Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
7337 มุมมอง

What i want:

I want to inherit the model(account.invoice) qweb report named as report_invoice_document which i access by Purchase->Vendor Bills then Print invoice of Vendor Bills.

What i had done till now

I am trying to inherit a qweb Report which relates to model (account.invoice). I simply goes to settings->reports and found my qweb template which need to be inherited. Here is the screenshoot.

https://i.stack.imgur.com/2wsoC.png

Further i dig into my reports. I had successfully found my report named as account.report_invoice_document. here is the screenshot 

https://i.stack.imgur.com/UHDUx.png

I had successfully inherited my required view and it shows me that i had tried to inherit then view in inherited views. here is the screenshot 

https://i.stack.imgur.com/FBphm.png

here is my code in which i had inherited the existing view.

<template id="myinherited_account_invoice_report" inherit_id="account.report_invoice_document">
            <xpath expr="//table[@class='table table-condensed']/thead/tr/th[3]" position="after">
                <th class="text-right">Analytic Account</th>
                <th class="text-right">Analytic Tags</th>
            </xpath>
            <xpath expr="//table[@class='table table-condensed']/tbody/tr/td[3]" position="after">
                <td class="text-right">testt1</td>
                <td class="text-right">testt2</td>
            </xpath>
        </template>


here is my pdf qweb report that has no effect of my work. 
https://i.stack.imgur.com/xdYhB.png

อวตาร
ละทิ้ง
ผู้เขียน

here is my manifest.py

{

'name': "invoice_reports",

'summary': """

Inherit the qweb reports of Account.invoice""",

'description': """

Inherit the qweb reports of Account.invoice

""",

'author': "Hassan Ali(Dynexcel)",

'website': "http://www.dynexcel.com",

'category': 'Qweb',

'version': '0.1',

'depends': ['account'],

'data': [

'views/templates.xml',

],

# only loaded in demonstration mode

'demo': [

'demo/demo.xml',

],

}

Please guide me if i am doing something wrong here. Because my same code works well at odoo 10C at my local server. But it didn't affect my odoo 11E. And also guide that do i inheriting the correct qweb report.

คำตอบที่ดีที่สุด

Hi 

The Answer is that you need to spacify priority. Let all other apps do their work and then finally your app report should come in action. 

so in your case it would be 

<template id="myinherited_account_invoice_report" inherit_id="account.report_invoice_document" piority="21">
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi ,

I've similar issue, I'm not able to edit invoice_report_document, did you solved the issue?


thanks,

Filippo.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 22
3227
0
พ.ย. 18
4177
Prototype inheritance. แก้ไขแล้ว
2
มี.ค. 18
4736
2
ต.ค. 18
4652
Trying to Sum fields in Qweb Report แก้ไขแล้ว
2
ธ.ค. 17
9268