I’m encountering an issue while using the FiscalYear.create(data) method in the User Application. Specifically, I’m getting a _TransactionLockError(_table="account_fiscalyear").

I’ve already verified the data to see if any field is missing, but everything appears to be in order.

Any assistance you can provide would be greatly appreciated.

Thank you.


AFAIK, this comes from the 6.8 version, where locks can only be acquired at the start of the transaction.

See this commit, you can check in protocols/dispatcher.py@_dispatch for how to handle this manually.

It looks like the with_transaction decorator is missing the TransactionError management: with_transaction decorator does not manage TransactionError (#12962) · Issues · Tryton / Tryton · GitLab

Thanks @ced for your reply.

When the issue #12962 will be resolved?

or is there any alternative solution to manually lock the table?

Do not know. This is a community project, it will be fixed when someone spend his time on it.

You must start the transaction yourself and pass _lock_tables argument as a list containing the names of the tables to lock.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.