Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] pos_restaurant: don't clear order after printing bill #159530

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Mar 27, 2024

Steps to reproduce:

  • Install Restaurant app.
  • Go to Point of Sale app and open a new Restaurant session.
  • Add items to the order.
  • Click on the Bill button, the receipt window appears.
  • Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
  • Close the receipt window.
  • Add another item to the order, the older items are removed -the order is cleared-.

Investigation:

opw-3796605

Forward-Port-Of: #158516

@robodoo
Copy link
Contributor

robodoo commented Mar 27, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Mar 27, 2024

@AH-Yussef @caburj this PR targets master and is the last of the forward-port chain containing:

To merge the full chain, use

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Mar 27, 2024
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Mar 27, 2024
@AH-Yussef
Copy link
Contributor

@fw-bot r+

robodoo pushed a commit that referenced this pull request Mar 29, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes #159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
robodoo pushed a commit that referenced this pull request Mar 29, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes #159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
robodoo pushed a commit that referenced this pull request Mar 29, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes #159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
robodoo pushed a commit that referenced this pull request Mar 30, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes #159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
robodoo pushed a commit that referenced this pull request Mar 30, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes #159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Mar 30, 2024

@AH-Yussef @caburj staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/build/60617760)

@AH-Yussef AH-Yussef force-pushed the master-saas-17.1-opw-3796605-don't_clear_order_after_printing_bill-alhy-tt4R-fw branch from ea7fff7 to 2b278d5 Compare April 1, 2024 03:11
@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 1, 2024

@AH-Yussef @caburj this PR was modified / updated and has become a normal PR. It should be merged the normal way (via @robodoo)

@AH-Yussef
Copy link
Contributor

@robodoo r+

@C3POdoo C3POdoo requested review from a team and adgu-odoo and removed request for a team April 1, 2024 03:13
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

X-original-commit: 37ce3e5
@AH-Yussef AH-Yussef force-pushed the master-saas-17.1-opw-3796605-don't_clear_order_after_printing_bill-alhy-tt4R-fw branch from 2b278d5 to 566dd53 Compare April 2, 2024 06:41
@adgu-odoo adgu-odoo requested review from caburj and removed request for adgu-odoo April 2, 2024 08:27
@AH-Yussef
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Apr 5, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes #159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
@robodoo robodoo closed this Apr 5, 2024
@robodoo robodoo added the 17.3 label Apr 5, 2024
sjai-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Apr 12, 2024
Steps to reproduce:
- Install Restaurant app.
- Go to Point of Sale app and open a new Restaurant session.
- Add items to the order.
- Click on the Bill button, the reeceipt window appears.
- Click on the Print button, the print window appears. Cancel it - U don't have to print it or save it-.
- Close the reeceipt window.
- Add another item to the order, the older items are removed -the order is cleared-.

Investigation:
- When the Print button is clicked in the Bill Screen, `print()` method is triggered https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L16-L19
- which do two actions simultaneously:
	- calls the `printReceipt()` method https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L17
	- set the order.`_printed` to `false` https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/pos_restaurant/static/src/app/bill_screen/bill_screen.js#L18 NOW order.`_printed` IS FALSE.
- Inside the `printReceipt()` method, we reach this line https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/pos_store.js#L1793 which set the order.`_printed` to True. NOW order.`_printed` IS TRUE.
- When a new product is added to the order, this if clause https://github.com/odoo/odoo/blob/c3fe6dfd3c56ae8058d0eb688680bdc627ee611a/addons/point_of_sale/static/src/app/store/models.js#L1871-L1875 is activated given that the order.`_printed` is true although it should have been false!

opw-3796605

closes odoo#159530

X-original-commit: 37ce3e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
@fw-bot fw-bot deleted the master-saas-17.1-opw-3796605-don't_clear_order_after_printing_bill-alhy-tt4R-fw branch April 19, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
17.3 forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants