9 Commits

Author SHA1 Message Date
OCA-git-bot
9e43f38081 [BOT] post-merge updates 2024-10-08 12:41:02 +00:00
sergiocorato
7dcaede3d7 [MIG] stock_orderpoint_generator to 14.0 2023-12-20 08:52:06 +01:00
OCA-git-bot
615d7a1c4d [UPD] README.rst 2023-11-06 16:45:37 +01:00
OCA-git-bot
72c7a61a87 [UPD] README.rst 2023-11-06 16:45:33 +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
cubells
fca38738f1 [MIG] stock_orderpoint_generator: Migration to 11.0 2023-11-06 16:45:25 +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