This question has been flagged

Hi everyone. Look im moving from v7 to v8 and testing 9alpha, and i keep running into this error.??

  File "/opt/odoo/server/addons/sale/sale.py", line 719, in action_ship_create
    vals = self._prepare_order_line_procurement(cr, uid, order, line, group_id=group_id, context=context)
  File "/opt/odoo/server/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
ValueError: "_prepare_order_line_procurement() got an unexpected keyword argument 'group_id'" while evaluating
u'action_ship_create()'

My product items are setup as normal, these product items are "manufacture items" and "make to order item" or "both".
Ive setup boms too for each.

So with all settings "that i know to be correct" i still come across this error.

Anyone else had this?? Any insight would be greatly appreciated. Thank you.

 

Full error output,

2014-10-12 11:39:30,214 22318 ERROR test80 openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/opt/odoo/server/openerp/http.py", line 500, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/server/openerp/http.py", line 517, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/server/openerp/http.py", line 283, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/server/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/server/openerp/http.py", line 280, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/server/openerp/http.py", line 733, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/server/openerp/http.py", line 376, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/server/addons/web/controllers/main.py", line 979, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/server/addons/web/controllers/main.py", line 967, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/server/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/server/addons/event_sale/models/sale_order.py", line 12, in action_button_confirm
    res = super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)
  File "/opt/odoo/server/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/server/addons/portal_sale/portal_sale.py", line 67, in action_button_confirm
    return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)
  File "/opt/odoo/server/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/server/addons/sale/sale.py", line 599, in action_button_confirm
    self.signal_workflow(cr, uid, ids, 'order_confirm')
  File "/opt/odoo/server/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/server/openerp/models.py", line 3513, in signal_workflow
    result[res_id] = workflow.trg_validate(uid, self._name, res_id, signal, cr)
  File "/opt/odoo/server/openerp/workflow/__init__.py", line 85, in trg_validate
    return WorkflowService.new(cr, uid, res_type, res_id).validate(signal)
  File "/opt/odoo/server/openerp/workflow/service.py", line 91, in validate
    res2 = wi.validate(signal)
  File "/opt/odoo/server/openerp/workflow/instance.py", line 75, in validate
    wi.process(signal=signal, force_running=force_running, stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 120, in process
    ok = self._split_test(activity['split_mode'], signal, stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 248, in _split_test
    self._join_test(t[0], t[1], stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 257, in _join_test
    WorkflowItem.create(self.session, self.record, activity, inst_id, stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 95, in create
    workflow_item.process(stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 120, in process
    ok = self._split_test(activity['split_mode'], signal, stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 248, in _split_test
    self._join_test(t[0], t[1], stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 257, in _join_test
    WorkflowItem.create(self.session, self.record, activity, inst_id, stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 95, in create
    workflow_item.process(stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 120, in process
    ok = self._split_test(activity['split_mode'], signal, stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 248, in _split_test
    self._join_test(t[0], t[1], stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 257, in _join_test
    WorkflowItem.create(self.session, self.record, activity, inst_id, stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 95, in create
    workflow_item.process(stack=stack)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 116, in process
    if not self._execute(activity, stack):
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 162, in _execute
    returned_action = self.wkf_expr_execute(activity)
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 313, in wkf_expr_execute
    return self.wkf_expr_eval_expr(activity['action'])
  File "/opt/odoo/server/openerp/workflow/workitem.py", line 291, in wkf_expr_eval_expr
    result = eval(line, env, nocopy=True)
  File "/opt/odoo/server/openerp/tools/safe_eval.py", line 313, in safe_eval
    return eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/odoo/server/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/server/openerp/api.py", line 552, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/opt/odoo/server/addons/sale/sale.py", line 719, in action_ship_create
    vals = self._prepare_order_line_procurement(cr, uid, order, line, group_id=group_id, context=context)
  File "/opt/odoo/server/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
ValueError: "_prepare_order_line_procurement() got an unexpected keyword argument 'group_id'" while evaluating
u'action_ship_create()'

 

Avatar
Discard
Author

Well i might be wrong in saying this , but I really think this whole function needs a clean-rewrite. Would be great to hear your opinion. Temp solution i did... ------------------------------------------------------------------- "addons/sale/sale.py", line 654, "addons/sale/sale.py", line 719, "addons/sale_stock/sale_stock.py", line 73, "addons/sale_stock/sale_stock.py", line 74, "addons/sale_mrp/sale_mrp.py", line 81, "addons/sale_mrp/sale_mrp.py", line 82, ---------------------------------------- *Renamed All occurrence of _prepare_order_line_procurement | to | prepare_order_line_procurement ---------------------------------------- * Removed All occurrence of _prepare_order_line_procurement(cr, uid, order, line, group_id=group_id, context=context) | Replaced with | prepare_order_line_procurement(cr, uid, order, line, context=context) (group_id=group_id, just a pain in the a**!!!. Many combo tried with leaveing it in place... but no success, so had to get violent here....) Why the function was written like that we'll never know. Any comments?. share your opinion. --------------------------------------------------------------------- "addons/sale/sale.py", line 666, 'group_id': group_id, | to |'group_id': order.procurement_group_id.id, *Dont forget this.... --------------------------------------------------------------------- Owh i also included a view element forTesting...: record id="sale_order_procurement_group_id" model="ir.ui.view"> field name="name">sale.order.procurement_group_id field name="model">sale.order field name="inherit_id" ref="sale.view_order_form"/> field name="arch" type="xml"> xpath expr="//field[@name='WHEREEVER']" position="after"> field name="procurement_group_id"/> /xpath> /field> Well hope that helps,,,, and SPEEDS things up... Cheers..