From 7a62a15b6c649f7df9458e45aaa14a60d96dc42c Mon Sep 17 00:00:00 2001 From: Bhavesh Odedra Date: Fri, 12 Apr 2019 23:03:52 +0530 Subject: [PATCH] [FIX] repair_refurbish, product with tracking show error when end repair order --- repair_refurbish/__manifest__.py | 2 +- repair_refurbish/models/repair.py | 13 +++++++++++-- repair_refurbish/readme/CONTRIBUTORS.rst | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/repair_refurbish/__manifest__.py b/repair_refurbish/__manifest__.py index 10b60bdbc..09ac4ed0f 100644 --- a/repair_refurbish/__manifest__.py +++ b/repair_refurbish/__manifest__.py @@ -3,7 +3,7 @@ { "name": "MRP Repair Refurbish", "summary": "Create refurbished products during repair", - "version": "12.0.1.0.1", + "version": "12.0.1.1.1", "category": "Manufacturing", "website": "https://github.com/OCA/manufacture", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/repair_refurbish/models/repair.py b/repair_refurbish/models/repair.py index dc0033c11..01dcbe825 100644 --- a/repair_refurbish/models/repair.py +++ b/repair_refurbish/models/repair.py @@ -49,8 +49,17 @@ class RepairOrder(models.Model): self.address_id.id or False, 'location_id': self.location_dest_id.id, 'location_dest_id': self.refurbish_location_dest_id.id, - 'restrict_lot_id': self.refurbish_lot_id.id, - } + 'move_line_ids': [(0, 0, { + 'product_id': self.refurbish_product_id.id, + 'lot_id': self.refurbish_lot_id.id, + 'product_uom_qty': self.product_qty, + 'product_uom_id': self.product_uom.id or + self.refurbish_product_id.uom_id.id, + 'qty_done': self.product_qty, + 'package_id': False, + 'result_package_id': False, + 'location_id': self.location_dest_id.id, + 'location_dest_id': self.refurbish_location_dest_id.id})]} @api.multi def action_repair_done(self): diff --git a/repair_refurbish/readme/CONTRIBUTORS.rst b/repair_refurbish/readme/CONTRIBUTORS.rst index 30781998a..2c6fe617d 100644 --- a/repair_refurbish/readme/CONTRIBUTORS.rst +++ b/repair_refurbish/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Jordi Ballester Alomar * Lois Rilo * Akim Juillerat +* Bhavesh Odedra