Commit Graph

12 Commits

Author SHA1 Message Date
sergiocorato
19d9086b4d [IMP] stock_orderpoint_generator: black, isort, prettier 2023-11-06 16:45:38 +01:00
david
ee8a5cbfdc [IMP] stock_orderpoint_generator: delivered items options
A new option for auto computing minimum and maximum values depending on
the actual delivered items for a period of time
2023-11-06 16:45:34 +01:00
Víctor Martínez
1b95696248 [MIG] stock_orderpoint_generator: Migration to 13.0 2023-11-06 16:45:32 +01:00
Víctor Martínez
8a23ede668 [IMP] stock_orderpoint_generator: black, isort, prettier 2023-11-06 16:45:32 +01:00
david
b108263477 [MIG] stock_orderpoint_generator: Migration to 12.0 2023-11-06 16:45:30 +01:00
david
046ef447f8 [IMP] stock_orderpoint_generator: auto values 2023-11-06 16:45:28 +01:00
Cas Vissers
74dc43d6c4 [FIX] Fix singleton 2023-11-06 16:45:27 +01:00
cubells
fca38738f1 [MIG] stock_orderpoint_generator: Migration to 11.0 2023-11-06 16:45:25 +01:00
Nicolas Mac Rouillon
32595da4ec [FIX] stock_orderpoint_generator: fix a bug when iterate the data with call create (#466) 2023-11-06 16:45:24 +01:00
mreficent
557eb8a6f5 [FIX] stock_orderpoint_generator (fields don't exist) 2023-11-06 16:45:24 +01:00
Guewen Baconnier
48c8528874 [IMP] stock_orderpoint_generator: Add Automatic Reordering Rules (#258)
And improve the wording

* Add an option to automatically generate rules

When a product variant is created with a (or several) rule template(s), it
automatically generates (on the fly) the corresponding rule(s). When a rule template
is modified, it automatically updates the existing rules of the linked
products (it uses the mechanism in place, disable the old and create a
fresh one). The latter update is done by a cron because it might take a
long time to update all the products reordering rules.

* Add documentation

* Copy orderpoint views to orderpoint templates

Unfortunately we cannot rely on the possibility to copy a view with
"inherit_id" + "mode=primary" in Odoo 9.0 in this use case (precisely
with a model that is a "copy by prototype").

The explanation:

We "copy by prototype" the model "stock.warehouse.orderpoint" to a new
"stock.warehouse.orderpoint.template" model (with both _inherit and
different _name). Before this commit, we were reusing the
stock.warehouse.orderpoint's views, just making the changes needed for
the templates. Thing is: when a third (unrelated) addon adds a column on
the model, the ORM doesn't add the column in the
stock.warehouse.orderpoint.template model. So the templates' views
complains about this unexisting field.

Therefore, copy-pasting the view ensure that changes on
'stock.warehouse.orderpoint' does not have any side effect on the
templates.

From Odoo 10.0, the "copy by prototype" reports the changes made on the
"prototype" model to the "copy" so we should be able to revert to the
"inherit_id" + "mode=primary" views.
2023-11-06 16:45:23 +01:00
Cyril Gaudin
44aa70cb4f stock_orderpoint_generator: Migration V9 2023-11-06 16:45:21 +01:00