mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 10:19:09 +02:00
work on payroll
This commit is contained in:
@@ -62,6 +62,8 @@ class HrPayslip(models.Model):
|
||||
states={'draft': [('readonly', False)]})
|
||||
input_line_ids = fields.One2many('hr.payslip.input', 'payslip_id', string='Payslip Inputs',
|
||||
readonly=True, states={'draft': [('readonly', False)]})
|
||||
emp_salary_line_ids = fields.One2many('employee.salary.rule', 'emloyee_payslip_id', string='Salary rule',
|
||||
readonly=True)
|
||||
paid = fields.Boolean(string='Made Payment Order ? ', readonly=True, copy=False,
|
||||
states={'draft': [('readonly', False)]})
|
||||
note = fields.Text(string='Internal Note', readonly=True, states={'draft': [('readonly', False)]})
|
||||
@@ -648,3 +650,19 @@ class ResourceMixin(models.AbstractModel):
|
||||
'days': days,
|
||||
'hours': sum(day_hours.values()),
|
||||
}
|
||||
|
||||
class EmployeeSalary(models.Model):
|
||||
_name = 'employee.salary.rule'
|
||||
_description = 'Employee Payslip Salary Rule'
|
||||
|
||||
employee_id = fields.Many2one('hr.employee', string='Employee', required=True, readonly=True,
|
||||
help="Employee")
|
||||
emloyee_payslip_id = fields.Many2one('hr.payslip', string='Pay Slip',index=True, help="Payslip")
|
||||
basic_salary = fields.Float()
|
||||
other_allowance = fields.Float()
|
||||
housing_allowance = fields.Float('Housing Allowance')
|
||||
travel_allowance = fields.Float('Transportation Allowance')
|
||||
total_salary = fields.Float('Total Salary')
|
||||
monthly_deduct = fields.Float('Monthly Deduction in AED')
|
||||
deduction_start_date = fields.date('Deduction Start Date')
|
||||
deduction_end_date = fields.date('Deduction End Date')
|
||||
|
||||
@@ -252,6 +252,22 @@
|
||||
<field name="note" placeholder="Add an internal note..."/>
|
||||
</div>
|
||||
</page>
|
||||
<page string="Employee Salary rule">
|
||||
<separator string="Employee Rule"/>
|
||||
<field name="emp_salary_line_ids">
|
||||
<tree string="Employee Salary Rule" editable="bottom">
|
||||
<field name="employee_id"/>
|
||||
<field name="basic_salary"/>
|
||||
<field name="other_allowance"/>
|
||||
<field name="housing_allowance"/>
|
||||
<field name="travel_allowance"/>
|
||||
<field name="total_salary"/>
|
||||
<field name="monthly_deduct"/>
|
||||
<field name="deduction_start_date"/>
|
||||
<field name="deduction_end_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user