← Back to team overview

openerp-india team mailing list archive

[Bug 1065568] Re: [6.1] form view of account.invoice.line uses parent.xxxx

 

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP Publisher's Warranty Team (openerp-opw)

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1065568

Title:
  [6.1] form view of account.invoice.line uses parent.xxxx

Status in OpenERP Addons (modules):
  New

Bug description:
  The form view for account.invoice.line defined in
  account/account_invoice_view.xml uses parent.xxx in various places.
  This must not be done as it breaks when the view is called from
  another context (and the crash is really not nice).

  This view must be inlined in the account.invoice form view, and
  another safe form view must be provided.

  Steps to reproduce:

  1. define a custom tree view displaying account.invoice.line
  2. display that view
  3. click on a line 

  you get a crash

  
  Client Traceback (most recent call last):
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/common/http.py", line 180, in dispatch
  response["result"] = method(controller, self, **self.params)
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/controllers/main.py", line 1209, in load
  return self.fields_view_get(req, model, view_id, view_type, toolbar=toolbar)
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/controllers/main.py", line 1090, in fields_view_get
  context = req.session.eval_context(req.context)
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/common/session.py", line 196, in eval_context
  return ccontext.evaluate(ctx)
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/common/nonliterals.py", line 267, in evaluate
  final_context.update(context_to_eval.evaluate(ctx))
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/common/nonliterals.py", line 267, in evaluate
  final_context.update(context_to_eval.evaluate(ctx))
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/common/nonliterals.py", line 185, in evaluate
  return eval(self.get_context_string(), SuperDict(ctx))
  File "<string>", line 1, in <module>
  File "/srv/openerp/instances/openerp_test_alpesdeveloppement/src/webclient/addons/web/common/nonliterals.py", line 194, in __getattr__
  raise AttributeError(name)
  AttributeError: type

  the attribute error comes from the use of parent.type in the form
  view.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1065568/+subscriptions


References