You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Yannick Vaucher (Camptocamp SA)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp import fields, models, osv
  5. class ResCompanyA(models.Model):
  6. _inherit = 'res.company'
  7. prefix_a_name = fields.Char()
  8. prefix_a_integer = fields.Integer()
  9. prefix_a_partner_id = fields.Many2one(comodel_name='res.partner')
  10. class ResCompanyB(models.Model):
  11. _inherit = 'res.company'
  12. _columns = {
  13. 'prefix_b_name': osv.fields.char('name'),
  14. 'prefix_b_integer': osv.fields.integer('int'),
  15. 'prefix_b_partner_id': osv.fields.many2one('res.partner'),
  16. }
  17. class MyConfigA(models.TransientModel):
  18. _name = 'a.config.settings'
  19. _inherit = ['res.config.settings', 'abstract.config.settings']
  20. _prefix = 'prefix_a_'
  21. _companyObject = ResCompanyA
  22. class MyConfigB(models.TransientModel):
  23. _name = 'b.config.settings'
  24. _inherit = ['res.config.settings', 'abstract.config.settings']
  25. _prefix = 'prefix_b_'
  26. _companyObject = ResCompanyB