diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-06-18 13:13:08 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-06-18 13:13:08 +0700 |
| commit | 18404c79a875afc31831ddd1ae2a419536216eb2 (patch) | |
| tree | 0e0a532e2b1081820f131b8034adb9aa55a5b0b2 | |
| parent | 001aa772a6ff8f7eb1cf1688480f32a7d82ec45d (diff) | |
fix change request multi create uangmuka pembelian
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 3 | ||||
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/purchase_order_multi_uangmuka.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/uangmuka_pembelian.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 3df6d888..0ba25ad8 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -62,7 +62,6 @@ class AccountMove(models.Model): so_delivery_amt = fields.Char(string="SO Delivery Amount", compute='compute_so_shipping_paid_by') flag_delivery_amt = fields.Boolean(string="Flag Delivery Amount", compute='compute_flag_delivery_amt') nomor_kwitansi = fields.Char(string="Nomor Kwitansi") - po_id = fields.Many2one('purchase.order', string='purchase Order') @api.model def create(self, vals): @@ -168,7 +167,7 @@ class AccountMove(models.Model): res = super(AccountMove, self).button_cancel() if self.move_type == 'entry': po = self.env['purchase.order'].search([ - ('invoice_ids', 'in', [self.id]) + ('move_id', 'in', [self.id]) ]) for order in po: diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 16fb7cf8..7b0fa20c 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -59,6 +59,7 @@ class PurchaseOrder(models.Model): sale_order = fields.Char(string='Sale Order') matches_so = fields.Many2many('sale.order', string='Matches SO', compute='_compute_matches_so') is_create_uangmuka = fields.Boolean(string='Uang Muka?') + move_id = fields.Many2one('account.move', string='Account Move') def _compute_matches_so(self): for po in self: diff --git a/indoteknik_custom/models/purchase_order_multi_uangmuka.py b/indoteknik_custom/models/purchase_order_multi_uangmuka.py index e0f80b1a..dd63e698 100644 --- a/indoteknik_custom/models/purchase_order_multi_uangmuka.py +++ b/indoteknik_custom/models/purchase_order_multi_uangmuka.py @@ -115,7 +115,7 @@ class PurchaseOrderMultiUangmuka(models.TransientModel): order.is_create_uangmuka = True - order.invoice_ids = [account_move.id] + order.move_id = account_move.id param_credit = { 'move_id': account_move.id, 'account_id': self.account_id.id, # bank in transit diff --git a/indoteknik_custom/models/uangmuka_pembelian.py b/indoteknik_custom/models/uangmuka_pembelian.py index 4d44e9f6..204855d3 100644 --- a/indoteknik_custom/models/uangmuka_pembelian.py +++ b/indoteknik_custom/models/uangmuka_pembelian.py @@ -108,7 +108,7 @@ class UangmukaPembelian(models.TransientModel): else: request.env['account.move.line'].create([param_debit, param_credit]) order.is_create_uangmuka = True - order.invoice_ids = [account_move.id] + order.move_id = account_move.id return { 'name': _('Journal Entries'), 'view_mode': 'form', |
