Port product_no_translation to v10
This commit is contained in:
3
product_no_translation/__init__.py
Normal file
3
product_no_translation/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import product
|
||||
22
product_no_translation/__manifest__.py
Normal file
22
product_no_translation/__manifest__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2014-2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# 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'],
|
||||
}
|
||||
45
product_no_translation/product.py
Normal file
45
product_no_translation/product.py
Normal file
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2014-2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# 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)
|
||||
BIN
product_no_translation/static/description/icon.png
Normal file
BIN
product_no_translation/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.0 KiB |
Reference in New Issue
Block a user