From a12c54181c7f393777f34e683532ba2ec5878eff Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 8 Jul 2019 08:50:01 +0200 Subject: [PATCH] [12.0][FIX/MIG] stock_cycle_count: fix zero confirmation rules. Now zero-qty quants are not removed straight away but by a cron job. Therefore, we have to also check that the quants are not zero-qty ones. --- stock_cycle_count/models/stock_location.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stock_cycle_count/models/stock_location.py b/stock_cycle_count/models/stock_location.py index 030ea0986..1b6fd58d0 100644 --- a/stock_cycle_count/models/stock_location.py +++ b/stock_cycle_count/models/stock_location.py @@ -57,7 +57,10 @@ class StockLocation(models.Model): @api.multi def _get_zero_confirmation_domain(self): self.ensure_one() - domain = [('location_id', '=', self.id)] + domain = [ + ('location_id', '=', self.id), + ('quantity', '>', 0.0), + ] return domain @api.multi