This question has been flagged
1 Reply
4122 Views

Please I need your help. I need to add two new fields to the PosTicket. for example I want to add code2d and sign_str. For which I have defined the pos.order as follows:

class PorOrder(models.Model):

_inherit = 'pos.order'

sign_str = fields.Char(related='invoice_id.sign_str')

code2d = fields.Char(related='invoice_id.code2d')

pos.xml

<?xml version="1.0" encoding="UTF-8"?>

<templates id="template" xml:space="preserve">

<t t-extend="PosTicket">

<t t-jquery="t[t-esc*='order.formatted_validation_date']" t-operation="replace">

<strong><t t-esc="order.code2d" /></strong>

</t>

<t t-jquery=".receipt-user" t-operation="replace">

<span><t t-esc="sign_str" /></span>

</t>

<t t-jquery="t[t-esc*='widget.pos.company.name']" t-operation="before">

<hr/>

<span>RUC: </span><t t-esc="widget.pos.company.vat"/><br/>

</t>

</t>

</templates>

However, those fields do not appear.

Avatar
Discard
Best Answer

Hello refer below forum link,

it will help in your case.


  • https://www.odoo.com/forum/help-1/question/customer-name-on-point-of-sale-receipt-odoo-11-127096

  • https://www.odoo.com/forum/help-1/question/show-id-order-in-pos-tickets-114317

  • https://www.odoo.com/forum/help-1/question/how-to-show-company-logo-and-customer-details-in-pos-ticket-69631


Thanks

Avatar
Discard