Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
1475 Widoki

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,

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 23
1012
0
lis 23
1260
2
lut 25
4377
3
maj 24
1520
1
maj 24
1415