Browse Source

fixup! [MIG] pos_margin: Migration to 12.0

pull/399/head
Sylvain LE GAL 5 years ago
committed by AmmarOfficewala
parent
commit
72e65e914e
  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