Issue 8363

Title
Improve _sync_inventory_to_outgoing
Priority
feature
Status
resolved
Superseder
Allow move as move's origin (issue 8253)
Project-Id-Version: Roundup 0.7.0 Report-Msgid-Bugs-To: roundup-devel@lists.sourceforge.net POT-Creation-Date: 2021-07-12 22:10-0400 PO-Revision-Date: 2004-11-20 13:47+0200 Language-Team: English Language: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii
No invoice created for shipment out between supplier and customer (issue 8566)
Nosy list
ced, mrichez, pokoli, resteve, reviewbot, roundup-bot, tbruyere
Assigned to
ced
Keywords
review

Created on 2019-05-20.15:31:20 by ced, last changed 39 months ago 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
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.
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.
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-10-30 12:42:38cedlinkissue8775 superseder
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:16cedsetmessages: + msg51229
superseder: + No invoice created for shipment out between supplier and customer
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

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