diff options
| author | Arnold Moyaux <arm@odoo.com> | 2020-01-23 09:27:48 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2020-01-27 12:38:13 +0000 |
| commit | d39fc89324810df765cdcdbe2113446ec5cd882d (patch) | |
| tree | 53db545532c39cf67bc14fd2e54a9cff63513b47 /addons/mrp_subcontracting | |
| parent | b0da38e82f237d5affe2ca86fe95c6db1a6214cc (diff) | |
[FIX] mrp_subcontracting: lot_id instead of lot_name in receipt
Usecase to reproduce:
- Create a subcontracted product tracked without tracked components
- Create a receipt for this product
- Click on show detail
-> Lot_id are display even if the picking type uses create lot.
The assign serial feature is not working either.
The lot_id instead of lot_name is required in case of tracked
components since it will open the produce wizard and the user
will create lot there. However in the case of non-tracked components,
the wizard will not be used nor lot created. In this case the
classic behavior should be used with lot_name
closes odoo/odoo#43997
Task: 2180191
X-original-commit: 00fe4186935435f46a0db197c68e6df956fe80db
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/mrp_subcontracting')
| -rw-r--r-- | addons/mrp_subcontracting/models/stock_move.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp_subcontracting/models/stock_move.py b/addons/mrp_subcontracting/models/stock_move.py index a6d8a61dd91..72f50c9374e 100644 --- a/addons/mrp_subcontracting/models/stock_move.py +++ b/addons/mrp_subcontracting/models/stock_move.py @@ -71,7 +71,7 @@ class StockMove(models.Model): float_compare(self.quantity_done, self.product_uom_qty, precision_rounding=rounding) < 0: return self._action_record_components() action = super(StockMove, self).action_show_details() - if self.is_subcontract: + if self.is_subcontract and self._has_tracked_subcontract_components(): action['views'] = [(self.env.ref('stock.view_stock_move_operations').id, 'form')] action['context'].update({ 'show_lots_m2o': self.has_tracking != 'none', |
