diff --git a/CHANGELOG b/CHANGELOG
index 577b063709..339437b9bd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+* Add start and end dates on employee
+
Version 4.0.0 - 2016-05-02
* Bug fixes (see mercurial logs for details)
* Add Python3 support
diff --git a/company.py b/company.py
index 8f39425e30..3223270225 100644
--- a/company.py
+++ b/company.py
@@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import copy
+
from trytond.model import ModelView, ModelSQL, fields
from trytond.wizard import Wizard, StateView, Button, StateTransition
from trytond.report import Report
@@ -61,6 +62,20 @@ class Employee(ModelSQL, ModelView):
_rec_name = 'party'
party = fields.Many2One('party.party', 'Party', required=True)
company = fields.Many2One('company.company', 'Company', required=True)
+ start_date = fields.Date('Start Date',
+ domain=[If((Eval('start_date')) & (Eval('end_date')),
+ ('start_date', '<=', Eval('end_date')),
+ (),
+ )
+ ],
+ depends=['end_date'])
+ end_date = fields.Date('End Date',
+ domain=[If((Eval('start_date')) & (Eval('end_date')),
+ ('end_date', '>=', Eval('start_date')),
+ (),
+ )
+ ],
+ depends=['start_date'])
@staticmethod
def default_company():
diff --git a/view/employee_form.xml b/view/employee_form.xml
index f8000de26f..af0da7a19e 100644
--- a/view/employee_form.xml
+++ b/view/employee_form.xml
@@ -6,4 +6,8 @@ this repository contains the full copyright notices and license terms. -->
+
+
+
+
diff --git a/view/employee_tree.xml b/view/employee_tree.xml
index 9312626eb8..137b2d1a71 100644
--- a/view/employee_tree.xml
+++ b/view/employee_tree.xml
@@ -4,4 +4,6 @@ this repository contains the full copyright notices and license terms. -->
+
+