[IMP] pre-commit: first run on whole repo

This commit is contained in:
Kevin Khao
2021-11-26 18:54:38 +03:00
parent a04b8980e1
commit 167aefee13
289 changed files with 6020 additions and 4170 deletions

View File

@@ -6,16 +6,16 @@ from odoo import api, fields, models
class PurchaseOrder(models.Model):
_inherit = 'purchase.order'
_inherit = "purchase.order"
has_service = fields.Boolean(compute='_compute_has_service')
has_service = fields.Boolean(compute="_compute_has_service")
@api.depends('order_line.product_id.type')
@api.depends("order_line.product_id.type")
def _compute_has_service(self):
for order in self:
has_service = False
for l in order.order_line:
if l.product_id.type == 'service':
if l.product_id.type == "service":
has_service = True
break
order.has_service = has_service