Browse Source

[IMP] emc: Complete data_policy_approved processing

Now data_policy is shown on a subscription request and also on a
partner.
pull/2/head
Rémy Taymans 6 years ago
parent
commit
5911b3e5bc
  1. 9
      easy_my_coop/models/coop.py
  2. 3
      easy_my_coop/view/res_partner_view.xml
  3. 1
      easy_my_coop/view/subscription_request_view.xml

9
easy_my_coop/models/coop.py

@ -450,7 +450,8 @@ class subscription_request(models.Model):
'customer': self.share_product_id.customer,
'out_inv_comm_algorithm': 'random',
'country_id': self.country_id.id,
'lang': self.lang}
'lang': self.lang,
'data_policy_approved': self.data_policy_approved}
return partner_vals
def get_partner_vals(self):
@ -464,7 +465,8 @@ class subscription_request(models.Model):
'out_inv_comm_algorithm': 'random',
'country_id': self.country_id.id, 'lang': self.lang,
'birthdate_date': self.birthdate,
'customer': self.share_product_id.customer}
'customer': self.share_product_id.customer,
'data_policy_approved': self.data_policy_approved}
return partner_vals
def create_coop_partner(self):
@ -536,7 +538,8 @@ class subscription_request(models.Model):
'parent_id': partner.id,
'representative': True,
'function': self.contact_person_function,
'type': 'representative'}
'type': 'representative',
'data_policy_approved': self.data_policy_approved}
contact = partner_obj.create(contact_vals)
else:
if len(contact) > 1:

3
easy_my_coop/view/res_partner_view.xml

@ -30,6 +30,9 @@
<group>
<field name="gender" attrs="{'invisible':[('is_company','=',True)]}"/>
</group>
<group name="approvals">
<field name="data_policy_approved" />
</group>
</xpath>
<xpath expr="//page[@name='sales_purchases']" position='after'>

1
easy_my_coop/view/subscription_request_view.xml

@ -79,6 +79,7 @@
<field name="lang"/>
<field name="validated"/>
<field name="skip_control_ng"/>
<field name="data_policy_approved"/>
</group>
</group>
<notebook>

Loading…
Cancel
Save