summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-01-30 11:00:36 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-01-30 11:00:36 +0700
commitf50f7d570eaa66552e6e91cfd9a29942a7ea3c36 (patch)
tree69596b187dfdaf4fd0a9a7c437fda2d9a96dcb8d
parent7c01bc02cea42e39816cf724545f6465080d689d (diff)
fix bug
-rwxr-xr-xindoteknik_custom/models/product_template.py60
1 files changed, 30 insertions, 30 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index d4b0abf4..151513e8 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -67,22 +67,22 @@ class ProductTemplate(models.Model):
print_barcode = fields.Boolean(string='Print Barcode', default=True)
# qr_code = fields.Binary("QR Code", compute='_compute_qr_code')
- @api.model
- def create(self, vals):
- 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('Hanya MD yang bisa membuat Product')
- result = super(ProductTemplate, self).create(vals)
- return result
+ # @api.model
+ # def create(self, vals):
+ # 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('Hanya MD yang bisa membuat Product')
+ # result = super(ProductTemplate, self).create(vals)
+ # return result
- def write(self, values):
- 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('Hanya MD yang bisa mengedit Product')
- result = super(ProductTemplate, self).write(values)
- return result
+ # def write(self, values):
+ # 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('Hanya MD yang bisa mengedit Product')
+ # result = super(ProductTemplate, self).write(values)
+ # return result
# def _compute_qr_code(self):
# for rec in self.product_variant_ids:
@@ -420,22 +420,22 @@ class ProductProduct(models.Model):
merchandise_ok = fields.Boolean(string='Product Promotion')
qr_code_variant = fields.Binary("QR Code Variant", compute='_compute_qr_code_variant')
- @api.model
- def create(self, vals):
- 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('Hanya MD yang bisa membuat Product')
- result = super(ProductProduct, self).create(vals)
- return result
+ # @api.model
+ # def create(self, vals):
+ # 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('Hanya MD yang bisa membuat Product')
+ # result = super(ProductProduct, self).create(vals)
+ # return result
- def write(self, values):
- 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('Hanya MD yang bisa mengedit Product')
- result = super(ProductProduct, self).write(values)
- return result
+ # def write(self, values):
+ # 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('Hanya MD yang bisa mengedit Product')
+ # result = super(ProductProduct, self).write(values)
+ # return result
def _compute_qr_code_variant(self):
for rec in self: