Hello all,
I can't solve this error trying to confirm a mrp production.
This is the error :
Traceback (most recent call last):
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 307, in checked_call
return self.endpoint(*a, **kw)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/mrp/wizard/mrp_product_produce.py", line 123, in do_produce
data.product_qty, data.mode, data, context=context)
File "/home/odoo-test/odoo-8.0-20150809/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/mrp/mrp.py", line 986, in action_produce
new_moves = stock_mov_obj.action_consume(cr, uid, [produce_product.id], qty, location_id=produce_product.location_id.id, restrict_lot_id=lot_id, context=context)
File "/home/odoo-test/odoo-8.0-20150809/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
TypeError: action_consume() got an unexpected keyword argument 'restrict_lot_id'
Thanks to help
UPDATE #1
In the file ./odoo-8.0-20150809/openerp/addons/mrp/mrp.py, we have these lines who bring the error :
lot_id = False
if wiz:
lot_id = wiz.lot_id.id
qty = min(subproduct_factor * production_qty_uom, produce_product.product_qty) #Needed when producing more than maximum quantity
new_moves = stock_mov_obj.action_consume(cr, uid, [produce_product.id], qty, location_id=produce_product.location_id.id, restrict_lot_id=lot_id, context=context)
UPDATE #2
I have tried with « Consume only » instead. I get a new error.
Here is the new error :
Traceback (most recent call last):
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 307, in checked_call
return self.endpoint(*a, **kw)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/home/odoo-test/odoo-8.0-20150809/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/mrp/wizard/mrp_product_produce.py", line 123, in do_produce
data.product_qty, data.mode, data, context=context)
File "/home/odoo-test/odoo-8.0-20150809/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/odoo-test/odoo-8.0-20150809/openerp/addons/mrp/mrp.py", line 1021, in action_produce
restrict_lot_id=consume['lot_id'], consumed_for=main_production_move, context=context)
File "/home/odoo-test/odoo-8.0-20150809/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
TypeError: action_consume() got an unexpected keyword argument 'consumed_for'
Still not found!
Pascal, if you are getting this error on official modules, you must report on github..com/odoo/odoo