Browse Source

[FIX] emc: cooperator computation issue

False value treated as a string when no share_product code was registered.
pull/30/head
Elouan Le Bars 5 years ago
parent
commit
0d09965a69
  1. 4
      easy_my_coop/models/partner.py

4
easy_my_coop/models/partner.py

@ -84,7 +84,9 @@ class ResPartner(models.Model):
for partner in self: for partner in self:
share_type = '' share_type = ''
for line in partner.share_ids: for line in partner.share_ids:
share_type = str(line.share_product_id.default_code)
code = line.share_product_id.default_code
if code:
share_type = str(code)
if share_type != '': if share_type != '':
partner.cooperator_type = share_type partner.cooperator_type = share_type

Loading…
Cancel
Save