diff options
| author | Arnold Moyaux <arm@odoo.com> | 2019-10-09 13:21:27 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2019-10-16 07:58:12 +0000 |
| commit | b5ecbd5b5cf1b1294ec9d3f010ec0acf0ea884ab (patch) | |
| tree | d096274507a87eea4da4d66e05cac0e4c2a59e7c /addons | |
| parent | ec5e63cf80f64c47e1fcaa3d4560c930860d0a3b (diff) | |
[FIX] mrp_subcontracting: show lot name
Usecase:
- Set details operations on picking type
- Create a receipt for a subcontracted product with tracked components
- Records production
- Go to details operations
The move line is created however the lot name is invisible.
It happens due to produce_wizard line creation. It will set the lot_id
but the field lot_id is invisible if the picking type use the option
'use_create_lot' and uncheck 'use_exisiting_lot'
In order to fix it set both lot_name and lot_id after the produce
operation.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mrp_subcontracting/wizard/mrp_product_produce.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mrp_subcontracting/wizard/mrp_product_produce.py b/addons/mrp_subcontracting/wizard/mrp_product_produce.py index 368cfa90df7..439c2f4566c 100644 --- a/addons/mrp_subcontracting/wizard/mrp_product_produce.py +++ b/addons/mrp_subcontracting/wizard/mrp_product_produce.py @@ -43,6 +43,7 @@ class MrpProductProduce(models.TransientModel): 'product_uom_id': self.product_uom_id.id, 'qty_done': self.qty_producing, 'lot_id': self.finished_lot_id and self.finished_lot_id.id, + 'lot_name': self.finished_lot_id and self.finished_lot_id.name, }) if not self._get_todo(self.production_id): ml_reserved = self.subcontract_move_id.move_line_ids.filtered(lambda ml: |
