|
@ -83,24 +83,22 @@ 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: |
|
|
|
|
|
code = record.partner_code |
|
|
|
|
|
ref = record.ref |
|
|
|
|
|
result.append( |
|
|
|
|
|
( |
|
|
|
|
|
record.id, |
|
|
|
|
|
"{}{}{}".format( |
|
|
|
|
|
code and code + " - " or "", |
|
|
|
|
|
ref and record.is_company and ref + " - " or "", |
|
|
|
|
|
super(ResPartner, record).name_get()[0][1], |
|
|
|
|
|
), |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
ffck_partners = self.filtered("ffck_network") |
|
|
|
|
|
others = self - ffck_partners |
|
|
|
|
|
for record in ffck_partners: |
|
|
|
|
|
code = record.partner_code |
|
|
|
|
|
ref = record.ref |
|
|
|
|
|
result.append( |
|
|
|
|
|
( |
|
|
|
|
|
record.id, |
|
|
|
|
|
"{}{}{}".format( |
|
|
|
|
|
code and code + " - " or "", |
|
|
|
|
|
ref and record.is_company and ref + " - " or "", |
|
|
|
|
|
super(ResPartner, record).name_get()[0][1], |
|
|
|
|
|
), |
|
|
) |
|
|
) |
|
|
else: |
|
|
|
|
|
result += super(ResPartner, record).name_get() |
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
result += super(ResPartner, others).name_get() |
|
|
return result |
|
|
return result |
|
|
|
|
|
|
|
|
# COMPUTES |
|
|
# COMPUTES |
|
|