Browse Source

[FIX] flake 8

pull/347/head
Nicolas JEUDY 8 years ago
parent
commit
c4d6dca250
  1. 7
      partner_contact_in_several_companies/models/res_partner.py

7
partner_contact_in_several_companies/models/res_partner.py

@ -28,7 +28,9 @@ class ResPartner(models.Model):
@api.depends('contact_id')
def _get_contact_type(self):
for record in self:
record.contact_type = record.contact_id and 'attached' or 'standalone'
record.contact_type = record.contact_id \
and 'attached' \
or 'standalone'
def _basecontact_check_context(self, mode):
""" Remove 'search_show_all_positions' for non-search mode.
@ -145,7 +147,8 @@ class ResPartner(models.Model):
record._contact_sync_from_parent()
# 2. To DOWNSTREAM: sync contact fields to parent or related
elif any(field in contact_fields for field in update_values):
update_ids = record.other_contact_ids.filtered(lambda p: not p.is_company)
update_ids = record.other_contact_ids.filtered(
lambda p: not p.is_company)
if record.contact_id:
update_ids |= record.contact_id
update_ids.update_contact(update_values)

Loading…
Cancel
Save