diff --git a/product_sale_manufactured_for/README.rst b/product_sale_manufactured_for/README.rst index cfe9f396702..0d684e5a0cf 100644 --- a/product_sale_manufactured_for/README.rst +++ b/product_sale_manufactured_for/README.rst @@ -63,11 +63,13 @@ Contributors - Thierry Ducrest - Carlos Serra-Toro - Simone Orsi +- Nhan Tran Other credits ------------- -The development of this module was financially supported by Camptocamp +The migration of this module from 14.0 to 18.0 was financially supported +by Camptocamp Maintainers ----------- diff --git a/product_sale_manufactured_for/__manifest__.py b/product_sale_manufactured_for/__manifest__.py index 3425ac070c2..dafee5b404e 100644 --- a/product_sale_manufactured_for/__manifest__.py +++ b/product_sale_manufactured_for/__manifest__.py @@ -4,7 +4,7 @@ "name": "Product Manufactured for Customer", "summary": "Allows to indicate in products that they were made " "specifically for some customers.", - "version": "14.0.1.1.0", + "version": "18.0.1.0.0", "category": "Sales", "website": "https://github.com/OCA/product-attribute", "author": "Camptocamp, Odoo Community Association (OCA)", diff --git a/product_sale_manufactured_for/migrations/14.0.1.1.0/post-migrate.py b/product_sale_manufactured_for/migrations/14.0.1.1.0/post-migrate.py deleted file mode 100644 index 5918adb9ea1..00000000000 --- a/product_sale_manufactured_for/migrations/14.0.1.1.0/post-migrate.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2023 Camptocamp SA (http://www.camptocamp.com) -# @author Simone Orsi -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -import logging - -from odoo import SUPERUSER_ID, api, tools - -_logger = logging.getLogger(__name__) - - -def migrate(cr, version): - if not version: - return - - bkp_table = "product_template_res_partner_rel_bkp" - if not tools.sql.table_exists(cr, bkp_table): - return - - # Use backup table (created by pre-migrate step) - api.Environment(cr, SUPERUSER_ID, {}) - query = """ - INSERT INTO product_product_manuf_for_partner_rel - SELECT * FROM product_template_res_partner_rel_bkp - """ - cr.execute(query) - cr.execute("DROP TABLE product_template_res_partner_rel_bkp") - _logger.info("Table migrated") diff --git a/product_sale_manufactured_for/migrations/14.0.1.1.0/pre-migrate.py b/product_sale_manufactured_for/migrations/14.0.1.1.0/pre-migrate.py deleted file mode 100644 index 912b90e4bc3..00000000000 --- a/product_sale_manufactured_for/migrations/14.0.1.1.0/pre-migrate.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2023 Camptocamp SA -# @author Simone Orsi -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -import logging - -from odoo import tools - -_logger = logging.getLogger(__name__) - - -def migrate(cr, version): - if not version: - return - - # Backup old relation to be used later on post migrate - old_table = "product_template_res_partner_rel" - if not tools.sql.table_exists(cr, old_table): - return - bkp_table = "product_template_res_partner_rel_bkp" - if tools.sql.table_exists(cr, bkp_table): - return - - bkp_query = """ - CREATE TABLE IF NOT EXISTS - product_template_res_partner_rel_bkp - AS - SELECT - prod.id as product_id, - rel.res_partner_id as partner_id - FROM - product_product prod, - product_template_res_partner_rel rel - WHERE - prod.product_tmpl_id = rel.product_template_id; - """ - cr.execute(bkp_query) - _logger.info("Relations backed up") - - # cleanup possibly broken views - cr.execute( - """ - DELETE FROM ir_ui_view - WHERE model = 'product.template' - AND arch_db like '%manufactured_for_partner_ids%'; - """ - ) - _logger.info("Views cleaned up") diff --git a/product_sale_manufactured_for/readme/CONTRIBUTORS.md b/product_sale_manufactured_for/readme/CONTRIBUTORS.md index 24d167246e2..7aeb110feb5 100644 --- a/product_sale_manufactured_for/readme/CONTRIBUTORS.md +++ b/product_sale_manufactured_for/readme/CONTRIBUTORS.md @@ -1,3 +1,4 @@ - Thierry Ducrest \<\> - Carlos Serra-Toro \<\> - Simone Orsi \<\> +- Nhan Tran \<\> diff --git a/product_sale_manufactured_for/readme/CREDITS.md b/product_sale_manufactured_for/readme/CREDITS.md index 876f0f6ff5c..7777d29d620 100644 --- a/product_sale_manufactured_for/readme/CREDITS.md +++ b/product_sale_manufactured_for/readme/CREDITS.md @@ -1 +1 @@ -The development of this module was financially supported by Camptocamp +The migration of this module from 14.0 to 18.0 was financially supported by Camptocamp diff --git a/product_sale_manufactured_for/static/description/index.html b/product_sale_manufactured_for/static/description/index.html index 17a86db8cfc..0c549ba673a 100644 --- a/product_sale_manufactured_for/static/description/index.html +++ b/product_sale_manufactured_for/static/description/index.html @@ -409,11 +409,13 @@

Contributors

  • Thierry Ducrest <thierry.ducrest@camptocamp.com>
  • Carlos Serra-Toro <carlos.serra@camptocamp.com>
  • Simone Orsi <simone.orsi@camptocamp.com>
  • +
  • Nhan Tran <nhant@trobz.com>
  • Other credits

    -

    The development of this module was financially supported by Camptocamp

    +

    The migration of this module from 14.0 to 18.0 was financially supported +by Camptocamp

    Maintainers

    diff --git a/product_sale_manufactured_for/views/sale_order.xml b/product_sale_manufactured_for/views/sale_order.xml index dbb20f80177..558e7c05a0c 100644 --- a/product_sale_manufactured_for/views/sale_order.xml +++ b/product_sale_manufactured_for/views/sale_order.xml @@ -24,7 +24,7 @@