|
|
@ -135,11 +135,10 @@ class ResPartner(models.Model): |
|
|
|
] |
|
|
|
) |
|
|
|
crck_by_state = {crck.state_id: crck for crck in crck_ok} |
|
|
|
print(crck_by_state) |
|
|
|
states_ok = states & crck_ok.mapped("state_id") |
|
|
|
concerned = self.filtered( |
|
|
|
lambda rp: rp.ffck_network |
|
|
|
and int(rp.partner_scale) >= 3 |
|
|
|
and int(rp.partner_scale) >= 2 |
|
|
|
and rp.state_id in states_ok |
|
|
|
) |
|
|
|
for partner in concerned: |
|
|
@ -155,7 +154,7 @@ class ResPartner(models.Model): |
|
|
|
cdck_ok = self.search( |
|
|
|
[ |
|
|
|
("ffck_network", "=", True), |
|
|
|
("partner_scale", "=", "4"), |
|
|
|
("partner_scale", "=", "3"), |
|
|
|
("country_department_id", "in", depts.ids), |
|
|
|
] |
|
|
|
) |
|
|
@ -163,7 +162,7 @@ class ResPartner(models.Model): |
|
|
|
depts_ok = depts & cdck_ok.mapped("country_department_id") |
|
|
|
concerned = self.filtered( |
|
|
|
lambda rp: rp.ffck_network |
|
|
|
and int(rp.partner_scale) >= 4 |
|
|
|
and int(rp.partner_scale) >= 3 |
|
|
|
and rp.country_department_id in depts_ok |
|
|
|
) |
|
|
|
for partner in concerned: |
|
|
|