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

Change field on sale order report

By
Laura
on 12/28/15, 6:45 AM 480 views

I'm trying to change any fields of the table but only it change name of the "theads" but not the dinamic information. I'm trying to change "Description" field for the name of product in this case "product_id" but is not changing anything..


The original code in the report of "report_saleorder_document":

<...>

<thead>

<tr>

<th>Description</th>

<th>Taxes</th>

<th class="text-right">Quantity</th>

<th class="text-right">Unit Price</th>

<th groups="sale.group_discount_per_so_line">Disc.(%)</th>

<th class="text-right">Price</th>

</tr>

</thead>

<tbody class="sale_tbody">

<tr t-foreach="o.order_line" t-as="l">

<td class="text-right">

<span t-field="l.name"/>

</td>

<td>

<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>

</td>

<...>


------------------------------------------------------


And my code :

<...>

<thead>

<tr>

<th>Product Name</th>

<th>Taxes</th>

<th class="text-right">Quantity</th>

<th class="text-right">Unit Price</th>

<th groups="sale.group_discount_per_so_line">Disc.(%)</th>

<th class="text-right">Price</th>

</tr>

</thead>

<tbody class="sale_tbody">

<tr t-foreach="o.order_line" t-as="l">

<td class="text-right">

<span t-field="l.product_id.name"/> <!--This code I'm trying to change-->

</td>

<td>

<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>

</td>

<...>

 

I tried to change to this codes:

<span t-field="l.product_id.name"/>

or

<span t-field="l.product_id"/>



But it doesn't work \(>o<)/ Help meee 


1

zbik

--zbik--
5976
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 12/28/15, 5:53 PM
Probably another installed module also overwrite the same report and your change is overwritten.
F
or example module sale_layout inherit and replace full report_saleorder_document.


 

0
Laura
On 12/29/15, 2:09 AM

Then, I need to create a new module to avoid the overwritten?

 I found a beginner tutorial "http://www.odoo.yenthevg.com/creating-custom-reports-odoo-8/"??

Thanks!

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: 12/28/15, 6:45 AM
Seen: 480 times
Last updated: 1/5/16, 3:08 AM