How to Load Field to PoS in Odoo 14 – CBMS Odoo ERP

How to Load Field to PoS in Odoo 14 – CBMS Odoo ERP

8
0 minutes, 45 seconds Read

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

Similar Posts

8 Comments

  1. avatar
    @carlosnaranjo9914 says:

    How can I add the data from a one2many field? I added to product.product a one2many like that, but it just adds the array of ids, not the data for each of the items in that one2many, and I loaded the model of that one2many before with load_models

  2. avatar
    @swfaod says:

    thank you for this i want to ask

    how i count itemes in Pos odoo 15

    i mean if pos has line 10 suger , 5 rice and 3 oil

    i want to show this " items count = 3 "

    in end of Pos

    can you help mep please ?

Leave a Reply

Your email address will not be published. Required fields are marked *