diff options
Diffstat (limited to 'fixco_custom/models')
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index 82714e8..79a0665 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -125,6 +125,10 @@ class StockPicking(models.Model): origin = self.origin or '' if any(prefix in origin for prefix in ['PO/', 'SO/']) and not self.check_product_lines and not self.name.startswith('BU/INT'): raise UserError(_("Belum ada check product, gabisa validate")) + + if self.name.startswith('BU/INT') and self.picking_type_code == 'internal' and self.env.user.id not in [10,15,2] and self.location_dest_id.id == 86: + raise UserError(_("Hanya bang rafly hanggara yang bisa validate")) + res = super(StockPicking, self).button_validate() |
