[FIX] pos_restaurant: don't show internal notes button on shops

To reproduce (16.2 and >):
 1. Install pos_restaurant
 2. Open the Shop pos session
-> "Kitchen Note" button display
=> Unintended as this button does only make sense in restaurant

Before this commit:
 The button actually shows due to `iface_orderline_notes` value being
 set to `True` by default.

After this commit:
 The setting value is unset (for shops) to prevent the button to render

opw-3651750

closes odoo/odoo#148700

X-original-commit: afd9c9faaff9603eb1a11dc79ea3053a1eac98fb
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
This commit is contained in:
Loan (LSE)
2024-01-10 08:51:03 +00:00
parent 56a9e9f49a
commit 344e3262d8
+2 -1
View File
@@ -11,7 +11,7 @@ class PosConfig(models.Model):
iface_splitbill = fields.Boolean(string='Bill Splitting', help='Enables Bill Splitting in the Point of Sale.')
iface_printbill = fields.Boolean(string='Bill Printing', help='Allows to print the Bill before payment.')
iface_orderline_notes = fields.Boolean(string='Internal Notes', help='Allow custom Internal notes on Orderlines.', default=True)
iface_orderline_notes = fields.Boolean(string='Internal Notes', help='Allow custom Internal notes on Orderlines.')
floor_ids = fields.Many2many('restaurant.floor', string='Restaurant Floors', help='The restaurant floors served by this point of sale.')
set_tip_after_payment = fields.Boolean('Set Tip After Payment', help="Adjust the amount authorized by payment terminals to add a tip after the customers left or at the end of the day.")
module_pos_restaurant = fields.Boolean(default=True)
@@ -78,6 +78,7 @@ class PosConfig(models.Model):
vals['iface_splitbill'] = True
if not is_restaurant or not vals.get('iface_tipproduct', False):
vals['set_tip_after_payment'] = False
vals["iface_orderline_notes"] = is_restaurant
pos_configs = super().create(vals_list)
for config in pos_configs:
if config.module_pos_restaurant: