diff options
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 8 | ||||
| -rw-r--r-- | indoteknik_custom/models/tukar_guling_po.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/models/uom_uom.py | 6 |
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') |
