Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
1483 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
set 23
1018
0
nov 23
1266
2
feb 25
4386
3
mag 24
1526
1
mag 24
1421