Skip to Content
मेन्यू
This question has been flagged
2 Replies
1419 Views

Hi

I use odoo enterprise 17 and when I print an invoice it shows the main product in the description instead of showing the product variants.

How can I change the invoice report to show the product variants instead of the main product description?

Regards,

Avatar
Discard
Best Answer

given solution is not wokring on odoo 17e,
my steps
1) create custome product desciprtion on Inovice line table(x_studio_sale_line_description)
2) fatch this feild on customer invoice data is fatched succefully
3) goto odoo studio and click on report edit, fatch custome feild on report showing error like( Saving the report "Invoices" failed.This may be due to an incorrect syntax in the edited parts.Error message: Error while render the template)

Code Is:

  <t t-foreach="lines" t-as="line">


                                    <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>

                                    <t t-set="current_total" t-value="current_total + line.price_total"/>


                                    <tr t-att-class="'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">

                                        <t t-if="line.display_type == 'product'" name="account_invoice_line_accountable">

                                             <td style="width:20%" t-if="o.move_type in ('out_invoice','out_refund') and o.stock_picking_ids"><span t-field="line.stock_picking_id"/></td>

                                            <td name="account_invoice_line_name">

                                                <span t-if="line.name" t-field="line.name" t-options="{'widget': 'text'}">Bacon Burger</span>

                                            </td>

                                            <td>

                                                ## ***<t t-esc="line.sale_line_ids and line.sale_line_ids[1].x_studio_sale_line_description  or line.name"/>***

                                                </td>


odoo 17e it allow to customize this level or customization or not

please help me out.

Avatar
Discard
Best Answer

Hi,

If you want to make any changes to the invoice report, You can make changes to its template.Example:Settings-> Technical-> User Interface -> Views -> search for the invoice report templateYou can search for "report_invoice_document" This is one of the invoice templates and in the template, you can make changes. If you want to make a change in the order lines , you can make changes in the below shown areas


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
0
सित॰ 23
975
0
नव॰ 23
1212
2
फ़र॰ 25
4302
3
मई 24
1472
1
मई 24
1371