Issue 10526

Title
Unable to create an internal shipment using cost price per warehouse
Priority
bug
Status
resolved
Nosy list
albertca, carles@nan-tic.com, ced, pokoli, resteve, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2021-06-22.17:58:38 by carles@nan-tic.com, last changed 1 month ago by roundup-bot.

Messages

New changeset 77bdf8b6d1ce by Cédric Krier in branch '6.0':
Allow creating draft move between warehouses
https://hg.tryton.org/modules/product_cost_warehouse/rev/77bdf8b6d1ce
New changeset 9215ee741a9c by Cédric Krier in branch 'default':
Allow creating draft move between warehouses
https://hg.tryton.org/tryton-env/rev/9215ee741a9c
New changeset 2311b918f88b by Cédric Krier in branch 'default':
Allow creating draft move between warehouses
https://hg.tryton.org/modules/product_cost_warehouse/rev/2311b918f88b
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-07-19.19:15:27

Here is review338481002 which disable the validation for staging and draft moves and update the test.

Author: [hidden] (resteve)
Date: 2021-07-19.19:13:35

msg68928

I think we need to control draft moves . See at scenario test [1] that control moves from_location / to_location in differents warehouses:

>>> move = StockMove()
>>> move.product = product
>>> move.quantity = 1
>>> move.from_location = warehouse1.storage_location
>>> move.to_location = warehouse2.storage_location
>>> move.save()

I don't understand the message "To move products between "%(from)s" and "%(to)s", you must use the internal shipment transit location" when is the case that we do an internal shipment.

How to do a internal shipment between two warehouses?

Wareause1 / Loc1 -> to -> Wareahouse2 / Loc2 ?

In case you try do an internal shipment, we recibe the "msg_move_storage_location_same_warehouse" message [2].

[1] https://hg.tryton.org/modules/product_cost_warehouse/file/tip/tests/scenario_product_cost_warehouse.rst#l135
[2] https://hg.tryton.org/modules/product_cost_warehouse/file/tip/message.xml#l6

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-07-19.11:02:43

I do no think we should skip all internal shipments but only the ones that are in draft state which is the one before the transt moves are created.

Author: [hidden] (resteve)
Date: 2021-07-19.10:55:15

I understand that when movements that are related in shipment intern, not required to validate cost.

See review344541002

Author: [hidden] (carles@nan-tic.com)
Date: 2021-06-22.17:58:38

There is validation in the code of the product_cost_warehouse to ensure that all movements between internal locations use the traffic location. A move between internal locations cannot be saved without going through the transit location

https://hg.tryton.org/modules/product_cost_warehouse/file/tip/stock.py#l61

When an internal delivery note is created, Tryton needs to save the log to include the transit location in the movements. The problem is that Tryton cannot save the first move as it does not pass the commented validation.

History
Date User Action Args
2021-08-05 23:58:16roundup-botsetkeyword: - backport
messages: + msg69172
2021-07-22 19:09:46roundup-botsetmessages: + msg69031
2021-07-22 19:09:42roundup-botsetmessages: + msg69030
nosy: + roundup-bot
status: testing -> resolved
2021-07-20 09:28:44pokolisetkeyword: + backport
2021-07-20 09:24:28reviewbotsetmessages: + msg68936
2021-07-19 23:24:51cedlinkissue10586 superseder
2021-07-19 19:43:46reviewbotsetmessages: + msg68933
2021-07-19 19:15:27cedsetassignedto: resteve -> ced
messages: + msg68932
reviews: 344541002 -> 344541002,338481002
status: chatting -> testing
2021-07-19 19:13:35restevesetmessages: + msg68931
2021-07-19 11:16:56reviewbotsetmessages: + msg68929
nosy: + reviewbot

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