[REVERT] A fix for orphan _inherits record for read() , better solution will be put soon.the fix may regress browse() with non-existent id
bzr revid: ach@tinyerp.com-20101015131902-ix4zgjjz60l8w8xd
This commit is contained in:
parent
d577495043
commit
f70f0d4520
|
@ -2389,6 +2389,7 @@ msgstr ""
|
|||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_partner_customer_form
|
||||
#: model:ir.ui.menu,name:base.menu_partner_form
|
||||
#: view:res.partner:0
|
||||
msgid "Customers"
|
||||
msgstr "Clients"
|
||||
|
@ -6874,10 +6875,6 @@ msgid "Landscape"
|
|||
msgstr "Paysage"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_partner_form
|
||||
#: model:ir.ui.menu,name:base.menu_base_config_partner
|
||||
#: model:ir.ui.menu,name:base.menu_base_partner
|
||||
#: model:ir.ui.menu,name:base.menu_partner_form
|
||||
#: view:res.partner:0
|
||||
#: view:res.partner.category:0
|
||||
#: field:res.partner.category,partner_ids:0
|
||||
|
|
|
@ -130,7 +130,11 @@ class res_partner(osv.osv):
|
|||
'email': fields.related('address', 'email', type='char', size=240, string='E-mail'),
|
||||
'company_id': fields.many2one('res.company', 'Company', select=1),
|
||||
}
|
||||
|
||||
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
x = self.pool.get('account.account').read(cr,uid,[500],[],context=context)
|
||||
print "::XXX:",x
|
||||
return super(res_partner,self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
def _default_category(self, cr, uid, context={}):
|
||||
if 'category_id' in context and context['category_id']:
|
||||
return [context['category_id']]
|
||||
|
|
|
@ -3041,20 +3041,20 @@ class orm(orm_template):
|
|||
else:
|
||||
res = map(lambda x: {'id': x}, ids)
|
||||
|
||||
if not res:
|
||||
res = map(lambda x: {'id': x}, ids)
|
||||
for record in res:
|
||||
for f in fields_to_read:
|
||||
field_val = False
|
||||
if f in self._columns.keys():
|
||||
ftype = self._columns[f]._type
|
||||
elif f in self._inherit_fields.keys():
|
||||
ftype = self._inherit_fields[f][2]._type
|
||||
else:
|
||||
continue
|
||||
if ftype in ('one2many', 'many2many'):
|
||||
field_val = []
|
||||
record.update({f:field_val})
|
||||
# if not res:
|
||||
# res = map(lambda x: {'id': x}, ids)
|
||||
# for record in res:
|
||||
# for f in fields_to_read:
|
||||
# field_val = False
|
||||
# if f in self._columns.keys():
|
||||
# ftype = self._columns[f]._type
|
||||
# elif f in self._inherit_fields.keys():
|
||||
# ftype = self._inherit_fields[f][2]._type
|
||||
# else:
|
||||
# continue
|
||||
# if ftype in ('one2many', 'many2many'):
|
||||
# field_val = []
|
||||
# record.update({f:field_val})
|
||||
|
||||
for f in fields_pre:
|
||||
if f == self.CONCURRENCY_CHECK_FIELD:
|
||||
|
|
Loading…
Reference in New Issue