From 7611b785bcc965becf6a493900045ab6b01433e1 Mon Sep 17 00:00:00 2001 From: jmartin Date: Thu, 9 Jul 2015 11:30:13 +0200 Subject: [PATCH] Add filters field to electronic.mail.template model --- __init__.py | 2 ++ template.py | 15 +++++++++++++++ template.xml | 16 ++++++++++++++++ tryton.cfg | 3 ++- view/electronic_mail_template_form.xml | 9 +++++---- 5 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 template.py create mode 100644 template.xml diff --git a/__init__.py b/__init__.py index 5677041..de8d389 100644 --- a/__init__.py +++ b/__init__.py @@ -3,10 +3,12 @@ # copyright notices and license terms. from trytond.pool import Pool from .electronic_mail import * +from .template import * def register(): Pool.register( ElectronicMailFilter, SearchingStart, + Template, module='electronic_mail_filter', type_='model') diff --git a/template.py b/template.py new file mode 100644 index 0000000..c478e49 --- /dev/null +++ b/template.py @@ -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') diff --git a/template.xml b/template.xml new file mode 100644 index 0000000..a1246a7 --- /dev/null +++ b/template.xml @@ -0,0 +1,16 @@ + + + + + + + + electronic.mail.template + + electronic_mail_template_form + + + + diff --git a/tryton.cfg b/tryton.cfg index d4f7c56..aa1d0ea 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -6,4 +6,5 @@ depends: electronic_mail_template searching xml: - electronic_mail.xml \ No newline at end of file + electronic_mail.xml + template.xml diff --git a/view/electronic_mail_template_form.xml b/view/electronic_mail_template_form.xml index 6af1773..f716b65 100644 --- a/view/electronic_mail_template_form.xml +++ b/view/electronic_mail_template_form.xml @@ -3,9 +3,10 @@ The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. --> - -