diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2025-02-24 11:32:06 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2025-02-24 11:32:06 +0700 |
| commit | 7df979b8d5312bb90d13d338f2a787dc35373f17 (patch) | |
| tree | 12a5fd7b487781b52900505a2cffa999da692f9f /indoteknik_custom/models/account_move_line.py | |
| parent | a9c4cd0c5ac694074f0e3a4359182a97f27f542e (diff) | |
| parent | 38f8ddd9aaaad58c8d7ea27235cd109ba288693d (diff) | |
Merge branch 'odoo-production' into feature/integrasi_biteship
# Conflicts:
# indoteknik_custom/models/__init__.py
# indoteknik_custom/models/product_template.py
# indoteknik_custom/models/sale_order.py
# indoteknik_custom/security/ir.model.access.csv
Diffstat (limited to 'indoteknik_custom/models/account_move_line.py')
| -rw-r--r-- | indoteknik_custom/models/account_move_line.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move_line.py b/indoteknik_custom/models/account_move_line.py index a4b25109..7c95d4ef 100644 --- a/indoteknik_custom/models/account_move_line.py +++ b/indoteknik_custom/models/account_move_line.py @@ -7,6 +7,7 @@ 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') + line_no = fields.Integer('No', default=0) @api.onchange('account_id') def _onchange_account_id(self): @@ -22,3 +23,11 @@ class AccountMoveLine(models.Model): else: account.is_required = False + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + if 'move_id' in vals: + move = self.env['account.move'].browse(vals['move_id']) + if move.move_type == 'entry' and move.is_hr == True: + vals['name'] = move.ref + return super().create(vals_list)
\ No newline at end of file |
