Files
odoo_source/addons/pos_self_order
Theo VINCENT (thvi) 3236c1cb50 [IMP] pos_restaurant, *: default settings and data
*: point_of_sale, pos_self_order

Changes:
 - Adds a default restaurant with some default usual settings (with tips after payment if the company is in the United States) but no floor in the Point of Sale app. Makes pos_restaurant module auto installed with point_of_sale.
 - Makes some restaurant settings enabled by default (only for restaurants).
 - Adds loadable default demonstration data for onboarding (only when no real product is available in POS), specific to a restaurant. The default demonstration data for onboarding of point_of_sale and pos_restaurant are loaded together (if pos_restaurant is installed) to make it so an user that clicks to add demo data will have demo data for the default point of sale and also for the default restaurant (and the current restaurant if it is different than the default one). Makes the load demonstration data button visible when there is no product with a positive price available, because without that condition the tips (in restaurant) and discount were preventing the display of the button.
 - Hides the Preparation Printers menu item if there is no POS config using the printers.
 - Renames some labels.

Fixes:
 - Adds checks to always set set_tip_after_payment to False if a point of sale is no longer a restaurant or if the tips are disabled. This is needed because the code of pos_restaurant seems to be written considering that set_tip_after_payment is True only when the point of sale is a restaurant with the tips enabled (which wasn't guaranteed). Without that checks, some tests like ReceiptScreenTour fail. Another solution to make the tests successful without that checks would be to add !this.env.pos.config.module_pos_restaurant in pos_restaurant/static/src/js/Screens/PaymentScreen.js:16. But because other parts of the code only check the value of set_tip_after_payment, I think it is better to opt for the additionnal checks.
 - Fixes duplication of displayed product categories when loading demonstration data.
 - Fixes products before loading demonstration data that were kept and displayed after (discount for example).
 - Fixes categories and therefore communication with the preparation display after loading demo data in a restaurant.
 - Adds a check on the server side to prevent demonstration data loading when there is at least one valid product for POS.
 - Fixes order count display when "NaN" (in floors and tables view).
 - Fixes arguments of orm call for set_not_tip (model and method names were not given in the right order).

closes odoo/odoo#117941

Task-id: 2484291
Related: odoo/enterprise#39450
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-26 20:00:35 +02:00
..
…