[IMP] hr_contract: Add 'reported_to_secretariat' field on contracts

Informative field to be greened when the related information is sent to
the secretariat or the government.
This commit is contained in:
Yannick Tivisse
2018-05-04 09:46:22 +02:00
parent 60527f9b6d
commit 4117f346af
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -84,6 +84,8 @@ class Contract(models.Model):
permit_no = fields.Char('Work Permit No', related="employee_id.permit_no")
visa_no = fields.Char('Visa No', related="employee_id.visa_no")
visa_expire = fields.Date('Visa Expire Date', related="employee_id.visa_expire")
reported_to_secretariat = fields.Boolean('Social Secretariat',
help='Green this button when the contract information has been transfered to the social secretariat.')
def _expand_states(self, states, domain, order):
return [key for key, val in type(self).state.selection]
@@ -69,6 +69,8 @@
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<separator/>
<filter string="To Report to Social Secretariat" name="to_report" domain="[('reported_to_secretariat', '=', False)]"/>
<separator/>
<filter string="Important Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
<group expand="0" string="Group By">
<filter string="Employee" name="employee" domain="[]" context="{'group_by':'employee_id'}"/>
@@ -108,6 +110,7 @@
</group>
<group>
<field name="type_id"/>
<field name="reported_to_secretariat" widget="toggle_button" options='{"active": "Reported to the social secretariat", "inactive": "To report to the social secretariat"}'/>
</group>
</group>
<notebook>