2017-03-16 18:48:43 +01:00
|
|
|
# This file is part electronic_mail module for Tryton.
|
|
|
|
# The COPYRIGHT file at the top level of this repository contains
|
|
|
|
# the full copyright notices and license terms.
|
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
from trytond import backend
|
|
|
|
|
|
|
|
__all__ = ['Activity']
|
|
|
|
|
|
|
|
|
2018-09-15 18:09:14 +02:00
|
|
|
class Activity(metaclass=PoolMeta):
|
2017-03-16 18:48:43 +01:00
|
|
|
__name__ = "activity.activity"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def __setup__(cls):
|
|
|
|
super(Activity, cls).__setup__()
|
|
|
|
# TODO change required to state required
|
|
|
|
cls.employee.required = False
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def __register__(cls, module_name):
|
2020-06-06 17:18:31 +02:00
|
|
|
table = backend.TableHandler(cls, module_name)
|
2017-03-16 18:48:43 +01:00
|
|
|
|
|
|
|
super(Activity, cls).__register__(module_name)
|
|
|
|
table.not_null_action('employee', 'remove')
|