|
Title
|
- [[ m[0] ]]
+ [[ m[0] != 'None' and m[0] or '' ]]
|
- [[ m[1] ]]
+ [[ m[1] != 'None' and m[1] or '' ]]
|
- [[ m[2] ]]
+ [[ m[2] != 'None' and m[2] or '' ]]
|
- [[ m[3] ]]
+ [[ m[3] != 'None' and m[3] or '' ]]
|
- [[ m[4] ]]
+ [[ m[4] != 'None' and m[4] or '' ]]
|
- [[ m[5] ]]
+ [[ m[5] != 'None' and m[5] or '' ]]
|
- [[ m[6] ]]
+ [[ m[6] != 'None' and m[6] or '' ]]
|
- [[ m[7] ]]
+ [[ m[7] != 'None' and m[7] or '' ]]
|
- [[ m[8] ]]
+ [[ m[8] != 'None' and m[8] or '' ]]
|
- [[ m[9] ]]
+ [[ m[9] != 'None' and m[9] or '' ]]
|
- [[ m[10] ]]
+ [[ m[10] != 'None' and m[10] or '' ]]
|
- [[ m[11] ]]
+ [[ m[11] != 'None' and m[11] or '' ]]
|
Total
@@ -379,9 +393,6 @@
-
-
-
|
@@ -390,8 +401,8 @@
|
- [[ repeatIn(get_allow(),'e1') ]]
-
+ [[ repeatIn(get_allow(),'e1') ]]
+
|
[[ e1[0] ]]
@@ -437,9 +448,6 @@
|
-
-
-
@@ -449,8 +457,8 @@
- [[ repeatIn(get_deduct(),'e2') ]]
-
+ [[ repeatIn(get_deduct(),'e2') ]]
+
|
[[ e2[0] ]]
@@ -496,9 +504,6 @@
|
-
-
-
@@ -508,8 +513,8 @@
- [[ repeatIn(get_other(),'e3') ]]
-
+ [[ repeatIn(get_other(),'e3') ]]
+
|
[[ e3[0] ]]
@@ -555,18 +560,9 @@
|
-
-
-
-
-
-
-
-
-
-
+
[[ get_monthly_total()[0] ]]
@@ -616,9 +612,6 @@
-
-
-
diff --git a/addons/hr_payroll/report/report_year_report.rml b/addons/hr_payroll/report/report_year_report.rml
index 052af6f4701..527491552aa 100755
--- a/addons/hr_payroll/report/report_year_report.rml
+++ b/addons/hr_payroll/report/report_year_report.rml
@@ -63,11 +63,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -133,58 +146,55 @@
- [[ repeatIn(get_periods(data['form']),'m') ]]
+ [[ repeatIn(get_periods(data['form']),'m') ]]
|
Name
|
- [[ m[0] ]]
+ [[ m[0] != 'None' and m[0] or '' ]]
|
- [[ m[1] ]]
+ [[ m[1] != 'None' and m[1] or '' ]]
|
- [[ m[2] ]]
+ [[ m[2] != 'None' and m[2] or '' ]]
|
- [[ m[3] ]]
+ [[ m[3] != 'None' and m[3] or '' ]]
|
- [[ m[4] ]]
+ [[ m[4] != 'None' and m[4] or '' ]]
|
- [[ m[5] ]]
+ [[ m[5] != 'None' and m[5] or '' ]]
|
- [[ m[6] ]]
+ [[ m[6] != 'None' and m[6] or '' ]]
|
- [[ m[7] ]]
+ [[ m[7] != 'None' and m[7] or '' ]]
|
- [[ m[8] ]]
+ [[ m[8] != 'None' and m[8] or '' ]]
|
- [[ m[9] ]]
+ [[ m[9] != 'None' and m[9] or '' ]]
|
- [[ m[10] ]]
+ [[ m[10] != 'None' and m[10] or '' ]]
|
- [[ m[11] ]]
+ [[ m[11] != 'None' and m[11] or '' ]]
|
Total
|
-
-
-
- [[ repeatIn(get_employee(data['form']),'e') ]]
+ [[ repeatIn(get_employee(data['form']),'e') ]]
|
@@ -231,19 +241,10 @@
|
-
-
-
-
-
-
-
-
-
- [[ repeatIn(get_months_tol(),'t') ]]
+ [[ repeatIn(get_months_tol(),'t') ]]
|
@@ -294,8 +295,5 @@
-
-
-
diff --git a/addons/hr_payroll/report/report_year_salary.py b/addons/hr_payroll/report/report_year_salary.py
index b23effbeccb..6c830b80941 100755
--- a/addons/hr_payroll/report/report_year_salary.py
+++ b/addons/hr_payroll/report/report_year_salary.py
@@ -43,6 +43,9 @@ class year_salary_report(rml_parse.rml_parse):
cm = 0
cy = ly
cm = cm +1
+ for c in range(0,(12-no_months)):
+ mnth_name.append('None')
+ self.mnths.append('None')
return [mnth_name]
def get_employee(self,form):
@@ -58,11 +61,14 @@ class year_salary_report(rml_parse.rml_parse):
ls1.append(emp_id.name)
tol = 0.0
for mnth in self.mnths:
- if len(mnth) != 7:
- mnth = '0' + str(mnth)
- query = "select net from hr_payslip where employee_id = "+str(emp_id.id)+" and to_char(date,'mm-yyyy') like '%"+mnth+"%' and state = 'done' "
- self.cr.execute(query)
- sal = self.cr.fetchall()
+ if mnth <> 'None':
+ if len(mnth) != 7:
+ mnth = '0' + str(mnth)
+ query = "select net from hr_payslip where employee_id = "+str(emp_id.id)+" and to_char(date,'mm-yyyy') like '%"+mnth+"%' and state = 'done' "
+ self.cr.execute(query)
+ sal = self.cr.fetchall()
+ else:
+ sal = [(0.0,)]
try:
ls1.append(sal[0][0])
except:
| | |