Browse Source

Update base_contact.py

context is now received as a frozendict, so pop is not allowed on it directly.
We need to make a copy of it first, so 

    if context is None:
        context = {}

is not enought...
pull/2/head
TheCloneMaster 10 years ago
parent
commit
cd0e039271
  1. 3
      base_contact/base_contact.py

3
base_contact/base_contact.py

@ -59,8 +59,7 @@ class res_partner(orm.Model):
Keeping it in context can result in unexpected behaviour (ex: reading
one2many might return wrong result - i.e with "attached contact" removed
even if it's directly linked to a company). """
if context is None:
context = {}
context = dict(context or {})
if mode != 'search':
context.pop('search_show_all_positions', None)
return context

Loading…
Cancel
Save