How to add the contact details of a customer in a sales invoice Qweb Report.Right now it is only showing the Shipping address. Please help me out to add the companies Contact address in the invoice.
Thanks in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
I tried the same in "report_invoice_document"
but getting below error
QWebException: 'account.invoice' object has no attribute 'contact_address' Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 10.0\server\odoo\addons\base\ir\ir_qweb\qweb.py", line 315, in _compiled_fn File "<template>", line 1, in template_account_report_invoice_document_2465 File "<template>", line 3, in body_call_content_2464 AttributeError: 'account.invoice' object has no attribute 'contact_address' Error to render compiling AST AttributeError: 'account.invoice' object has no attribute 'contact_address' Template: account.report_invoice_document Path: /templates/t/t/div/div[11]/span[2] Node: <span t-raw="o.contact_address.replace('\n\n', '\n').replace('\n', '<br>')"/>
Hi,
To get the company details in the invoice print, you just have to re arrange the existing report template.
You can do it by editing the original file like this,
Call the report.external_layout inside the page , so that company details will be displayed in the invoice.
You can get the template from Account - > Views -> report_invoice.xml, template name is report_invoice_document.
Original template is like this,
<template id="report_invoice_document">
<t t-call="report.external_layout">
<div class="page">
#template content
</div>
</t>
</template>
This you have to change like this,
<template id="report_invoice_document">
<div class="page">
<t t-call="report.external_layout">
#template content
</t>
</div>
</template>
Then the report will be like this,
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
so you want to company address in the report ?
Actually i want to add the companies mail contact details in Qweb report for sales Invoice , Right now i am able to see only the shipping address on PDF.
I tried a lot to add the contact details but no luck...!
Plz find the attachment its only contains the shiping address which is on the right hand side of the invoice (Cognizant, DLF), But what i want extra is the main branch address of cognizant which will be on just left hand side of the invoice.
kind request you to please help me out for the same.
Thanks in advance...!
Thanks & Regards,
Tushar Wagh
+91-9021097798