diff --git a/website_sale_prod_description/__manifest__.py b/website_sale_prod_description/__manifest__.py index 24480855..fbbf5c3e 100644 --- a/website_sale_prod_description/__manifest__.py +++ b/website_sale_prod_description/__manifest__.py @@ -20,7 +20,7 @@ { 'name': 'Website Sale Product Description', 'category': 'Hidden', - 'version': "16.0.1.1.0", + 'version': "16.0.1.2.0", 'author': 'ADHOC SA', 'website': 'www.adhoc.com.ar', 'license': 'AGPL-3', diff --git a/website_sale_prod_description/migrations/16.0.1.2.0/pre-migration.py b/website_sale_prod_description/migrations/16.0.1.2.0/pre-migration.py new file mode 100644 index 00000000..be975654 --- /dev/null +++ b/website_sale_prod_description/migrations/16.0.1.2.0/pre-migration.py @@ -0,0 +1,19 @@ +from openupgradelib import openupgrade +import logging +logger = logging.getLogger(__name__) + +@openupgrade.migrate() +def migrate(env, version): + + # Desactivamos temporalmente el noupdate para la vista + env.cr.execute(""" + UPDATE ir_model_data + SET noupdate = FALSE + WHERE module = 'website_sale_prod_description' + AND model = 'ir.ui.view' + AND name = 'product_description' + AND noupdate = TRUE; + """) + + logger.info('Forzamos la actualización de la vista de product_template_templates en módulo website_sale_prod_description') + openupgrade.load_data(env.cr, 'website_sale_prod_description', 'views/product_template_templates.xml')