odoo/odoo#194666
Created by Bugfix, Sarah Bellefroid (sbel)
Merged
at 40b819ded20f769b0a63b73abfefebbdaca390df
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:18.0-opw-4435140-closing_session_numbers-sbel
- head
- 53f7c7d5cce95864f4d2803fac8799ac2c7556ac
- merged
- 8 months ago by POS IoT, Joseph Caburnay (jcb)
odoo/odoo | |
---|---|
18.0 | #194666 |
saas-18.1 | #200589 |
saas-18.2 | #201046 |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #201148 |
[FIX] point_of_sale: start order tracking number at 1
Currently, when you make a os order, close the session an then re-open it without going through the backend, the starting tracking number is related to the previous session.
Steps to reproduce:
- Open pos shop
- Make an order and pay it
- Select New order
- Close the session, do not go in the backend
- Re-open the session
> Observation: The tracking number is likeX03
. If we make an order,
the tracking number will then be(X+1)01
.
Why the fix:
When closing the register the current order is marked as cancelled and a reloading of the page is done. When reloading, the onMounted
of the product screen is triggered which creates a new order.
We will condition the effect of the onMounted
in a useEffect
so that we don't create new orders when we are closing the session.