blob: 52c156b51ef7d8dc8739e0cdc64adef111476315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
from odoo import models, fields
import logging
_logger = logging.getLogger(__name__)
class PoMultiCancel(models.TransientModel):
_name = 'po.multi.cancel'
def save_multi_cancel_po(self):
purchase_ids = self._context['purchase_ids']
purchase = self.env['purchase.order'].browse(purchase_ids)
purchase.button_cancel()
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': 'Notification',
'message': 'Status berhasil diubah',
'next': {'type': 'ir.actions.act_window_close'},
}
}
|