summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/res_partner.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py
index 39faf9d3..0b9a3a6c 100644
--- a/indoteknik_custom/models/res_partner.py
+++ b/indoteknik_custom/models/res_partner.py
@@ -51,9 +51,14 @@ class ResPartner(models.Model):
def write(self, vals):
res = super(ResPartner, self).write(vals)
- if 'property_payment_term_id' in vals:
- if not self.env.user.is_accounting and vals['property_payment_term_id'] != 26:
- raise UserError('Hanya Finance Accounting yang dapat merubah payment term')
+ # if 'property_payment_term_id' in vals:
+ # if not self.env.user.is_accounting and vals['property_payment_term_id'] != 26:
+ # raise UserError('Hanya Finance Accounting yang dapat merubah payment term')
+
+ # group_id = self.env.ref('indoteknik_custom.group_role_merchandiser').id
+ # users_in_group = self.env['res.users'].search([('groups_id', 'in', [group_id])])
+ # if self.env.user.id not in users_in_group.mapped('id'):
+ # raise UserError('You name it')
return res