diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-06-20 15:09:34 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-06-20 15:09:34 +0700 |
| commit | 45583fb16a83602bea6c02711bfd947f7a402265 (patch) | |
| tree | 4abd385d16179abf7e5625ec73b5588f0eabf825 | |
| parent | a3e6d8b8fa284f8f07d815c14c8e547321161261 (diff) | |
add note in product sales order for sales monitoring, and add tracking in midtrans status
| -rwxr-xr-x | indoteknik_custom/models/sale_monitoring_detail.py | 4 | ||||
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 3 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_monitoring_detail.xml | 2 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_monitoring_detail.py b/indoteknik_custom/models/sale_monitoring_detail.py index 2bcda50c..43a8aeb0 100755 --- a/indoteknik_custom/models/sale_monitoring_detail.py +++ b/indoteknik_custom/models/sale_monitoring_detail.py @@ -22,6 +22,7 @@ class SaleMonitoringDetail(models.Model): date_order = fields.Datetime(string="Date Order") status = fields.Char(string="Status") qty_reserved = fields.Integer(string="Qty Reserved") + note = fields.Char(string="Note") def init(self): tools.drop_view_if_exists(self.env.cr, self._table) @@ -52,7 +53,8 @@ class SaleMonitoringDetail(models.Model): so.date_order AS date_order, get_qty_po(so.id, sol.product_id) AS qty_po, get_qty_received(so.id, sol.product_id) AS qty_po_received, - get_qty_reserved(so.id, sol.product_id) as qty_reserved + get_qty_reserved(so.id, sol.product_id) as qty_reserved, + sol.note_procurement as note FROM sale_order so JOIN sale_order_line sol ON sol.order_id = so.id JOIN product_product p ON p.id = sol.product_id diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 5293b0fb..0c631761 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -70,7 +70,7 @@ class SaleOrder(models.Model): ('partial_refund', 'Partial Refund'), ('partial_chargeback', 'Partial Chargeback'), ('authorize', 'Authorize'), - ], string='Payment Status', help='Payment Gateway Status / Midtrans / Web, https://docs.midtrans.com/en/after-payment/status-cycle') + ], tracking=True, string='Payment Status', help='Payment Gateway Status / Midtrans / Web, https://docs.midtrans.com/en/after-payment/status-cycle') date_doc_kirim = fields.Datetime(string='Tanggal Kirim di SJ', help="Tanggal Kirim di cetakan SJ yang terakhir, tidak berpengaruh ke Accounting") payment_type = fields.Char(string='Payment Type', help='Jenis pembayaran dengan Midtrans') gross_amount = fields.Float(string='Gross Amount', help='Jumlah pembayaran yang dilakukan dengan Midtrans') @@ -459,6 +459,7 @@ class SaleOrderLine(models.Model): delivery_amt_line = fields.Float('DeliveryAmtLine', compute='compute_delivery_amt_line') fee_third_party_line = fields.Float('FeeThirdPartyLine', compute='compute_fee_third_party_line', default=0) line_no = fields.Integer('No', default=0, copy=False) + note_procurement = fields.Char(string='Note', help="Harap diisi jika ada keterangan tambahan dari Procurement, agar dapat dimonitoring") def compute_item_margin(self): for line in self: diff --git a/indoteknik_custom/views/sale_monitoring_detail.xml b/indoteknik_custom/views/sale_monitoring_detail.xml index 824e65e8..ce5b8e9b 100755 --- a/indoteknik_custom/views/sale_monitoring_detail.xml +++ b/indoteknik_custom/views/sale_monitoring_detail.xml @@ -23,6 +23,7 @@ decoration-success="status == 'Siap kirim'" decoration-info="status == 'Delivered' or status == 'Invoiced'" /> + <field name="note" optional="hide"/> </tree> </field> </record> @@ -46,6 +47,7 @@ decoration-success="status == 'Siap kirim'" decoration-info="status == 'Delivered' or status == 'Invoiced'" /> + <field name="note"/> </group> <group> <field name="qty_so"/> diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index b160d9b1..ea84eb00 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -61,6 +61,7 @@ "/> <field name="purchase_tax_id" attrs="{'readonly': [('parent.approval_status', '!=', False)]}" domain="[('type_tax_use','=','purchase')]"/> <field name="item_percent_margin"/> + <field name="note_procurement" optional="hide"/> </xpath> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_id']" position="before"> <field name="line_no" readonly="1" optional="hide"/> |
