Skip to content

Commit

Permalink
Merge PR OCA#1934 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Feb 19, 2025
2 parents 2803271 + 5a13267 commit 1d343ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions account_invoice_constraint_chronology/model/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def _conflicting_inv_after_sequence_before_inv_date_domain(self):
[
(
("name", ">", self.name),
("name", "!=", "/"),
("invoice_date", "<", self.invoice_date),
)
]
Expand All @@ -106,6 +107,7 @@ def _conflicting_inv_before_sequence_after_inv_date_domain(self):
[
(
("name", "<", self.name),
("name", "!=", "/"),
("invoice_date", ">", self.invoice_date),
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,12 @@ def test_modify_invoice_date_validated_past_invoice(self):
),
):
self.invoice_1_a_15.action_post()

def test_post_invoice_with_name(self):
# invoice 1 has a number (not /)
assert self.invoice_1.state == "draft"
assert self.invoice_1.name > "/"
# invoice 2 is dated after invoice 1 and is named '/'
invoice2 = self.invoice_1.copy()
invoice2.invoice_date = self.invoice_1.invoice_date + timedelta(days=1)
self.invoice_1.action_post()

0 comments on commit 1d343ff

Please sign in to comment.