[CLN] global : lint line length corrections
This commit is contained in:
@@ -6,7 +6,10 @@ class MailTemplate(models.Model):
|
||||
|
||||
event_attachment_name_prefix = fields.Char(
|
||||
"Attachment name prefix",
|
||||
help="If there is an attachment in event registration, or in event, with a name that starts with this name, it will be attached to the mail.",
|
||||
help="""
|
||||
If there is an attachment in event registration, or in event,
|
||||
with a name that starts with this name, it will be attached to the mail.
|
||||
""",
|
||||
)
|
||||
|
||||
def generate_email(self, res_ids, fields):
|
||||
@@ -18,10 +21,9 @@ class MailTemplate(models.Model):
|
||||
res_ids = [res_ids]
|
||||
multi_mode = False
|
||||
|
||||
for lang, (template, template_res_ids) in self._classify_per_lang(
|
||||
res_ids
|
||||
).items():
|
||||
# add reports attached to event.registration or event.event from attachment name
|
||||
for _, (template, template_res_ids) in self._classify_per_lang(res_ids).items():
|
||||
# add reports attached to event.registration or event.event from
|
||||
# attachment name
|
||||
if template.event_attachment_name_prefix:
|
||||
for res_id in template_res_ids:
|
||||
event_registration = self.env["event.registration"].browse(res_id)
|
||||
|
@@ -79,7 +79,10 @@ class EventMailRegistration(models.Model):
|
||||
|
||||
if not template:
|
||||
_logger.warning(
|
||||
"Cannot process ticket %s, because Mail Scheduler %s has reference to non-existent template",
|
||||
"""
|
||||
Cannot process ticket %s, because Mail Scheduler %s has
|
||||
reference to non-existent template
|
||||
""",
|
||||
reg_mail.registration_id,
|
||||
reg_mail.scheduler_id,
|
||||
)
|
||||
|
@@ -18,6 +18,7 @@ msgstr ""
|
||||
|
||||
#. module: event_sequence
|
||||
#: model:ir.model.fields,field_description:event_sequence.field_event_event__current_sequence_id
|
||||
#: model_terms:ir.ui.view,arch_db:event_sequence.view_event_form_event_sequence
|
||||
msgid "Current sequence"
|
||||
msgstr "Séquence en cours"
|
||||
|
||||
@@ -45,12 +46,6 @@ msgstr "Séquence"
|
||||
msgid "Sequences"
|
||||
msgstr "Séquences"
|
||||
|
||||
#. module: event_sequence
|
||||
#: model_terms:ir.ui.view,arch_db:event_sequence.view_event_form_event_sequence
|
||||
msgid "Current sequence"
|
||||
msgstr "Séquence en cours"
|
||||
|
||||
|
||||
#. module: event_sequence
|
||||
#: model_terms:ir.ui.view,arch_db:event_sequence.view_event_track_by_sequence_kanban
|
||||
msgid "hours"
|
||||
|
@@ -31,7 +31,8 @@ class EventTrack(models.Model):
|
||||
Return default values of calendar events.
|
||||
"""
|
||||
return {
|
||||
# due to google calendar unexpected notifications, for the moment we disable attendees of calendar event
|
||||
# due to google calendar unexpected notifications, for the moment we
|
||||
# disable attendees of calendar event
|
||||
# uncomment following line to re-enable
|
||||
#'partner_ids':[Command.set(self.get_calendar_event_partner_value())],
|
||||
"partner_ids": [Command.set([])],
|
||||
|
@@ -15,7 +15,8 @@ Link event tracks locations to calendar event
|
||||
----------------------------------------------------
|
||||
* Add Partner field on event track location
|
||||
* Add partner "location" to calendar event
|
||||
* Update calendar event if event track location change (or partner in event track location)
|
||||
* Update calendar event if event track location change
|
||||
(or partner in event track location)
|
||||
* Alert if location is used
|
||||
|
||||
|
||||
|
@@ -6,8 +6,12 @@ from odoo.tools import format_date
|
||||
class EventTrack(models.Model):
|
||||
_inherit = "event.track"
|
||||
|
||||
location_already_in_use = fields.Boolean("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 = fields.Boolean(
|
||||
"Location already in use", 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")
|
||||
def _compute_location_already_in_use(self):
|
||||
@@ -19,7 +23,8 @@ class EventTrack(models.Model):
|
||||
|
||||
for calendar_event in track.calendar_event_ids:
|
||||
if track.location_id and calendar_event.start:
|
||||
# search if other calendar event exists for same day on same location
|
||||
# search if other calendar event exists for same day on
|
||||
# same location
|
||||
search_other_calendar_events = [
|
||||
("event_track_id.location_id", "=", track.location_id.id),
|
||||
("start", ">=", calendar_event.start.replace(hour=0, minute=0)),
|
||||
@@ -32,14 +37,22 @@ class EventTrack(models.Model):
|
||||
|
||||
# search only on other event tracks
|
||||
if track.id or track.id.origin:
|
||||
search_other_calendar_events.append(("event_track_id", "!=", track.id or track.id.origin))
|
||||
search_other_calendar_events.append(
|
||||
("event_track_id", "!=", track.id or track.id.origin)
|
||||
)
|
||||
|
||||
# search calendar events not already founded
|
||||
if already_found_other_calendar_event_ids:
|
||||
search_other_calendar_events.append(("id", "not in", already_found_other_calendar_event_ids))
|
||||
search_other_calendar_events.append(
|
||||
("id", "not in", already_found_other_calendar_event_ids)
|
||||
)
|
||||
|
||||
other_calendar_events = self.env["calendar.event"].search(search_other_calendar_events)
|
||||
already_found_other_calendar_event_ids.extend(other_calendar_events.ids)
|
||||
other_calendar_events = self.env["calendar.event"].search(
|
||||
search_other_calendar_events
|
||||
)
|
||||
already_found_other_calendar_event_ids.extend(
|
||||
other_calendar_events.ids
|
||||
)
|
||||
|
||||
if other_calendar_events:
|
||||
location_already_in_use = True
|
||||
|
Reference in New Issue
Block a user