diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-10-17 09:48:32 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-10-17 09:48:32 +0700 |
| commit | db4547a746308fe1498e36208c1821168183a7e2 (patch) | |
| tree | 8e02f3027345743b42adeae73960d85315270690 | |
| parent | 6d9ac5debfc7f8809e627900555301aac6ab6083 (diff) | |
add column note and description in purchase order
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 5 | ||||
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/views/purchase_order.xml | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index e21b411d..990d3cc5 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -30,12 +30,13 @@ class AutomaticPurchase(models.Model): for vendor in vendor_ids: param_header = { 'partner_id': vendor['partner_id'][0], - 'partner_ref': 'Automatic PO', + # 'partner_ref': 'Automatic PO', 'currency_id': 12, 'user_id': self.env.user.id, 'company_id': 1, # indoteknik dotcom gemilang 'picking_type_id': 28, # indoteknik bandengan receipts - 'date_order': current_time + 'date_order': current_time, + 'note_description': 'Automatic PO' } # new_po = self.env['purchase.order'].create([param_header]) products_vendors = self.env['automatic.purchase.line'].search([ diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 8ad25228..5e4617d4 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -47,6 +47,7 @@ class PurchaseOrder(models.Model): count_line_product = fields.Float('Total Item', compute='compute_count_line_product') note_description = fields.Char(string='Note', help='bisa diisi sebagai informasi indent barang tertentu atau apapun') has_active_invoice = fields.Boolean(string='Has Active Invoice', compute='_compute_has_active_invoice') + description = fields.Char(string='Description', help='bisa diisi sebagai informasi indent barang tertentu atau apapun') def _compute_has_active_invoice(self): for order in self: diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index adcaaf43..a0614a56 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -75,6 +75,7 @@ </page> <field name="fiscal_position_id" position="after"> <field name="note_description"/> + <field name="description"/> <field name="total_so_percent_margin"/> <field name="has_active_invoice" invisible="1" /> </field> |
