Skip to content
Snippets Groups Projects
Commit 0c4c5199 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] point_of_sale: split check


- Install `pos_restaurant`
- Make an order, choose 'Split'

At validation, an error is raised because the field `mp_dirty` doesn't
exist.

We filter out the non-existing fields sent by the server.

opw-2116461

closes odoo/odoo#39552

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 9f221500
Branches
Tags
No related merge requests found
......@@ -693,6 +693,10 @@ class PosOrderLine(models.Model):
if line and 'tax_ids' not in line[2]:
product = self.env['product.product'].browse(line[2]['product_id'])
line[2]['tax_ids'] = [(6, 0, [x.id for x in product.taxes_id])]
# Clean up fields sent by the JS
line = [
line[0], line[1], {k: v for k, v in line[2].items() if k in self.env['pos.order.line']._fields}
]
return line
company_id = fields.Many2one('res.company', string='Company', related="order_id.company_id", store=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment