summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/invoice_reklas.py
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-03-19 10:23:27 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-03-19 10:23:27 +0700
commite0ba42d70cda5ab419badac0775b550e63645b3b (patch)
treed58923caf57b341a3c3c97f1fa08278e641788a8 /indoteknik_custom/models/invoice_reklas.py
parentfc5defa647bcdd317dc2d4069432c2dcc1141344 (diff)
parent9e293f201e3c43662c3866fa06eaa36805d69cc5 (diff)
Merge branch 'odoo-backup' into feature/feedback_bitehisp
# Conflicts: # indoteknik_custom/models/sale_order.py
Diffstat (limited to 'indoteknik_custom/models/invoice_reklas.py')
-rw-r--r--indoteknik_custom/models/invoice_reklas.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/indoteknik_custom/models/invoice_reklas.py b/indoteknik_custom/models/invoice_reklas.py
index f5bb5a25..d10d4c31 100644
--- a/indoteknik_custom/models/invoice_reklas.py
+++ b/indoteknik_custom/models/invoice_reklas.py
@@ -18,6 +18,12 @@ class InvoiceReklas(models.TransientModel):
('pembelian', 'Pembelian'),
], string='Reklas Tipe')
+ @api.onchange('reklas_type')
+ def _onchange_reklas_type(self):
+ if self.reklas_type == 'penjualan':
+ invoices = self.env['account.move'].browse(self._context.get('active_ids', []))
+ self.pay_amt = invoices.amount_total
+
def create_reklas(self):
if not self.reklas_type:
raise UserError('Reklas Tipe harus diisi')