mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: black, isort, prettier
This commit is contained in:
committed by
Christopher Rogos
parent
17be8bdd2f
commit
162d266218
@@ -47,7 +47,7 @@ def _expand_none(criteria):
|
||||
|
||||
|
||||
def _add(matrix, criteria, allowed):
|
||||
""" Expand None values to True/False combination """
|
||||
"""Expand None values to True/False combination"""
|
||||
for c in _expand_none(criteria):
|
||||
matrix[c] = allowed
|
||||
|
||||
|
||||
@@ -41,14 +41,10 @@ class ResPartner(models.Model):
|
||||
for partner in self:
|
||||
partner_child_ids = partner.child_ids.ids + partner.ids
|
||||
partner.sale_contract_count = sum(
|
||||
[r[2] for r in result if r[0] in partner_child_ids and r[1] == "sale"]
|
||||
r[2] for r in result if r[0] in partner_child_ids and r[1] == "sale"
|
||||
)
|
||||
partner.purchase_contract_count = sum(
|
||||
[
|
||||
r[2]
|
||||
for r in result
|
||||
if r[0] in partner_child_ids and r[1] == "purchase"
|
||||
]
|
||||
r[2] for r in result if r[0] in partner_child_ids and r[1] == "purchase"
|
||||
)
|
||||
|
||||
def act_show_contract(self):
|
||||
|
||||
@@ -309,7 +309,7 @@ class TestContract(TestContractBase):
|
||||
self.contract._recurring_create_invoice()
|
||||
invoice_daily = self.contract._get_related_invoices()
|
||||
self.assertTrue(invoice_daily)
|
||||
self.assertEquals(self.contract.user_id, invoice_daily.user_id)
|
||||
self.assertEqual(self.contract.user_id, invoice_daily.user_id)
|
||||
|
||||
def test_contract_weekly_post_paid(self):
|
||||
recurring_next_date = to_date("2018-03-01")
|
||||
|
||||
Reference in New Issue
Block a user