From 2e708e7a98aca710b006fbc249366e7cea151b78 Mon Sep 17 00:00:00 2001 From: Mqdd Date: Tue, 20 Jan 2026 08:52:18 +0700 Subject: cleanup code --- indoteknik_custom/models/gudang_service.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/indoteknik_custom/models/gudang_service.py b/indoteknik_custom/models/gudang_service.py index d4f7397c..73dcf0a4 100644 --- a/indoteknik_custom/models/gudang_service.py +++ b/indoteknik_custom/models/gudang_service.py @@ -14,7 +14,6 @@ class GudangService(models.Model): name = fields.Char('Name', readonly=True) partner_id = fields.Many2one('res.partner', string='Customer', readonly=True) origin = fields.Many2one('sale.order', string='Origin SO', required=True) - # picking_id = fields.Many2one('stock.picking', string = 'Picking ID', domain="[('sale_id', '=', origin)]") schedule_date = fields.Date( string="Schedule Date", required=True, @@ -33,24 +32,6 @@ class GudangService(models.Model): state = fields.Selection([('draft', 'Backlog'), ('onprogress', 'On Progress'),('done', 'Done'), ('cancel', 'Cancel')], default='draft', tracking=True) cancel_reason = fields.Text('Cancel Reason', tracking=True) - # @api.onchange('picking_id') - # def _onchange_picking_id(self): - # if not self.picking_id: - # self.gudang_service_lines = [(5, 0, 0)] - # return - - # lines = [(5, 0, 0)] - # for move in self.picking_id.move_ids_without_package: - # if move.product_id: - # lines.append((0, 0, { - # 'product_id': move.product_id.id, - # 'quantity': move.product_uom_qty, - # 'origin_so': self.origin.id, - # })) - - # self.gudang_service_lines = lines - - def _send_logistic_notification(self): group = self.env.ref('indoteknik_custom.group_role_logistic', raise_if_not_found=False) if not group: @@ -99,7 +80,6 @@ class GudangService(models.Model): if records: records._send_logistic_notification() - @api.depends('start_date', 'done_date', 'state') def _compute_remaining_date(self): today = fields.Date.today() @@ -119,8 +99,6 @@ class GudangService(models.Model): days = (end - start).days rec.remaining_date = _("%s days") % days - - def action_submit(self): for rec in self: rec.state = 'onprogress' @@ -163,7 +141,6 @@ class GudangService(models.Model): rec.done_date = False rec.state = 'cancel' - @api.model def create(self, vals): # Send notification @@ -206,13 +183,11 @@ class GudangService(models.Model): self.gudang_service_lines = [(5, 0, 0)] + lines - class GudangServiceLine(models.Model): _name = "gudang.service.line" _inherit = ['mail.thread', 'mail.activity.mixin'] product_id = fields.Many2one('product.product', string='Product') quantity = fields.Float(string='Quantity') - # picking_id = fields.Many2one('stock.picking', string='Nomor Picking') origin_so = fields.Many2one('sale.order', string='Origin SO') gudang_service_id = fields.Many2one('gudang.service', string='Gudang Service ID') \ No newline at end of file -- cgit v1.2.3