Aurelien van Delft (avd) 53c1295c8e [FIX] point_of_sale: skip recomputes on settings change
In v16 the configuration of a pos_config got moved from Point of Sale
to Settings, with new settings fields related to pos_config fields.
The create method got overriden in point_of_sale
to write values on the current pos_config
after the creation of the new settings.

The side-effect of doing so is that each creation of a res_config_setting,
i.e. after changing any given setting (pos-related or not), triggers a
write on ~50 fields of the current pos_config. Among those fields there are
modifying_relations fields that trigger recomputes on pos.order. Because
pos.order can grow quite big in some databases (> 200.000 pos.orders), it
makes it almost impossible to change any setting in these database. They
reach a TimeoutError on SaaS/SH.

To fix this, this commit filter pos_fields_vals to only write new
values on pos_config. If no value got changed since the last settings
creation, no write is triggered, and no recompute happens.

Because we are in the context of res.config.settings create, and all
the pos_config settings fields are related fields, everything should be
in cache and no (or very few) query should be executed when doing this
filtering.

opw-3547106
opw-3508239

closes odoo/odoo#148756

X-original-commit: 72f7c0d7d16a1b791bba61fd885261227f73d263
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Aurélien van Delft (avd) <avd@odoo.com>
2024-01-10 19:39:31 +00:00
2023-11-02 21:02:44 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%