跳至内容
菜单
此问题已终结
2 回复
5149 查看

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 


形象
丢弃
最佳答案
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.


 

形象
丢弃
编写者 最佳答案

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!

形象
丢弃
相关帖文 回复 查看 活动
2
8月 24
1553
0
3月 15
3260
1
6月 23
2449
2
3月 17
6063
0
2月 16
3381