Commit Graph

22 Commits

Author SHA1 Message Date
david
ed2a9b865b [FIX] stock_available_mrp: normal BoM available to promise
Normal BoM products (those which are manufactured) are regular stored
products and their immediately_usable_qty will be summed with potential
stock. This was the expected behavior of the module and it was lost at
some point.

Phantom BoM products (kits) don't have real stock so their available to
promise quantity will be the same as the potential.

As an improvement, we've added the possibility to override the sum of
potential and available to promise. In some cases such addition doesn't
make sense as we don't know how long can take to manufacture those potential
units.

TT35589
2022-05-09 16:19:57 +02:00
Víctor Martínez
29a63ae105 [FIX] stock_available_mrp: Set correctlly immediately_usable_qty value.
TT27873
2022-03-02 13:18:39 +01:00
Cédric Pigeon
a4c6c5b8bf [14.0] stock_available: improve search performance 2021-10-01 21:56:52 +02:00
Cédric Pigeon
08a708a649 [14.0] stock_available_mrp: improve performance by using standard field 2021-10-01 17:25:23 +02:00
Guewen Baconnier
5dc3fc08a1 Improve performance of stock available of BoMs
Use an optimized method to explode the BoM. The explode methods
include data and a cycle check that we don't need here. Besides,
it calls '_bom_find' on every bom line of the graph, which generates
thousands of SELECT queries on large BoMs.
2021-10-01 17:24:02 +02:00
sbejaoui
7414c84313 [FIX] - local variable referenced before assignment 2021-06-09 15:21:32 +02:00
Florian da Costa
45a6669428 Migrate stock_available_mrp to v14 2021-05-27 18:18:11 +02:00
Víctor Martínez
baa9673b45 [MIG] stock_available_mrp: Migration to 13.0 2021-05-27 12:42:07 +02:00
Víctor Martínez
67767fb5b6 [IMP] stock_available_mrp: black, isort, prettier 2021-05-27 12:42:07 +02:00
Florian da Costa
8436495372 Make stock_available_mrp compatible with other modules like stock_available_immediately 2021-05-27 12:42:07 +02:00
Florian da Costa
7d864341dd Migrate stock_available_mrp to v12 2021-05-27 12:42:07 +02:00
Timon Tschanz
e6a9e9bf43 [11.0][MIG] port stock_available_mrp to 11.0 2021-05-27 12:42:07 +02:00
Timon Tschanz
85883c4ab0 [FIX] stock_available_mrp: remove duplicate button + fix calculation of immediately usable qty 2021-05-27 12:42:07 +02:00
Cédric Pigeon
cd5c206d2e [ADD] include new improvments 2021-05-27 12:42:07 +02:00
Denis Roussel
1e923a2b56 [IMP] stock_available_mrp: readability + change compute bom_id + use recordset + Condition never statisfied 2021-05-27 12:42:07 +02:00
Cédric Pigeon
e23de10ffd [10.0][MIG] port stock_available_mrp to 10.0 2021-05-27 12:42:07 +02:00
Cyril Gaudin
d1839d73da V9 migration modifications.
* mrp_bom.name has been deleted.
    * mrp_bom_line.type moved to mrp_bom.type.
    * Fix missing group_mrp_user issue.
    * Change versions
2021-05-27 12:42:07 +02:00
Cyril Gaudin
ebb9c4d7ad [FIX+IMP] stock_available_mrp: fix recursive potential_qty in list view + small improvements 2021-05-27 12:42:07 +02:00
Laetitia Gangloff
c23889e8ba stock_available / stock_available_mrp : add possibility to choose which field use to compute potential 2021-05-27 12:42:07 +02:00
Cyril Gaudin
f31bdb5bb6 stock_available_mrp: fix BOM qty (multi-units, efficiency) 2021-05-27 12:42:07 +02:00
Laurent Mignon (ACSONE)
ce28b0cb9b [FIX] Browse mrp.bom as current user
sudo is not required since mrp.bom are readable to groups with access to the qty_x fields on a product. Moreover using sudo to retrive the bom will ignore the company_id defined on the bom
2021-05-27 12:42:07 +02:00
Lionel Sausin
18a5ec23a9 [MIGR] stock_available_mrp: migrate to v8
Compute potential quantities for both product templates and variants. To keep the code simple, only the biggest potential of any single variant is accounted for in the template's potential.
Take all levels of phantom BoM into account, respects validity dates etc. thanks to the use of the standard method _bom_explode, as suggested by @gdgellatly in https://github.com/OCA/stock-logistics-warehouse/pull/5#issuecomment-66902191
Improve tests, rewritten in python.
Adhere to new file/manifest/README conventions.
Simplify copyright headers
2021-05-27 12:42:07 +02:00