Search code examples
javaandroidodooodoo-mobile

Odoo mobile framework - BaseModel


I am currently building an app using Odoo mobile framework. When I look for the BaseModels java class under the base.addons in my project structure, I can't find the class just like what the example shown. Do I need to add BaseModels class? Thanks.


Solution

  • It is available in the framework-master-update-dpr branch.

    public class BaseModels {
        public static final String TAG = BaseModels.class.getSimpleName();
    
        public static List<OModel> baseModels(Context context, OUser user) {
            List<OModel> models = new ArrayList<>();
            models.add(new OdooNews(context, user));
            models.add(new IrModel(context, user));
            models.add(new ResPartner(context, user));
            models.add(new ResUsers(context, user));
            models.add(new ResCompany(context, user));
            models.add(new IrAttachment(context, user));
            models.add(new MailMessage(context, user));
            return models;
        }
    }