Hello
I develop addon for Point Of Sale (POS), but I have one problem.
for each product, my .js loads floor_sale_price_total. Defined in other addon, so it's in database.
With debug mode of my navigator, I see that my .js loads this attribute.
But my .xml says "undefined"(or hasn't number), if I change attribute 'floor_sale_price_total' by 'price' (attribute in the models.js of Point of Sale), I see the price of ech article.
So my problem is in my .js but I don't know where it's.
my .js
odoo.define('pos_min_price.PosModel', function(require){"use strict";
var models = require('point_of_sale.models');
models.load_models({
model: 'product.product',
fields: ['floor_sale_price_total'],
domain:[['sale_ok','=',true],['available_in_pos','=',true]],
context: function(self){ return {'floor_sale_price': self.floor_sale_price_total}},
loaded: function(self, products){
$.each(products, function(){
$.extend(self.db.get_product_by_id(this.id) || {}, this)
});
}
})
})