diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-01-30 13:48:19 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-01-30 13:48:19 +0700 |
| commit | b0152e913e55d4061abe1a0e96c558f62a99a830 (patch) | |
| tree | b3b4c39f6435d05b4c016b869109699fc7f4eefd /indoteknik_custom/models/account_move_line.py | |
| parent | 2ceef7e7e73a91ee513787071ba4537c7c263349 (diff) | |
cr on account move line and add tracking on shipping paid by and shipping covered by on sale order
Diffstat (limited to 'indoteknik_custom/models/account_move_line.py')
| -rw-r--r-- | indoteknik_custom/models/account_move_line.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move_line.py b/indoteknik_custom/models/account_move_line.py index a4b25109..c4a65209 100644 --- a/indoteknik_custom/models/account_move_line.py +++ b/indoteknik_custom/models/account_move_line.py @@ -7,6 +7,12 @@ 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, compute='_compute_line_no') + + def _compute_line_no(self): + if self.move_id: + for index, line in enumerate(self.move_id.invoice_line_ids, start=1): + line.line_no = index @api.onchange('account_id') def _onchange_account_id(self): |
