diff options
| author | Simon Lejeune <sle@openerp.com> | 2017-11-09 15:09:43 +0100 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2017-11-14 17:44:15 +0100 |
| commit | c6c802aac628bbfee29bcd5abdbe85308b4d10ec (patch) | |
| tree | e139cbb42bf6c9f4dd741c43bf4f68becb21ff6f | |
| parent | 99b9874ab3c09b41a1b7439bba92420ad9170357 (diff) | |
[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.
| -rw-r--r-- | addons/purchase/models/stock.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/purchase/models/stock.py b/addons/purchase/models/stock.py index 4edd90aafbb..62d9a1d1b30 100644 --- a/addons/purchase/models/stock.py +++ b/addons/purchase/models/stock.py @@ -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 |
