Browse Source

[MRG] from 6.1

(lp:c2c-addons/6.1  rev 28.3.29)
pull/7/head
Alexandre Fayolle @ camptocamp 12 years ago
parent
commit
aca76c7008
  1. 16
      base_address_category/base_address.py

16
base_address_category/base_address.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved # All Right Reserved
# #
# Author : Nicolas Bessi (Camptocamp), Joel Grand-Guillaume # Author : Nicolas Bessi (Camptocamp), Joel Grand-Guillaume
@ -31,10 +31,6 @@
from osv import osv, fields from osv import osv, fields
import time
from mx import DateTime
import netsvc
import string
class ResPartnerAdressCategory(osv.osv): class ResPartnerAdressCategory(osv.osv):
def name_get(self, cr, uid, ids, context={}): def name_get(self, cr, uid, ids, context={}):
@ -62,8 +58,8 @@ class ResPartnerAdressCategory(osv.osv):
return False return False
level -= 1 level -= 1
return True return True
_description='Partner address Categories' _description='Partner address Categories'
_name = 'res.partner.address.category' _name = 'res.partner.address.category'
@ -81,15 +77,15 @@ class ResPartnerAdressCategory(osv.osv):
'active' : lambda *a: 1, 'active' : lambda *a: 1,
} }
_order = 'parent_id,name' _order = 'parent_id,name'
ResPartnerAdressCategory() ResPartnerAdressCategory()
class ResPartnerAddress(osv.osv): class ResPartnerAddress(osv.osv):
_inherit = "res.partner.address" _inherit = "res.partner.address"
_columns = { _columns = {
'category_id': fields.many2many('res.partner.address.category', 'res_partner_address_category_rel', 'adress_id', 'category_id', 'Adress categories'), 'category_id': fields.many2many('res.partner.address.category', 'res_partner_address_category_rel', 'adress_id', 'category_id', 'Adress categories'),
} }
ResPartnerAddress()
ResPartnerAddress()
Loading…
Cancel
Save