Skip to Content
Menu
This question has been flagged
2270 Views

I'm editing the QWeb view of 'account.report_analyticjournal' and can't figure out the name of the field I want to display.  I want the report to show me the following columns: Date, Account Name, Employee, and Timesheet hours for that employee/date/account.  I'm almost there, as you can see below, I just need to know what to fill in near the bottom where I have written 'EMPLOYEE_NAME' in bold.  I have not changed any of the underlying relationships from the original QWeb view.  Any assistance or even guesses would be greatly appreciated.



<?xml version="1.0"?>

<t t-name="account.report_analyticjournal">

<t t-call="report.html_container">

<t t-foreach="docs" t-as="o">

<t t-call="report.internal_layout">

<div class="page">

<h2>Timesheet Journal</h2>

<div class="row mt32 mb32">

<div class="col-xs-3">

<strong>Period From:</strong>

<p t-esc="formatLang(data['form']['date1'], date=True)"/>

</div>

<div class="col-xs-3">

<strong>Period To:</strong>

<p t-esc="formatLang(data['form']['date2'], date=True)"/>

</div>

</div>

<table class="table table-condensed">

<thead>

<tr>

<th>Date</th>

<th>Code</th>

<th>Description</th>

<th>Task</th>

<th>General</th>

<th>Hours</th>

</tr>

</thead>

<tbody>

<t t-foreach="lines(o.id, data['form']['date1'], data['form']['date2'])" t-as="move">

<tr>

<td/>

<td/>

<td>

<span t-esc="move.name"/>

</td>

<td>

<span t-esc="move.account_id.name"/>

</td>

<td>

<span t-esc="formatLang(move.unit_amount.credit)"/>

</td>

<td/>

</tr>

<tr t-foreach="lines_a(move.id, o.id, data['form']['date1'], data['form']['date2'])" t-as="move_a">

<td>

<span t-esc="formatLang(move_a.date,date = True)"/>

</td>

<td>

<p t-if="move_a.code"><span t-esc="move_a.code"/></p>

</td>

<td>

<span t-esc="move_a.name"/>

</td>

<td><span t-esc="move_a.account_id.name"/></td>

<td/>

<td><span t-esc="formatLang(move_a.unit_amount)"/></td>

</tr>

</t>

<tr t-foreach="lines_a(False, o.id, data['form']['date1'], data['form']['date2'])" t-as="move_a">

<td><span t-esc="formatLang(move_a.date,date = True)"/></td>

<td><p t-if="move_a.code"><span t-esc="move_a.code"/></p></td>

<td><span t-esc="EMPLOYEE_NAME"/></td>

<td><span t-esc="move_a.account_id.name"/></td>

<td/>

<td><span t-esc="formatLang(move_a.unit_amount)"/></td>

</tr>

</tbody>

</table>

</div>

</t>

</t>

</t>

</t>

 

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 22
1530
0
Oct 24
157
0
Aug 24
165
0
Apr 24
232
0
Jan 24
731