summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order_multi_confirm.py
blob: ac77ca5438480d02584c601197c3b0e71e722b66 (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 PurchaseOrderMultiUpdate(models.TransientModel):
    _name = 'purchase.order.multi_confirm'

    def save_multi_confirm_po(self):
        order_ids = self._context['order_ids']
        purchase = self.env['purchase.order'].browse(order_ids)
        purchase.action_multi_confirm_po()
        return {
            'type': 'ir.actions.client',
            'tag': 'display_notification',
            'params': {
                'title': 'Notification',
                'message': 'PO berhasil di Confirm',
                'next': {'type': 'ir.actions.act_window_close'},
            }
        }