Skip to Content
Menu
This question has been flagged
2 Replies
167 Views

I want to show customer name on the downloaded Pdf Quotation or Sales Order give me the XML code or any Module from where i make this easy

Avatar
Discard

The customer's name is printed in the PDF already. Please specify what you're asking for exactly.

"Customer Name" is not a question. A question is a substantial phrase that ends with "?"

We get close to 1,000 posts a month and not everyone will open a post to find out what your question is.

I have edited your post to make the title a question.

In the future, please consider (1) using a Question that makes it clear what you ask without requiring people to open your post and (2) adding Tags. This will often increase the chances people will respond and also make everything clearer for others who may come along later searching for the same thing.

Failing that, you can paste your future posts into an AI Chatbot and ask it to "please generate a question of no more than 16 words that summarizes what I am asking" and use that as your question.

See also https://www.odoo.com/forum/help-1/meta-why-do-some-questions-get-answers-and-others-do-not-25620

Best Answer

Hii,

here is custom module code please try this 


__manifest__.py

{

    'name': 'Sale Order PDF Customer Name',

    'version': '16.0.1.0.0',

    'depends': ['sale'],

    'data': [

        'views/sale_order_report_inherit.xml',

    ],

    'installable': True,

}

views/sale_order_report_inherit.xml

<odoo>

    <!-- Inherit the default Sale Order/Quotation report -->

    <template id="report_saleorder_document_inherit_customer_name" inherit_id="sale.report_saleorder_document">

       

        <!-- Example: Show customer name at the top, just below the title -->

        <xpath expr="//div[@class='page']//h2" position="after">

            <p style="font-size:16px; font-weight:bold; margin-bottom:10px;">

                Customer: <t t-esc="doc.partner_id.name"/>

            </p>

        </xpath>


    </template>

</odoo>


this is for version 16 

i hope it is use full

Avatar
Discard