[FIX] purchase: set date_approve on order confirmation

Restore behaviour before the workflow removal

Closes #23306
Fixes #23273
This commit is contained in:
Swapnesh Shah
2018-03-01 11:55:42 +01:00
committed by Martin Trigaux
parent b9d217c4f5
commit 685f4eff50
+1 -1
View File
@@ -322,7 +322,7 @@ class PurchaseOrder(models.Model):
@api.multi
def button_approve(self, force=False):
self.write({'state': 'purchase'})
self.write({'state': 'purchase', 'date_approve': fields.Date.context_today(self)})
self._create_picking()
if self.company_id.po_lock == 'lock':
self.write({'state': 'done'})