Sales -> Customers -> Sales & Purchases Tab -> Contact Reference
I want to print this information in the Sales Order Invoice Report PDF, is this possible?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Sales -> Customers -> Sales & Purchases Tab -> Contact Reference
I want to print this information in the Sales Order Invoice Report PDF, is this possible?
Hi,
You may try like this in your module.
Create a file custom_saleorder.xml under views folder in your module. Also mention it in __openerp__.py file.
Then add following code in the file, to have customer reference in sale order:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_saleorder_inherited" inherit_id="sale.report_saleorder_document">
<xpath expr="//t/div/div[3]/div[1]" position="after">
<div t-if="o.partner_id.ref" class="col-xs-3">
<strong>Customer Reference:</strong>
<p t-field="o.partner_id.ref"/>
</div>
</xpath>
</template>
</data>
</openerp>
Restart the server and upgrade your module. Then try.
Similarly you can override the invoice report by inheriting the corresponding invoice template.
For eg: create a file custom_invoice_report.xml file under views folder in your module. And add the following code:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_invoice_document_inherited" inherit_id="account.report_invoice_document">
<xpath expr="/t/div/div[2]/div[5]" position="after">
<div t-if="o.partner_id.ref" class="col-xs-3">
<strong>Customer Reference:</strong>
<p t-field="o.partner_id.ref"/>
</div>
</xpath>
</template>
</data>
</openerp>
Also don't forget to mention sale, account as depends in your __openerp__.py file.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Dec 24
|
34 | ||
|
1
Jun 24
|
672 | ||
|
0
Oct 24
|
232 | ||
|
11
Oct 24
|
20527 | ||
|
2
Aug 24
|
34 |
Which report ? SO, ...
Sales Order , Invoice