Browse Source
Merge pull request #95 from coopiteasy/9.0-touch_cooperator_type
[IMP] add button to allow to update cooperator type without sql.
9.0-tag
Houssine BAKKALI
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
0 deletions
-
easy_my_coop/models/partner.py
-
easy_my_coop/view/res_partner_view.xml
|
|
@ -150,6 +150,14 @@ class ResPartner(models.Model): |
|
|
|
data_policy_approved = fields.Boolean(string="Data Policy Approved ") |
|
|
|
financial_risk_approved = fields.Boolean(string="Financial Risk Approved ") |
|
|
|
|
|
|
|
@api.multi |
|
|
|
def touch_cooperator_type(self): |
|
|
|
self.ensure_one() |
|
|
|
for line in self.share_ids: |
|
|
|
line.share_product_id = line.share_product_id.id |
|
|
|
break |
|
|
|
return True |
|
|
|
|
|
|
|
@api.multi |
|
|
|
@api.depends('subscription_request_ids.state') |
|
|
|
def _compute_coop_candidate(self): |
|
|
|
|
|
@ -12,6 +12,7 @@ |
|
|
|
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_energiris_manager"/> |
|
|
|
<button string="Update info" name="%(action_view_update_partner_info)d" |
|
|
|
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_energiris_manager"/> |
|
|
|
<button string="Touch" name="touch_cooperator_type" type="object" groups="base.group_system"/> |
|
|
|
</header> |
|
|
|
</sheet> |
|
|
|
|
|
|
|