Tryton - Issues

 

Issue7657

Title Set origin to null when clone a stock move
Priority bug Status chatting
Superseder Nosy List albertca, ced, pokoli, resteve
Type feature request Components stock_consignment
Assigned To Keywords
Reviews

Created on 2018-08-29.12:18:20 by resteve, last changed by ced.

Messages
msg43152 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-29.15:20:16
We are not going to delay the creation of the invoice line. This has been already discussed.
msg43151 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2018-08-29.15:00:04
The module stock_split allows splitting a stock.move also when it is in assigned state and stock_consignment creates the invoice line in the assigned state, so it is possible that the user splits the move when the invoice line has already been created and removing the origin in this case would probably be wrong.

One option would be to create the invoice line once the move is in "done" state (which I think is a better workflow for the user), though that requires to add a mechanism to prevent the warning that the move has no origin when it's assigned.
msg43148 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-29.12:58:29
For me, the origin should be reset only for move for which the origin is the invoice line from the stock_consignment.
msg43147 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-08-29.12:40:16
stock split also uses the copy method, but I think it makes sense to preserve the origin when spliting a move.
msg43146 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-08-29.12:39:33
Not sure if it should be part of the stock module. Another scenario
msg43143 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-29.12:21:52
Patch is welcome.
msg43142 (view) Author: [hidden] (resteve) Date: 2018-08-29.12:18:20
In stock.move model has not copy() method to reset origin field to null when duplicate a shipment

Scenario:

1- Install stock_consignment module and configure locations to create invoice lines.
2- Create a shipment internal and assign => create account invoice lines from stock moves.
3- Duplicate the shipment => stock.move has the origin of the previous stock.move (account.invoice.line) 
4- Assign duplicated shipment => not generate  new invoice lines because has an origin
History
Date User Action Args
2018-08-29 15:20:16cedsetmessages: + msg43152
2018-08-29 15:00:05albertcasetnosy: + albertca
messages: + msg43151
2018-08-29 12:58:29cedsetcomponent: + stock_consignment, - stock
messages: + msg43148
2018-08-29 12:40:16pokolisetmessages: + msg43147
2018-08-29 12:39:33pokolisetnosy: + pokoli
messages: + msg43146
2018-08-29 12:21:52cedsetnosy: + ced
messages: + msg43143
2018-08-29 12:18:20restevecreate

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