Browse Source

[IMP] name_get()

16.0
RemiFr82 7 months ago
parent
commit
94dcb3c19f
  1. 10
      ffck_commons/models/res_partner.py

10
ffck_commons/models/res_partner.py

@ -83,10 +83,9 @@ class ResPartner(models.Model):
def name_get(self): def name_get(self):
result = [] result = []
# ffck_partners = self.filtered('ffck_network')
# others = self - ffck_partners
for record in self:
if record.ffck_network:
ffck_partners = self.filtered("ffck_network")
others = self - ffck_partners
for record in ffck_partners:
code = record.partner_code code = record.partner_code
ref = record.ref ref = record.ref
result.append( result.append(
@ -99,8 +98,7 @@ class ResPartner(models.Model):
), ),
) )
) )
else:
result += super(ResPartner, record).name_get()
result += super(ResPartner, others).name_get()
return result return result
# COMPUTES # COMPUTES

Loading…
Cancel
Save