Missing rollbacked in transaction
Since #10870 (closed) , in case has TransactionError
, do a rollcacked but is not defined in transaction
We detected when pass tests. for example:
FAIL: /tryton/trytond/trytond/modules/sale_credit_limit_total/tests/scenario_sale_credit_limit_total.rst
Doctest: scenario_sale_credit_limit_total.rst
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.9/doctest.py", line 2204, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scenario_sale_credit_limit_total.rst
File "/tryton/trytond/trytond/modules/sale_credit_limit_total/tests/scenario_sale_credit_limit_total.rst", line 0
----------------------------------------------------------------------
File "/tryton/trytond/trytond/modules/sale_credit_limit_total/tests/scenario_sale_credit_limit_total.rst", line 106, in scenario_sale_credit_limit_total.rst
Failed example:
sale.click('confirm')
Exception raised:
Traceback (most recent call last):
File "/tryton/tryton/trytond/trytond/worker.py", line 144, in run_task
task.run()
File "/tryton/tryton/trytond/trytond/ir/queue_.py", line 177, in run
getattr(Model, self.data['method'])(
File "/tryton/tryton/trytond/trytond/model/modelview.py", line 697, in wrapper
return func(cls, records, *args, **kwargs)
File "/tryton/tryton/trytond/trytond/modules/sale/sale.py", line 1011, in process
cls.lock(sales)
File "/tryton/tryton/trytond/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
File "/tryton/tryton/trytond/trytond/model/modelsql.py", line 2043, in lock
transaction.lock_table(cls._table)
File "/tryton/tryton/trytond/trytond/transaction.py", line 243, in lock_table
raise _TransactionLockError(table)
trytond.transaction._TransactionLockError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/doctest.py", line 1336, in __run
exec(compile(example.source, filename, "single",
File "<doctest scenario_sale_credit_limit_total.rst[62]>", line 1, in <module>
sale.click('confirm')
File "/tryton/tryton/proteus/proteus/__init__.py", line 102, in newfunc
return self.func(owner, [instance], *args, **kwargs)
File "/tryton/tryton/proteus/proteus/__init__.py", line 916, in click
return getattr(proxy, button)([r.id for r in records], context)
File "/tryton/tryton/proteus/proteus/config.py", line 227, in __call__
run_task(self._config.database_name, task_id)
File "/tryton/tryton/trytond/trytond/worker.py", line 147, in run_task
transaction.rollbacked()
AttributeError: 'Transaction' object has no attribute 'rollbacked'