Commit d540b050 by François C.

Modifications pour retirer les articles Fruits et Légumes des fichiers balances…

Modifications pour retirer les articles Fruits et Légumes des fichiers balances si non marqués 'A peser'
parent e848788f
Pipeline #4177 failed with stage
in 0 seconds
......@@ -369,9 +369,8 @@ class CagetteProducts(models.Model):
api = OdooAPI()
cond = [['active', '=', True],
['available_in_pos', '=', True],
['to_weight', '=', True],
['name', 'ilike', 'vrac']]
if not withCandidate:
cond = [('active', '=', True), ('name', 'ilike', 'vrac'), ('available_in_pos', '=', True), '|', ('barcode', '=like', '0491%'), ('barcode', '=like', '0493%')]
return api.search_read('product.product', cond, fields)
@staticmethod
......@@ -386,11 +385,8 @@ class CagetteProducts(models.Model):
def get_fl_products(withCandidate=False, fields=[]):
api = OdooAPI()
flv_cats = [settings.CATEG_FRUIT, settings.CATEG_LEGUME]
cond = [['active', '=', True],
['available_in_pos', '=', True],
['categ_id', 'in', flv_cats]]
if not withCandidate:
cond = [('active', '=', True), ('categ_id', 'in', flv_cats), ('available_in_pos', '=', True), '|', ('barcode', '=like', '0493%'), ('barcode', '=like', '0499%')]
cond = ['&', ('active', '=', True), ('categ_id', 'in', flv_cats), ('available_in_pos', '=', True),
'|', ('barcode', '=like','0491%'), ('barcode', '=like', '0499%')]
return api.search_read('product.product', cond, fields)
@staticmethod
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment