summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-09-05 16:19:20 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-09-05 16:19:20 +0700
commite07379886024a313695a56ebdd072bfd87b6626a (patch)
tree0c242434cc35379d59d885d42784b1facb3f31ab
parentc4bf293cd29fab412d38e7590acdc99f2456c0d8 (diff)
try to fix bug on odoo
-rw-r--r--indoteknik_custom/models/account_move.py1
-rw-r--r--indoteknik_custom/models/account_move_line.py3
2 files changed, 3 insertions, 1 deletions
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