summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-07 18:44:12 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-07 18:44:12 +0700
commit776bc2d9f132050ceed95ef2a96eb1dcf8ad1c44 (patch)
treec6004c87a0591f199408ea1d3850247526cbefd2 /indoteknik_custom/models
parentec5053921c0e858a4c33fb2cddf1152600831f7a (diff)
(andri) add button select & unselect all
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/letter_receivable.py12
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):