From 6e45c744faedb71a71b758b600d6031133788961 Mon Sep 17 00:00:00 2001 From: Isaac Gallart Bochons Date: Mon, 10 Jun 2019 11:42:45 +0200 Subject: [PATCH] [FIX] mrp_mto_with_stock: Error singleton Loop second haven't production, it has self. --- mrp_mto_with_stock/README.rst | 1 + mrp_mto_with_stock/__manifest__.py | 2 +- mrp_mto_with_stock/models/mrp_production.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mrp_mto_with_stock/README.rst b/mrp_mto_with_stock/README.rst index b8606761e..9749931b7 100644 --- a/mrp_mto_with_stock/README.rst +++ b/mrp_mto_with_stock/README.rst @@ -70,6 +70,7 @@ Contributors * Lois Rilo * Florian da Costa * Bhavesh Odedra +* Isaac Gallart Maintainer ---------- diff --git a/mrp_mto_with_stock/__manifest__.py b/mrp_mto_with_stock/__manifest__.py index 23cb051fc..f26062533 100644 --- a/mrp_mto_with_stock/__manifest__.py +++ b/mrp_mto_with_stock/__manifest__.py @@ -9,7 +9,7 @@ "author": "John Walsh, Eficent, Odoo Community Association (OCA)", "website": "https://odoo-community.org/", "category": "Manufacturing", - "version": "11.0.2.0.0", + "version": "11.0.2.0.1", "license": "AGPL-3", "application": False, "installable": True, diff --git a/mrp_mto_with_stock/models/mrp_production.py b/mrp_mto_with_stock/models/mrp_production.py index dcbc73d09..6130648da 100644 --- a/mrp_mto_with_stock/models/mrp_production.py +++ b/mrp_mto_with_stock/models/mrp_production.py @@ -28,7 +28,7 @@ class MrpProduction(models.Model): for production in self: warehouse = production.location_src_id.get_warehouse() mto_with_no_move_dest_id = warehouse.mrp_mto_mts_forecast_qty - move_ids = copy.copy(self.move_raw_ids.ids) + move_ids = copy.copy(production.move_raw_ids.ids) for move in move_obj.browse(move_ids): new_move = False qty_to_procure = 0.0