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
1909 Widoki

I need to Print the Product Expiry date and the Product Barcode in the sales Invoice.

Awatar
Odrzuć
Najlepsza odpowiedź

Hi 

Inherit the account.invoice_report_document and add the following code .

<template id="report_invoice_document_barcode" inherit_id="account.report_invoice_document">
      <xpath expr="//table[@name='invoice_line_table']/thead/tr/th[3]" position="after">
            <th class="text-right">
                <strong>Product Barcode</strong>
            </th>
            <th class="text-right">
                <strong>Product Expiry Date</strong>
            </th>
    </xpath>
      <xpath expr="//table[@name='invoice_line_table']/tbody//tr[1]//td[3]" position="after">
        <td class="text-right">
            <span t-field="line.product_id.barcode" />
 
      </td>
        <td class="text-right">
            <span t-field="line.product_id.expiration_time"/>
        </td>
    </xpath>
</template>


Hope this Helps


Regards

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Thanks Bella for your reply

The Product Barcode it printed in invoice but the expiry date didn't appear. 

the Expiry date is the Delivery Note related to Order.

Saad. 

Awatar
Odrzuć

Here I updated the product expiration date after installing the product_expiry addon. It gives the expiration time for each product. which date are you expecting?

Autor

Dear Bella James
kindly, i need the product expiry date which in Delivery Note related Lot/Serial Number
Hope that is clear for you