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

# -*- coding: utf-8 -*-
# © 2016 Yannick Vaucher (Camptocamp SA)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import fields, models, osv
class ResCompanyA(models.Model):
_inherit = 'res.company'
prefix_a_name = fields.Char()
prefix_a_integer = fields.Integer()
prefix_a_partner_id = fields.Many2one(comodel_name='res.partner')
class ResCompanyB(models.Model):
_inherit = 'res.company'
_columns = {
'prefix_b_name': osv.fields.char('name'),
'prefix_b_integer': osv.fields.integer('int'),
'prefix_b_partner_id': osv.fields.many2one('res.partner'),
}
class MyConfigA(models.TransientModel):
_name = 'a.config.settings'
_inherit = ['res.config.settings', 'abstract.config.settings']
_prefix = 'prefix_a_'
_companyObject = ResCompanyA
class MyConfigB(models.TransientModel):
_name = 'b.config.settings'
_inherit = ['res.config.settings', 'abstract.config.settings']
_prefix = 'prefix_b_'
_companyObject = ResCompanyB