If we add a new field in the backend and want them to be displayed in POS, we can use the load_fields method in the ‘PosModel’ initialization function.
eg:-
var models = require(‘point_of_sale.models’);
models.load_fields(‘model’, ‘field_name’);
In order to upload the new model to POS, we use load_models(models, options).
Load the odoo model when the point of sale starts.
‘load_models’ uses a set of model loader declarations.
The model will be loaded in array order. If the odoo model name is not provided, the server data will not be loaded, but the system can be used to preprocess the data before loading.
Loader parameters can be functions that return dynamic values. This function takes ‘PosModel’ as the first parameter and a temporary object shared by all models, which can be used to store transient information between model loads.
#Load #Field #PoS #Odoo