Update project_invoice.py
This commit is contained in:
parent
c81dedd5b2
commit
e3d5645b6b
|
|
@ -238,7 +238,8 @@ class ProjectInvoice(models.Model):
|
|||
self.invoice_id.sudo().unlink()
|
||||
self.state = 'draft'
|
||||
else:
|
||||
raise UserError(_("Kindly The invoice is not in draft state, so it cannot be unlinked."))
|
||||
if self.invoice_id:
|
||||
raise UserError(_("Kindly The invoice is not in draft state, so it cannot be unlinked."))
|
||||
|
||||
def action_get_invoice(self):
|
||||
self.ensure_one()
|
||||
|
|
|
|||
Loading…
Reference in New Issue