Commit Graph
5189 Commits
Author SHA1 Message Date
Nicolas Évrard 80ffcdea53 Read xxx2Many fields using the dotted notation
Closes #12856
2024-04-07 17:39:13 +02:00
Nicolas Évrard b973f371c8 Add a contextual read limit for related fields 2024-04-08 13:13:14 +02:00
Nicolas Évrard 2f29a24c9c Stop loading fields definition already known by the field 2023-12-18 19:19:39 +01:00
Cédric Krier 575ae00711 Use sequence ordered for view priority 2024-02-25 13:32:10 +01:00
Cédric Krier 0b431b0ce1 Do not mix base views and extensions
Closes #13056
2024-02-25 13:31:48 +01:00
Cédric Krier adb7243f0c Display XML ID on Log window
Closes #13055
2024-02-25 13:42:18 +01:00
Cédric Krier cd3395b233 Add email constructor from message 2024-02-21 21:43:50 +01:00
Cédric Krier c5d85c1a4f Order email multipart/alternative by increasing preferences
The html version is preferred over the plain text.

Closes #13049
2024-02-21 19:51:08 +01:00
Cédric Krier 3cc0bb6c15 Add send_message methods to sendmail
Closes #13048
2024-02-21 21:38:53 +01:00
Cédric Krier c5eb6248a9 Disable maxDiff for scenario asserts 2024-01-22 10:03:55 +01:00
Cédric Krier 9a4f3322ac Fallback to searching on rec_name for fmany2one only when value is a string
Like Many2One field, the implicit rec_name search should only apply to string
value otherwise it is on the target id.
2024-04-07 12:16:54 +02:00
Cédric Krier 79fabdfd1f Normalize logging message when deleting old XML records
Closes #13007
2024-02-06 15:43:10 +01:00
Cédric Krier 229e30286a Use fromisoformat to parse date when importing data 2024-03-27 12:37:24 +01:00
Cédric Krier 9d27f8b951 Do not use sub-query with target table of Many2One for id only clause
Closes #13121
2024-03-22 22:40:09 +01:00
Cédric Krier ff7cd065ad Add module Many2One 2024-02-25 13:49:05 +01:00
Cédric Krier a42777834e Add model Many2One on ir.action.wizard 2024-02-25 16:23:30 +01:00
Cédric Krier b83ad6695a Add model Many2One on ir.action.act_window 2024-02-24 18:04:11 +01:00
Cédric Krier 51b1c05832 Add model Many2One on ir.action.report 2024-02-25 16:23:50 +01:00
Cédric Krier dc1f2df99e Add model Many2One on ir.model.data 2024-02-24 17:43:15 +01:00
Cédric Krier 302e92783c Add model and field Many2One on ir.ui.view_tree_width 2024-02-22 17:49:34 +01:00
Cédric Krier 2502e07bb3 Add children field Many2One on ir.ui.view 2024-02-22 17:39:16 +01:00
Cédric Krier c18c7dd927 Add model Many2One on ir.ui.view 2024-02-24 00:13:24 +01:00
Cédric Krier 80b61a9f63 Store model on ir.rule.group 2024-02-25 13:45:21 +01:00
Cédric Krier 5448a91bf7 Store model on ir.model.button 2024-04-06 10:48:45 +02:00
Cédric Krier 122a45b167 Store model and field name on ir.model.field.access 2024-04-06 11:04:15 +02:00
Cédric Krier 9193a425d1 Store model name on ir.model.access 2024-04-06 14:10:01 +02:00
Cédric Krier b60f0b7044 Store model name on ir.model.field 2024-02-23 18:40:52 +01:00
Cédric Krier 0dffe1087c Add fmany2one field
Closes #13051
2024-02-22 17:36:51 +01:00
Cédric Krier e0f11efc94 Allow creation of foreign key on non primary key 2024-02-22 19:08:43 +01:00
Cédric Krier e4a386c316 Instantiate pool in the initialization thread
Since 30429d744d29 the pool instance is stored per thread so to initialize a
pool within a thread, the instance must have been created in the same thread.
2024-04-03 09:48:48 +02:00
Cédric Krier 3f72367f13 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
2024-04-01 16:18:13 +02:00
Cédric Krier 85da55352e Setup a database for CacheTestCase
Since 8616fb62c5e9 some tests are decorated with transaction so the test case
needs a database to run.
2024-04-01 12:27:33 +02:00
Cédric Krier 82c1583112 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
2024-03-28 09:25:55 +01:00
Cédric Krier e95057981d 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.
2024-03-13 08:42:10 +01:00
Cédric Krier 02bbbc6549 Silent exit of cron and worker with keyboard 2024-02-04 20:51:05 +01:00
Nicolas Évrard 00f81cf62f Limit search for NULL rows when adding a NOT NULL constraint 2024-03-05 16:08:19 +01:00
Cédric Krier 2837108682 Use operators when converting PYSON to string
Closes #12986
2024-03-09 01:41:54 +01:00
Cédric Krier 4e75c63e51 Include context information in access error
We include the date/time when the access error may be due to history and
user's groups when it depends on it.

Closes #12670
2024-01-29 13:18:30 +01:00
Cédric Krier ec5a00c82e Make pool initialization atomic
An instance of pool is created per thread and it stores a reference to the
current pool values.
When the pool is initialized, a temporary reference is set on the instance so
only the values for this thread is modified. Once the initialization is
complete, the new pool value replace the global values.
Each instances is refreshed with the global values after the pool has been
stopped.

Closes #11401
2024-03-06 18:28:38 +01:00
Cédric Krier 88ac130d2f Remove readthedocs 2024-02-18 18:35:54 +01:00
Cédric Krier 2dde73b737 Unify help text of command line 2024-01-26 00:09:37 +01:00
Cédric Krier 25b8316733 Use EmailMessage to construct emails
Closes #12958
2024-01-25 16:04:05 +01:00
Cédric Krier ea53fb3ce8 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
2024-02-12 11:59:13 +01:00
Cédric Krier 53460ad511 Add duration in logging message of with_pool decorator
This applies the same design as 180997544b2e did to the dispatcher.
2024-02-06 14:17:10 +01:00
Cédric Krier ffaa3f096c Clear transaction tasks on retry of with_transaction decorator
Closes #13008
2024-02-06 13:26:34 +01:00
Cédric Krier f02c9cf04c 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
2024-02-06 12:59:00 +01:00
Cédric Krier 53a383db4d Restore passing activatedeps to load_modules when initialize to Pool
e00d867eda85 removed the argument.

Closes #13000
2024-02-05 12:59:35 +01:00
Cédric Krier 9cc7de53e6 Compare original functions to compute access of table query models
The bound methods are different because they are bounded to different classes.

Closes #12965
2024-01-29 11:35:16 +01:00
Cédric Krier 122dd1aa57 Apply access rights only on resource record linked to an instance
Closes #12977
2024-01-30 17:09:22 +01:00
Dani Möller bd54284d6f Use processing pool and selector as context managers
Delegate closing both resources to the with instruction.
2024-02-04 19:45:59 +01:00