diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-05-23 02:11:28 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-05-23 02:11:28 +0000 |
| commit | 957004adc73e524667800457f3db9fb6793edeac (patch) | |
| tree | 1824b9ee589f2b54657ab75f539b2f7d02224e7c /indoteknik_custom/models/invoice_reklas.py | |
| parent | 92b6da28414fed56732f86e1f04ea2fac3464d7d (diff) | |
| parent | 558130bbf48c33ddfa6080450c80bc8801a570f0 (diff) | |
Merged in CR/form-merchant (pull request #310)odoo-production
odoo quotation view & merchant view
Diffstat (limited to 'indoteknik_custom/models/invoice_reklas.py')
| -rw-r--r-- | indoteknik_custom/models/invoice_reklas.py | 6 |
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') |
