diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-06 13:12:51 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-06 13:12:51 +0700 |
| commit | 38b28cfb316a1abf62f192ce03f938c70f21f1fb (patch) | |
| tree | 2be84b9182aeb4e18e943b2eac75c0cdd9598a06 /indoteknik_custom/models/account_move.py | |
| parent | 89d4e9c8df4babbaa8daccdf4a6f77fee8a06123 (diff) | |
multiple reklas
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 82a86a39..929d2ee6 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -35,6 +35,23 @@ class AccountMove(models.Model): ('belum_upload', 'Belum Upload FP'), ('sudah_upload', 'Sudah Upload FP'), ], 'Mark Upload Faktur', compute='_compute_mark_upload_efaktur', default='belum_upload') + reklas_id = fields.Many2one('account.move', string='Nomor CAB', domain="[('partner_id', '=', partner_id)]") + + def open_form_multi_create_reklas_penjualan(self): + action = self.env['ir.actions.act_window']._for_xml_id('indoteknik_custom.action_view_invoice_reklas_penjualan') + invoice = self.env['invoice.reklas.penjualan'].create([{ + 'name': '-', + }]) + for move in self: + self.env['invoice.reklas.penjualan.line'].create([{ + 'invoice_reklas_id': invoice.id, + 'name': move.name, + 'partner_id': move.partner_id.id, + 'amount_untaxed_signed': move.amount_untaxed_signed, + 'amount_total_signed': move.amount_total_signed, + }]) + action['res_id'] = invoice.id + return action def _compute_mark_upload_efaktur(self): for move in self: |
