summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-03-09 16:01:36 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-03-09 16:01:36 +0700
commit741dcdd1be6cdd522322e9aa1d9aaf5c7ad66340 (patch)
tree6406d577d0cdf07a5a09fd72ae1db3be5f04ff09
parent60c166f8b4f5f9cd8d4cdf6422f53d8b5d083648 (diff)
parenta72a4c2d96eefdfc265373916588d2e89dcb9e53 (diff)
Merge branch 'release' into staging
-rw-r--r--indoteknik_custom/models/account_move.py12
-rw-r--r--indoteknik_custom/models/stock_picking.py2
2 files changed, 13 insertions, 1 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 18dbfba7..db4886f4 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -14,6 +14,18 @@ class AccountMove(models.Model):
date_terima_tukar_faktur = fields.Date(string='Terima Faktur')
shipper_faktur_id = fields.Many2one('delivery.carrier', string='Shipper Faktur')
+ def unlink(self):
+ res = super(AccountMove, self).unlink()
+ if not self.env.user.is_accounting:
+ raise UserError('Hanya Accounting yang bisa delete')
+ return res
+
+ def button_cancel(self):
+ res = super(AccountMove, self).button_cancel()
+ if self.id and not self.env.user.is_accounting:
+ raise UserError('Hanya Accounting yang bisa Cancel')
+ return res
+
def button_draft(self):
res = super(AccountMove, self).button_draft()
if not self.env.user.is_accounting:
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 1dba31a3..5bf774f4 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -53,7 +53,7 @@ class StockPicking(models.Model):
], string='Approval Status', readonly=True, copy=False, index=True, tracking=3, help="Approval Status untuk Internal Use")
approval_return_status = fields.Selection([
- ('pengajuan1', 'Approval Accounting'),
+ ('pengajuan1', 'Approval Finance'),
('approved', 'Approved'),
], string='Approval Return Status', readonly=True, copy=False, index=True, tracking=3, help="Approval Status untuk Return")
date_doc_kirim = fields.Datetime(string='Tanggal Kirim di SJ', help="Tanggal Kirim di cetakan SJ, tidak berpengaruh ke Accounting")