[FIX] purchase: reset reminder status on cancel
Steps to reproduce: * Create PO * Confirm Receipt Date * Cancel PO * Draft and Confirm again Current behavior: * Button for Confirm Receipt Date is not visible Expected behavior: * Button for Confirm Receipt Date should be visible This is happening as we are not resetting the value of `mail_reminder_confirmed` on cancelling PO. With this commit, we reset value of `mail_reminder_confirmed` so use can Confirm Receipt Date again. closes odoo/odoo#79122 X-original-commit: 9e48afe5bf4f52b7cc2705fe434b4647df752a59 Signed-off-by: Arnold Moyaux <arm@odoo.com>
This commit is contained in:
@@ -431,7 +431,7 @@ class PurchaseOrder(models.Model):
|
||||
if inv and inv.state not in ('cancel', 'draft'):
|
||||
raise UserError(_("Unable to cancel this purchase order. You must first cancel the related vendor bills."))
|
||||
|
||||
self.write({'state': 'cancel'})
|
||||
self.write({'state': 'cancel', 'mail_reminder_confirmed': False})
|
||||
|
||||
def button_unlock(self):
|
||||
self.write({'state': 'purchase'})
|
||||
|
||||
Reference in New Issue
Block a user