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.