Merge pull request #911 from expsa/project_test

Update project_invoice.py
This commit is contained in:
zainab2097 2024-08-29 11:10:17 +03:00 committed by GitHub
commit 9e9e02d10d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class ProjectInvoice(models.Model):
def action_set_to_draft(self):
self.ensure_one()
if self.invoice_id.state=='draft':
self.invoice_id=False or [(5, 0, 0)]
self.invoice_id=False
self.state = 'draft'
else:
raise UserError(_("Kindly The invoice is not in draft state, so it cannot be unlinked."))