Browse Source

[FIX] partner_multi_relation (Smart Button Error)

Fix for error when opening a contact and clicking the smart button.

Error Information:
  File "/opt/odoo/v12/src/partner-contact/partner_multi_relation/models/res_partner.py", line 187, in action_view_relations
    action['context'].\
AttributeError: 'str' object has no attribute 'update'
12.0
Patrick Wilson 5 years ago
parent
commit
aa0ff1252d
  1. 13
      partner_multi_relation/models/res_partner.py

13
partner_multi_relation/models/res_partner.py

@ -184,11 +184,10 @@ class ResPartner(models.Model):
'partner_multi_relation.action_res_partner_relation_all'
).read()[0]
action['domain'] = [('id', 'in', relation_ids.ids)]
action['context'].\
update({'search_default_this_partner_id': contact.id,
'default_this_partner_id': contact.id,
'active_model': 'res.partner',
'active_id': contact.id,
'active_ids': [contact.id],
'active_test': False})
action['context'] = {'search_default_this_partner_id': contact.id,
'default_this_partner_id': contact.id,
'active_model': 'res.partner',
'active_id': contact.id,
'active_ids': [contact.id],
'active_test': False}
return action
Loading…
Cancel
Save