Browse Source

fixup! [MIG] pos_margin: Migration to 12.0

pull/385/head
Sylvain LE GAL 5 years ago
parent
commit
7b720e8064
  1. 2
      pos_margin/models/pos_order_line.py

2
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)

Loading…
Cancel
Save