blob: 1fbd80232b1b6d647acc6f81ec4ffdea359e138a (
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
27
28
29
30
31
32
33
34
35
|
from odoo import api, fields, models, _
import time
from odoo.exceptions import UserError
import logging
_logger = logging.getLogger(__name__)
class AssignConfirm(models.TransientModel):
_name = 'vit.assign_wizard'
_description = 'Assign Confirmation'
def _get_active_invoices(self):
if self._context.get('active_model') == 'account.invoice':
return self._context.get('active_ids', False)
return False
invoice_ids = fields.Many2many(comodel_name="account.invoice", string="Invoices", required=True,
default=_get_active_invoices)
efaktur_id = fields.Many2one(comodel_name="vit.efaktur", string="Nomor E-Faktur", required=False, )
"""
logika:
update invoice_ids.efaktur_id dengan yang dipilih
:return:
"""
# @api.multi
def confirm_button(self):
self.ensure_one()
for inv in self.invoice_ids:
inv.efaktur_id = self.efaktur_id
return {'type': 'ir.actions.act_window_close'}
|