Allow delete move when account_move_draft is activated

#044614
This commit is contained in:
Raimon Esteve 2021-05-06 15:11:40 +02:00 committed by GitHub
parent cf75823679
commit 4c6ddc6cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ class Invoice(metaclass=PoolMeta):
'invoice_report_format': None,
'invoice_report_cache': None,
})
return super(Invoice, cls).draft(invoices)
with Transaction().set_context(draft_invoices=True):
return super(Invoice, cls).draft(invoices)
@classmethod
def cancel(cls, invoices):