summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/automatic_purchase.py3
-rwxr-xr-xindoteknik_custom/models/purchase_order.py11
-rw-r--r--indoteknik_custom/models/refund_sale_order.py4
-rw-r--r--indoteknik_custom/report/purchase_report.xml2
-rw-r--r--indoteknik_custom/views/purchasing_job.xml4
5 files changed, 6 insertions, 18 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index 4b0ce325..0b2f7d1b 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -499,7 +499,8 @@ class AutomaticPurchase(models.Model):
# _logger.info('test %s' % point.product_id.name)
if point.product_id.qty_available_bandengan > point.product_min_qty:
continue
- qty_purchase = point.product_max_qty - point.product_id.qty_incoming_bandengan - point.product_id.qty_available_bandengan
+ # qty_purchase = point.product_max_qty - point.product_id.qty_incoming_bandengan - point.product_id.qty_available_bandengan
+ qty_purchase = point.product_max_qty - point.product_id.qty_available_bandengan
po_line = self.env['purchase.order.line'].search([('product_id', '=', point.product_id.id), ('order_id.state', '=', 'done')], order='id desc', limit=1)
if self.vendor_id:
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 35fa79a8..e16c8d61 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -1086,17 +1086,6 @@ class PurchaseOrder(models.Model):
if self.order_sales_match_line:
if self.total_percent_margin <= 15.0:
raise UserError("Approval Pimpinan diperlukan jika terdapat perubahan Unit Price pada PO Line dan Memiliki Margin <= 15%")
- else:
- low_margin_match_so = self.order_sales_match_line.filtered(
- lambda match: match.so_header_margin <= 15.0
- )
- if low_margin_match_so:
- raise UserError("Approval Pimpinan diperlukan jika pada PO Line yang Matches SO item memiliki header margin SO <= 15%")
- # else:
- # is_po_manual = '/A/' not in self.name and '/MO/' not in self.name
- # if is_po_manual:
- # if not self.order_sales_match_line:
- # raise UserError("Tidak ada matches SO, Approval Pimpinan diperlukan.")
self._check_assets_note()
# self._check_payment_term() # check payment term
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py
index 7ce347a8..627a6fdd 100644
--- a/indoteknik_custom/models/refund_sale_order.py
+++ b/indoteknik_custom/models/refund_sale_order.py
@@ -697,13 +697,11 @@ class RefundSaleOrder(models.Model):
('line_ids.account_id', '=', 450),
('line_ids.account_id', '=', 668),
]
-
- if so_names:
domain += ['|'] * (len(so_names) - 1)
for name in so_names:
domain.append(('ref', 'ilike', name))
- moves_ongkir = self.env['account.move'].search(domain)
+ moves_ongkir = self.env['account.move'].search(domain)
all_moves = moves | piutangbca | piutangmdr | misc | moves2 | moves_ongkir | cabinvoice
diff --git a/indoteknik_custom/report/purchase_report.xml b/indoteknik_custom/report/purchase_report.xml
index a6804ca4..81129dde 100644
--- a/indoteknik_custom/report/purchase_report.xml
+++ b/indoteknik_custom/report/purchase_report.xml
@@ -67,7 +67,7 @@
ADM. JAKARTA UTARA, DKI JAKARTA
</t>
<t t-else="">
- Jl. Bandengan Utara Komp A 8 B RT.<br/>
+ Jl. Bandengan Utara Komp A &amp; B RT.<br/>
Penjaringan, Kec. Penjaringan, Jakarta<br/>
(BELAKANG INDOMARET)
</t>
diff --git a/indoteknik_custom/views/purchasing_job.xml b/indoteknik_custom/views/purchasing_job.xml
index d303e5ea..8e1eb3b6 100644
--- a/indoteknik_custom/views/purchasing_job.xml
+++ b/indoteknik_custom/views/purchasing_job.xml
@@ -16,7 +16,7 @@
<field name="outgoing"/>
<field name="status_apo" invisible="1"/>
<field name="action"/>
- <field name="note"/>
+ <field name="note" optional="hide"/>
<field name="note_detail"/>
<field name="date_po" optional="hide"/>
<field name="so_number"/>
@@ -59,7 +59,7 @@
<field name="outgoing"/>
<field name="purchase_representative_id"/>
<field name="vendor_id"/>
- <field name="note"/>
+ <!-- <field name="note"/> -->
<field name="note_detail"/>
</group>
</group>