Commit Graph
7 Commits
Author SHA1 Message Date
Michael (mcm) 4ce19e0c37 [IMP] web: add loadFields fn to view service
This commit adds a function `loadFields` to the view
service to load the fields of a given model and cache them.

Part-of: odoo/odoo#96852
2022-08-03 11:06:30 +02:00
Laurent Smet a7990134ee [FIX] web: Prevent 'load_views' caused by default values inside the context
The use case is the following:
- Create a kanban view
- Customize it to open a form view on the right when clicking on a kanban card
- The form view is initialized using the context with a 'default_...' key to set a field.
=> Since the context is different every time, the 'load_views' rpc call is always triggered, leading to performance issues.

Task: 2555114
Part-of: odoo/odoo#91448
2022-06-07 10:16:12 +02:00
Julien Mougenot bcc5a6efbf [IMP] web: legacy view adapter
Part-of: odoo/odoo#91448
2022-06-07 10:16:11 +02:00
tsm-odoo c23f85903a [IMP] mail, *: use pyEnv in the mockServer
Now that pyEnv is available, using it in the mock_server lighten the syntax.

task-2582313

closes odoo/odoo#90783

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-13 11:59:58 +02:00
Aaron Bohy f573e93bb2 [REF] web,mail: adapt code to new load_views API
Part-of: odoo/odoo#87522
2022-04-29 09:57:44 +02:00
Mathieu Duckerts-Antoine b134c1e45e [REF] web: new view service API
We simplify and document the view service API.
2021-08-16 12:53:50 +00:00
Lucas Perais (lpe) 0195d8e7b4 [FIX] web: view_service: store the Promise in cache, not its result
Before this commit, the result of the load_views was put in the cache, so a load_views could have been
triggered multiple times before the first of them returned

After this commit, the cahce works as expected and stores the whole Promise
We always delete from the cache Promises that are rejected (to let the user re-do it in the hope the situatuion has changed)
2021-06-18 21:31:34 +02:00