Skip to content

Commit

Permalink
[MIG] product_variant_specific_description: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Luis-Mora committed May 8, 2024
1 parent e6ae638 commit c762def
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion product_variant_specific_description/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Product Variant Specific Description",
"version": "16.0.1.0.1",
"version": "17.0.1.0.1",
"category": "Product",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-variant",
Expand Down
4 changes: 2 additions & 2 deletions product_variant_specific_description/init_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
logger = logging.getLogger(__name__)


def post_init_hook(cr, registry):
def post_init_hook(env):
logger.info("Setting product variant description with product template description")
cr.execute(
env.cr.execute(
"""
UPDATE product_product pp
SET description = pt.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='description']/.." position="attributes">
<attribute
name="attrs"
>{'invisible': [('product_variant_count', '>', 1)]}</attribute>
name="invisible"
>'product_variant_count', '>', 1</attribute>
</xpath>
<xpath expr="//field[@name='description']" position="attributes">
<attribute
name="attrs"
>{'readonly': [('is_system_multi_lang', '=', True)]}</attribute>
name="readonly"
>is_system_multi_lang</attribute>
</xpath>
<xpath expr="//field[@name='description']" position="before">
<field name="is_system_multi_lang" invisible="1" />
<field name="is_system_multi_lang" column_invisible="1" />
<p
colspan="2"
attrs="{'invisible': [('is_system_multi_lang', '=', False)]}"
invisible="not is_system_multi_lang"
>
<i
class="fa fa-info-circle"
Expand Down

0 comments on commit c762def

Please sign in to comment.