Sale_layout Misses account_invoice_layout for dependency.

Bug #646201 reported by Laurent G.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Fix Released
Low
Unassigned
Trunk
Fix Released
Undecided
Unassigned

Bug Description

Hi,

When I make invoice in customer order, I have this error :

Environment Information :
System : Windows-32bit
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : fr_FR.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.14
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 256, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 571, in exec_workflow
    res = service.exec_workflow(db, uid, object, method, id)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 137, in exec_workflow
    res = self.exec_workflow_cr(cr, uid, obj, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 130, in exec_workflow_cr
    return wf_service.trg_validate(uid, obj, args[0], method, cr)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/wkf_service.py", line 81, in trg_validate
    res2 = instance.validate(cr, id, ident, signal)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/instance.py", line 50, in validate
    workitem.process(cr, witem, ident, signal, force_running, stack=stack)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/workitem.py", line 62, in process
    ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/workitem.py", line 175, in _split_test
    _join_test(cr, t[0], t[1], ident, stack)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/workitem.py", line 183, in _join_test
    create(cr,[activity], inst_id, ident, stack)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/workitem.py", line 42, in create
    process(cr, res, ident, stack=stack)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/workitem.py", line 54, in process
    result = _execute(cr, workitem, activity, ident, stack)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/workitem.py", line 127, in _execute
    id_new = wkf_expr.execute(cr, ident, workitem, activity)
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/wkf_expr.py", line 69, in execute
    return _eval_expr(cr, ident, workitem, activity['action'])
  File "/usr/lib/python2.5/site-packages/openerp-server/workflow/wkf_expr.py", line 59, in _eval_expr
    ret = eval(line, env, nocopy=True)
  File "/usr/lib/python2.5/site-packages/openerp-server/tools/safe_eval.py", line 269, in safe_eval
    return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 168, in <lambda>
    return lambda *args, **argv: getattr(self._table, name)(self._cr, self._uid, [self._id], *args, **argv)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/sale/sale.py", line 445, in action_invoice_create
    created_lines = self.pool.get('sale.order.line').invoice_line_create(cr, uid, lines)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/sale_layout/sale_layout.py", line 38, in invoice_line_create
    pool_inv_line.write(cr, uid, [obj_inv_line.id], {'sequence': list_seq[seq]}, context=context)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 2526, in write
    fobj = self._inherit_fields[field][2]
KeyError: 'sequence'

Thank's for your help

Laurent

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Laurent,

Have you modified the file sale_layout.py?

It is really tricky to get this error.The field sequence is well defined for Invoice Lines.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

But there is a real mistake.
The module 'account_invoice_layout' doesn't appear in the dependency graph.
Thanks for noticing the point.

summary: - [5.0.14] error with module sale_layout
+ Sale_layout Misses account_invoice_layout for dependency.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Laurent,

You may install 'account_invoice_layout' module as a workaround.

For trunk(this module has been merged inside official addons),this has been fixed.
For stable extra addons branch , fixed by revision 4532 <email address hidden>.

Thanks.

Revision history for this message
Laurent G. (lguilloteau) wrote :

Hi Jay,

I don't have modified files of module "sale_layout".
But I make many tests and when I install module "Account_invoice_layout", create invoice is good.

Thank's and good night

Laurent

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.