Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6283 Zobrazení
Im trying to extend pos receipt, when I append the code just as in pos_restaurant I write the following code:

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-extend="XmlReceipt">
<t t-jquery='.total' t-operation='append'>
<barcode encoding="CODE128"><t t-esc="o.id"/></barcode>
</t>
</t>

<t t-extend="BillReceipt">
<t t-jquery='.cashier' t-operation='append'>
<barcode encoding="CODE128"><t t-esc="o.ean_128"/></barcode>
</t>
</t>
</templates>
but I get the following error:
File "lxml.etree.pyx", line 3373, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:166352)
So then, I try to modify the view by hand to see if it modify the receipt point_of_sale.report_receipt view, but it doesnt change the pos receipt neither the printed one or the web receipt....
    
AssertionError: Document does not comply with schema


Avatar
Zrušit
Nejlepší odpověď

//Try This Code !!!!
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-extend="XmlReceipt">
<t t-jquery='.total' t-operation='after'> //use after
<barcode encoding="CODE128"><t t-esc="o.id"/></barcode>
</t>
</t>

<t t-extend="BillReceipt">
<t t-jquery='.cashier' t-operation='after'> //user after
<barcode encoding="CODE128"><t t-esc="o.ean_128"/></barcode>
</t>
</t>
</templates>

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 23
1533
1
čvn 23
8356
1
lis 20
3335
1
kvě 19
2827
0
pro 21
2519