44class HrContract (models .Model ):
55 _inherit = 'hr.contract'
66
7- l10n_in_basic_salary = fields .Float (string = "Basic Salary" , help = "Basic salary calculated from the wage" , compute = "_compute_l10n_in_basic_salary" , inverse = "_inverse_l10n_in_basic_salary" )
8- l10n_in_house_rent_allowance = fields .Float (string = "House Rent Allowance" , compute = "_compute_l10n_in_house_rent_allowance" , inverse = "_inverse_l10n_in_house_rent_allowance" )
9- l10n_in_standard_allowance = fields .Float (string = "Standard Allowance" , default = 4167 )
10- l10n_in_performance_bonus = fields .Float (string = "Performance Bonus" , compute = "_compute_l10n_in_performance_bonus" , inverse = "_inverse_l10n_in_performance_bonus" )
11- l10n_in_leave_travel_allowance = fields .Float (string = "Leave Travel Allowance" , compute = "_compute_l10n_in_leave_travel_allowance" , inverse = "_inverse_l10n_in_leave_travel_allowance" )
12- l10n_in_leave_allowance = fields .Float (string = "Leave Allowance" , compute = "_compute_leave_allowance" , inverse = "_inverse_leave_allowance" )
7+ l10n_in_basic_salary = fields .Monetary (string = "Basic Salary" , help = "Basic salary calculated from the wage" , compute = "_compute_l10n_in_basic_salary" , inverse = "_inverse_l10n_in_basic_salary" , currency_field = "currency_id " )
8+ l10n_in_house_rent_allowance = fields .Monetary (string = "House Rent Allowance" , compute = "_compute_l10n_in_house_rent_allowance" , inverse = "_inverse_l10n_in_house_rent_allowance" , currency_field = "currency_id " )
9+ l10n_in_standard_allowance = fields .Monetary (string = "Standard Allowance" , default = 4167 , currency_field = "currency_id" )
10+ l10n_in_performance_bonus = fields .Monetary (string = "Performance Bonus" , compute = "_compute_l10n_in_performance_bonus" , inverse = "_inverse_l10n_in_performance_bonus" , currency_field = "currency_id " )
11+ l10n_in_leave_travel_allowance = fields .Monetary (string = "Leave Travel Allowance" , compute = "_compute_l10n_in_leave_travel_allowance" , inverse = "_inverse_l10n_in_leave_travel_allowance" , currency_field = "currency_id " )
12+ l10n_in_leave_allowance = fields .Monetary (string = "Leave Allowance" , compute = "_compute_leave_allowance" , inverse = "_inverse_leave_allowance" , currency_field = "currency_id " )
1313 l10n_in_leave_days = fields .Float (string = "Leave Days" , default = 1 )
14- l10n_in_gratuity = fields .Float (string = "Gratuity" , default = 0 )
15- l10n_in_supplementary_allowance = fields .Float (string = "Supplementary Allowance" , compute = "_compute_l10n_in_supplementary_allowance" , inverse = "_inverse_l10n_in_supplementary_allowance" , default = 0 )
14+ l10n_in_gratuity = fields .Monetary (string = "Gratuity" , currency_field = "currency_id" )
15+ l10n_in_supplementary_allowance = fields .Monetary (string = "Supplementary Allowance" , compute = "_compute_l10n_in_supplementary_allowance" , inverse = "_inverse_l10n_in_supplementary_allowance" , currency_field = "currency_id" )
1616
1717 l10n_in_basic_salary_percent = fields .Float (string = "Basic Salary Percentage" , help = "basic salary percentage of wage" , default = 50 )
1818 l10n_in_house_rent_allowance_percent = fields .Float (string = "House Rent Allowance Percentage" , help = "this is the percentage of basic salary" , default = 50 )
@@ -24,14 +24,14 @@ class HrContract(models.Model):
2424 l10n_in_gratuity_percent = fields .Float (string = "Gratuity Percentage" , compute = "_compute_l10n_in_gratuity_percent" , inverse = "_inverse_l10n_in_gratuity_percent" )
2525 l10n_in_supplementary_allowance_percent = fields .Float (string = "Supplementary Allowance Percentage" )
2626
27- l10n_in_pf_employee_contribution = fields .Float (related = "company_id.l10n_in_pf_employee_contribution " , readonly = False )
28- l10n_in_pf_employer_contribution = fields .Float (related = "company_id.l10n_in_pf_employer_contribution " , readonly = False )
29- l10n_in_professional_tax = fields .Float (string = "Professional Tax" , default = 200 )
30- l10n_in_esic_employee_contribution = fields .Float (related = "company_id.l10n_in_esic_employee_contribution " , readonly = False )
31- l10n_in_esic_employer_contribution = fields .Float (related = "company_id.l10n_in_esic_employer_contribution " , readonly = False )
32- l10n_in_lwf_employee_contribution = fields .Float ( related = "company_id.l10n_in_lwf_employee_contribution " , readonly = False )
33- l10n_in_lwf_employer_contribution = fields .Float ( related = "company_id.l10n_in_lwf_employer_contribution " , readonly = False )
34- l10n_in_other_deduction = fields .Float (string = "Other Deduction" )
27+ l10n_in_pf_employee_contribution = fields .Float (string = "Employee Contribution " , default = 12 )
28+ l10n_in_pf_employer_contribution = fields .Float (string = "Employer Contribution " , default = 12 )
29+ l10n_in_professional_tax = fields .Monetary (string = "Professional Tax" , default = 200 )
30+ l10n_in_esic_employee_contribution = fields .Float (string = "Employee Contribution " , default = 0.75 )
31+ l10n_in_esic_employer_contribution = fields .Float (string = "Employer Contribution " , default = 3.25 )
32+ l10n_in_lwf_employee_contribution = fields .Monetary ( string = "Employee Contribution " , currency_field = "currency_id" , default = 6 )
33+ l10n_in_lwf_employer_contribution = fields .Monetary ( string = "Employer Contribution " , currency_field = "currency_id" , default = 12 )
34+ l10n_in_other_deduction = fields .Monetary (string = "Other Deduction" , currency_field = "currency_id " )
3535
3636 @api .depends ("l10n_in_basic_salary_percent" , "wage" )
3737 def _compute_l10n_in_basic_salary (self ):
@@ -76,7 +76,7 @@ def _compute_l10n_in_leave_travel_allowance(self):
7676
7777 def _inverse_l10n_in_leave_travel_allowance (self ):
7878 for record in self :
79- record .l10n_in_leave_travel_allowance_percent = record . l10n_in_leave_days * (( record .l10n_in_leave_allowance * 100 ) / record .wage if record .wage else 0 )
79+ record .l10n_in_leave_travel_allowance_percent = ( record .l10n_in_leave_travel_allowance * 100 ) / record .l10n_in_basic_salary if record .l10n_in_basic_salary else 0
8080
8181 @api .depends ('wage' , 'l10n_in_leave_allowance_per_day_percent' , 'l10n_in_leave_days' )
8282 def _compute_leave_allowance (self ):
0 commit comments