diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-05-17 02:50:46 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-05-17 02:50:46 +0000 |
| commit | 3d3cb07ee778c445b2f6be361a8749dab27822ec (patch) | |
| tree | 3036c34392651fa07ad14977b87d2863a0cbb5cf /indoteknik_custom/models/stock_picking.py | |
| parent | 844339e517540826f6990456a63945dc879e37d5 (diff) | |
| parent | 39c13cc7ebe48344e3088bc5bb921458ba4f7972 (diff) | |
Merged in production (pull request #142)
Production
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 9b4fffb1..22aceaf4 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -86,6 +86,11 @@ 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.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') + def do_unreserve(self): res = super(StockPicking, self).do_unreserve() current_time = datetime.datetime.utcnow() |
