From 7b720e80642fec89384381c17e654fade2387ffa Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Tue, 1 Oct 2019 10:44:37 +0200 Subject: [PATCH] fixup! [MIG] pos_margin: Migration to 12.0 --- pos_margin/models/pos_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_margin/models/pos_order_line.py b/pos_margin/models/pos_order_line.py index ad83d80b..9cb14f33 100644 --- a/pos_margin/models/pos_order_line.py +++ b/pos_margin/models/pos_order_line.py @@ -22,7 +22,7 @@ class PosOrderLine(models.Model): @api.multi @api.depends('product_id', 'qty', 'price_subtotal') def _compute_multi_margin(self): - for line in self.filtered(lambda x: x.product_id): + for line in self.filtered('product_id'): purchase_price = self._get_purchase_price(line) line.purchase_price = purchase_price line.margin = line.price_subtotal - (purchase_price * line.qty)