Browse Source

[IMP] context check, make type_id browsable

pull/15/head
Holger Brunn 10 years ago
parent
commit
6b8991149f
  1. 3
      partner_relations/model/res_partner.py
  2. 3
      partner_relations/model/res_partner_relation_type_selection.py

3
partner_relations/model/res_partner.py

@ -30,6 +30,9 @@ class ResPartner(orm.Model):
def _get_relation_ids(
self, cr, uid, ids, dummy_name, dummy_arg, context=None):
if context is None:
context = {}
# TODO: do a permission test on returned ids
cr.execute(
'''select id, left_partner_id, right_partner_id

3
partner_relations/model/res_partner_relation_type_selection.py

@ -110,7 +110,8 @@ class ResPartnerRelationTypeSelection(orm.Model):
_foreign_keys = []
_columns = {
'record_type': fields.selection(_RECORD_TYPES, 'Record type', size=16),
'type_id': fields.integer('Type'),
'type_id': fields.many2one(
'res.partner.relation.type', 'Type'),
'name': fields.char('Name', size=64),
'contact_type_this': fields.selection(
ResPartnerRelationType._get_partner_types.im_func,

Loading…
Cancel
Save