Skip to content

Commit

Permalink
Merge faffe05 into 6e3b967
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-teruel committed Apr 15, 2019
2 parents 6e3b967 + faffe05 commit 8310c33
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sale_order_secondary_unit/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
'name': 'Sale Order Secondary Unit',
'summary': 'Sale product in a secondary unit',
'version': '11.0.1.0.1',
'version': '11.0.1.0.2',
'development_status': 'Beta',
'category': 'Sale',
'website': 'https://github.com/OCA/sale-workflow',
Expand Down
23 changes: 23 additions & 0 deletions sale_order_secondary_unit/migrations/11.0.1.0.2/post-migration.py
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)]
})
2 changes: 1 addition & 1 deletion sale_order_secondary_unit/views/product_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="name">Product template Secondary Unit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="groups_id" eval="[(4, ref('product.group_uom'))]"/>
<field name="groups_id" eval="[(4, ref('product_secondary_unit.group_secondary_unit'))]"/>
<field name="arch" type="xml">
<field name="uom_id" position="after">
<field name="sale_secondary_uom_id"
Expand Down
2 changes: 1 addition & 1 deletion sale_order_secondary_unit/views/sale_order_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="name">Sale Order Secondary Unit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="groups_id" eval="[(4, ref('product.group_uom'))]"/>
<field name="groups_id" eval="[(4, ref('product_secondary_unit.group_secondary_unit'))]"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/form//field[@name='price_subtotal']" position="after">
<field name="secondary_uom_qty" class="oe_inline oe_no_button"
Expand Down

0 comments on commit 8310c33

Please sign in to comment.