forked from OCA/server-tools
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmodels.py
36 lines (26 loc) · 1.01 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- 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