Update project_invoice.py
This commit is contained in:
parent
1f84e2e024
commit
20b5511ba2
|
|
@ -231,7 +231,11 @@ class ProjectInvoice(models.Model):
|
|||
|
||||
def action_set_to_draft(self):
|
||||
self.ensure_one()
|
||||
self.state = 'draft'
|
||||
if self.invoice_id.state=='draft':
|
||||
self.invoice_id=False or [(5, 0, 0)]
|
||||
self.state = 'draft'
|
||||
else:
|
||||
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