cron task for "posting clearing move" failed
I have a payment journal for SEPA using clearing.
I created several Payments *without* associated invoices (the related invoices are recorded in 2018 in another accounting program, and the moves will be imported with the closing balance of 2018, later).
I created a Payment Group, generated the SEPA message, and send it to my bank. The bank makes the move, and I have a Statement Line with the Payment Group.
When I posted the Statement, the payments in the PaymentGroup switched to "succeed" state, but no move for the payments has been created (I expected to see a move of clearingAccount/party). Only the one for PaymentGroup (clearingAccount/bankAccount) is here.
Next, I received a mail from trytond with the following backtrace:
Subject: L'action planifiée a échouée
L'action suivante n'a pas pu s'exécuter correctement: « Poster les mouvements de compensation »
tryton://mira.local/solitrap/model/ir.cron/2
Retraçage:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/trytond/model/model.py", line 396, in __getattr__
return self._values[name]
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/trytond/model/modelstorage.py", line 1263, in __getattr__
return super(ModelStorage, self).__getattr__(name)
File "/usr/local/lib/python3.6/site-packages/trytond/model/model.py", line 399, in __getattr__
% (self.__name__, name, self._values))
AttributeError: 'ir.configuration' Model has no attribute 'language': None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/trytond/ir/cron.py", line 171, in run
cron.run_once()
File "/usr/local/lib/python3.6/site-packages/trytond/model/descriptors.py", line 31, in newfunc
return self.func(owner, [instance], *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/trytond/model/modelview.py", line 665, in wrapper
return func(cls, records, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/trytond/modules/company/cron.py", line 31, in run_once
super(Cron, cls).run_once([cron])
File "/usr/local/lib/python3.6/site-packages/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/trytond/model/modelview.py", line 665, in wrapper
return func(cls, records, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/trytond/ir/cron.py", line 151, in run_once
getattr(Model, cron.function)(*args)
File "/usr/local/lib/python3.6/site-packages/trytond/modules/account_payment_clearing/payment.py", line 51, in cron_post_clearing_moves
Move.post(moves)
File "/usr/local/lib/python3.6/site-packages/trytond/model/modelview.py", line 665, in wrapper
return func(cls, records, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/trytond/modules/analytic_account/line.py", line 173, in post
MoveLine.set_analytic_state(lines)
File "/usr/local/lib/python3.6/site-packages/trytond/modules/analytic_account/line.py", line 270, in set_analytic_state
('parent', '=', None),
File "/usr/local/lib/python3.6/site-packages/trytond/model/modelsql.py", line 1199, in search
forder = field.convert_order(oexpr, tables, cls)
File "/usr/local/lib/python3.6/site-packages/trytond/model/fields/field.py", line 467, in convert_order
language = Transaction().language
File "/usr/local/lib/python3.6/site-packages/trytond/transaction.py", line 251, in language
return self.context.get('language') or get_language()
File "/usr/local/lib/python3.6/site-packages/trytond/transaction.py", line 249, in get_language
return Config.get_language()
File "/usr/local/lib/python3.6/site-packages/trytond/ir/configuration.py", line 27, in get_language
language = config.language
File "/usr/local/lib/python3.6/site-packages/trytond/model/fields/field.py", line 298, in __get__
return inst.__getattr__(self.name)
File "/usr/local/lib/python3.6/site-packages/trytond/model/modelstorage.py", line 1265, in __getattr__
if self.id is None or self.id < 0:
File "/usr/local/lib/python3.6/site-packages/trytond/model/fields/field.py", line 295, in __get__
assert self.name is not None
AssertionError
I dunno about the order: if the cron task failed and so no move were created, or if no moves were created (because of no invoice ?) and so the cron task failed, or if the backtrace is unrelated.
I am interested to know if the Move associated to payments when succeeded should be created automatically or not