diff --git a/product_name_translate_false/__init__.py b/product_name_translate_false/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/product_name_translate_false/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_name_translate_false/__manifest__.py b/product_name_translate_false/__manifest__.py new file mode 100644 index 00000000..760a2408 --- /dev/null +++ b/product_name_translate_false/__manifest__.py @@ -0,0 +1,12 @@ +# Copyright 2024 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Product Name Translate False", + "version": "11.0.1.0.0", + "author": "Quartile Limited", + "website": "https://www.quartile.co", + "category": "Product", + "license": "AGPL-3", + "depends": ["product"], + "installable": True, +} diff --git a/product_name_translate_false/models/__init__.py b/product_name_translate_false/models/__init__.py new file mode 100644 index 00000000..e8fa8f6b --- /dev/null +++ b/product_name_translate_false/models/__init__.py @@ -0,0 +1 @@ +from . import product_template diff --git a/product_name_translate_false/models/product_template.py b/product_name_translate_false/models/product_template.py new file mode 100644 index 00000000..6d493a2d --- /dev/null +++ b/product_name_translate_false/models/product_template.py @@ -0,0 +1,10 @@ +# Copyright 2024 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + name = fields.Char(translate=False) diff --git a/product_name_translate_false/readme/DESCRIPTION.rst b/product_name_translate_false/readme/DESCRIPTION.rst new file mode 100644 index 00000000..4c4d9907 --- /dev/null +++ b/product_name_translate_false/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module disables the product name field translation, as a workaround for the performance issue +described in https://github.com/odoo/odoo/issues/18679.