summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-11-03 14:23:14 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-11-03 14:23:14 +0700
commitabe957c0e15d5c7171bb748ffca27c7517bd23f8 (patch)
tree7415afa92326b523451c8e42f023a2c2981ed26a /indoteknik_custom/models
parentda34fa99cf4816dbd3c6e9f1a2e47ec19059b765 (diff)
parentf820ab9df141389af244a36b093f8a119a4b2004 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/__init__.py1
-rw-r--r--indoteknik_custom/models/refund_sale_order.py2
-rw-r--r--indoteknik_custom/models/stock_picking.py8
-rw-r--r--indoteknik_custom/models/tukar_guling_po.py4
-rw-r--r--indoteknik_custom/models/uom_uom.py6
5 files changed, 18 insertions, 3 deletions
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py
index 165dae4e..6e1ef2e0 100755
--- a/indoteknik_custom/models/__init__.py
+++ b/indoteknik_custom/models/__init__.py
@@ -163,3 +163,4 @@ from . import letter_receivable
from . import sj_tele
from . import partial_delivery
from . import domain_apo
+from . import uom_uom \ No newline at end of file
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py
index e6547a88..9eae5b32 100644
--- a/indoteknik_custom/models/refund_sale_order.py
+++ b/indoteknik_custom/models/refund_sale_order.py
@@ -989,7 +989,7 @@ class RefundSaleOrder(models.Model):
for rec in self:
if self.env.uid not in allowed_user_ids and not is_fat:
raise UserError("❌ Hanya user yang bersangkutan atau Finance (FAT) yang bisa melakukan penolakan.")
- if rec.status not in ['refund', 'reject']:
+ if rec.status != 'reject':
rec.status = 'reject'
rec.status_payment = 'reject'
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 273fda82..c17fdbd5 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -198,6 +198,14 @@ class StockPicking(models.Model):
('partial_final', 'Partial Final'),
('full', 'Full'),
], string='Delivery Status', compute='_compute_delivery_status_detail', store=False)
+ so_num = fields.Char('SO Number', compute='_get_so_num')
+
+ @api.depends('group_id')
+ def _get_so_num(self):
+ for record in self:
+ record.so_num = record.group_id.name
+
+
@api.depends('move_line_ids_without_package.qty_done', 'move_line_ids_without_package.product_uom_qty', 'state')
def _compute_delivery_status_detail(self):
diff --git a/indoteknik_custom/models/tukar_guling_po.py b/indoteknik_custom/models/tukar_guling_po.py
index 2a5ca3dd..739898a1 100644
--- a/indoteknik_custom/models/tukar_guling_po.py
+++ b/indoteknik_custom/models/tukar_guling_po.py
@@ -366,8 +366,8 @@ class TukarGulingPO(models.Model):
# if bu_put:
# raise UserError("❌ Tidak bisa retur BU/INPUT karena BU/PUT sudah Done!")
- if self.operations.picking_type_id.id == 28 and tipe == 'tukar_guling':
- raise UserError("❌ BU/INPUT tidak boleh di retur tukar guling")
+ # if self.operations.picking_type_id.id == 28 and tipe == 'tukar_guling':
+ # raise UserError("❌ BU/INPUT tidak boleh di retur tukar guling")
# if self.operations.picking_type_id.id != 28:
# if self._is_already_returned(self.operations):
diff --git a/indoteknik_custom/models/uom_uom.py b/indoteknik_custom/models/uom_uom.py
new file mode 100644
index 00000000..32e53d73
--- /dev/null
+++ b/indoteknik_custom/models/uom_uom.py
@@ -0,0 +1,6 @@
+from odoo import fields, models, api, _
+
+class Uom(models.Model):
+ _inherit = 'uom.uom'
+
+ coretax_id = fields.Char(string='Coretax ID')