Product: Hot field

This commit is contained in:
resteve 2014-06-05 16:01:31 +02:00
parent 77b178729a
commit 09748e7745
5 changed files with 38 additions and 0 deletions

View File

@ -4,10 +4,12 @@
from trytond.pool import Pool
from .galatea import *
from .shop import *
from .product import *
def register():
Pool.register(
GalateaWebSite,
GalateaUser,
SaleShop,
Template,
module='galatea_esale', type_='model')

13
product.py Normal file
View File

@ -0,0 +1,13 @@
#This file is part galatea_esale module for Tryton.
#The COPYRIGHT file at the top level of this repository contains
#the full copyright notices and license terms.
from trytond.model import fields
from trytond.pool import Pool, PoolMeta
__all__ = ['Template']
__metaclass__ = PoolMeta
class Template:
__name__ = 'product.template'
esale_hot = fields.Boolean('Hot', help='Icon Hot product')

13
product.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!-- This file is part galatea_esale module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="template_view_form">
<field name="model">product.template</field>
<field name="type">form</field>
<field name="inherit" ref="product.template_view_form"/>
<field name="name">template_form</field>
</record>
</data>
</tryton>

View File

@ -6,3 +6,4 @@ depends:
product_esale
xml:
galatea.xml
product.xml

9
view/template_form.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part product_esale module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook/page[@id=&quot;esale&quot;]/notebook/page[@id=&quot;esale-general&quot;]/field[@name=&quot;esale_sequence&quot;]" position="after">
<label name="esale_hot"/>
<field name="esale_hot"/>
</xpath>
</data>