Tryton - Issues

 

Message30683

Author nblock
Recipients
Date 2016-12-12.16:32:48
Content
Traceback:
  Traceback (most recent call last):
    File "/trytond/wsgi.py", line 47, in dispatch_request
      return endpoint(request, **request.view_args)
    File "/trytond/protocols/dispatcher.py", line 41, in rpc
      request, database_name, *request.rpc_params)
    File "/trytond/wsgi.py", line 39, in auth_required
      return wrapped(*args, **kwargs)
    File "/trytond/protocols/wrappers.py", line 107, in wrapper
      return func(request, pool, *args, **kwargs)
    File "/trytond/protocols/dispatcher.py", line 160, in _dispatch
      result = rpc.result(meth(*c_args, **c_kwargs))
    File "/trytond/modules/company/company.py", line 393, in execute
      return super(LetterReport, cls).execute(ids, data)
    File "/trytond/report/report.py", line 152, in execute
      cls.render(action_report, report_context))
    File "/trytond/report/report.py", line 237, in render
      data = rel_report(**report_context).render()
    File "/relatorio/templates/base.py", line 34, in render
      return self.serializer(self.events)
    File "/relatorio/templates/opendocument.py", line 894, in __call__
      for kind, data, pos in stream:
    File "/genshi/core.py", line 289, in _ensure
      for event in stream:
    File "/genshi/filters/i18n.py", line 690, in __call__
      for kind, data, pos in stream:
    File "/genshi/template/base.py", line 618, in _include
      for event in stream:
    File "/genshi/template/markup.py", line 326, in _match
      for event in stream:
    File "/genshi/template/base.py", line 558, in _flatten
      for kind, data, pos in stream:
    File "/genshi/template/directives.py", line 360, in __call__
      iterable = _eval_expr(self.expr, ctxt, vars)
    File "/genshi/template/base.py", line 289, in _eval_expr
      retval = expr.evaluate(ctxt)
    File "/genshi/template/eval.py", line 177, in evaluate
      return eval(self.code, _globals, {'__data__': data})
    File "<string>", line 1, in <Expression u"iter(party.addresses[0].full_address.split('\\n'))">
    File "/genshi/template/eval.py", line 317, in lookup_attr
      val = getattr(obj, key)
    File "/trytond/model/fields/field.py", line 261, in __get__
      return inst.__getattr__(self.name)
    File "/trytond/model/modelstorage.py", line 1364, in __getattr__
      read_data = self.read(list(ids), ffields.keys())
    File "/trytond/model/modelsql.py", line 773, in read
      getter_results = field.get(ids, cls, field_list, values=result)
    File "/trytond/model/fields/function.py", line 91, in get
      return dict((name, call(name)) for name in names)
    File "/trytond/model/fields/function.py", line 91, in <genexpr>
      return dict((name, call(name)) for name in names)
    File "/trytond/model/fields/function.py", line 85, in call
      return dict((r.id, method(r, name)) for r in records)
    File "/trytond/model/fields/function.py", line 85, in <genexpr>
      return dict((r.id, method(r, name)) for r in records)
    File "/trytond/modules/party/address.py", line 123, in get_full_address
      **self._get_address_substitutions())
    File "/string.py", line 172, in substitute
      return self.pattern.sub(convert, self.template)
    File "/string.py", line 162, in convert
      val = mapping[named]
  KeyError: u'district'

Reproduce:
 - Create a new party with e.g. country 'Pakistan' (or any other country where
   ${district} is used in the address format.
 - Report -> Label

Trytond: 4.2
History
Date User Action Args
2016-12-12 16:32:49nblocksetmessageid: <1481556769.22.0.391801494274.issue6111@tryton.org>
2016-12-12 16:32:49nblocklinkissue6111 messages
2016-12-12 16:32:48nblockcreate

Showing 10 items. Show all history (warning: this could be VERY long)