Browse Source

make travis green again

pull/123/head
robin.keunen 4 years ago
parent
commit
ec04c0f2f7
  1. 4
      easy_my_coop/models/company.py
  2. 9
      easy_my_coop/models/coop.py
  3. 2
      easy_my_coop/models/operation_request.py
  4. 7
      easy_my_coop/models/partner.py
  5. 2
      easy_my_coop_website_taxshelter/controllers/main.py

4
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

9
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

2
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",

7
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)]
)
partner.representative_of_member_company = (
partner in member_companies.mapped(
"child_ids"
).filtered(
representatives = member_companies.mapped("child_ids").filtered(
"representative"
)
partner.representative_of_member_company = (
partner in representatives
)
@api.multi

2
easy_my_coop_website_taxshelter/controllers/main.py

@ -118,7 +118,7 @@ class PortalTaxShelter(CustomerPortal):
report_type=None,
download=False,
query_string=None,
**kw
**kw,
):
partner = request.env.user.partner_id
try:

Loading…
Cancel
Save