diff --git a/pos_mrp_order/__manifest__.py b/pos_mrp_order/__manifest__.py index a953fdf2e..a35910a82 100644 --- a/pos_mrp_order/__manifest__.py +++ b/pos_mrp_order/__manifest__.py @@ -20,7 +20,7 @@ ############################################################################## { 'name': 'Make MRP orders from POS', - 'version': '13.0.1.0.2', + 'version': '13.0.1.0.3', 'summary': """Launch Automatic MRP Orders After Selling Through POS.""", 'description': """Launch automatic MRP orders after selling through POS""", 'author': 'Cybrosys Techno Solutions', diff --git a/pos_mrp_order/models/point_of_sale_make_mrp.py b/pos_mrp_order/models/point_of_sale_make_mrp.py index 7f135d92e..7413ed3c9 100644 --- a/pos_mrp_order/models/point_of_sale_make_mrp.py +++ b/pos_mrp_order/models/point_of_sale_make_mrp.py @@ -65,21 +65,19 @@ class MrpProduction(models.Model): mrp_order = self.sudo().create(vals) list_value = [] for bom_line in mrp_order.bom_id.bom_line_ids: - print(bom_line.product_id.with_context(force_company=self.company_id.id).property_stock_production.id) list_value.append((0, 0, { - 'raw_material_production_id': mrp_order.id, - 'name': mrp_order.name, - 'product_id': bom_line.product_id.id, - 'product_uom': bom_line.product_uom_id.id, - 'product_uom_qty': bom_line.product_qty, - 'picking_type_id': mrp_order.picking_type_id.id, - 'location_id': mrp_order.location_src_id.id, - 'location_dest_id': bom_line.product_id.with_context(force_company=self.company_id.id).property_stock_production.id, - 'company_id': mrp_order.company_id.id, - + 'raw_material_production_id': mrp_order.id, + 'name': mrp_order.name, + 'product_id': bom_line.product_id.id, + 'product_uom': bom_line.product_uom_id.id, + 'product_uom_qty': bom_line.product_qty * mrp_order.product_qty, + 'picking_type_id': mrp_order.picking_type_id.id, + 'location_id': mrp_order.location_src_id.id, + 'location_dest_id': bom_line.product_id.with_context(force_company=self.company_id.id).property_stock_production.id, + 'company_id': mrp_order.company_id.id, })) - mrp_order.update({'move_raw_ids':list_value}) + mrp_order.update({'move_raw_ids':list_value}) return True