Add stock_move_auto_assign

Automatically check availability of stock moves when a move is set to "done".

It uses queue jobs to verify the availability in order to have a minimal impact
on the user operations.

The conditions to trigger the check are:

* A move is marked as done
* The destination locations of the move lines are internal
* The move doesn't have successors in a chain of moves

At this point, jobs are generated:

* One job per product
* Any move waiting for stock in a parent (or same) location of the internal
  destination locations from the done move has its availability checked

Only one job is generated for an identical set of (product, locations).
This commit is contained in:
Guewen Baconnier
2020-06-12 16:12:12 +02:00
parent 6e00f29d20
commit d3b1dbdd05
11 changed files with 277 additions and 0 deletions

View File

@@ -0,0 +1 @@
../../../../stock_move_auto_assign

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)