Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to get Employee Name on Analytic Journal Report

By
Matt
on 6/3/15, 4:44 PM 416 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>

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/3/15, 4:44 PM
Seen: 416 times
Last updated: 6/3/15, 4:44 PM