Commit Graph
5141 Commits
Author SHA1 Message Date
Nicolas Évrard 2e1bf05ff7 Use English when fetching records from the database
Closes #13204
(grafted from f4d5c22dd02905eb6007b5661d720147ee6ce1fe)

--HG--
branch : 7.0
2024-04-18 19:00:34 +02:00
Cédric Krier 1463aa57e8 Increase version number
--HG--
branch : 7.0
2024-05-01 11:09:20 +02:00
Cédric Krier a2a61fb5dc Prepare release trytond-7.0.11
--HG--
branch : 7.0
2024-05-01 11:09:03 +02:00
Cédric Krier d92c741136 Compute cache key for record rules using all models
As model can inherit the access rules from another, the key must include the
keys of those other models.

Closes #13162
(grafted from b04f36d27c78663851f6859e266aac203afd7600)

--HG--
branch : 7.0
2024-04-17 20:22:10 +02:00
Adrià Tarroja Caubet 8d9773f85b Clear view toolbar cache when email templates are modified
Closes #13072
(grafted from aaced85022248371ebea50482914d5df13bb477e)

--HG--
branch : 7.0
2024-04-21 17:29:41 +02:00
Cédric Krier 29c8790c40 Prevent to get user_id from request without view_args
If user_id is accessed before view_args has been setup, we should not cache
`None` as value but instead raise an exception.
The `user_id` may be accessed before the mapping if the request is logged
because the representation of the request used the `rpc_method` which needs to
parse the request data. But since 1923117e935d parsing compressed content is
only allowed for request with `user_id`.
So we can no more include the `rpc_method` is the request has not yet been
mapped and so it has a `view_args`.

Closes #13203
(grafted from 0630029c1d5a0a2c7bd45086957f2e0fbed4c427)

--HG--
branch : 7.0
2024-04-18 19:28:04 +02:00
Cédric Krier e41c237bc0 Use function to not copy custom report content
The Function fields are not copied so it is the storage field that must have a
default value.

Closes #13170
(grafted from 96d629fe11a710b395d9981881c5dfda1674becf)

--HG--
branch : 7.0
2024-04-13 15:00:52 +02:00
Cédric Krier 2cf3c4a317 Test if queue batch is boolean
In Python bool type is a subtype of integer so it must be tested first.
Also by converting other types to int, we catch any other wrong types.

Closes #13133
(grafted from 2c7c6983eecc716cddc3dcfce7c417e902257df0)

--HG--
branch : 7.0
2024-04-13 14:20:21 +02:00
Cédric Krier 4c1cb2a9d3 Remove ending commit when loading modules
The commit call was added by a6624f31ff20 to release lock because Cache.resets
was called inside the transaction.
But Cache.resets was removed in a83631f4ba67 and Cache does not create any new
transaction since.
And since 2fd8c5f88265 the transaction is even committed only on module
update.
(grafted from 0548d73c7ce3b4e07b6b76007f2592ed2be945ff)

--HG--
branch : 7.0
2024-03-13 08:42:10 +01:00
Cédric Krier c1a2c5d09b Increase version number
--HG--
branch : 7.0
2024-04-17 12:27:55 +02:00
Cédric Krier 602eb45e07 Prepare release trytond-7.0.10
--HG--
branch : 7.0
2024-04-17 12:27:38 +02:00
Cédric Krier 16d36f2390 Do not accept compressed content from unauthenticated request
Closes #13142
(grafted from 1923117e935de62276352585185ced6d854bcb3d)

--HG--
branch : 7.0
2024-04-17 10:19:58 +02:00
Cédric Krier ab9d451c40 Do not commit new transaction for database error processing
(grafted from 15d80de804c51a5557fae817f697201f08abfa99)

--HG--
branch : 7.0
2024-04-02 00:34:25 +02:00
Nicolas Évrard 87b1e66f67 Use PYSON's Bool evaluation for PYSON's Not evaluation
Closes #13096
(grafted from 009133813b11f264b5e038dc9c5912dc9e0101cb)

--HG--
branch : 7.0
2024-03-11 16:35:39 +01:00
Cédric Krier 3a579caff2 Catch exception before the cron transaction is ended
To rollback the transaction must be done before the context manager calls stop
on exit.

Closes #13149
(grafted from 02ef3e349808c73a260ab7e83fea4eb66f37bd02)

--HG--
branch : 7.0
2024-04-01 16:18:13 +02:00
Cédric Krier c52843b183 Setup a database for CacheTestCase
Since 8616fb62c5e9 some tests are decorated with transaction so the test case
needs a database to run.
(grafted from b2b78cdd6c19340652eb27ceaac620c940030a5d)

--HG--
branch : 7.0
2024-04-01 12:27:33 +02:00
Cédric Krier 50c9dd34e0 Do not round Decimal to validate digits
Decimal may raise an InvalidOperation error if the context does not allow the
needed precision.
But rounding is not necessary for Decimal as we can just test the exponent
from the tuple version.

Closes #13138
(grafted from 776889be97e4c1b8917a9090338511d8008c625b)

--HG--
branch : 7.0
2024-03-28 09:25:55 +01:00
Cédric Krier 05da1a327a Increase version number
--HG--
branch : 7.0
2024-04-04 09:37:49 +02:00
Cédric Krier e0ff82e073 Prepare release trytond-7.0.9
--HG--
branch : 7.0
2024-04-04 09:37:31 +02:00
Cédric Krier 358e305c13 Do not stop pool on refresh if modules list is empty
A Pool.refresh may be triggered on Pool.init if a cache listener is started by
the new transaction of load_modules. In such cache the pool is empty just
after the init.

Closes #13101

--HG--
branch : 7.0
2024-03-17 18:10:19 +01:00
Cédric Krier c4d4951525 Remove readthedocs
(grafted from 2f67994e59b0bca29d7b0632a51540774b109140)

--HG--
branch : 7.0
2024-02-18 18:35:54 +01:00
Cédric Krier d3caafdf78 Increase version number
--HG--
branch : 7.0
2024-03-03 12:59:44 +01:00
Cédric Krier 0b4f9bdb5a Prepare release trytond-7.0.8
--HG--
branch : 7.0
2024-03-03 12:59:24 +01:00
Cédric Krier ae84e0a539 Test number of dots in name before computing unique value from a domain
The type of value may not correspond with the single_value parameter if the
domain does not apply directly to the field but to a nested field.

Closes #12843
(grafted from 411d5752ff2a1283d65fb457a5c9ac2f399dafb0)

--HG--
branch : 7.0
2024-02-12 11:59:13 +01:00
Cédric Krier 577aceda8d Clear transaction tasks on retry of with_transaction decorator
Closes #13008
(grafted from 6ba5facee41af77e391409382d9aef7a6b4b576a)

--HG--
branch : 7.0
2024-02-06 13:26:34 +01:00
Cédric Krier 7b651a5e51 Lock table at transaction start for with_transaction decorator
Since c8771e45b861 TransactionError is raised if a table is not locked at the
transaction start. The decorator must manage such exception in case the
decorated route needs to lock a table.

Closes #12962
(grafted from bced72f6282bbb1ec2c58e7af25ca1e5a941b82f)

--HG--
branch : 7.0
2024-02-06 12:59:00 +01:00
Cédric Krier 78a5739426 Increase version number
--HG--
branch : 7.0
2024-02-15 19:25:43 +01:00
Cédric Krier f50a9a91df Prepare release trytond-7.0.7
--HG--
branch : 7.0
2024-02-15 19:23:01 +01:00
Cédric Krier a7587cc7c3 Compare original functions to compute access of table query models
The bound methods are different because they are bounded to different classes.

Closes #12965
(grafted from 6bea752604b46675e2c237485d7b7bec2b09d191)

--HG--
branch : 7.0
2024-01-29 11:35:16 +01:00
Cédric Krier 813dff1729 Apply access rights only on resource record linked to an instance
Closes #12977
(grafted from 0fc48efcc5609f5e195e2d57516c2575dc6d3f34)

--HG--
branch : 7.0
2024-01-30 17:09:22 +01:00
Cédric Krier 3bef7eff33 Define explicitly escape char used for like operators
For now we rely on the default value set by python-sql but SQL-92 does not
define a default value.

Closes #12933
(grafted from 659160cd1681a6a1bc98d51a97d7765ee8d31714)

