-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
sale_order_secondary_unit/migrations/11.0.1.0.2/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2019 Tecnativa - Sergio Teruel | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl | ||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate(use_env=True) | ||
def migrate(env, version): | ||
# Remove old security group_uom from product template view because now has | ||
# a new group for secondary units | ||
group_uom = env.ref('product.group_uom') | ||
view_product_template = env.ref( | ||
'sale_order_secondary_unit.product_template_form_view') | ||
view_product_template.write({ | ||
'groups_id': [(3, group_uom.id)] | ||
}) | ||
|
||
# Remove old security group_uom from sale order view because now has a | ||
# new group for secondary units | ||
view_product_template = env.ref( | ||
'sale_order_secondary_unit.view_order_form') | ||
view_product_template.write({ | ||
'groups_id': [(3, group_uom.id)] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters