diff --git a/README b/README
index 9ba4c1e..b2cf1b4 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ questions on the NaN·tic bug tracker, mailing list,
wiki or IRC channel:
* http://doc.tryton-erp.es/
-* http://bitbucket.org/nantic/trytond-product_brand
+* http://bitbucket.org/nantic/trytond-product_brand_esale
* http://groups.tryton.org/
* http://wiki.tryton.org/
* irc://irc.freenode.net/tryton
diff --git a/__init__.py b/__init__.py
index 2d9e22f..5ee9de1 100644
--- a/__init__.py
+++ b/__init__.py
@@ -7,5 +7,4 @@ from . import product
def register():
Pool.register(
product.Brand,
- product.Template,
- module='product_brand', type_='model')
+ module='product_brand_esale', type_='model')
diff --git a/locale/ca.po b/locale/ca.po
index 6790893..964b94d 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -1,7 +1,15 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.brand:"
+msgid ""
+"There is another brand with the same slug. The slug of the active brands "
+"must be unique!"
+msgstr ""
+"Hi ha una altre marca amb el mateix slug. L'slug de les marques actives ha "
+"de ser únic!"
+
msgctxt "field:product.brand,create_date:"
msgid "Create Date"
msgstr "Data creació"
@@ -10,10 +18,26 @@ msgctxt "field:product.brand,create_uid:"
msgid "Create User"
msgstr "Usuari creació"
+msgctxt "field:product.brand,description:"
+msgid "Brand Description"
+msgstr "Descripció de la marca"
+
msgctxt "field:product.brand,id:"
msgid "ID"
msgstr "ID"
+msgctxt "field:product.brand,metadescription:"
+msgid "Meta Description"
+msgstr "Meta Description"
+
+msgctxt "field:product.brand,metakeywords:"
+msgid "Meta Keywords"
+msgstr "Meta Keywords"
+
+msgctxt "field:product.brand,metatitle:"
+msgid "Meta Title"
+msgstr "Meta Title"
+
msgctxt "field:product.brand,name:"
msgid "Name"
msgstr "Nom"
@@ -22,6 +46,14 @@ msgctxt "field:product.brand,rec_name:"
msgid "Name"
msgstr "Nom"
+msgctxt "field:product.brand,slug:"
+msgid "Slug"
+msgstr "Slug"
+
+msgctxt "field:product.brand,url:"
+msgid "URL"
+msgstr "URL"
+
msgctxt "field:product.brand,write_date:"
msgid "Write Date"
msgstr "Data modificació"
@@ -34,11 +66,19 @@ msgctxt "field:product.template,brand:"
msgid "Brand"
msgstr "Marca"
-msgctxt "model:ir.action,name:act_product_brand"
+msgctxt "help:product.brand,metadescription:"
+msgid ""
+"Almost all search engines recommend it to be shorter than 155 characters of "
+"plain text"
+msgstr ""
+"La majoria de motors de cerca recomanen que sigui menor de 155 caracters de "
+"text plà"
+
+msgctxt "model:ir.action,name:"
msgid "Brands"
msgstr "Marques"
-msgctxt "model:ir.ui.menu,name:menu_product_brand"
+msgctxt "model:ir.ui.menu,name:"
msgid "Brands"
msgstr "Marques"
diff --git a/locale/es.po b/locale/es.po
index 2221371..945bbb9 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -1,7 +1,15 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "error:product.brand:"
+msgid ""
+"There is another brand with the same slug. The slug of the active brands "
+"must be unique!"
+msgstr ""
+"Hay otra marca con el mismo slug. El slug de las marcas activas debe ser "
+"único!"
+
msgctxt "field:product.brand,create_date:"
msgid "Create Date"
msgstr "Fecha creación"
@@ -14,6 +22,18 @@ msgctxt "field:product.brand,id:"
msgid "ID"
msgstr "ID"
+msgctxt "field:product.brand,metadescription:"
+msgid "Meta Description"
+msgstr "Meta Description"
+
+msgctxt "field:product.brand,metakeywords:"
+msgid "Meta Keywords"
+msgstr "Meta Keywords"
+
+msgctxt "field:product.brand,metatitle:"
+msgid "Meta Title"
+msgstr "Meta Title"
+
msgctxt "field:product.brand,name:"
msgid "Name"
msgstr "Nombre"
@@ -22,6 +42,14 @@ msgctxt "field:product.brand,rec_name:"
msgid "Name"
msgstr "Nombre"
+msgctxt "field:product.brand,slug:"
+msgid "Slug"
+msgstr "Slug"
+
+msgctxt "field:product.brand,url:"
+msgid "URL"
+msgstr "URL"
+
msgctxt "field:product.brand,write_date:"
msgid "Write Date"
msgstr "Fecha modificación"
@@ -34,11 +62,19 @@ msgctxt "field:product.template,brand:"
msgid "Brand"
msgstr "Marca"
-msgctxt "model:ir.action,name:act_product_brand"
+msgctxt "help:product.brand,metadescription:"
+msgid ""
+"Almost all search engines recommend it to be shorter than 155 characters of "
+"plain text"
+msgstr ""
+"La mayoría de los motores de búsqueda recomiendan un texto plano de no más "
+"de 155 caracteres."
+
+msgctxt "model:ir.action,name:"
msgid "Brands"
msgstr "Marcas"
-msgctxt "model:ir.ui.menu,name:menu_product_brand"
+msgctxt "model:ir.ui.menu,name:"
msgid "Brands"
msgstr "Marcas"
diff --git a/product.py b/product.py
index a1149b9..362ef4e 100644
--- a/product.py
+++ b/product.py
@@ -1,22 +1,23 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
-from trytond.model import ModelView, ModelSQL, fields, Unique
+from trytond.model import fields, Unique
from trytond.pool import PoolMeta
-from trytond.modules.product.product import STATES, DEPENDS
from slug import slug
-__all__ = ['Brand', 'Template']
+__all__ = ['Brand']
-class Brand(ModelSQL, ModelView):
- '''Brand'''
+class Brand:
+ __metaclass__ = PoolMeta
__name__ = 'product.brand'
- name = fields.Char('Name', required=True, translate=True)
- active = fields.Boolean('Active')
url = fields.Char('URL', translate=True)
slug = fields.Char('Slug', translate=True)
- products = fields.One2Many('product.template', 'brand', 'Products')
+ metadescription = fields.Char('Meta Description', translate=True,
+ help=('Almost all search engines recommend it to be shorter than 155 '
+ 'characters of plain text'))
+ metakeywords = fields.Char('Meta Keywords', translate=True)
+ metatitle = fields.Char('Meta Title', translate=True)
@classmethod
def __setup__(cls):
@@ -24,24 +25,13 @@ class Brand(ModelSQL, ModelView):
t = cls.__table__()
cls._sql_constraints += [
('slug_uniq', Unique(t, t.active, t.slug),
- 'There is another brand with the same slug.\n'
- 'The slug of the active brands must be unique!'),
+ ('There is another brand with the same slug. The slug of the '
+ 'active brands must be unique!')),
]
- @staticmethod
- def default_active():
- return True
-
@fields.depends('name', 'slug', 'active')
def on_change_with_slug(self):
if self.name and not self.slug and self.active:
return slug(self.name)
else:
return self.slug
-
-
-class Template:
- __name__ = 'product.template'
- __metaclass__ = PoolMeta
- brand = fields.Many2One('product.brand', 'Brand', states=STATES,
- depends=DEPENDS)
diff --git a/product.xml b/product.xml
index 36777ee..a38287e 100644
--- a/product.xml
+++ b/product.xml
@@ -3,58 +3,10 @@
copyright notices and license terms. -->