Skip to content

Commit

Permalink
[UPD] stock_lock_lot
Browse files Browse the repository at this point in the history
  • Loading branch information
FLAlvaroGomez committed Jan 20, 2025
1 parent 243492a commit 39687f0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions stock_lock_lot/models/product_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ class ProductCategory(models.Model):
)

def _check_category_lock_unlock(self, vals):
for record in self:
if record.lot_default_locked != vals and not self.user_has_groups(
"stock_lock_lot.group_lock_lot"
):
raise exceptions.AccessError(
_("You are not allowed to block/unblock Serial Numbers/Lots")
)
if self.lot_default_locked != vals and not self.user_has_groups(
"stock_lock_lot.group_lock_lot"
):
raise exceptions.AccessError(
_("You are not allowed to block/unblock Serial Numbers/Lots")
)

def write(self, vals):
if "lot_default_locked" in vals:
Expand Down

0 comments on commit 39687f0

Please sign in to comment.