<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/pos_cache/static/src, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] pos_cache: load products by batches</title>
<updated>2021-02-19T15:38:25+00:00</updated>
<author>
<name>Ivan Yelizariev</name>
<email>iel@odoo.com</email>
</author>
<published>2021-02-19T14:02:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fe7718d02f7539959616b0e6f56d4354c768339b'/>
<id>fe7718d02f7539959616b0e6f56d4354c768339b</id>
<content type='text'>
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 &lt;pimodoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;pimodoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] pos_cache: add pos to product</title>
<updated>2021-01-12T09:10:03+00:00</updated>
<author>
<name>Adrien Widart</name>
<email>awt@odoo.com</email>
</author>
<published>2021-01-12T08:52:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=cc2bd6717df379e87c9dfc485aa51f8dd33f6b76'/>
<id>cc2bd6717df379e87c9dfc485aa51f8dd33f6b76</id>
<content type='text'>
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 &lt;pimodoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;pimodoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] pos_cache: make it compatible with onboarding tool</title>
<updated>2020-12-07T14:12:51+00:00</updated>
<author>
<name>Ivan Yelizariev</name>
<email>iel@odoo.com</email>
</author>
<published>2020-12-07T12:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e669ea8a6a79fdf7e309b3191c9648c60179d195'/>
<id>e669ea8a6a79fdf7e309b3191c9648c60179d195</id>
<content type='text'>
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 &lt;pimodoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;pimodoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] pos_cache: migration to OWL framework</title>
<updated>2020-05-12T12:48:58+00:00</updated>
<author>
<name>Joseph Caburnay</name>
<email>jcb@odoo.com</email>
</author>
<published>2020-05-05T07:59:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e773761d1038aab944f91c233d50fe2c4fb3914b'/>
<id>e773761d1038aab944f91c233d50fe2c4fb3914b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] pos_cache: eval domain before sending it to server</title>
<updated>2019-06-28T14:05:58+00:00</updated>
<author>
<name>Pierre Masereel</name>
<email>pim@odoo.com</email>
</author>
<published>2019-06-28T14:01:59+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b9889e081e3ac0da12709e639bd2382dbca6a2e8'/>
<id>b9889e081e3ac0da12709e639bd2382dbca6a2e8</id>
<content type='text'>
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 &lt;pimodoo@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;pimodoo@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] pos_cache: Adapt JS code to ac89783d2f6c.</title>
<updated>2017-11-22T23:25:01+00:00</updated>
<author>
<name>Victor Tabuenca Calvo</name>
<email>vta@openerp.com</email>
</author>
<published>2017-11-21T15:26:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c3ce1d4f13735487963e81ccfb32d9182950e49d'/>
<id>c3ce1d4f13735487963e81ccfb32d9182950e49d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web, *: simplify our RPC system (in JS)</title>
<updated>2017-04-11T17:44:38+00:00</updated>
<author>
<name>Géry Debongnie</name>
<email>ged@odoo.com</email>
</author>
<published>2017-03-20T14:23:19+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2106e3dd2ecd61096d7c7531c2f18b00fb30aeea'/>
<id>2106e3dd2ecd61096d7c7531c2f18b00fb30aeea</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] *: use _rpc method for all rpcs</title>
<updated>2017-04-11T17:44:38+00:00</updated>
<author>
<name>Géry Debongnie</name>
<email>ged@odoo.com</email>
</author>
<published>2017-03-07T15:14:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=86a87aa8b0dde2237cfe1bb769724e8ed269b62e'/>
<id>86a87aa8b0dde2237cfe1bb769724e8ed269b62e</id>
<content type='text'>
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] web,*: remove 'web.model' and 'web.dataModel</title>
<updated>2017-04-11T17:44:38+00:00</updated>
<author>
<name>Géry Debongnie</name>
<email>ged@odoo.com</email>
</author>
<published>2017-03-05T08:34:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e5740270568404d71a3bc093074a085c9c2eded8'/>
<id>e5740270568404d71a3bc093074a085c9c2eded8</id>
<content type='text'>
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADD] pos_cache: add pos_cache ported to v9 from odoo-extra</title>
<updated>2015-09-25T10:47:29+00:00</updated>
<author>
<name>Joren Van Onder</name>
<email>jov@odoo.com</email>
</author>
<published>2015-02-11T09:18:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=97b0723722d8ebd3cbf5828c871da19f3d471187'/>
<id>97b0723722d8ebd3cbf5828c871da19f3d471187</id>
<content type='text'>
Originally written by Nicolas Seinlet &lt;nse@odoo.com&gt;. 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally written by Nicolas Seinlet &lt;nse@odoo.com&gt;. 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.
</pre>
</div>
</content>
</entry>
</feed>