--HG--
branch : 7.0
2024-01-14 13:32:27 +01:00
Cédric Krier 74c572f0b5 Increase version number
--HG--
branch : 7.0
2024-02-03 11:57:09 +01:00
Cédric Krier 1cc9d1e1da Prepare release trytond-7.0.6
--HG--
branch : 7.0
2024-02-03 11:56:40 +01:00
Cédric Krier e758ce2b9b Add template filters after being cached
The MemoryCache copy the stored template since 7bbbb91621ab but Genshi
Template clear the filters when copied.

Closes #12963
(grafted from 3111fe5130705da70e46b07e4b7cb47012430964)

--HG--
branch : 7.0
2024-01-28 00:34:12 +01:00
Cédric Krier f7c397191f Prevent modify mutable cached value
The cached values are copied when set and copied again when returned so the
stored values can never be modified.

Closes #9558
(grafted from 7bbbb91621ab3759dfdc04de3aa1754c89ef145d)

--HG--
branch : 7.0
2024-01-15 23:48:50 +01:00
Cédric Krier d0b8a38529 Find module paths using entry points
Closes #12900
(grafted from d9ef251eee77a95b3f0c5be9c6c036790072439f)

--HG--
branch : 7.0
2024-01-05 19:57:49 +01:00
Cédric Krier 3bfd7e0ba9 Display the actual wrong ids in domain rule error message
Closes #12907
(grafted from 4ebe825f8202d35630c08b0fbd5d1c93bd9124c3)

--HG--
branch : 7.0
2024-01-07 19:11:58 +01:00
Cédric Krier b3db04b8a8 Increase version number
--HG--
branch : 7.0
2024-01-16 00:08:08 +01:00
Cédric Krier 457a9a34e1 Prepare release trytond-7.0.5
--HG--
branch : 7.0
2024-01-16 00:07:49 +01:00
Cédric Krier f5d11ae7c2 Do not fail to get keyword action with empty record id
Closes #12767
(grafted from 9b28b3b64550681b1ff2b37c7dcaa82874032c42)

--HG--
branch : 7.0
2023-12-23 18:50:58 +01:00
Cédric Krier 2c17cfba48 Instantiate list of ids when exporting data with domain as list of ids
Closes #12868
(grafted from 645ee58d8a4ae278cd2613ff2b16cc0b859046a8)

--HG--
branch : 7.0
2023-12-23 18:26:00 +01:00
Cédric Krier 734a8438d3 Increase version number
--HG--
branch : 7.0
2024-01-01 13:01:24 +01:00
Cédric Krier 46c98dada8 Prepare release trytond-7.0.4
--HG--
branch : 7.0
2024-01-01 13:01:05 +01:00
Cédric Krier bf4f274278 Check selection of dict schema when selection or help selection are modified
It is the modification of stored field that must be checked and not the json
version.

Closes #12781
(grafted from 4f04e2409fad82de243439bac3128c1002d540ee)

--HG--
branch : 7.0
2023-12-17 20:33:32 +01:00
Cédric Krier 6c0fd494ed Use empty value Function xxx2Many fields without initial value
Since d142b33fa3ab the on_change_with relies on _changed_value. But for
Function xxx2Many fields if their value is not in the initial value, we should
not retrieve it from the database because the result will be the same as the
one set by on_change_with.

Closes #12836
(grafted from 13d2870d43c833a8629b451edd82ac2efdc27009)

--HG--
branch : 7.0
2023-12-15 18:09:30 +01:00
Cédric Krier d4660a701a Compare leaf values only of the same type to sort domain
Closes #12792
(grafted from cb0f2181f6188f8a920e591f0d27a2dac6be5678)

--HG--
branch : 7.0
2023-12-12 18:02:14 +01:00
Cédric Krier 877beba54a Increase version number
--HG--
branch : 7.0
2023-12-16 10:50:26 +01:00
Cédric Krier 372b3fe57d Prepare release trytond-7.0.3
--HG--
branch : 7.0
2023-12-16 10:50:06 +01:00
Cédric Krier 8ac6e71297 Always pass the field name to convert value from getter of Function field
Closes #12802
(grafted from 90893adeec8f5866375bae97084ee00080d8aeb3)

--HG--
branch : 7.0
2023-12-05 12:33:33 +01:00
Hartmut Goebel d30092792a 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 : 7.0
2023-11-19 12:16:03 +01:00