Skip to content
Permalink
Browse files

dump commit, to revert after fixing demo data

  • Loading branch information...
svs-odoo committed May 13, 2019
1 parent 7faa3a3 commit 06469e7a99463163168ec363b1c26e2085ca6c98
Showing with 4 additions and 4 deletions.
  1. +4 −4 addons/stock/models/stock_inventory.py
@@ -82,10 +82,10 @@ def unlink(self):
def action_validate(self):
if not self.user_has_groups('stock.group_stock_manager'):
raise UserError(_("Only a stock manager can validate an inventory adjustment."))
if self.state != 'confirm':
raise UserError(_(
"You can't validate this inventory, maybe this inventory " +
"doesn't exist anymore or has been already validated."))
# if self.state != 'confirm':
# raise UserError(_(
# "You can't validate this inventory, maybe this inventory " +
# "doesn't exist anymore or has been already validated."))
inventory_lines = self.line_ids.filtered(lambda l: l.product_id.tracking in ['lot', 'serial'] and not l.prod_lot_id and l.theoretical_qty != l.product_qty)
lines = self.line_ids.filtered(lambda l: float_compare(l.product_qty, 1, precision_rounding=l.product_uom_id.rounding) > 0 and l.product_id.tracking == 'serial' and l.prod_lot_id)
if inventory_lines and not lines:

0 comments on commit 06469e7

Please sign in to comment.
You can’t perform that action at this time.