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
Pedro M. Baeza
parent
8ce3152fec
commit
7f620ee1e6
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user