Tryton - Issues



Title splitting stock moves in outgoing shipment loses link to invoice lines
Priority bug Status chatting
Superseder Nosy List ced, rmu
Type behavior Components account_invoice_stock, stock_lot, stock_split
Assigned To Keywords

Created on 2018-02-20.18:46:17 by rmu, last changed by rmu.

msg38530 (view) Author: [hidden] (rmu) Date: 2018-02-21.11:22:44
clarification: the second issue from msg38525 is caused by the copy in, so it is indeed the same issue.
msg38529 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-21.11:01:20
replying to msg38520:
I think we must use a specific contextual keyword when copying Move for splitting moves to update spread quantities. This keyword must not be limited to stock_split.
msg38526 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-21.10:01:55
Your link does not point to the place where the copy is done. It is in the stock_lot module see msg38520
msg38525 (view) Author: [hidden] (rmu) Date: 2018-02-21.09:36:20
I am saying that because of the following scenario:

* create and process sale
* in outgoing shipment, split inventory stock moves (in preparation to eventually assign stock lots)
* assign/...
* link to invoice line is lost except for one move per original line

and in this case it seems as ff is syncronising the outgoing moves, copying the stock lots, but the link to invoice line is lost, as the original move is neither split nor copied, just changed to correct quantity.

Perhaps I'm completely mistaken how that is supposed to work, but in order to have stock lots on inventory moves it seems it is not sufficient to set the lots on the outgoing moves. Creating the invoice from the shipment somehow solves that problem (links are created and seem to be fine), but that may be undesireable.
msg38522 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-21.00:20:05
On 2018-02-20 20:44, Robert Schöftner wrote:
> this is only half the story. _sync_inventory_to_outgoing also does not keep links to invoice lines, there is no move.copy involved.

I do not see why you are saying that.
The links exist only on outgoing moves which are created by the
sale. Any move created by _sync_inventory_to_outgoing should precisely
not be linked.
msg38521 (view) Author: [hidden] (rmu) Date: 2018-02-20.20:44:09
this is only half the story. _sync_inventory_to_outgoing also does not keep links to invoice lines, there is no move.copy involved.
msg38520 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-02-20.19:19:58
I think the solution will be that account_invoice_stock add a contextual switch which prevent to not copy the invoice_lines.
This switch should be added when copying move in stock_split and stock_lot. Or maybe it is better to use an extras_depend and override the methods in account_invoice_stock.

Another option will be to use the '_check_access' context to know if it is a copy from the UI or from the code. But I'm not sure that all copy from code should keep the invoice_lines.
msg38518 (view) Author: [hidden] (rmu) Date: 2018-02-20.18:46:17

* create and process sale
* in outgoing shipment, split outgoing stock move
* link to invoice line is lost except for first move

something similar is happening when splitting the inventory move and assign/..., link to invoice line (in outgoing moves) is lost except for first move.
Date User Action Args
2018-02-21 11:22:45rmusetmessages: + msg38530
2018-02-21 11:01:20cedsetmessages: + msg38529
2018-02-21 10:01:55cedsetmessages: + msg38526
2018-02-21 09:36:20rmusetmessages: + msg38525
2018-02-21 00:20:05cedsetmessages: + msg38522
2018-02-20 20:44:09rmusetmessages: + msg38521
2018-02-20 19:19:58cedsetstatus: unread -> chatting
component: + stock_lot, - sale
messages: + msg38520
nosy: + ced
2018-02-20 18:46:17rmucreate

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