Commit Graph
4662 Commits
Author SHA1 Message Date
Cédric Krier a61494e8a8 Increase version number
--HG--
branch : 6.0
2023-12-16 10:51:26 +01:00
Cédric Krier 5675414be1 Prepare release trytond-6.0.39
--HG--
branch : 6.0
2023-12-16 10:51:11 +01:00
Hartmut Goebel 2ca461397f Make state node of workflow graph unique
Quite a few model have states with the same name (e.g. "open",
"close).  When creating Workflow Graphs for several of these models at
once, the nodes of these states must be distinguished.  Otherwise the
graphs will overlap and eventually even overwrite each other.

Closes #12253
(grafted from 91a09102ec61a08f57868bc9f030fdcb9ab831c8)

--HG--
branch : 6.0
2023-11-19 12:16:03 +01:00
Nicolas Évrard 05a1cf6707 Do not start threads before the end of the evaluation of trytond.application
When uwsgi forks workers it can happen that python execute the code from one of
the launched thread (eg: the cache listener or trytond-status). In that case
python will keep executing the thread and never switch to the main thread. Thus
preventing to listen for incoming connections.

Closes #12758
(grafted from d51b0990639d7ca0ac289dc08f56fd84a14e3e89)

--HG--
branch : 6.0
2023-11-16 23:37:19 +01:00
Cédric Krier 99fb574dfd Limit size of database cache dump to 40 chars
Each backend has their limit. 40 chars is picked as limit to match the size of
mercurial hash.

Closes #12754
(grafted from 3055098129d4afbf82af5fa527e3d3e357ea7021)

--HG--
branch : 6.0
2023-11-26 17:12:40 +01:00
Nicolas Évrard 888653e08d Filter history lines matching search when they're too old
Closes #12687
(grafted from f7ff1a181c0d031ea10fea722fa781885f0aec73)

--HG--
branch : 6.0
2023-11-03 19:07:11 +01:00
Cédric Krier 7b92ab380a Increase version number
--HG--
branch : 6.0
2023-11-17 19:33:10 +01:00
Cédric Krier d153811c9a Prepare release trytond-6.0.38
--HG--
branch : 6.0
2023-11-17 19:32:53 +01:00
Cédric Krier 71b8ab0f2d Avoid race condition when making directories for database cache
(grafted from b67ad422ba5062b82ffc5022cc6490564af2477f)

--HG--
branch : 6.0
2023-11-01 13:27:36 +01:00
Cédric Krier 6a73f7423e Avoid race condition when making directories for filestore
Closes #12696
(grafted from a1e568d36b05a33a91c6515cef6a4695429d7566)

--HG--
branch : 6.0
2023-11-01 13:26:37 +01:00
Cédric Krier da2f6fcbd0 Increase version number
--HG--
branch : 6.0
2023-11-03 17:46:52 +01:00
Cédric Krier 9e75ccd57a Prepare release trytond-6.0.37
--HG--
branch : 6.0
2023-11-03 17:46:35 +01:00
Cédric Krier 166280687c Prevent storing Decimal with too much trailing zero
The trailing zero are kept in the Decimal and rendered in the string
representation which is unexpected for a field with limited digits.

Closes #12587
(grafted from cfbc9e902c1d5f9bc299b536b495a98fda380369)

--HG--
branch : 6.0
2023-10-21 14:12:12 +02:00
Cédric Krier 87086931cc Use assert_not_called in Mock instead of calling not_called
(grafted from b097604b69b899117a9d3c00c3fdae8487356e48)

--HG--
branch : 6.0
2023-10-23 09:34:26 +02:00
Cédric Krier 343a431b8b Do not include depends of field without read access to view definition
Closes #12640
(grafted from b41c36a66c64974a8c5965cd111526df1574c2b1)

--HG--
branch : 6.0
2023-10-12 16:28:54 +02:00
Cédric Krier 24058779c6 Return None when date_trunc is called with NULL in SQLite
Closes #12649
(grafted from 20cdeff55e33886505d9d627b06c5943683653da)

--HG--
branch : 6.0
2023-10-17 17:09:36 +02:00
Maxime Richez a8d28ddca8 Allow to send email without files to attach
Closes #12645
(grafted from 177d9695220f1ec64eab311e11ff7c97b1880cfb)

--HG--
branch : 6.0
2023-10-16 16:48:40 +02:00
Cédric Krier ae29cc72c5 Do not store in transaction cache instances of Reference fields
If the target of the Reference field is deleted, the transaction cache is not
cleared because there is no "ON DELETE" support for Reference field. Instead
the ids are checked in the Reference.get method.

Closes #12599
(grafted from 7f25936732310704ad6296d5ab3f35e3276e2157)

--HG--
branch : 6.0
2023-09-28 17:44:29 +02:00
Cédric Krier b6bf82de3d Do not uniquely sort list in Dict field without schema
When there is no schema, the list values are not for a MultiSelection entry.

Closes #12417
(grafted from aedd6a22eabc62538664c0127739ac02acd8f429)

--HG--
branch : 6.0
2023-07-19 22:02:49 +02:00
Cédric Krier 34dd5b884a Store a copy of reference selection
Same as #810 but for reference fields
(grafted from cc8fc33b72a49ecaef2904761bff3e454da96275)

--HG--
branch : 6.0
2023-06-21 10:59:55 +02:00
Cédric Krier 7e545e6df4 Do not set rec_name for unsaved record
Since 0db956eb2505 _changed_value is used for on_change_with calls, so it can
have to deal with unsaved Many2One value if it is the parent of a One2Many.
(grafted from 206e247e16437dc8b2f1989cc13b7e48a1d0dfc7)

--HG--
branch : 6.0
2023-09-11 22:02:27 +02:00
Cédric Krier a0d1049c25 Increase version number
--HG--
branch : 6.0
2023-10-04 23:56:45 +02:00
Cédric Krier c23d7b0e73 Prepare release trytond-6.0.36
--HG--
branch : 6.0
2023-10-04 23:56:28 +02:00
Cédric Krier 7b0b7292aa Use fallback value for charset, url_charset and encoding_errors
Werkzeug 3.0 removes those attributes.

Closes #12604
(grafted from 0f5c7ceb4ea70a844ee660a678cc0b2b4643167e)

--HG--
branch : 6.0
2023-09-30 19:55:24 +02:00
Cédric Krier 9b1e4278e3 Convert pattern values into boolean when matching boolean field
Closes #12504
(grafted from b09b54e3915c92d465537bab02d66d559bce4295)

--HG--
branch : 6.0
2023-08-18 17:06:26 +02:00
Cédric Krier 0fb839771d Do not skip many2many in _changed_values
Like the one2many they should always be processed as they can have been
updated.

Closes #12474
(grafted from f45d89eb8048c28887d2e282a5dc7604bc8d9846)

--HG--
branch : 6.0
2023-08-16 11:37:12 +02:00
Cédric Krier e09c7bf5c8 Do not fail to copy empty list of ModelStorage
Closes #12541
(grafted from 45a5fa2e5df6a0f153f1c3682513c02e81639d45)

--HG--
branch : 6.0
2023-09-04 16:41:33 +02:00
Nicolas Évrard 90f4274dbf Use source of translation in the unique_key of Translation objects
Closes #12467
(grafted from 0917dd05a3105fa45b9699562d5da44e00d1c383)

--HG--
branch : 6.0
2023-08-11 18:40:32 +02:00
Cédric Krier 97f414695f Increase version number
--HG--
branch : 6.0
2023-09-06 22:58:57 +02:00
Cédric Krier 98bdc2908d Prepare release trytond-6.0.35
--HG--
branch : 6.0
2023-09-06 22:58:39 +02:00
Cédric Krier 36aa3a5aed Discard disconnected connection from the pool
When a connection in the pool is disconnected, it stays in the pool and it may
still be served.
Using such connection raise an OperationalError and so the request is retried
but before that the connection is put back to the pool. So we may get it back
again.
It is not possible to distinct between an OperationalError due to a
disconnection or due to a isolation error for example.
So with the current design of Transaction API, an OperationalError always put
back the connection to the pool.
This main that we can only ensure that the connections served are still
connected by executing a simple query. And close connections that are failing.

Closes #12452
(grafted from f8aaf62a0c7508e3f3398e47dc2b86e6f8f06cc0)

--HG--
branch : 6.0
2023-08-04 15:59:35 +02:00
Cédric Krier 944afc59ff Add .readthedocs.yaml configuration [skip ci]
This is required by Read the Docs service:
https://blog.readthedocs.com/migrate-configuration-v2/

Closes #12344
(grafted from ffef63a3959b55756c395ebfd3ee1224f4dc7611)

--HG--
branch : 6.0
2023-08-06 19:31:44 +02:00
Cédric Krier cb850dd05b Increase version number
--HG--
branch : 6.0
2023-07-31 17:08:14 +02:00
Cédric Krier c5999897d1 Prepare release trytond-6.0.34
--HG--
branch : 6.0
2023-07-31 17:07:59 +02:00
Cédric Krier 88abcdddd1 Read ids from the table even without columns if a rule domain exists
The rule must be enforced also when only non SQL type fields are read.

Closes #12428
(grafted from bd69f1025bca6648fd9ff11f585a60214d2bbf6e)

--HG--
branch : 6.0
2023-07-23 10:18:04 +02:00
Cédric Krier f9908ca812 Do not fail on ValueError when formatting message with gettext
If wrong variables are used to call gettext, the formatting may raise a
ValueError. It is better to not fail for such minor error when not testing.

Closes #12371
(grafted from 47809a507263c47b927c318750f22499adecd036)

--HG--
branch : 6.0
2023-07-15 00:40:59 +02:00
Nicolas Évrard 751292ea1d Clear caches after commit when installing modules
A call to clear_all is required after the commit in order to ensure that the
transaction uses an empty cache from this point. clear_all is not required to
prevent the deadlock on ir.cache because the rollback ensures that nothing
changed from the point of view of this transaction.

Close #12343
(grafted from 48396d9cfed6caccb3fca6d981fec5016a1f6ca2)

--HG--
branch : 6.0
2023-07-14 18:50:44 +02:00
Cédric Krier c38f44dc10 Document on_change methods under ModelView instead of Model
(grafted from a379ef0e1567383579001994c4c11f9cd711ad62)

--HG--
branch : 6.0
2023-07-04 18:39:28 +02:00
Cédric Krier 90eac45ba9 Skip child position of exported data based on field names
When exporting data of a xxx2Many field, the column to skip should be based on
the child field names instead of the exported value (which can be 0 for
example).

Closes #12316
(grafted from a91e1a9f95ca2b22d4ce5372b1753999d03aa8af)

--HG--
branch : 6.0
2023-06-08 18:42:07 +02:00
Cédric Krier 5264c5745d Prevent None value in selection of MultiSelection
Closes #12313
(grafted from 470a28314f49c5c02112d17fa95f0ef5941626c0)

--HG--
branch : 6.0
2023-06-30 00:18:00 +02:00
Cédric Krier 17d1629087 Use proper module prefix for msg_dict_schema_help_selection_help
(grafted from d223f6f40c6aac3b47a26b90e70a8ca526ad1ee1)

--HG--
branch : 6.0
2023-06-13 15:52:27 +02:00
Cédric Krier 50d1d63e3e Increase version number
--HG--
branch : 6.0
2023-06-21 19:11:32 +02:00
Cédric Krier cec8fd81e0 Prepare release trytond-6.0.33
--HG--
branch : 6.0
2023-06-21 19:11:15 +02:00
Cédric Krier 96a48f4910 Do not try to login if Authorization has no username
User application request has an Authorization header so an Authorization
instance is returned but it can not be used for login.

Closes #12312
(grafted from 0a4e13728c0a9bb24536cb1033d95ca6749a2b9d)

--HG--
branch : 6.0
2023-06-09 08:17:20 +02:00
Cédric Krier 3f5565bcc7 Parse authorization header for session scheme without token
Since Werkzeug >= 2.3, it always tries to parse the Authorization header as a
digest. If the session value which is encoded in base64 needs padding, the
trailing `=` are interpreted as header values and the token attribute is not
filled.
In this case we must parse ourself the Authorization header to decode the
base64 value as session.

Closes #12259
(grafted from 0bd0b8a0e20ad8d2f3d13cc8d879c78717817b7a)

--HG--
branch : 6.0
2023-05-08 13:21:10 +02:00
Cédric Krier d8f75ba1d6 Increase version number
--HG--
branch : 6.0
2023-05-17 22:33:47 +02:00
Cédric Krier 1da8788b71 Prepare release trytond-6.0.32
--HG--
branch : 6.0
2023-05-17 22:33:30 +02:00
Cédric Krier 00c943a727 Clear cache before commit each module
As the cache is rollback to avoid dead lock, the transaction commit could
restore cache version that is no more valid.
For example the language cache of `ir.translation` which is filled initially
with only English and then reset when other languages are created by the `ir`
module. So at the end of `ir` module load, the cache is reset to contain only
English as it was the content before the first cache reset. This prevents to
load any other language from other modules.
So to ensure the next module is loaded using a fresh cache, all the caches are
cleared.

Closes #12246
(grafted from 5f14ca66744e53cd1d6200dfd569c2dca19f99c6)

--HG--
branch : 6.0
2023-05-08 12:20:39 +02:00
Cédric Krier d1c67443ff Do not override deleted record instances by related records
(grafted from 5b67535bb4cdf07df76c15e6fb4b425f44f4ad23)

--HG--
branch : 6.0
2023-04-22 18:31:30 +02:00
Cédric Krier b38bb01a6f Do not update related records by foreign key if they are going to be deleted
Closes #3689
(grafted from a99b53347ecf5f6ffaff45b62086209b61e7ab72)

--HG--
branch : 6.0
2023-04-22 18:29:44 +02:00