mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[14.0][MIG]agreement_maintenance: Travis
This commit is contained in:
@@ -7,11 +7,11 @@ from odoo import api, fields, models
|
||||
class Agreement(models.Model):
|
||||
_inherit = "agreement"
|
||||
|
||||
mr_count = fields.Integer('# Maintenance Requests',
|
||||
compute='_compute_mr_count')
|
||||
mr_count = fields.Integer("# Maintenance Requests", compute="_compute_mr_count")
|
||||
|
||||
@api.multi
|
||||
def _compute_mr_count(self):
|
||||
for ag_rec in self:
|
||||
ag_rec.mr_count = self.env['maintenance.request'].search_count(
|
||||
[('agreement_id', 'in', ag_rec.ids)])
|
||||
ag_rec.mr_count = self.env["maintenance.request"].search_count(
|
||||
[("agreement_id", "in", ag_rec.ids)]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user