[FIX] point_of_sale : Variant changing price
Current behavior: When using variant in PoS the price was not always correct Steps to reproduce: 1. Set up items with modifiers (Modifier type must be of type variant creation mode : never, where adding a modifier leads to a different price than with the base item e.g. base item is 10 USD, modifier is 5 USD, total price is 15 USD; 2. Activate Product configurator and make sure it's a Bar/Restaurant in the PoS settings 3. Select the items with the modifier; 4. Leave the table and come back to the table 5. Change the quantity of this product 6. The price is back to the base price without the modifier opw-2696529 closes odoo/odoo#83444 X-original-commit: d959dfada11a72d6bc275b35f5eeb06b045a0dea Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
@@ -900,6 +900,7 @@ class PosOrderLine(models.Model):
|
||||
readonly=True, required=True)
|
||||
price_subtotal_incl = fields.Float(string='Subtotal', digits=0,
|
||||
readonly=True, required=True)
|
||||
price_extra = fields.Float(string="Price extra")
|
||||
margin = fields.Monetary(string="Margin", compute='_compute_margin')
|
||||
margin_percent = fields.Float(string="Margin (%)", compute='_compute_margin', digits=(12, 4))
|
||||
total_cost = fields.Float(string='Total cost', digits='Product Price', readonly=True)
|
||||
@@ -1029,6 +1030,7 @@ class PosOrderLine(models.Model):
|
||||
'pack_lot_ids': [[0, 0, lot] for lot in orderline.pack_lot_ids.export_for_ui()],
|
||||
'customer_note': orderline.customer_note,
|
||||
'refunded_qty': orderline.refunded_qty,
|
||||
'price_extra': orderline.price_extra,
|
||||
}
|
||||
|
||||
def export_for_ui(self):
|
||||
|
||||
@@ -61,6 +61,7 @@ class PosOrder(models.Model):
|
||||
'mp_dirty',
|
||||
'full_product_name',
|
||||
'customer_note',
|
||||
'price_extra',
|
||||
])
|
||||
return fields
|
||||
|
||||
|
||||
Reference in New Issue
Block a user