[CLN] global : clean lint errors
This commit is contained in:
@@ -5,5 +5,5 @@ from odoo import fields, models
|
|||||||
class EventSequence(models.Model):
|
class EventSequence(models.Model):
|
||||||
_name = "event.sequence"
|
_name = "event.sequence"
|
||||||
|
|
||||||
name = fields.Char("name")
|
name = fields.Char()
|
||||||
sequence = fields.Integer("Sequence") # for sorting
|
sequence = fields.Integer() # for sorting
|
||||||
|
@@ -7,7 +7,7 @@ class EventTrack(models.Model):
|
|||||||
sequence_id = fields.Many2one(
|
sequence_id = fields.Many2one(
|
||||||
"event.sequence", "Sequence", group_expand="_read_group_stage_ids"
|
"event.sequence", "Sequence", group_expand="_read_group_stage_ids"
|
||||||
)
|
)
|
||||||
sequence = fields.Integer("Sequence") # for sorting
|
sequence = fields.Integer() # for sorting
|
||||||
|
|
||||||
@api.model_create_multi
|
@api.model_create_multi
|
||||||
def create(self, vals_list):
|
def create(self, vals_list):
|
||||||
|
@@ -6,10 +6,10 @@ class EventTrack(models.Model):
|
|||||||
_inherit = "event.track"
|
_inherit = "event.track"
|
||||||
|
|
||||||
speaker_ids = fields.Many2many(
|
speaker_ids = fields.Many2many(
|
||||||
"res.partner", string="Intervenants", compute="compute_speaker_ids"
|
"res.partner", string="Intervenants", compute="_compute_speaker_ids"
|
||||||
)
|
)
|
||||||
|
|
||||||
def compute_speaker_ids(self):
|
def _compute_speaker_ids(self):
|
||||||
"""
|
"""
|
||||||
Set speaker_ids as concat of all speakers of all events.
|
Set speaker_ids as concat of all speakers of all events.
|
||||||
"""
|
"""
|
||||||
|
@@ -6,12 +6,8 @@ from odoo.tools import format_date
|
|||||||
class EventTrack(models.Model):
|
class EventTrack(models.Model):
|
||||||
_inherit = "event.track"
|
_inherit = "event.track"
|
||||||
|
|
||||||
location_already_in_use = fields.Boolean(
|
location_already_in_use = fields.Boolean("Location already in use", compute="_compute_location_already_in_use")
|
||||||
"Location already in use", compute="_compute_location_already_in_use"
|
location_already_in_use_message = fields.Text(compute="_compute_location_already_in_use")
|
||||||
)
|
|
||||||
location_already_in_use_message = fields.Text(
|
|
||||||
compute="_compute_location_already_in_use"
|
|
||||||
)
|
|
||||||
|
|
||||||
@api.depends("date", "duration", "location_id")
|
@api.depends("date", "duration", "location_id")
|
||||||
def _compute_location_already_in_use(self):
|
def _compute_location_already_in_use(self):
|
||||||
@@ -36,22 +32,14 @@ class EventTrack(models.Model):
|
|||||||
|
|
||||||
# search only on other event tracks
|
# search only on other event tracks
|
||||||
if track.id or track.id.origin:
|
if track.id or track.id.origin:
|
||||||
search_other_calendar_events.append(
|
search_other_calendar_events.append(("event_track_id", "!=", track.id or track.id.origin))
|
||||||
("event_track_id", "!=", track.id or track.id.origin)
|
|
||||||
)
|
|
||||||
|
|
||||||
# search calendar events not already founded
|
# search calendar events not already founded
|
||||||
if already_found_other_calendar_event_ids:
|
if already_found_other_calendar_event_ids:
|
||||||
search_other_calendar_events.append(
|
search_other_calendar_events.append(("id", "not in", already_found_other_calendar_event_ids))
|
||||||
("id", "not in", already_found_other_calendar_event_ids)
|
|
||||||
)
|
|
||||||
|
|
||||||
other_calendar_events = self.env["calendar.event"].search(
|
other_calendar_events = self.env["calendar.event"].search(search_other_calendar_events)
|
||||||
search_other_calendar_events
|
already_found_other_calendar_event_ids.extend(other_calendar_events.ids)
|
||||||
)
|
|
||||||
already_found_other_calendar_event_ids.extend(
|
|
||||||
other_calendar_events.ids
|
|
||||||
)
|
|
||||||
|
|
||||||
if other_calendar_events:
|
if other_calendar_events:
|
||||||
location_already_in_use = True
|
location_already_in_use = True
|
||||||
|
0
event_type_button_box/__init__.py
Normal file
0
event_type_button_box/__init__.py
Normal file
Reference in New Issue
Block a user