diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-06-19 16:59:09 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-06-19 16:59:09 +0700 |
| commit | 3be1e1707547d40f618f70bd18e54519842e95a1 (patch) | |
| tree | 0856fe9da7070c766150c19565c5e85d5e84bfb9 | |
| parent | 1beabdd925218c888ad1b3b684a8eab020316a2e (diff) | |
(andri) fix value PO pada CAB dan Vendor Bill pada MISC
| -rw-r--r-- | indoteknik_custom/models/invoice_reklas.py | 3 | ||||
| -rw-r--r-- | indoteknik_custom/views/account_move.xml | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/indoteknik_custom/models/invoice_reklas.py b/indoteknik_custom/models/invoice_reklas.py index 5145e098..58299d3e 100644 --- a/indoteknik_custom/models/invoice_reklas.py +++ b/indoteknik_custom/models/invoice_reklas.py @@ -102,6 +102,9 @@ class InvoiceReklas(models.TransientModel): 'journal_id': 13 } + if invoice.purchase_order_id: + parameters_header['purchase_order_id'] = invoice.purchase_order_id.id + account_move = request.env['account.move'].create([parameters_header]) _logger.info('Success Reklas with %s' % account_move.name) diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml index 0c2f9a68..d2b03b1d 100644 --- a/indoteknik_custom/views/account_move.xml +++ b/indoteknik_custom/views/account_move.xml @@ -37,8 +37,8 @@ </field> <field name="ref" position="after"> <field name="sale_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'entry')]}"/> - <!-- <field name="purchase_order_id" context="{'form_view_ref': 'purchase.purchase_order_form'}" options="{'no_create': True}"/> --> - <field name="bill_id" readonly="1" attrs="{'invisible': ['|', ('move_type', '!=', 'entry'), ('purchase_order_id', '!=', False)]}"/> + <field name="purchase_order_id" context="{'form_view_ref': 'purchase.purchase_order_form'}" options="{'no_create': True}"/> + <field name="bill_id" readonly="1"/> </field> <field name="partner_shipping_id" position="before"> <field name="real_invoice_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/> |
