diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-09-12 15:00:12 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-09-12 15:00:12 +0700 |
| commit | bb49da69c2af4d32c6bbc99cbc74e86e1f695424 (patch) | |
| tree | def59116d071d38a712b925480ee1ab94d7e21c5 /fixco_custom/models/stock_picking.py | |
| parent | f1b119641b64b77427caa5199d9ce04e5c965c52 (diff) | |
schema sisa uang muka
Diffstat (limited to 'fixco_custom/models/stock_picking.py')
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index 408e055..73f4175 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -45,6 +45,15 @@ class StockPicking(models.Model): ) is_printed = fields.Boolean(string="Sudah Dicetak", default=False) + def action_cancel(self): + for picking in self: + if not self.env.user.id == 13: + if picking.purchase_id.move_entry_id: + raise UserError( + 'Hanya Accounting yang bisa melakukan cancel karena di po nya sudah ada uang muka' + ) + super(StockPicking, self).action_cancel() + def action_create_invoice_from_mr(self): """Create the invoice associated to the PO. """ |
