diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-01 10:08:00 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2025-12-01 10:08:00 +0700 |
| commit | a6def05e8e94db52af007bfc42fde9d1b753f000 (patch) | |
| tree | 8a6688f615cc4e381d6e860dc65342f68449e912 | |
| parent | 42cb9eef299048dcca942fee3c02c845e44893fd (diff) | |
<Miqdad> only bg rafly H. can start inventory adjustment
| -rw-r--r-- | indoteknik_custom/models/stock_inventory.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_inventory.py b/indoteknik_custom/models/stock_inventory.py index 69cca5bc..e34d9a8e 100644 --- a/indoteknik_custom/models/stock_inventory.py +++ b/indoteknik_custom/models/stock_inventory.py @@ -52,6 +52,10 @@ class StockInventory(models.Model): return "00001" # Jika format tidak valid, mulai dari 00001 return "00001" # Jika belum ada data, mulai dari 00001 + def action_start(self): + if self.env.user.id != 21: + raise UserError("Hanya Rafly H. yang bisa start inventory") + @api.model def create(self, vals): """Pastikan nomor hanya dibuat saat penyimpanan.""" |
