Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] stock_orderpoint_generator: Migration to 11.0 #488

Merged

Conversation

cubells
Copy link
Sponsor Member

@cubells cubells commented Sep 27, 2018

Cyril Gaudin and others added 7 commits September 26, 2018 10:59
…#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.
@cubells cubells force-pushed the 11.0-mig-stock_orderpoint_generator branch 2 times, most recently from ef93b5b to 9bc30c2 Compare September 27, 2018 12:31
@pedrobaeza pedrobaeza added this to the 11.0 milestone Sep 27, 2018
@cubells cubells force-pushed the 11.0-mig-stock_orderpoint_generator branch from 9bc30c2 to de893d8 Compare September 28, 2018 10:27
@cubells
Copy link
Sponsor Member Author

cubells commented Sep 28, 2018

@chienandalu done.

@pedrobaeza pedrobaeza mentioned this pull request Oct 1, 2018
46 tasks
Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

@rousseldenis
Copy link
Sponsor Contributor

@chienandalu Can you update your review ?

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

@rousseldenis rousseldenis merged commit 2bfe074 into OCA:11.0 Oct 9, 2018
i-vyshnevska pushed a commit to camptocamp/stock-logistics-warehouse that referenced this pull request Apr 13, 2020
…_preparation

[12.0] mig stock_picking_package_preparation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants