[FIX] purchase: set date_approve on order confirmation
Restore behaviour before the workflow removal Closes #23306 Fixes #23273
This commit is contained in:
@@ -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'})
|
||||
|
||||
Reference in New Issue
Block a user