Skip to Content
Menu
This question has been flagged
1697 Views

Hello,

I'm working with odoo 11 trying to extend point of sale. For now i'm trying to load the pos.order model filtered by order.uid

This is how i load the model. It works if i set the pos_reference filter but i need to set it dinamically

models.load_models([{
model: 'pos.order',
condition: function(self){ return true; },
fields: [],
domain: function(self){ return [['pos_reference','=', 'Pedido 121345345345' ]]; },
loaded: function(self, result){
//self.set('secuencia', result[0].display_name);
self.pedido = result;
},
}]);

In pos.xml this line shows the  correct order uid value

<t t-esc="order.uid"/>

The problem i have right now is that i need to get order.uid in model.jsi tried with

self.pos.get_order().uid

this.pos.order.uid

order.uid


But always get undefined error


Some one can help me?


Thanks


Avatar
Discard