diff --git a/easy_my_coop/models/company.py b/easy_my_coop/models/company.py
index ee27535..e9e0c8b 100644
--- a/easy_my_coop/models/company.py
+++ b/easy_my_coop/models/company.py
@@ -90,7 +90,7 @@ class ResCompany(models.Model):
)
financial_risk_approval_text = fields.Html(
translate=True,
- help="Text to display aside the checkbox to approve financial risk."
+ help="Text to display aside the checkbox to approve financial risk.",
)
@api.onchange("data_policy_approval_required")
@@ -103,7 +103,7 @@ class ResCompany(models.Model):
if self.internal_rules_approval_required:
self.display_internal_rules_approval = True
- @api.onchange('financial_risk_approval_required')
+ @api.onchange("financial_risk_approval_required")
def onchange_financial_risk_approval_required(self):
if self.financial_risk_approval_required:
self.display_financial_risk_approval = True
diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py
index 5037490..d3fe1f2 100644
--- a/easy_my_coop/models/coop.py
+++ b/easy_my_coop/models/coop.py
@@ -44,7 +44,7 @@ class SubscriptionRequest(models.Model):
if company.internal_rules_approval_required:
required_fields.append("internal_rules_approved")
if company.financial_risk_approval_required:
- required_fields.append('financial_risk_approved')
+ required_fields.append("financial_risk_approved")
return required_fields
def get_mail_template_notif(self, is_company=False):
@@ -432,8 +432,7 @@ class SubscriptionRequest(models.Model):
string="Approved Internal Rules", default=False
)
financial_risk_approved = fields.Boolean(
- string='Financial Risk Approved',
- default=False,
+ string="Financial Risk Approved", default=False
)
_order = "id desc"
@@ -580,7 +579,7 @@ class SubscriptionRequest(models.Model):
"lang": self.lang,
"data_policy_approved": self.data_policy_approved,
"internal_rules_approved": self.internal_rules_approved,
- 'financial_risk_approved': self.financial_risk_approved
+ "financial_risk_approved": self.financial_risk_approved,
}
return partner_vals
@@ -602,7 +601,7 @@ class SubscriptionRequest(models.Model):
"customer": self.share_product_id.customer,
"data_policy_approved": self.data_policy_approved,
"internal_rules_approved": self.internal_rules_approved,
- "financial_risk_approved": self.financial_risk_approved
+ "financial_risk_approved": self.financial_risk_approved,
}
return partner_vals
diff --git a/easy_my_coop/models/operation_request.py b/easy_my_coop/models/operation_request.py
index 3b5543c..e1ba986 100644
--- a/easy_my_coop/models/operation_request.py
+++ b/easy_my_coop/models/operation_request.py
@@ -29,7 +29,7 @@ class OperationRequest(models.Model):
request_date = fields.Date(
string="Request date", default=lambda self: self.get_date_now()
)
- effective_date = fields.Date(string='Effective date')
+ effective_date = fields.Date(string="Effective date")
partner_id = fields.Many2one(
"res.partner",
string="Cooperator",
diff --git a/easy_my_coop/models/partner.py b/easy_my_coop/models/partner.py
index 64e9ab7..cbae28a 100644
--- a/easy_my_coop/models/partner.py
+++ b/easy_my_coop/models/partner.py
@@ -206,12 +206,11 @@ class ResPartner(models.Model):
member_companies = self.env["res.partner"].search(
[("is_company", "=", True), ("member", "=", True)]
)
+ representatives = member_companies.mapped("child_ids").filtered(
+ "representative"
+ )
partner.representative_of_member_company = (
- partner in member_companies.mapped(
- "child_ids"
- ).filtered(
- "representative"
- )
+ partner in representatives
)
@api.multi
diff --git a/easy_my_coop/views/email_template_view.xml b/easy_my_coop/views/email_template_view.xml
index d110f67..98b87e7 100644
--- a/easy_my_coop/views/email_template_view.xml
+++ b/easy_my_coop/views/email_template_view.xml
@@ -16,9 +16,9 @@
mail.template
-
-
-
+
+
+
diff --git a/easy_my_coop/views/res_partner_view.xml b/easy_my_coop/views/res_partner_view.xml
index cc03a14..58ab6b5 100644
--- a/easy_my_coop/views/res_partner_view.xml
+++ b/easy_my_coop/views/res_partner_view.xml
@@ -54,11 +54,11 @@
+ attrs="{'invisible':[('member','=',False)]}"/>
+ attrs="{'invisible':[('member','=',False)]}"/>
+ attrs="{'invisible':[('member','=',False)]}"/>
diff --git a/easy_my_coop_website_taxshelter/controllers/main.py b/easy_my_coop_website_taxshelter/controllers/main.py
index 7263e98..a084bb7 100644
--- a/easy_my_coop_website_taxshelter/controllers/main.py
+++ b/easy_my_coop_website_taxshelter/controllers/main.py
@@ -105,6 +105,11 @@ class PortalTaxShelter(CustomerPortal):
"easy_my_coop_website_taxshelter.portal_my_tax_shelter", values
)
+ # Black adds a trailing comma after last argument of function definition
+ # this syntax is invalid for python < 3.6
+ # Exclude for formatting while not fixed, follow status here:
+ # https://github.com/psf/black/issues/1657
+ # fmt: off
@http.route(
["/my/tax_shelter_certificates/"],
type="http",
@@ -120,6 +125,7 @@ class PortalTaxShelter(CustomerPortal):
query_string=None,
**kw
):
+ # fmt: on
partner = request.env.user.partner_id
try:
taxshelter_certificate_sudo = self._document_check_access(