diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-07 18:44:12 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-07 18:44:12 +0700 |
| commit | 776bc2d9f132050ceed95ef2a96eb1dcf8ad1c44 (patch) | |
| tree | c6004c87a0591f199408ea1d3850247526cbefd2 /indoteknik_custom/models | |
| parent | ec5053921c0e858a4c33fb2cddf1152600831f7a (diff) | |
(andri) add button select & unselect all
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/letter_receivable.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indoteknik_custom/models/letter_receivable.py b/indoteknik_custom/models/letter_receivable.py index f75af92e..370e0909 100644 --- a/indoteknik_custom/models/letter_receivable.py +++ b/indoteknik_custom/models/letter_receivable.py @@ -69,6 +69,18 @@ class SuratPiutang(models.Model): "sp1": "sp2", "sp2": "sp3", } + + def action_select_all_lines(self): + for rec in self: + if not rec.line_ids: + raise UserError(_("Tidak ada invoice line untuk dipilih.")) + rec.line_ids.write({'selected': True}) + + def action_unselect_all_lines(self): + for rec in self: + if not rec.line_ids: + raise UserError(_("Tidak ada invoice line untuk dihapus seleksinya.")) + rec.line_ids.write({'selected': False}) @api.onchange('partner_id') def _onchange_partner_id_domain(self): |
