<para style="terp_default_Bold_9">Basic Salary</para>
</td>
<td>
- <para style="terp_default_9">[[ formatLang(o.basic_before_leaves, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] </para>
+ <para style="terp_default_9">[[ formatLang(o.contract_id.wage, dp='Account') ]] [[ o.company_id.currency_id.symbol ]] </para>
</td>
<td>
<para style="terp_default_Bold_9">Leaved Deduction</para>
<para style="terp_default_space">
<font color="white"> </font>
</para>
- <blockTable colWidths="269.0,134.0,135.0" style="Table21">
- <tr>
- <td>
- <para style="terp_tblheader_Details">Other Lines</para>
- </td>
- <td>
- <para style="terp_tblheader_Details_Right">Payments - [[ get_month(o) ]]</para>
- </td>
- <td>
- <para style="terp_tblheader_Details_Right">Deduction -[[ get_month(o) ]]</para>
- </td>
- </tr>
- </blockTable>
- <section>
- <para style="terp_default_9">[[repeatIn(get_others(o.line_ids),'ol') ]]</para>
- <blockTable colWidths="269.0,134.0,135.0" style="Table22">
- <tr>
- <td>
- <para style="terp_default_9">[[ ol.code or '' ]]</para>
- </td>
- <td>
- <para style="terp_default_Right_9">[[ ol.type in ['advance','loan','otherpay'] and formatLang(ol.total, dp='Account') or '' ]] [[ ol.type in ['advance','loan','otherpay'] and o.company_id and o.company_id.currency_id.symbol or '' ]]</para>
- </td>
- <td>
- <para style="terp_default_Right_9">[[ ol.type in ['otherdeduct','installment'] and formatLang(ol.total, dp='Account') or '' ]] [[ ol.type in ['otherdeduct','installment'] and o.company_id and o.company_id.currency_id.symbol or '' ]]</para>
- </td>
- </tr>
- </blockTable>
- </section>
+
<blockTable colWidths="269.0,177.0,93.0" style="Table5">
<tr>
<td>
'get_earnings': self.get_earnings,
'get_deductions':self.get_deductions,
'get_leave':self.get_leave,
- 'get_others':self.get_others,
})
def convert(self, amount, cur):
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
return amt_en
- def get_others(self, obj):
- payslip_line = self.pool.get('hr.payslip.line')
- res = []
- ids = []
- for id in range(len(obj)):
- if obj[id].category_id.type in ('advance', 'loan', 'otherpay', 'otherdeduct', 'installment'):
- ids.append(obj[id].id)
- if ids:
- res = payslip_line.browse(self.cr, self.uid, ids)
- return res
-
def get_leave(self, obj):
payslip_line = self.pool.get('hr.payslip.line')
res = []
- ids = []
- for id in range(len(obj)):
- if obj[id].type == 'leaves':
- ids.append(obj[id].id)
- if ids:
- res = payslip_line.browse(self.cr, self.uid, ids)
+# ids = []
+# for id in range(len(obj)):
+# if obj[id].type == 'leaves':
+# ids.append(obj[id].id)
+# if ids:
+# res = payslip_line.browse(self.cr, self.uid, ids)
return res
def get_earnings(self, obj):
res = []
ids = []
for id in range(len(obj)):
- if obj[id].category_id.type == 'allowance' and obj[id].type != 'leaves':
+ if obj[id].category_id.parent_id.name == 'Allowance':
ids.append(obj[id].id)
if ids:
res = payslip_line.browse(self.cr, self.uid, ids)
res = []
ids = []
for id in range(len(obj)):
- if obj[id].category_id.type == 'deduction' and obj[id].type != 'leaves':
+ if obj[id].category_id.parent_id.name == 'Deduction':
ids.append(obj[id].id)
if ids:
res = payslip_line.browse(self.cr, self.uid, ids)