[FIX] purchase: kit and unit price

When buying a kit, the components should not get their unit price on the
kit. By doing this patch + a previous that set the unit_price on the
move as copy False, it'll take the standard price.
This commit is contained in:
Simon Lejeune
2017-11-14 17:44:15 +01:00
parent 99b9874ab3
commit c6c802aac6
+1 -1
View File
@@ -48,7 +48,7 @@ class StockMove(models.Model):
def _get_price_unit(self):
""" Returns the unit price for the move"""
self.ensure_one()
if self.purchase_line_id:
if self.purchase_line_id and self.product_id.id == self.purchase_line_id.product_id.id:
line = self.purchase_line_id
order = line.order_id
price_unit = line.price_unit