BaseModels.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * Odoo, Open Source Management Solution
  3. * Copyright (C) 2012-today Odoo SA (<http:www.odoo.com>)
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Affero General Public License as
  7. * published by the Free Software Foundation, either version 3 of the
  8. * License, or (at your option) any later version
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Affero General Public License for more details
  14. *
  15. * You should have received a copy of the GNU Affero General Public License
  16. * along with this program. If not, see <http:www.gnu.org/licenses/>
  17. *
  18. * Created on 31/12/14 12:59 PM
  19. */
  20. package com.odoo.base.addons;
  21. import android.content.Context;
  22. import com.odoo.base.addons.ir.IrAttachment;
  23. import com.odoo.base.addons.ir.IrModel;
  24. import com.odoo.base.addons.mail.MailMessage;
  25. import com.odoo.base.addons.res.ResCompany;
  26. import com.odoo.base.addons.res.ResPartner;
  27. import com.odoo.base.addons.res.ResUsers;
  28. import com.odoo.core.orm.OModel;
  29. import com.odoo.core.support.OUser;
  30. import com.odoo.news.models.OdooNews;
  31. import java.util.ArrayList;
  32. import java.util.List;
  33. public class BaseModels {
  34. public static final String TAG = BaseModels.class.getSimpleName();
  35. public static List<OModel> baseModels(Context context, OUser user) {
  36. List<OModel> models = new ArrayList<>();
  37. models.add(new OdooNews(context, user));
  38. models.add(new IrModel(context, user));
  39. models.add(new ResPartner(context, user));
  40. models.add(new ResUsers(context, user));
  41. models.add(new ResCompany(context, user));
  42. models.add(new IrAttachment(context, user));
  43. models.add(new MailMessage(context, user));
  44. return models;
  45. }
  46. }