diff --git a/__init__.py b/__init__.py index cec787d..36203be 100644 --- a/__init__.py +++ b/__init__.py @@ -1,6 +1,5 @@ -#The COPYRIGHT file at the top level of this repository contains the full -#copyright notices and license terms. - +# The COPYRIGHT file at the top level of this repository contains the full +# copyright notices and license terms. from trytond.pool import Pool from .configuration import * from .work import * diff --git a/configuration.py b/configuration.py index d1b57fd..5a538db 100644 --- a/configuration.py +++ b/configuration.py @@ -1,5 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of -#this repository contains the full copyright notices and license terms. +# The COPYRIGHT file at the top level of this repository contains the full +# copyright notices and license terms. from trytond.model import ModelView, ModelSQL, ModelSingleton, fields from trytond.pyson import Eval @@ -9,6 +9,7 @@ __all__ = ['Configuration'] class Configuration(ModelSingleton, ModelSQL, ModelView): 'Project Template Configuration' __name__ = 'project.template.configuration' + default_template = fields.Property(fields.Many2One('project.work', 'Default Template', domain=[ ('company', 'in', [Eval('context', {}).get('company', 0)]), diff --git a/configuration.xml b/configuration.xml index 65de1d4..d25942e 100644 --- a/configuration.xml +++ b/configuration.xml @@ -1,9 +1,8 @@ - + - project.template.configuration form diff --git a/work.xml b/work.xml index eff8cb8..7c0e108 100644 --- a/work.xml +++ b/work.xml @@ -1,9 +1,8 @@ + copyright notices and license terms. --> - project.work tree @@ -23,7 +22,6 @@ work_template_form - [('parent', '=', None),('template', '=', False)] @@ -94,6 +92,5 @@ project.work,-1 -