pos_cache is used to speed up opening POS in databases with large number of
products. In some cases it's still not enough and thousands of records cannot be
cached in a single request, because reading information may take more time than
maximum allowed.
As a workaround, this commit adds posibility to split request into few small
requests. To activate the feature set system parameter
``pos_cache.limit_products_per_request`` to appropriate value depending on your
server capacity.
---
opw-2439347
closesodoo/odoo#66995
X-original-commit: fe7718d02f7539959616b0e6f56d4354c768339b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Originally written by Nicolas Seinlet <nse@odoo.com>. Provides
pos.config with a product.product cache.
This adds a ported and refactored pos_cache from odoo-extra:
- Adapt to changes in web and point_of_sale since 8.0
- Refactor the load_server_data function, so it isn't copy pasted but
cleanly patched into the load_server_data super.
- Make the cron inactive by default.
- Also remove retrying the write 5 times, when it fails we'll just have
to wait until the cron triggers again (an hour from then).
- Store the product.product fields and domain on pos_cache. When cache
is requested from the pos with a different field or domain it'll
automatically recompute. Necessary for when someone would install a
module that modifies these things in the pos after a cache has been
generated.
- Have multiple caches per pos_config per user
- Make the module adhere to the Odoo Coding Guidelines.