[CLN] global: apply ruff

This commit is contained in:
Stéphan Sainléger
2025-06-25 15:57:21 +02:00
parent 76db335030
commit 2afa90260f
32 changed files with 194 additions and 159 deletions

View File

@@ -1,4 +1,4 @@
from odoo import models, api, Command
from odoo import Command, api, models
class HelpdeskTicket(models.Model):
@@ -8,5 +8,9 @@ class HelpdeskTicket(models.Model):
def _onchange_task_id(self):
for record in self:
if record.timesheet_ids and record.task_id:
not_yet_invoiced_timesheet_ids = [t.id for t in record.timesheet_ids if not t.timesheet_invoice_id]
record.task_id.timesheet_ids = [Command.link(t_id) for t_id in not_yet_invoiced_timesheet_ids]
not_yet_invoiced_timesheet_ids = [
t.id for t in record.timesheet_ids if not t.timesheet_invoice_id
]
record.task_id.timesheet_ids = [
Command.link(t_id) for t_id in not_yet_invoiced_timesheet_ids
]