2014-06-03 18:36:58 +02:00
|
|
|
# The COPYRIGHT file at the top level of this repository contains the full
|
|
|
|
# copyright notices and license terms.
|
2013-09-26 14:20:41 +02:00
|
|
|
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
|
|
|
|
from trytond.pyson import Eval
|
|
|
|
|
|
|
|
__all__ = ['Configuration']
|
|
|
|
|
|
|
|
|
|
|
|
class Configuration(ModelSingleton, ModelSQL, ModelView):
|
|
|
|
'Project Template Configuration'
|
|
|
|
__name__ = 'project.template.configuration'
|
2014-06-03 18:36:58 +02:00
|
|
|
|
2013-09-26 14:20:41 +02:00
|
|
|
default_template = fields.Property(fields.Many2One('project.work',
|
|
|
|
'Default Template', domain=[
|
|
|
|
('company', 'in', [Eval('context', {}).get('company', 0)]),
|
|
|
|
('template', '=', True),
|
|
|
|
], required=True))
|