Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6111 Lượt xem

Is it possible to add worked_days and worked_hours below the date.from and date.to line in payslip report?

I have tried to modify the payslip_report under settings/technical/userinterface/views/, but I'm honestly not really knowledgeable at writing code.

So, I just thought I could add this piece of code at line 45 of said payslip_report:

"<tr t-foreach="get_payslip_lines(o.worked_days_line_ids)" t-as="q">

<td><strong>Worked days</strong></td>

<td><span t-field="q.number_of_days"/></td>

</tr>"

But when I try to print the payslip, I get an error with the following message at the bottom:

QWebException: "'hr.payslip.worked_days' object has no attribute 'appears_on_payslip'" while evaluating

'get_payslip_lines(o.worked_days_line_ids)'  

Can any one provide some insight into what I'm trying to accomplish? 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Worked days not stores in payslip line

its worked_days_in_month  field inside hr.payslip model


Try this

<tr>

<td colspan="2"><strong>Worked Days</strong></td>

<td colspan="2"><span t-field="o.worked_days_in_month"/></td>

</tr>


Paste this code inside 1 table 
before</table>

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 15
4196
1
thg 2 25
1402
1
thg 2 25
1298
0
thg 1 24
1026
1
thg 6 18
5566