Tryton - Issues

 

Issue8363

Title Improve _sync_inventory_to_outgoing
Priority feature Status resolved
Superseder Allow move as move's origin, No invoice created for shipment out between supplier and customer
View: 8253, 8566
Nosy List ced, mrichez, pokoli, resteve, reviewbot, roundup-bot, tbruyere
Type performance Components stock, stock_lot
Assigned To ced Keywords review
Reviews 261811002
View: 261811002

Created on 2019-05-20.15:31:20 by ced, last changed by roundup-bot.

Messages
New changeset b705e7f82fc6 by Cédric Krier in branch 'default':
Improve moves synchronisation on shipments
https://hg.tryton.org/tryton-env/rev/b705e7f82fc6
New changeset 2987a2201834 by Cédric Krier in branch 'default':
Improve moves synchronisation on shipments
https://hg.tryton.org/modules/stock_lot/rev/2987a2201834
New changeset 38e2a76db719 by Cédric Krier in branch 'default':
Improve moves synchronisation on shipments
https://hg.tryton.org/modules/stock/rev/38e2a76db719
msg51229 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-08-10.00:12:15
issue8566 must be fixed before otherwise this one will break it even more.
review261811002 updated at https://codereview.tryton.org/261811002/#ps285571003
review261811002 updated at https://codereview.tryton.org/261811002/#ps277581002
msg50585 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-09.17:54:48
Here is review261811002 which simplify the synchronization but also support lot for internal shipment.
The major difference is that changing the product of a inventory move will affect the outgoing move either.
A second difference is that move without any inventory will be set to zero instead of being deleted.
msg49776 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-05-20.15:31:19
With issue8253, we will have a link between the inventory moves and the outgoing moves. So I think the synchronization could be simplified and hardened by using the origin.
If we synchronize by origin then we could simplify the design for stock_lot.
So the algorithm could be:

- compute quantity per origin and a key (default: product and extended with lot) from the inventory moves
- update quantity of outgoing moves using origin of quantity:
   - check if the key is valid for original move:
     - if yes: update quantity if lower or create new move if higher
     - if no: copy with default quantity and other key values
- update quantity to zero for missing origin
- create new move for unknown origins

This will also support to change the product (standard replacement) on inventory move and update it on the outgoing move.
History
Date User Action Args
2019-08-18 19:23:08roundup-botsetmessages: + msg51338
2019-08-18 19:23:03roundup-botsetmessages: + msg51337
2019-08-18 19:22:58roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg51336
2019-08-10 00:12:16cedsetsuperseder: + No invoice created for shipment out between supplier and customer
messages: + msg51229
2019-07-18 10:10:47reviewbotsetmessages: + msg50711
2019-07-09 18:08:14reviewbotsetnosy: + reviewbot
messages: + msg50586
2019-07-09 17:54:48cedsetstatus: in-progress -> testing
reviews: 261811002
messages: + msg50585
keyword: + review
2019-07-04 15:35:36pokolisetnosy: + pokoli
2019-05-21 10:21:48tbruyeresetnosy: + tbruyere, mrichez
2019-05-20 16:22:27restevesetnosy: + resteve

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