Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7159 Vizualizări

Hi,

I am creating a new report via XML in a module

 <report
id="report_invoice_custom"
model="account.invoice"
string="Custom invoice report"
report_type="qweb-pdf"
name="custom_invoice_report.invoice_custom"
attachment_use="False"
file="custom_invoice_report.invoice_custom"
attachment = "(object.state in ('open','paid')) and ('F_'+(object.number or '').replace('/','')+'.pdf')"
paperformat_id = "1" <-- THIS DOES NOT WORK!
/>

paperformat_id is not a field of report but it has to be specified through relationship report.paperformat.

How could be specified such relationship through XML?

Imagine profil
Abandonează
Cel mai bun răspuns

<report

id="report_invoice_custom"

model="account.invoice"

string="Custom invoice report"

report_type="qweb-pdf"

name="custom_invoice_report.invoice_custom"

attachment_use="False"

file="custom_invoice_report.invoice_custom"

attachment = "(object.state in ('open','paid')) and ('F_'+(object.number or '').replace('/','')+'.pdf')"

/>

<record id="report_invoice_custom" model="ir.actions.report.xml">

<field name="paperformat_id" ref="custom_invoice_report.custompaperformat"/> <!-- Put Your Custom PaperFormat Id -->

</record>


Also you can refer this

<field name="paperformat_id" ref="report.paperformat_euro"/>

Imagine profil
Abandonează
Autor

Thank you very much indeed, this is exactly what I was looking for.

Related Posts Răspunsuri Vizualizări Activitate
2
feb. 20
28968
3
iul. 23
6909
0
feb. 22
4488
0
oct. 21
5031
0
sept. 15
5519