<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/point_of_sale/static/src/js/Misc/NumberBuffer.js, 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] point_of_sale: dot input should be recognized even at different lang</title>
<updated>2021-05-25T09:44:54+00:00</updated>
<author>
<name>Joseph Caburnay</name>
<email>jcb@odoo.com</email>
</author>
<published>2021-05-25T09:05:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a37935b466e3d74e08d5ea41047185144e8e5b6f'/>
<id>a37935b466e3d74e08d5ea41047185144e8e5b6f</id>
<content type='text'>
Language such as FR recognizes `,` as the decimal separator. However, it is
possible that the keyboard setting is American so the decimal point in the
numpad will send `.` when pressing it. POS should be able to recognize both.
This fix allows `.` sent from keyboard to be interpreted as decimal separator
even at language where the decimal separator is `,`. This is okay because
number inputs in POS doesn't take into account the thousand separator.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Language such as FR recognizes `,` as the decimal separator. However, it is
possible that the keyboard setting is American so the decimal point in the
numpad will send `.` when pressing it. POS should be able to recognize both.
This fix allows `.` sent from keyboard to be interpreted as decimal separator
even at language where the decimal separator is `,`. This is okay because
number inputs in POS doesn't take into account the thousand separator.</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] point_of_sale: fix decimal button in lang with not dot decimal</title>
<updated>2020-10-12T09:26:31+00:00</updated>
<author>
<name>Anh Thao Pham (pta)</name>
<email>pta@odoo.com</email>
</author>
<published>2020-10-09T14:16:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a1543d2a283000e2955df5f8131bae5e25e110c0'/>
<id>a1543d2a283000e2955df5f8131bae5e25e110c0</id>
<content type='text'>
- Activate debug mode
- Go to Settings &gt; Translations &gt; Languages
- Activate and switch to a language that does not use dot (.) as decimal separator (i.e. French)
- Go to a POS session
- Select a Product, edit the price with a decimal via the Numpad widget
The decimal is not taken into account.

This is due to the fact that the entered input ('.') is not considered as the decimal point
in this language (i.e. ',') and is skipped.
The same issue happens for quantity and discount.

The dot in the Numpad widget has been replaced by the decimal separator of the language.
Also "field_utils.parse.float" has to be used instead of "parseFloat" because "parseFloat" only
recognizes a dot as separator. (i.e. "parseFloat" returns 12.00 for "12,99")
Howerver "parseFloat" is still useful for checking values as "field_utils.parse.float" returns
an error if its parameter is not a string or if the parsed result is not a number.

opw-2357848

closes odoo/odoo#59665

Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Activate debug mode
- Go to Settings &gt; Translations &gt; Languages
- Activate and switch to a language that does not use dot (.) as decimal separator (i.e. French)
- Go to a POS session
- Select a Product, edit the price with a decimal via the Numpad widget
The decimal is not taken into account.

This is due to the fact that the entered input ('.') is not considered as the decimal point
in this language (i.e. ',') and is skipped.
The same issue happens for quantity and discount.

The dot in the Numpad widget has been replaced by the decimal separator of the language.
Also "field_utils.parse.float" has to be used instead of "parseFloat" because "parseFloat" only
recognizes a dot as separator. (i.e. "parseFloat" returns 12.00 for "12,99")
Howerver "parseFloat" is still useful for checking values as "field_utils.parse.float" returns
an error if its parameter is not a string or if the parsed result is not a number.

opw-2357848

closes odoo/odoo#59665

Signed-off-by: Nicolas Martinelli (nim) &lt;nim@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] point_of_sale: random runbot errors due to NumberBuffer abstraction</title>
<updated>2020-08-25T10:05:06+00:00</updated>
<author>
<name>Joseph Caburnay</name>
<email>jcb@odoo.com</email>
</author>
<published>2020-08-24T16:16:44+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f53384f7af1ad36e7f3809d904a9653d37c071ef'/>
<id>f53384f7af1ad36e7f3809d904a9653d37c071ef</id>
<content type='text'>
The new randomly occurring runbot errors in pos/* can be reproduced by
performing quick successive clicks in numpad widget with the following form:

    1. Press 'Price' button.
    2. A number input.
    3. Press 'Qty' button.
    4. A number input.

The goal of the above steps is to set the price of the selected orderline
followed by setting the quantity. The result however is that the price
isn't changed but the quantity is changed to combined digits of the price
and quantity inputs. This is due to the implementation of the `NumberBuffer`
singleton which is used to abstract and take into account different sources of
user inputs -- via numpad widget, keyboard and barcode scanner.

Barcode scanner performs fast successive keyboard presses. To differentiate it
from normal keyboard input, we used `eventsBuffer` field of `NumberBuffer`
and store keyboard events there. Fast keyboard presses that stores more than
2 in the events are neglected by the buffer and is considered a barcode input.

In this commit, we save the `handler` that handles the keyboard events saved
in the `eventsBuffer`, then instead of only letting it to be invoked by the
setTimeout object, we allow the manual invoking of `handler` using the introduced
`capture` method. This method is called when the numpad mode is changed
(pressing Price, Discount or Qty button).

Additionally, we remove the use of 'useState' to prevent unnecessary rerender
of the component that uses the `NumberBuffer`.

closes odoo/odoo#56488

X-original-commit: a48d5a3599bff8f9f1446a5f7ad0ac9be0723478
Signed-off-by: pimodoo &lt;pimodoo@users.noreply.github.com&gt;
Signed-off-by: Joseph Caburnay (jcb) &lt;caburj@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new randomly occurring runbot errors in pos/* can be reproduced by
performing quick successive clicks in numpad widget with the following form:

    1. Press 'Price' button.
    2. A number input.
    3. Press 'Qty' button.
    4. A number input.

The goal of the above steps is to set the price of the selected orderline
followed by setting the quantity. The result however is that the price
isn't changed but the quantity is changed to combined digits of the price
and quantity inputs. This is due to the implementation of the `NumberBuffer`
singleton which is used to abstract and take into account different sources of
user inputs -- via numpad widget, keyboard and barcode scanner.

Barcode scanner performs fast successive keyboard presses. To differentiate it
from normal keyboard input, we used `eventsBuffer` field of `NumberBuffer`
and store keyboard events there. Fast keyboard presses that stores more than
2 in the events are neglected by the buffer and is considered a barcode input.

In this commit, we save the `handler` that handles the keyboard events saved
in the `eventsBuffer`, then instead of only letting it to be invoked by the
setTimeout object, we allow the manual invoking of `handler` using the introduced
`capture` method. This method is called when the numpad mode is changed
(pressing Price, Discount or Qty button).

Additionally, we remove the use of 'useState' to prevent unnecessary rerender
of the component that uses the `NumberBuffer`.

closes odoo/odoo#56488

X-original-commit: a48d5a3599bff8f9f1446a5f7ad0ac9be0723478
Signed-off-by: pimodoo &lt;pimodoo@users.noreply.github.com&gt;
Signed-off-by: Joseph Caburnay (jcb) &lt;caburj@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] point_of_sale: 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:47:10+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c6397ab3b3654da336a4269a81d5d91016baf520'/>
<id>c6397ab3b3654da336a4269a81d5d91016baf520</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
