diff options
Diffstat (limited to 'fixco_custom/models/stock_picking.py')
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index 4b4a850..21bdbf0 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -119,6 +119,9 @@ class StockPicking(models.Model): 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() # if self.name.startswith('BU/OUT') and self.origin.startswith('SO/'): |
