summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2017-07-19 17:18:28 +0200
committerSimon Lejeune <sle@openerp.com>2017-07-19 18:29:16 +0200
commitcc181711dd84df0584ea6d49d174265dade5ec9b (patch)
treee8b52f838a0c69be335bae8785e512a54acadad0 /addons/web/static/src/js/views/basic/basic_model.js
parent886137d0c813f3bbb8835a483549f54621449e43 (diff)
[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] 86f08c091eea2a623ee6460562a750506cbdd585
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions