[FIX] account_move_name_sequence: With the "account_move_name_sequence" module the "_get_last_sequence" method does not have to propagate the with_prefix parameter. The sequence_prefix parameter will not be completed and will give error as it is False in this line of code. https://github.com/OCA/OCB/blob/16.0/addons/account/models/sequence_mixin.py#L169

This commit is contained in:
Rodrigo
2023-01-20 12:11:00 +01:00
committed by Marcos Oitaben
parent a5bfa85aed
commit bbd92d6963
3 changed files with 4 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
{
"name": "Account Move Number Sequence",
"version": "16.0.1.1.0",
"version": "16.0.1.1.1",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Generate journal entry number from sequence",

View File

@@ -70,3 +70,6 @@ class AccountMove(models.Model):
if moves:
self.flush_model(["name", "journal_id", "move_type", "state"])
return super()._fetch_duplicate_supplier_reference(only_posted=only_posted)
def _get_last_sequence(self, relaxed=False, with_prefix=None, lock=True):
return super()._get_last_sequence(relaxed, None, lock)

View File

@@ -309,7 +309,6 @@ class TestAccountMoveNameSequence(TransactionCase):
],
}
)
in_refund_invoice._compute_split_sequence()
self.assertEqual(in_refund_invoice.name, "/")
in_refund_invoice.action_post()
error_msg = "You cannot delete an item linked to a posted entry."