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):
location_dest_id = settings.MEALS_LOC_ID
elif movement_type == 'autoconso':
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:
errors.append('Type de mouvement incorrect')
return {'errors': errors}
......@@ -28,6 +31,9 @@ class CagetteStock(models.Model):
['date_done', "<=", date_to],
['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)
return res
......
......@@ -32,6 +32,7 @@
<option value="losses">Pertes</option>
<option value="meals">Repas salariés</option>
<option value="autoconso">Autoconsomation</option>
<option value="caisse-invendus-supercafoutch">Caisse invendus Supercafoutch</option>
</select>
<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>
......
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