-
-
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
7.0 add payslip with ytd amount and translated lines #69
7.0 add payslip with ytd amount and translated lines #69
Conversation
👍 |
@@ -0,0 +1,44 @@ | |||
# -*- coding:utf-8 -*-######################################################### |
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.
Missing a \n
here
…translated into the employee's language
if line.appears_on_payslip and line.amount | ||
] | ||
|
||
def translate_in_employee_lang(self, term, payslip, is_payslip_line=False): |
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.
@dufresnedavid Thanks for the contribution.
What's wrong with the standard report translation function?
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.
@joaoalf We want the lang of the employee even if an other user is printing it for the employee.
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.
Can't you just get the lang of the employee and call setLang whenever it's necessary?
👍 |
…d_amount [ADD] payslip with year-to-date amounts and translated lines
#. module: hr_payslip_ytd_amount | ||
#: report:payslip_ytd_amount:0 | ||
#, fuzzy | ||
msgid "Amount Year-to-date" |
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.
Translation is fuzzy it might not get translated and instead of "Total Année Courante" "Total de l'année courante"
|
||
#. module: hr_payslip_ytd_amount | ||
#: field:hr.payslip.line,total_ytd:0 | ||
msgid "Total Year-to-date" |
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.
Traduction en double?
</blockTable> | ||
<para style="P3"> | ||
<font color="white"> </font> | ||
</para> |
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 there a use for all this whitespace? I know RML is a bit horrible, but in case specific positioning is required then
frames can be used. (See check writing in l10n-canada). Otherwise, this seems like useless whitespace.
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.
This also can be replaced by one <spacer length="" />
element. Here it might even create new empty pages if it overflow.
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.
To answer your questions here, I did not actually write all that code. I simply took the existing report from the hr_payroll module and changed a few lines. I know its a lot of useless whitespaces but it does what we need.
👍 , see my comments for minor non-blocking things to look at. |
fix potential utf8 errors
This payslip is the similar to the regular one in hr_payroll, but the columns are different.
The names of payslip lines can be translated.
Added the ytd amount column after the amount for the period.