Fix bug test.

This commit is contained in:
Bernat Brunet 2023-12-13 22:58:21 +01:00
parent 3d01d6a8ef
commit 2ff4828cad
1 changed files with 6 additions and 0 deletions

View File

@ -101,3 +101,9 @@ class Invoice(metaclass=PoolMeta):
# Remove links to lines which actually do not pay the invoice
if to_save:
cls._clean_payments(to_save)
@classmethod
def check_modify(cls, invoices):
if Transaction().context.get('invoice_posted2draft', False):
return
return super().check_modify(invoices)