summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move_multi_update_bills.py
blob: d348beed4ba3f43b7ab587a4589ce9f475962803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from odoo import models, fields
import logging

_logger = logging.getLogger(__name__)


class AccountMoveMultiUpdateBills(models.TransientModel):
    _name = 'account.move.multi_update_bills'

    date_terima_tukar_faktur = fields.Date(string="Terima Faktur")
    
    def save_multi_update_bills(self):
        move_ids = self._context['move_ids']
        moves = self.env['account.move'].browse(move_ids)
        moves.update({
            'date_terima_tukar_faktur': self.date_terima_tukar_faktur
        })
        return {
            'type': 'ir.actions.client',
            'tag': 'display_notification',
            'params': {
                'title': 'Notification',
                'message': 'Account Move berhasil diubah',
                'next': {'type': 'ir.actions.act_window_close'},
            }
        }