Files
odoo_source/addons
Simon Lejeune cc181711dd [FIX] stock: scrap: allow scrapping consumable
A previous revision[0] forbid to scrap consumables. The rationale at the
time was that, since consumables do not have quant, scrapping them does
not make sense. It appears that people use this feature on consumable
for traceability reason, so we bring back the old behavior.

A slight change was done in stock_scrap.py: if the product is a
consumable, do not raise the error if the quantity to scrap is not
available in stock for obvious reasons.

Also, a leftover todo in the code indicate that we should unreserve the
any move having reserved the scrapped product. This is actually already
done, since this mechanism is in the move line `action_done` and a scrap
uses a classical stock move and stock move lines.

We introduce some test to prove that it is possible to scrap a stockable
product and the quant are impacted, to scrap a consumable product and
the stock is not impacted and to scrap something that was reseved by a
move and that the move changes its state.

[0] 86f08c091e
2017-07-19 18:29:16 +02:00
..
2017-07-05 11:48:45 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-06-26 10:13:25 +02:00
2017-07-10 08:46:27 +02:00
2017-07-05 23:32:23 +02:00
2017-07-05 11:48:45 +02:00
2017-07-14 16:57:27 +02:00