diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index bfc84d6750d..753d3d6d017 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -522,7 +522,7 @@ class company_contribution(osv.osv): 'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Heads', required=False), 'name':fields.char('Name', size=256, required=True, readonly=False), 'code':fields.char('Code', size=64, required=True, readonly=False), - 'include_in_salary':fields.boolean('Included in Salary ?', help='If company contribute on this deduction then should company contribution is also deducted from Employee Salary'), +# 'include_in_salary':fields.boolean('Included in Salary ?', help='If company contribute on this deduction then should company contribution is also deducted from Employee Salary'), 'gratuity':fields.boolean('Use for Gratuity ?', required=False), 'line_ids':fields.one2many('company.contribution.line', 'contribution_id', 'Calculations', required=False), 'register_id':fields.property( @@ -537,19 +537,20 @@ class company_contribution(osv.osv): ), 'amount_type':fields.selection([ ('fix','Fixed Amount'), + ('per','Percentage'), ('func','Function Calculation'), ],'Amount Type', select=True), 'contribute_per':fields.float('Contribution', digits=(16, 4), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'), - 'account_id':fields.property( - 'account.account', - type='many2one', - relation='account.account', - string="Account", - method=True, - view_load=True, - help="Expanse account where company expanse will be encoded", - required=False - ), +# 'account_id':fields.property( +# 'account.account', +# type='many2one', +# relation='account.account', +# string="Account", +# method=True, +# view_load=True, +# help="Expanse account where company expanse will be encoded", +# required=False +# ), 'company_id':fields.many2one('res.company', 'Company', required=False), 'active':fields.boolean('Active', required=False), 'note': fields.text('Description'), diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index 97b6ac70cee..a85fcc2462c 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -644,8 +644,6 @@ - - @@ -654,9 +652,11 @@ - - - + + + + + diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index 9c1ab7a5c30..063090cbe83 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -393,6 +393,11 @@ class hr_payslip(osv.osv): line_ids += [movel_pool.create(cr, uid, rec)] + for contrub in line.category_id.contribute_ids: + print contrib.name, contrub.code, contrub.amount_type, contrib.contribute_per, line.total + + + # if line.company_contrib > 0: # company_contrib = line.company_contrib ## if line.category_id.amount_type == 'per':