Browse Source

Merge pull request #731 from OCA/10.0-partner_multi_relation-relation_all-write_multiple

[FIX] make res.partner.relation.all#write work for multiple records
pull/642/merge
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
f1f3bb4d05
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      partner_multi_relation/models/res_partner_relation_all.py

5
partner_multi_relation/models/res_partner_relation_all.py

@ -386,8 +386,9 @@ CREATE OR REPLACE VIEW %%(table)s AS
if type_id:
is_inverse = vals.get('is_inverse')
type_selection_id = type_id * 2 + (is_inverse and 1 or 0)
return type_selection_id and self.type_selection_id.browse(
type_selection_id) or False
return self.env['res.partner.relation.type.selection'].browse(
type_selection_id or []
)
@api.multi
def write(self, vals):

Loading…
Cancel
Save