From 4063abbd33df6d6cc969bdd97f7455e8ca33e161 Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Fri, 9 Jun 2023 16:41:46 +0530 Subject: [PATCH] Jun 9 [FIX] : Bug Fixed 'pos_mrp_order' --- pos_mrp_order/__manifest__.py | 2 +- pos_mrp_order/models/point_of_sale_make_mrp.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pos_mrp_order/__manifest__.py b/pos_mrp_order/__manifest__.py index b03af5430..f87dad2fb 100644 --- a/pos_mrp_order/__manifest__.py +++ b/pos_mrp_order/__manifest__.py @@ -20,7 +20,7 @@ ############################################################################## { 'name': 'Make MRP orders from POS', - 'version': '15.0.1.1.0', + 'version': '15.0.1.1.1', '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 63893a228..ead57bc84 100644 --- a/pos_mrp_order/models/point_of_sale_make_mrp.py +++ b/pos_mrp_order/models/point_of_sale_make_mrp.py @@ -59,7 +59,7 @@ class MrpProduction(models.Model): if bom: vals = { 'origin': 'POS-' + prod['pos_reference'], - # 'state': 'confirmed', + 'state': 'confirmed', 'product_id': prod['id'], 'product_tmpl_id': prod['product_tmpl_id'], 'product_uom_id': prod['uom_id'], @@ -74,7 +74,7 @@ class MrpProduction(models.Model): '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, + 'product_uom_qty': (bom_line.product_qty * mrp_order.product_qty)/self.env['mrp.bom'].search([("product_tmpl_id", "=", prod['product_tmpl_id'])]).product_qty, 'location_id': mrp_order.location_src_id.id, 'location_dest_id': bom_line.product_id.with_company( self.company_id.id).property_stock_production.id,