Browse Source

[FIX] the default get bank account number don't get it from the partner

it return None
pull/1/head
houssine 7 years ago
parent
commit
810ae7a444
  1. 9
      easy_my_coop/wizard/create_subscription_from_partner.py

9
easy_my_coop/wizard/create_subscription_from_partner.py

@ -52,8 +52,9 @@ class PartnerCreateSubscription(models.TransientModel):
@api.model @api.model
def _get_bank_account(self): def _get_bank_account(self):
if len(self.cooperator.bank_ids) > 0:
return self.cooperator.bank_ids[0]
partner = self._get_partner()
if len(self.partner.bank_ids) > 0:
return self.partner.bank_ids[0]
return None return None
@api.model @api.model
@ -96,12 +97,12 @@ class PartnerCreateSubscription(models.TransientModel):
'source': 'crm'} 'source': 'crm'}
if self.is_company: if self.is_company:
vals['company_name'] = self.cooperator.name
vals['company_name'] = cooperator.name
vals['name'] = '/' vals['name'] = '/'
vals['company_register_number'] = self.register_number vals['company_register_number'] = self.register_number
vals['is_company'] = True vals['is_company'] = True
else: else:
vals['name'] = self.cooperator.name
vals['name'] = cooperator.name
vals['no_registre'] = self.register_number vals['no_registre'] = self.register_number
coop_vals = {} coop_vals = {}

Loading…
Cancel
Save