From 130390b0c4c8c37f5a69d3833f5f1ad9e60e787d Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 21 Nov 2024 14:01:16 +0700 Subject: push --- indoteknik_custom/models/va_multi_reject.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 indoteknik_custom/models/va_multi_reject.py (limited to 'indoteknik_custom/models/va_multi_reject.py') diff --git a/indoteknik_custom/models/va_multi_reject.py b/indoteknik_custom/models/va_multi_reject.py new file mode 100644 index 00000000..c05581bf --- /dev/null +++ b/indoteknik_custom/models/va_multi_reject.py @@ -0,0 +1,22 @@ +from odoo import models, fields +import logging + +_logger = logging.getLogger(__name__) + + +class VaMultiReject(models.TransientModel): + _name = 'va.multi.reject' + + def save_multi_reject_va(self): + va_ids = self._context['va_ids'] + vendor_approval = self.env['vendor.approval'].browse(va_ids) + vendor_approval.action_reject() + return { + 'type': 'ir.actions.client', + 'tag': 'display_notification', + 'params': { + 'title': 'Notification', + 'message': 'Berhasil Di Reject', + 'next': {'type': 'ir.actions.act_window_close'}, + } + } \ No newline at end of file -- cgit v1.2.3