Browse Source

[IMP] res_partner_affiliate - use orm.Model instead of osv.osv

pull/2/head
Yannick Vaucher 12 years ago
parent
commit
44152f7da6
  1. 8
      res_partner_affiliate/res_partner.py

8
res_partner_affiliate/res_partner.py

@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################## ##############################################################################
from openerp.osv import osv, fields
from openerp.osv import orm, fields
class ResPartner(osv.osv):
class ResPartner(orm.Model):
""" """
Add relation affiliate_ids Add relation affiliate_ids
""" """
@ -30,8 +30,8 @@ class ResPartner(osv.osv):
_columns = { _columns = {
'child_ids': fields.one2many( 'child_ids': fields.one2many(
'res.partner', 'parent_id', 'res.partner', 'parent_id',
'Contacts', domain=[('is_company','=',False)]),
'Contacts', domain=[('is_company', '=', False)]),
'affiliate_ids': fields.one2many( 'affiliate_ids': fields.one2many(
'res.partner', 'parent_id', 'res.partner', 'parent_id',
'Affiliates', domain=[('is_company','=', True)]),
'Affiliates', domain=[('is_company', '=', True)]),
} }
Loading…
Cancel
Save