| Age | Commit message (Collapse) | Author |
|
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
closes odoo/odoo#66539
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
|
|
When adding a product to the order, the total will be updated but the
orderline will not be displayed
To reproduce the error:
1. Go to Point Of Sale
2. New Session
3. Click on a product so it will be added to the order
Err: The order's total is correctly updated but the line is not
displayed.
When displaying an orderline, the system wants to use the product's unit
name (`t-esc="props.line.get_unit().name"`). To do so, it uses one
specific variable of the current product, `pos`:
https://github.com/odoo/odoo/blob/abff1ca94bcc829250b63fd9677890988b796819/addons/point_of_sale/static/src/js/models.js#L1518-L1528
When using the standard Point of Sale, this variable is added on products
loading (L446) :
https://github.com/odoo/odoo/blob/abff1ca94bcc829250b63fd9677890988b796819/addons/point_of_sale/static/src/js/models.js#L438-L448
However, this variable is not set when using the pos_cache module.
OPW-2431221
closes odoo/odoo#64380
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
|
|
STEPS:
* install pos_cache in clean database without demo
* open pos
* click OK on popup "Would you like to load demo data"
closes odoo/odoo#62955
Before: error, products are not loaded even after refreshing
After: no errors, products are loaded
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
|
|
|
|
Since changes made on 'product.product' model in rev: 30e4d89a62c21e76db651ca54f8c132b96e7668d
the domain is not represented as a string, but as a function, and that
leads to error as the javascript function is sent to the server instead
of a string representing a domain.
So we check the type of domain to see if we have to evaluate a function
or send the domain as a string
closes odoo/odoo#34453
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
|
|
Otherwise, when rendering the 'Product' template it crashes when calling
the 'get_price' method.
Indeed, we need to add products as a Product model instead of as a plain
JS object.
|
|
The RPC system was not completely satisfactory, we decided to prepare
the future and do it properly. This commit introduces the new rpc
system, which replace the previous new one. We now simply have a
method, this._rpc, which takes a dictionary of parameters. The idea is
that depending on the parameters, it is able to add correct default
value when necessary.
For situations where we don't have the this._rpc method, we can use the
rpc.query method, which takes the same arguments, but directly calls
ajax.rpc instead of triggering up some events.
|
|
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
|
|
Use this.rpc instead of Model object, with web.ajax if necessary.
nb: EventDispatcherMixin include now the custom_events managment instead
of widget
|
|
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.
|