fix issue in state
This commit is contained in:
parent
d4f0a724b6
commit
ccb761c981
|
|
@ -537,7 +537,8 @@ class PurchaseOrderCustom(models.Model):
|
|||
def button_confirm(self):
|
||||
for order in self:
|
||||
if order.state not in ['draft']:
|
||||
return super(PurchaseOrderCustom, self).button_confirm()
|
||||
order.write({'state': 'purchase'})
|
||||
return True
|
||||
order._add_supplier_to_product()
|
||||
# Deal with double validation process
|
||||
if order._approval_allowed():
|
||||
|
|
|
|||
Loading…
Reference in New Issue