summaryrefslogtreecommitdiff
path: root/fixco_custom/models/stock_picking.py
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_custom/models/stock_picking.py')
-rwxr-xr-xfixco_custom/models/stock_picking.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py
index 11e24a6..916ac9f 100755
--- a/fixco_custom/models/stock_picking.py
+++ b/fixco_custom/models/stock_picking.py
@@ -51,19 +51,9 @@ class StockPicking(models.Model):
)
def button_validate(self):
- checked_products = self.mapped('check_product_lines').mapped('product_id')
- picking_lines = self.move_line_ids_without_package
-
- missing_products = [
- line.product_id.display_name
- for line in picking_lines
- if line.product_id not in checked_products
- ]
-
- if missing_products:
+ if len(self.check_product_lines) == 0:
raise UserError(_(
- "Product ini belum discan:\n- %s"
- % "\n- ".join(missing_products)
+ "Belum ada check product, gabisa validate"
))
return super(StockPicking, self).button_validate()