From 45482a112be240b8d8ca66abfef129c427fbcb6d Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 16 May 2024 17:07:29 +0700 Subject: fix error --- indoteknik_custom/models/stock_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 6e439c41..22aceaf4 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -86,7 +86,7 @@ class StockPicking(models.Model): date_availability = fields.Datetime(string="Date Availability", copy=False, tracking=True) sale_order = fields.Char(string='Matches SO', copy=False) - @api.constrains('carrier_id') + @api.onchange('carrier_id') def constrains_carrier_id(self): if not self.env.user.is_logistic_approver: raise UserError('Hanya Logistic yang bisa mengubah shipping method') -- cgit v1.2.3