Add filters field to electronic.mail.template model
This commit is contained in:
parent
f52b0cf86f
commit
7611b785bc
|
@ -3,10 +3,12 @@
|
||||||
# copyright notices and license terms.
|
# copyright notices and license terms.
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from .electronic_mail import *
|
from .electronic_mail import *
|
||||||
|
from .template import *
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
ElectronicMailFilter,
|
ElectronicMailFilter,
|
||||||
SearchingStart,
|
SearchingStart,
|
||||||
|
Template,
|
||||||
module='electronic_mail_filter', type_='model')
|
module='electronic_mail_filter', type_='model')
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
# 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 PoolMeta
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['Template']
|
||||||
|
__metaclass__ = PoolMeta
|
||||||
|
|
||||||
|
|
||||||
|
class Template:
|
||||||
|
__name__ = 'electronic.mail.template'
|
||||||
|
|
||||||
|
filters = fields.One2Many('electronic.mail.filter', 'template',
|
||||||
|
'Filters')
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part electronic_mail_template module for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- electronic.mail.template -->
|
||||||
|
<record model="ir.ui.view" id="template_view_form">
|
||||||
|
<field name="model">electronic.mail.template</field>
|
||||||
|
<field name="inherit"
|
||||||
|
ref="electronic_mail_template.template_view_form"/>
|
||||||
|
<field name="name">electronic_mail_template_form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
|
@ -6,4 +6,5 @@ depends:
|
||||||
electronic_mail_template
|
electronic_mail_template
|
||||||
searching
|
searching
|
||||||
xml:
|
xml:
|
||||||
electronic_mail.xml
|
electronic_mail.xml
|
||||||
|
template.xml
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
The COPYRIGHT file at the top level of this repository contains the full
|
The COPYRIGHT file at the top level of this repository contains the full
|
||||||
copyright notices and license terms. -->
|
copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="/form/field[@name='language']"
|
<xpath expr="/form/notebook/page[@id='advanced']" position="after">
|
||||||
position="after">
|
<page string="Filters" id="filters">
|
||||||
<label name="single_email"/>
|
<label name="filters"/>
|
||||||
<field name="single_email"/>
|
<field name="filters"/>
|
||||||
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
|
|
Loading…
Reference in New Issue