Odoo Help


How to print the custom field in the Sales->Quotations?

on 6/25/15, 5:45 AM 1,483 views

I have a custom field "x_RDHeight" in Sales-> product module. I need to print that value in the Sales->Quotations while printing the quotations in the PDF

I need to print the product along with the description while doing the configurations it is giving the exceptions.


QWebException: "description" while evaluating

"translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"

while Doing the below configuration Iam getting those exceptions QWebException: "description" while evaluating "translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"

on 7/6/15, 8:34 AM


| 8 8 8

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

On 6/25/15, 5:55 AM

Hi Sudarsan,

You should edit the file report_saleorder.xml under addons/sale/views.
In this file is a part that loops over every product you've added on your quotation / sale order. Which looks like this:

 <tbody class="sale_tbody">
                    <tr t-foreach="o.order_line" t-as="l">
                           <span t-field="l.name"/>
                            <span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
                        <td class="text-right">
                            <span t-field="l.product_uom_qty"/>
                            <span groups="product.group_uom" t-field="l.product_uom"/>
                        <td class="text-right">
                            <span t-field="l.price_unit"/>
                        <td groups="sale.group_discount_per_so_line">
                            <span t-field="l.discount"/>
                        <td class="text-right">
                            <span t-field="l.price_subtotal"
                                t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>

As you can see you can access any field from the product here (as long as its within the foreach), so simply add yours where you want it. Add the following line:

 <span t-field="l.x_RDHeigh"/> 

It should then be printed on your report.

Best of luck,

On 7/4/15, 2:03 AM

Hi Yenthe,

The change is not effecting in My Local Odoo, Is there any other thing to do along with that.

Use nano, pico, vim editors to open the file and edit.

Serpent Consulting Services Pvt. Ltd.
on 7/4/15, 3:50 AM

The file report_saleorder.xml is under addons/sale/views.

Serpent Consulting Services Pvt. Ltd.
on 7/4/15, 3:51 AM

Have you reloaded your module? You always need to reload your module first.

on 7/6/15, 9:49 AM
David Bertha
On 7/6/15, 5:54 AM

Here is an example with a new module redefining existing report template :

<template id="sale_report_delivery_date" name="Delivery Date on Sale Report" inherit_id="sale.report_saleorder_document"> 
<xpath expr="//div[@id='informations']" position="inside">
<div t-if="o.requested_delivery_datetime_start" class="col-xs-3">
<strong>Delivery interval : from </strong>
<p t-field="o.requested_delivery_datetime_"/>


Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 6/25/15, 7:19 AM


There is also a video to help you out.


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/25/15, 5:45 AM
Seen: 1483 times
Last updated: 7/6/15, 8:36 AM