update and remove cache
This commit is contained in:
parent
9b638e57c4
commit
7a2b8b1b59
|
|
@ -31,7 +31,7 @@ class PurchaseOrderCustom(models.Model):
|
||||||
order.recommendation_order = True
|
order.recommendation_order = True
|
||||||
|
|
||||||
def button_confirm(self):
|
def button_confirm(self):
|
||||||
res = super(PurchaseOrderCustom, self).button_confirm()
|
# res = super(PurchaseOrderCustom, self).button_confirm()
|
||||||
for order in self:
|
for order in self:
|
||||||
if order.state not in ['draft', 'sent', 'sign']:
|
if order.state not in ['draft', 'sent', 'sign']:
|
||||||
continue
|
continue
|
||||||
|
|
@ -43,4 +43,4 @@ class PurchaseOrderCustom(models.Model):
|
||||||
order.write({'state': 'to approve'})
|
order.write({'state': 'to approve'})
|
||||||
if order.partner_id not in order.message_partner_ids:
|
if order.partner_id not in order.message_partner_ids:
|
||||||
order.message_subscribe([order.partner_id.id])
|
order.message_subscribe([order.partner_id.id])
|
||||||
return res
|
return True
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -537,8 +537,7 @@ class PurchaseOrderCustom(models.Model):
|
||||||
def button_confirm(self):
|
def button_confirm(self):
|
||||||
for order in self:
|
for order in self:
|
||||||
if order.state not in ['draft']:
|
if order.state not in ['draft']:
|
||||||
order.write({'state': 'purchase'})
|
continue
|
||||||
return True
|
|
||||||
order._add_supplier_to_product()
|
order._add_supplier_to_product()
|
||||||
# Deal with double validation process
|
# Deal with double validation process
|
||||||
if order._approval_allowed():
|
if order._approval_allowed():
|
||||||
|
|
@ -563,7 +562,7 @@ class PurchaseOrderCustom(models.Model):
|
||||||
order.requisition_id.state = 'done'
|
order.requisition_id.state = 'done'
|
||||||
if order.request_id:
|
if order.request_id:
|
||||||
order.request_id.write({'state': 'done'})
|
order.request_id.write({'state': 'done'})
|
||||||
return res
|
return True
|
||||||
|
|
||||||
def action_unsign(self):
|
def action_unsign(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue