Port product_no_translation to v10

This commit is contained in:
Alexis de Lattre
2018-01-18 18:18:26 +01:00
parent 9a8d9616b7
commit 1ed7034ee4
4 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import product

View 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'],
}

View 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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB