[FW] account_move_name_sequence: Forward-Port of 15.0 to 16.0

This commit is contained in:
Moises Lopez - https://www.vauxoo.com/
2024-04-17 17:35:54 +00:00
parent 7f0e28eecc
commit e1eef83bbd
2 changed files with 7 additions and 7 deletions

View File

@@ -161,7 +161,7 @@ class TestSequenceConcurrency(TransactionCase):
with env0.cr.savepoint(), env1.cr.savepoint():
# Edit something in "last move"
invoice.write({"write_uid": env0.uid})
invoice.flush()
env0.flush_all()
self._create_invoice_form(env1)
def test_sequence_concurrency_30_editing_last_payment(self):
@@ -182,7 +182,7 @@ class TestSequenceConcurrency(TransactionCase):
with env0.cr.savepoint(), env1.cr.savepoint():
# Edit something in "last move"
payment_move.write({"write_uid": env0.uid})
payment_move.flush()
env0.flush_all()
self._create_payment_form(env1)
@tools.mute_logger("odoo.sql_db")
@@ -205,7 +205,7 @@ class TestSequenceConcurrency(TransactionCase):
lines2reconcile = (
(payment_move | invoice)
.mapped("line_ids")
.filtered(lambda l: l.account_id.internal_type == "receivable")
.filtered(lambda l: l.account_id.account_type == "asset_receivable")
)
with env0.cr.savepoint(), env1.cr.savepoint():
# Reconciling "last move"
@@ -213,7 +213,7 @@ class TestSequenceConcurrency(TransactionCase):
# lock records too many time
lines2reconcile.reconcile()
# Many pieces of code call flush directly
lines2reconcile.flush()
env0.flush_all()
self._create_invoice_form(env1)
def test_sequence_concurrency_50_reconciling_last_payment(self):
@@ -235,7 +235,7 @@ class TestSequenceConcurrency(TransactionCase):
lines2reconcile = (
(payment_move | invoice)
.mapped("line_ids")
.filtered(lambda l: l.account_id.internal_type == "receivable")
.filtered(lambda l: l.account_id.account_type == "asset_receivable")
)
with env0.cr.savepoint(), env1.cr.savepoint():
# Reconciling "last move"
@@ -243,7 +243,7 @@ class TestSequenceConcurrency(TransactionCase):
# lock records too many time
lines2reconcile.reconcile()
# Many pieces of code call flush directly
lines2reconcile.flush()
env0.flush_all()
self._create_payment_form(env1)
def test_sequence_concurrency_90_payments(self):