We are encountering the following error in Tryton, specifically during operations related to sick leave (arrêts de travail) creation:
'NoneType' object has no attribute 'IN_MAX'
This error appears consistently across all processes involving sick leave creation. It seems related to the use of Transaction().database.IN_MAX, which is None in our case.
Has anyone encountered a similar issue or could point us to what might be causing this?
Any guidance or ideas would be appreciated.
You can use Transaction().database only if the Transaction.start has been called before.
Normally the framework should have been started it for you so we will need more information on where this error happens and in which execution context.
The error occurs during the execution of a batch process that performs automatic processing on claim.ij.subscription records. This batch triggers the evaluation of rules (such as the Daily Allowance rule) programmatically, outside of the standard client UI.
In case of failure, the batch logs the error in the process.log table. For this issue, the message recorded is: ERROR in tranche_salaire : 'NoneType' object has no attribute 'IN_MAX'