|
@ -17,6 +17,7 @@ _REQUIRED = ['email', |
|
|
'iban', |
|
|
'iban', |
|
|
'no_registre', |
|
|
'no_registre', |
|
|
'data_policy_approved', |
|
|
'data_policy_approved', |
|
|
|
|
|
'internal_rules_approved', |
|
|
'gender'] # Could be improved including required from model |
|
|
'gender'] # Could be improved including required from model |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -335,6 +336,11 @@ class subscription_request(models.Model): |
|
|
default=False, |
|
|
default=False, |
|
|
# required=True, |
|
|
# required=True, |
|
|
) |
|
|
) |
|
|
|
|
|
internal_rules_approved = fields.Boolean( |
|
|
|
|
|
string='Approved Internal Rules', |
|
|
|
|
|
default=False, |
|
|
|
|
|
# required=True, |
|
|
|
|
|
) |
|
|
_order = "id desc" |
|
|
_order = "id desc" |
|
|
|
|
|
|
|
|
def get_person_info(self, partner): |
|
|
def get_person_info(self, partner): |
|
@ -451,7 +457,8 @@ class subscription_request(models.Model): |
|
|
'out_inv_comm_algorithm': 'random', |
|
|
'out_inv_comm_algorithm': 'random', |
|
|
'country_id': self.country_id.id, |
|
|
'country_id': self.country_id.id, |
|
|
'lang': self.lang, |
|
|
'lang': self.lang, |
|
|
'data_policy_approved': self.data_policy_approved} |
|
|
|
|
|
|
|
|
'data_policy_approved': self.data_policy_approved, |
|
|
|
|
|
'internal_rules_approved': self.internal_rules_approved} |
|
|
return partner_vals |
|
|
return partner_vals |
|
|
|
|
|
|
|
|
def get_partner_vals(self): |
|
|
def get_partner_vals(self): |
|
@ -466,7 +473,8 @@ class subscription_request(models.Model): |
|
|
'country_id': self.country_id.id, 'lang': self.lang, |
|
|
'country_id': self.country_id.id, 'lang': self.lang, |
|
|
'birthdate_date': self.birthdate, |
|
|
'birthdate_date': self.birthdate, |
|
|
'customer': self.share_product_id.customer, |
|
|
'customer': self.share_product_id.customer, |
|
|
'data_policy_approved': self.data_policy_approved} |
|
|
|
|
|
|
|
|
'data_policy_approved': self.data_policy_approved, |
|
|
|
|
|
'internal_rules_approved': self.internal_rules_approved} |
|
|
return partner_vals |
|
|
return partner_vals |
|
|
|
|
|
|
|
|
def create_coop_partner(self): |
|
|
def create_coop_partner(self): |
|
@ -539,7 +547,8 @@ class subscription_request(models.Model): |
|
|
'representative': True, |
|
|
'representative': True, |
|
|
'function': self.contact_person_function, |
|
|
'function': self.contact_person_function, |
|
|
'type': 'representative', |
|
|
'type': 'representative', |
|
|
'data_policy_approved': self.data_policy_approved} |
|
|
|
|
|
|
|
|
'data_policy_approved': self.data_policy_approved, |
|
|
|
|
|
'internal_rules_approved': self.internal_rules_approved} |
|
|
contact = partner_obj.create(contact_vals) |
|
|
contact = partner_obj.create(contact_vals) |
|
|
else: |
|
|
else: |
|
|
if len(contact) > 1: |
|
|
if len(contact) > 1: |
|
|