[FIX] mrp_mto_with_stock: Error singleton

Loop second haven't production, it has self.
This commit is contained in:
Isaac Gallart Bochons
2019-06-10 11:42:45 +02:00
parent 7b4470f414
commit 0ef6e19c22
3 changed files with 3 additions and 2 deletions

View File

@@ -69,6 +69,7 @@ Contributors
* John Walsh <John.Walsh@interclean.com>
* Lois Rilo <lois.rilo@eficent.com>
* Florian da Costa <florian.dacosta@akretion.com>
* Isaac Gallart <igallart@puntsistemes.es>
Maintainer
----------

View File

@@ -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,

View File

@@ -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):