From 0ef6e19c229e564bfa55b8c14e3b71e902787117 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 8ddb7bd7b..2238cf1a2 100644 --- a/mrp_mto_with_stock/README.rst +++ b/mrp_mto_with_stock/README.rst @@ -69,6 +69,7 @@ Contributors * John Walsh * Lois Rilo * Florian da Costa +* Isaac Gallart Maintainer ---------- diff --git a/mrp_mto_with_stock/__manifest__.py b/mrp_mto_with_stock/__manifest__.py index ef669a7fb..7bd14a732 100644 --- a/mrp_mto_with_stock/__manifest__.py +++ b/mrp_mto_with_stock/__manifest__.py @@ -10,7 +10,7 @@ "author": "John Walsh, Eficent, Odoo Community Association (OCA)", "website": "https://odoo-community.org/", "category": "Manufacturing", - "version": "10.0.1.0.0", + "version": "10.0.1.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 5fb115486..46ce7ee3d 100644 --- a/mrp_mto_with_stock/models/mrp_production.py +++ b/mrp_mto_with_stock/models/mrp_production.py @@ -29,7 +29,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 - for move in self.move_raw_ids: + for move in production.move_raw_ids: if (move.state == 'confirmed' and move.location_id in move.product_id.mrp_mts_mto_location_ids and not mto_with_no_move_dest_id):