mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] agreement_project: black, isort, prettier
This commit is contained in:
@@ -7,12 +7,12 @@ from odoo import api, fields, models
|
||||
class Agreement(models.Model):
|
||||
_inherit = "agreement"
|
||||
|
||||
task_count = fields.Integer('# Tasks',
|
||||
compute='_compute_task_count')
|
||||
task_count = fields.Integer("# Tasks", compute="_compute_task_count")
|
||||
|
||||
@api.multi
|
||||
def _compute_task_count(self):
|
||||
for ag in self:
|
||||
count = self.env['project.task'].search_count(
|
||||
[('agreement_id', '=', ag.id)])
|
||||
count = self.env["project.task"].search_count(
|
||||
[("agreement_id", "=", ag.id)]
|
||||
)
|
||||
ag.task_count = count
|
||||
|
||||
Reference in New Issue
Block a user