Passa al contenuto
Menu
La domanda è stata contrassegnata
2 Risposte
1212 Visualizzazioni

how  can i show  the  product internal ref. in pos receipt ?

i tried line.internalreferenace

but failed 


POS ODOO 14

Avatar
Abbandona
Autore Risposta migliore

i have to edit

odoo/addons/point_of_sale/static/src/js/models.js



to add default_code



other wise it will not work



line 1935



export_for_printing: function(){return {id: this.id,quantity: this.get_quantity(),

default_code: this.get_product().

Avatar
Abbandona
Risposta migliore

Hi,

This is the method for inheriting the existing pos receipt in Odoo14.We can use "line.default_code" for showing product internal reference in pos receipt.An example of bringing internal reference is shown below.

<  t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
     <  xpath expr="//div[hasclass('orderlines')]" position="inside">
         <  t t-foreach="receipt.orderlines" t-as="line">
             <  t t-if="line.default_code">
            <  li>
                <  t t-esc=" line.default_code"/>
            <  /li>
            <  /t>
         <  /t>
     <  /xpath>
<  /t>

NB: Ignore the space(" ") after " < " symbol.

Regards

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
nov 23
1956
0
mag 23
2744
0
dic 22
2522
0
ott 22
3725
0
giu 22
1798