From e07379886024a313695a56ebdd072bfd87b6626a Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 5 Sep 2023 16:19:20 +0700 Subject: try to fix bug on odoo --- indoteknik_custom/models/account_move.py | 1 + indoteknik_custom/models/account_move_line.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index b2d1df39..18025b32 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -21,6 +21,7 @@ class AccountMove(models.Model): new_due_date = fields.Date(string='New Due') counter = fields.Integer(string="Counter", default=0) cost_centre_id = fields.Many2one('cost.centre', string='Cost Centre') + analytic_account_ids = fields.Many2many('account.analytic.account', string='Analytic Account') due_line = fields.One2many('due.extension.line', 'invoice_id', compute='_compute_due_line', string='Due Extension Lines') def _compute_due_line(self): diff --git a/indoteknik_custom/models/account_move_line.py b/indoteknik_custom/models/account_move_line.py index c230b956..a4b25109 100644 --- a/indoteknik_custom/models/account_move_line.py +++ b/indoteknik_custom/models/account_move_line.py @@ -6,9 +6,10 @@ class AccountMoveLine(models.Model): cost_centre_id = fields.Many2one('cost.centre', string='Cost Centre') is_required = fields.Boolean(string='Is Required', compute='_compute_is_required') + analytic_account_ids = fields.Many2many('account.analytic.account', string='Analytic Account') @api.onchange('account_id') - def _onchange_analytic_account_ids(self): + def _onchange_account_id(self): for account in self: analytic_account = account.account_id.analytic_tag_ids account.analytic_tag_ids = analytic_account -- cgit v1.2.3