-
-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADD] Module hr_employee_exemption #83
[ADD] Module hr_employee_exemption #83
Conversation
fa37775
to
7c3db47
Compare
👍 |
@max3903 I don't know why runbot fails here, do you have any idea ? |
There are couple warnings: |
@gurneyalex It seems that runbot shuts down while installing the account module and I don't have a clue why it does. All warnings in the log don't seem to be related. Can you help me. |
3c2067c
to
ba3e4da
Compare
@feketemihai @bwrsandman @dreispt @pedrobaeza I would also appreciate reviews here as well as in #82 |
The method to call from a salary rule to check whether an employee | ||
is exempted from a source deduction | ||
""" | ||
employee = self.browse(cr, uid, ids[0], context=context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure ids is a list of one
👍 |
'description': """ | ||
Employee Exemption | ||
================== | ||
Add employee benefits in order to compute payslips. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put here also complete description (although it's duplicated)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the description from the hr_employee_benefits...like @pedrobaeza said, put the first paragraph at least from readme...
The icon is not significant enough. I would put OCA's generic one: https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.png |
required=True, | ||
ondelete='cascade', | ||
), | ||
'exemption_id': fields.many2one( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is quite directly linked with the payslip, and from my point of view it affects a salary rule (i don't know how you structure the salaries, but for me, in salary rule you have gross, benefits, deductions, employee taxes, employer taxes, and net), isn't it easier to directly link the exemption_id with a salary rule, and on compute payslip the amount to be 0...what do you think??
@pedrobaeza @bwrsandman @max3903
I notice that on benefits module is making a link between benefit, exemtion and salary rule, but i think it should be easier to split it and add functionalities per module, if this is a exemption, it should work standalone, the same benefits, it has many dependancies, so probably is it ok to split it in many modules...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it can be more logical and you avoid the formula in your salary rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feketemihai, @pedrobaeza I agree about linking the exemption to the salary rule. For the employee benefit module, what about that split:
hr_employee_benefit (depends on hr_payroll)
hr_employee_benefit_on_job (depends on hr_employee_benefit, hr_contract_multi_jobs and hr_worked_days_activity)
add employee benefits based on each worked hours of the employee
hr_employee_benefit_exemption (depends on hr_employee_benefit, hr_employee_exemption)
add exemptions on benefits
hr_employee_benefit_percent_gross (depends on hr_employee_benefit)
add benefits based on percent of the gross slary
What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedrobaeza @dufresnedavid I agree with the split.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also agree
@feketemihai @pedrobaeza Now, the rules are linked to exemption. The exemptions will apply automatically on selected rules. |
Seems good, thanks 👍 |
@dufresnedavid lxml problem should be solved after the next commit or rebase. |
d9d06d8
to
72e1749
Compare
…xemption [ADD] Module hr_employee_exemption
This module adds exemptions from income tax. This is required in some complexe structure where the employee is subject to several types of income tax and can be exempted from one or another. This module adds the required function to verify in a salary rule whether an employee is exempted or not.