Skip to Content
Menu
This question has been flagged
1 Reply
2173 Views

I've added Two fields into res.partner model and i want to show them on the POS receipt

i loaded the newly created field using:

odoo.define('pos_receipt.pos_order_extend', function (require) {
var models = require('point_of_sale.models');

models.load_models({
model: 'res.partner',
fields: ['houseNumber'],
loaded: function(self , houseNumber){
self.houseNumber = houseNumber;
console.log(self.houseNumber);
},
});

and the inherited receipt Xml is


<div t-if="env.pos.get_client()">

Building :

<t t-esc="env.pos.get_client().houseNumber"/>


</div>



Avatar
Discard
Best Answer

Hi,
Please try this code

.js

odoo.define('pos.Pos', function (require) {
"use strict";var models = require('point_of_sale.models');models.load_fields('res.partner', 'houseNumber
');});

.xml

https://ibb.co/4RSKLCN

Regards

Avatar
Discard
Related Posts Replies Views Activity
0
Nov 23
673
0
May 23
1702
0
Dec 22
1331
0
Oct 22
2082
0
Jun 22
745