Tryton - Issues

 

Issue6372

Title Assign fails for consumable products on certain conditions
Priority feature Status resolved
Superseder Nosy List ced, nblock, pokoli, reviewbot, roundup-bot
Type behavior Components stock
Assigned To ced Keywords review
Reviews 33981002
View: 33981002

Created on 2017-03-17.09:04:04 by nblock, last changed by roundup-bot.

Messages
New changeset 8423632d7c03 by C?dric Krier in branch 'default':
Do not assign consumable on view location
http://hg.tryton.org/modules/stock/rev/8423632d7c03
review33981002 updated at https://codereview.tryton.org/33981002/#ps1
msg32571 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-03-17.10:46:32
Indeed I think a proper solution is to not assign the remaining consumable if the location is a view. Here is review33981002 that implements it.
msg32565 (view) Author: [hidden] (nblock) Date: 2017-03-17.09:31:29
> As the system can not guess which location to pick, it just leaves it with the default value.

This reasonable. Our solution is to extend the logic here and pick the first of the product's default locations in the case described in message https://bugs.tryton.org/msg32563.

> So now that your default value is a view location for consumable product is for me a configuration error.

We use a view as the warehouse storage location. This is the parent of all storages. Why is this a configuration error?

> Maybe the error could be improved to point the user to the right move/product.

+1
msg32564 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-03-17.09:17:20
For me, the system works as expected which is no assignation process on consumable product. As the system can not guess which location to pick, it just leaves it with the default value.
So now that your default value is  a view location for consumable product is for me a configuration error.
Maybe the error could be improved to point the user to the right move/product.
msg32563 (view) Author: [hidden] (nblock) Date: 2017-03-17.09:04:04
The production assign step fails when one of its inputs is a consumable product that is not on stock and the move's from_location is of type view. Due to the missing quantities, to_pick() in stock/move.py selects the move's from_location.

Error message: The value of the field "From Location" on "Stock Move" is not valid according to its domain.

The assign step fails and none of the inputs are assigned. In order to resolve this, a user needs to check each input individually and manually assign the from_location for consumable products that are not on stock to any location of type 'storage'.

Preconditions:
  * The storage setting on warehouse is a location of type 'view' or a user
    changes the from_location to any location of type 'view'.
  * The production input is a consumable product.
  * The consumable product is not on stock.

Trytond: 4.2
History
Date User Action Args
2017-03-23 22:45:34roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg32728
2017-03-17 11:00:07reviewbotsetnosy: + reviewbot
messages: + msg32572
2017-03-17 10:46:32cedsetstatus: chatting -> testing
keyword: + review
messages: + msg32571
component: + stock
reviews: 33981002
assignedto: ced
2017-03-17 09:31:29nblocksetmessages: + msg32565
2017-03-17 09:22:13pokolisetnosy: + pokoli
2017-03-17 09:17:20cedsetpriority: bug -> feature
status: unread -> chatting
messages: + msg32564
nosy: + ced
2017-03-17 09:04:04nblockcreate

Showing 10 items. Show all history (warning: this could be VERY long)