Commit a60fe1ad by Yvon

try to show supercafoutch pertes

parent ae4248ad
Pipeline #2896 failed with stage
in 1 minute 7 seconds
...@@ -18,6 +18,9 @@ class CagetteStock(models.Model): ...@@ -18,6 +18,9 @@ class CagetteStock(models.Model):
location_dest_id = settings.MEALS_LOC_ID location_dest_id = settings.MEALS_LOC_ID
elif movement_type == 'autoconso': elif movement_type == 'autoconso':
location_dest_id = settings.AUTOCONSO_LOC_ID location_dest_id = settings.AUTOCONSO_LOC_ID
elif movement_type == 'caisse-invendus-supercafoutch':
location_dest_id = settings.CUSTOMERS_LOC_ID
picking_type_id = settings.LOSSES_PICKING_TYPE_ID
else: else:
errors.append('Type de mouvement incorrect') errors.append('Type de mouvement incorrect')
return {'errors': errors} return {'errors': errors}
...@@ -28,6 +31,9 @@ class CagetteStock(models.Model): ...@@ -28,6 +31,9 @@ class CagetteStock(models.Model):
['date_done', "<=", date_to], ['date_done', "<=", date_to],
['state', "=", 'done']] ['state', "=", 'done']]
if movement_type == 'caisse-invendus-supercafoutch':
c.append(['picking_type_id', "=", picking_type_id])
res = o_api.search_read('stock.picking', c, f) res = o_api.search_read('stock.picking', c, f)
return res return res
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<option value="losses">Pertes</option> <option value="losses">Pertes</option>
<option value="meals">Repas salariés</option> <option value="meals">Repas salariés</option>
<option value="autoconso">Autoconsomation</option> <option value="autoconso">Autoconsomation</option>
<option value="caisse-invendus-supercafoutch">Caisse invendus Supercafoutch</option>
</select> </select>
<p class="select_movement_element">De : <input type="text" id="from" class="select_movement_input"></p> <p class="select_movement_element">De : <input type="text" id="from" class="select_movement_input"></p>
<p class="select_movement_element">À : <input type="text" id="to" class="select_movement_input"></p> <p class="select_movement_element">À : <input type="text" id="to" class="select_movement_input"></p>
......
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