mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] account_move_name_sequence: pre-commit auto fixes
This commit is contained in:
parent
237db23038
commit
727721d7a2
@@ -23,11 +23,12 @@ class ThreadRaiseJoin(threading.Thread):
|
|||||||
self.exc = e
|
self.exc = e
|
||||||
|
|
||||||
def join(self, *args, **kwargs):
|
def join(self, *args, **kwargs):
|
||||||
super().join(*args, **kwargs)
|
res = super().join(*args, **kwargs)
|
||||||
# raise exception in the join
|
# raise exception in the join
|
||||||
# to raise it in the main thread
|
# to raise it in the main thread
|
||||||
if self.exc:
|
if self.exc:
|
||||||
raise self.exc
|
raise self.exc
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
@tagged("post_install", "-at_install", "test_move_sequence")
|
@tagged("post_install", "-at_install", "test_move_sequence")
|
||||||
@@ -99,9 +100,7 @@ class TestSequenceConcurrency(TransactionCase):
|
|||||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||||
cr_pid = cr.connection.get_backend_pid()
|
cr_pid = cr.connection.get_backend_pid()
|
||||||
# Avoid waiting for a long time and it needs to be less than deadlock
|
# Avoid waiting for a long time and it needs to be less than deadlock
|
||||||
cr.execute(
|
cr.execute("SET LOCAL statement_timeout = '%ss'", (deadlock_timeout + 10,))
|
||||||
"SET LOCAL statement_timeout = '%ss'", (deadlock_timeout + 10,)
|
|
||||||
)
|
|
||||||
if payment_first:
|
if payment_first:
|
||||||
_logger.info("Creating payment cr %s", cr_pid)
|
_logger.info("Creating payment cr %s", cr_pid)
|
||||||
self._create_payment_form(
|
self._create_payment_form(
|
||||||
|
|||||||
Reference in New Issue
Block a user