Merge branch 'master-bhumika-hr-payroll' into 'master'

Master bhumika hr payroll

Closes #137

See merge request flectra-hq/flectra!174
This commit is contained in:
Parthiv Patel 2018-12-03 06:36:10 +00:00
commit 5bd42a122c
5 changed files with 50 additions and 1 deletions

View File

@ -28,6 +28,13 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record> </record>
<record id="hr_employee_comp_rule" model="ir.rule">
<field name="name">Employee multi company rule</field>
<field name="model_id" ref="model_hr_employee"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_job_comp_rule" model="ir.rule"> <record id="hr_job_comp_rule" model="ir.rule">
<field name="name">Job multi company rule</field> <field name="name">Job multi company rule</field>
<field name="model_id" ref="model_hr_job"/> <field name="model_id" ref="model_hr_job"/>

View File

@ -20,6 +20,7 @@ You can assign several contracts per employee.
'website': 'https://flectrahq.com/page/employees', 'website': 'https://flectrahq.com/page/employees',
'depends': ['hr'], 'depends': ['hr'],
'data': [ 'data': [
'security/contract_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'data/hr_contract_data.xml', 'data/hr_contract_data.xml',
'views/hr_contract_views.xml', 'views/hr_contract_views.xml',

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<record id="hr_contract_rule" model="ir.rule">
<field name="name">Hr Contract Multicompany</field>
<field name="model_id" ref="model_hr_contract"/>
<field name="domain_force">
['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
</field>
</record>
</data>
</flectra>

View File

@ -19,7 +19,10 @@ class HrPayrollStructure(models.Model):
@api.model @api.model
def _get_parent(self): def _get_parent(self):
return self.env.ref('hr_payroll.structure_base', False) if self.env.user.company_id.id == self.env.ref(
'base.base.main_company', False):
return self.env.ref('hr_payroll.structure_base', False)
return False
name = fields.Char(required=True) name = fields.Char(required=True)
code = fields.Char(string='Reference', required=True) code = fields.Char(string='Reference', required=True)

View File

@ -33,5 +33,29 @@
<field name="groups" eval="[(4, ref('hr_payroll.group_hr_payroll_manager'))]"/> <field name="groups" eval="[(4, ref('hr_payroll.group_hr_payroll_manager'))]"/>
</record> </record>
<record id="hr_payslip_rule" model="ir.rule">
<field name="name">Payslip Multicompany</field>
<field name="model_id" ref="model_hr_payslip"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_structure_rule" model="ir.rule">
<field name="name">Payroll Structure Multicompany</field>
<field name="model_id" ref="model_hr_payroll_structure"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_salary_rule_rule" model="ir.rule">
<field name="name">Hr Salary Rule Multicompany</field>
<field name="model_id" ref="model_hr_salary_rule"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_contribution_register_rule" model="ir.rule">
<field name="name">Hr Contribution Register Multicompany</field>
<field name="model_id" ref="model_hr_contribution_register"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
</data> </data>
</flectra> </flectra>