Browse Source

[ADD] event_type_description

16.0
RemiFr82 1 year ago
parent
commit
cde863f1dd
  1. 1
      event_type_description/__init__.py
  2. 38
      event_type_description/__manifest__.py
  3. 2
      event_type_description/models/__init__.py
  4. 14
      event_type_description/models/event_type.py

1
event_type_description/__init__.py

@ -0,0 +1 @@
from . import models

38
event_type_description/__manifest__.py

@ -0,0 +1,38 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Event template description",
"version": "1.0.0",
"summary": """
This module allows to push website description from event form to its template/type.
""",
"description": """
TO WRITE
""",
"author": "RemiFr82",
"contributors": "",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Events",
# "price": 0,
# "currency": "EUR",
"application": False,
"installable": True,
"auto_install": False,
"pre_init_hook": "",
"post_init_hook": "",
"uninstall_hook": "",
"excludes": [],
"external_dependencies": [],
"depends": [
"website_event",
],
"data": [
"views/event_event.xml",
],
"css": [],
"images": [],
"js": [],
"test": [],
"demo": [],
"maintainer": "RemiFr82",
}

2
event_type_description/models/__init__.py

@ -0,0 +1,2 @@
from . import event_event
from . import event_type

14
event_type_description/models/event_type.py

@ -0,0 +1,14 @@
from odoo import models, fields, api, _
from odoo.tools.translate import html_translate
class EventType(models.Model):
_inherit = "event.type"
description = fields.Html(
string="Description",
translate=html_translate,
sanitize_attributes=False,
sanitize_form=False,
default=lambda self: self.env["event.event"]._default_description(),
)
Loading…
Cancel
Save