-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Indian l10n modification for hr_payroll #649
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
base: 18.0
Are you sure you want to change the base?
Conversation
…ayroll With This Commit ======================================================== - Added default configurations for deductions and allowances in setting. - Added salary components and deductions section in `hr_contract`. - Implemented dynamic percentage-based calculations for payroll allowances. - Added computation logic to ensure real-time updates based on wage. - Improved salary structure display in payroll & employee contracts.
946edf8
to
90d148b
Compare
With This Commit ======================================================== - Added Test Cases for salary component calculations - Modified some fields to make them monetary - Minor changes in views according above changes
90d148b
to
b405a19
Compare
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.
Hola! thanks for your work this is first round of review.
|
||
@api.depends("l10n_in_basic_salary_percent", "wage") | ||
def _compute_l10n_in_basic_salary(self): | ||
for record in self: |
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.
for record in self: | |
for contract in self: |
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.
done!
@api.depends("l10n_in_basic_salary_percent", "wage") | ||
def _compute_l10n_in_basic_salary(self): | ||
for record in self: | ||
record.l10n_in_basic_salary = record.wage * (record.l10n_in_basic_salary_percent / 100) |
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.
Have you checked percentage widget to avoid percentage logic on backend?
Also what if there is an hourly wage instead of a fixed wage on contract?
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.
checked percentage widget how it works and also implemented it.
As of now if there is hourly wages then it set all fields to 0 as PO sir said that these fields are for fixed wages only. If we want, we can calculate the monthly wage
from hourly wage
by given working schedule hours
.
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 code more readable so avoid using record instead of use contract
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.
Okay, I will take care of it from now.
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.
Did you check those fields that are not related to multi-company environment each company has different value in it. so those fields should be company dependant.
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.
Yes, they were not working with multiple company with different values.
Modified to work with multiple companies with different values.
<field name="l10n_in_basic_salary_percent" groups="base.group_no_one"/> | ||
<div groups="base.group_no_one">%</div> |
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.
again percentage widget
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.
checked percentage widget how it works and implemented it.
</div> | ||
|
||
<label for="l10n_in_house_rent_allowance" /> | ||
<div class="o_row mw-80" name="l10n_in_house_rent_allowance"> |
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.
did you check this in mobile view
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.
<div groups="base.group_no_one">%</div> | ||
</div> | ||
|
||
<label for="l10n_in_leave_days" /> |
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.
<label for="l10n_in_leave_days" /> | |
<label for="l10n_in_leave_days"/> |
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.
done!
<div groups="base.group_no_one">%</div> | ||
</div> | ||
|
||
<label for="l10n_in_supplementary_allowance" /> |
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.
<label for="l10n_in_supplementary_allowance" /> | |
<label for="l10n_in_supplementary_allowance"/> | |
check this in all files
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.
done!, I will take care of formatting.
With this commit ==================================================== - Made salary structure company dependent - Added percentage widget to required fields & code formatting
c2c114d
to
69d698a
Compare
With This Commit
hr_contract
.