[Must]
[trytond configuration file] the default language must be updated in order to use the short/simplified language code.
Otherwise this issue can be encountered (while using Invoice report):
ERROR:tryton.common.common:Traceback (most recent call last):
File "/trytond/wsgi.py", line 111, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 48, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 78, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/modules/account_invoice/invoice.py", line 2608, in execute
return super().execute(ids, data)
File "/trytond/report/report.py", line 165, in execute
oext, content = cls._execute(records, data, action_report)
File "/trytond/modules/account_invoice/invoice.py", line 2586, in _execute
result = super(InvoiceReport, cls)._execute(records, data, action)
File "/trytond/report/report.py", line 181, in _execute
return cls.convert(action, cls.render(action, report_context))
File "/trytond/modules/account_invoice/invoice.py", line 2603, in render
return super().render(*args, **kwargs)
File "/trytond/report/report.py", line 276, in render
data = template.generate(**report_context).render()
File "/relatorio/templates/base.py", line 34, in render
return self.serializer(self.events)
File "/relatorio/templates/opendocument.py", line 1056, in __call__
for kind, data, pos in stream:
File "/genshi/filters/i18n.py", line 691, in __call__
for kind, data, pos in stream:
File "/genshi/template/base.py", line 638, in _include
for event in stream:
File "/genshi/template/markup.py", line 327, in _match
for event in stream:
File "/genshi/template/base.py", line 598, in _flatten
result = _eval_expr(data, ctxt, vars)
File "/genshi/template/base.py", line 289, in _eval_expr
retval = expr.evaluate(ctxt)
File "/genshi/template/eval.py", line 178, in evaluate
return eval(self.code, _globals, {'__data__': data})
File "<string>", line 375, in <Expression '__relatorio_escape_invalid_chars(format_date(invoice.invoice_date or today, invoice.party.lang))'>
File "/trytond/report/report.py", line 331, in format_date
lang = Lang.get()
File "/trytond/ir/lang.py", line 357, in get
('code', '=', code),
ValueError: not enough values to unpack (expected 1, got 0)