コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
7658 ビュー

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<template id="shrinkage_report_template" inherit_id="shrinkage_monitoring.shrinkage_report_template">
<xpath expr="//table[@class='table-shrinkage']//thead//tr[1]//th[3]" position="after">
<th class="text-upper-text-head">New Column 1</th>
</xpath>
</template>
</data>
</odoo>


This is my code in inheriting the qweb so that I can add new column in my another custom module, I already added the dependencies , the __init__ and manifest but the new column still doesn't show up. Then i tried to make the class name wrong and it shows up error message that it can't locate the view, it means it can read the file I created but still the new column doesn't apply even how many times I upgrade the module. Why? 

アバター
破棄

it might be becuase of the wrong inherit_id or your xpath expr.

try to add something else like, a field and check if your inheritance works. and from front end please check the file is inherited.

著作者

Dear Trainee,

I can already add a row and column then after I upgrade some of my module , the row and column doesn't show up again? What might be the cause?

最善の回答

Hi,

Make sure that the file in which you have inherited the qweb is called inside the manifest file. Also are you getting any error message while upgrading the module ? If so update the question with  the error message.

For inherit and modifying an existing report in Odoo: Inherit And Modify Existing PDF Reports in Odoo

Thanks

アバター
破棄
著作者

Dear Niyas,

Thank for the tips, I can add a column and row now but after I upgrade some module including the base, the column and row I added doesn't show up again.

最善の回答

Hi,

Please refer

https://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/

Hope it will be help you

Thanks !!!  


Aswini @ iWesabe



アバター
破棄
著作者

Thank Aswini,

The problem has been solved but I upgrade some of my module and also the base, my new added column and row doesn't show up again, why?

関連投稿 返信 ビュー 活動
2
12月 22
22835
2
1月 24
1364
2
12月 21
22313
1
9月 20
7411
3
8月 20
27298