[FIX] stock_orderpoint_generator (fields don't exist)

This commit is contained in:
mreficent
2017-07-19 17:56:33 +02:00
committed by Víctor Martínez
parent 127bcf4f0e
commit 553643a803
3 changed files with 4 additions and 1 deletions

View File

@@ -56,6 +56,9 @@ class OrderpointTemplate(models.Model):
"""
orderpoint_model = self.env['stock.warehouse.orderpoint']
for data in self.copy_data():
data.pop('auto_generate', None)
data.pop('auto_product_ids', None)
data.pop('auto_last_generation', None)
for product_id in product_ids:
data['product_id'] = product_id
orderpoint_model.create(data)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -2,7 +2,7 @@
# © 2016 Cyril Gaudin (Camptocamp)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.exceptions import UserError
from openerp.tests import TransactionCase
from openerp.tests.common import TransactionCase
class TestOrderpointGenerator(TransactionCase):