Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Tryton Tryton
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 796
    • Issues 796
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 94
    • Merge requests 94
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Tryton
  • TrytonTryton
  • Issues
  • #8363
Closed
Open
Created May 20, 2019 by Cédric Krier@cedOwner

Improve _sync_inventory_to_outgoing

With #8253 (closed), 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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking