Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to solve this error when I confirm a mrp production?

By
Pascal Tremblay
on 8/9/15, 10:09 AM 1,040 views



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 Tremblay
on 8/10/15, 6:22 AM

Pascal, if you are getting this error on official modules, you must report on github..com/odoo/odoo

Serpent Consulting Services Pvt. Ltd.
on 8/10/15, 10:02 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/9/15, 10:09 AM
Seen: 1040 times
Last updated: 8/10/15, 6:09 PM