diff --git a/product_no_translation/__init__.py b/product_no_translation/__init__.py new file mode 100644 index 0000000..d7d7308 --- /dev/null +++ b/product_no_translation/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import product diff --git a/product_no_translation/__manifest__.py b/product_no_translation/__manifest__.py new file mode 100644 index 0000000..fbb406c --- /dev/null +++ b/product_no_translation/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# © 2014-2018 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +{ + 'name': 'Product no Translation', + 'version': '10.0.1.0.0', + 'category': 'Sales', + 'license': 'AGPL-3', + 'summary': "For companies work with several languages but not for products", + 'description': """ +This module sets the translatable fields of the product object (name, +descriptions) to non-translatable fields. + +This change is usefull for companies that work with several languages BUT that don't translate product names. + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['product'], +} diff --git a/product_no_translation/product.py b/product_no_translation/product.py new file mode 100644 index 0000000..b827205 --- /dev/null +++ b/product_no_translation/product.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# © 2014-2018 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, fields + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + name = fields.Char(translate=False) + description = fields.Text(translate=False) + description_purchase = fields.Text(translate=False) + description_sale = fields.Text(translate=False) + + +class ProductCategory(models.Model): + _inherit = "product.category" + + name = fields.Char(translate=False) + + +class ProductAttribute(models.Model): + _inherit = "product.attribute" + + name = fields.Char(translate=False) + + +class ProductAttributeValue(models.Model): + _inherit = "product.attribute.value" + + name = fields.Char(translate=False) + + +class ProductUomCateg(models.Model): + _inherit = 'product.uom.categ' + + name = fields.Char(translate=False) + + +class ProductUom(models.Model): + _inherit = 'product.uom' + + name = fields.Char(translate=False) diff --git a/product_no_translation/static/description/icon.png b/product_no_translation/static/description/icon.png new file mode 100644 index 0000000..7650d1d Binary files /dev/null and b/product_no_translation/static/description/icon.png differ