Skip to content
Extraits de code Groupes Projets
Valider 221a5756 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[IMP] add fields on events

parent fe85d684
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
# views menu # views menu
# wizard # wizard
], ],
"assets": {
"web.assets_frontend": [
"solagro_event/static/src/scss/event_templates_page.scss",
],
},
"installable": True, "installable": True,
"auto_install": False, "auto_install": False,
} }
Impossible d'afficher diff de source : il est trop volumineux. Options pour résoudre ce problème : voir le blob.
Ce diff est replié.
...@@ -9,6 +9,9 @@ class Event(models.Model): ...@@ -9,6 +9,9 @@ class Event(models.Model):
_inherit = "event.event" _inherit = "event.event"
webinar_link = fields.Char() webinar_link = fields.Char()
end_registration_message = fields.Html()
contract_number = fields.Integer()
hide_dates_in_registration_complete = fields.Boolean()
# ------------------------------------------------------ # ------------------------------------------------------
# Default methods # Default methods
......
.o_wevent_event {
.o_wevent_event_title {
margin: 3rem 0;
.o_wevent_event_name {
@include font-size(map-get($display-font-sizes, 5));
}
.o_wevent_event_subtitle {
@include font-size($h2-font-size);
}
}
}
...@@ -4,6 +4,26 @@ ...@@ -4,6 +4,26 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
--> -->
<odoo> <odoo>
<!-- Search -->
<record id="event_search" model="ir.ui.view">
<field name="name">solagro.event.event.search</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_search" />
<field name="priority">101</field>
<field name="arch" type="xml">
<field name="stage_id" position="after">
<field name="contract_number" />
</field>
<filter name="date_begin" position="after">
<filter
string="Numéro de contrat"
name="contract_number"
domain="[]"
context="{'group_by': 'contract_number'}"
/>
</filter>
</field>
</record>
<!-- Form --> <!-- Form -->
<record id="event_form" model="ir.ui.view"> <record id="event_form" model="ir.ui.view">
<field name="name">solagro.event.event.form</field> <field name="name">solagro.event.event.form</field>
...@@ -11,6 +31,9 @@ ...@@ -11,6 +31,9 @@
<field name="inherit_id" ref="event.view_event_form" /> <field name="inherit_id" ref="event.view_event_form" />
<field name="priority">101</field> <field name="priority">101</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="address_id" position="after">
<field name="contract_number" />
</field>
<xpath expr="//notebook" position="before"> <xpath expr="//notebook" position="before">
<group name="registration" string="Inscriptions"> <group name="registration" string="Inscriptions">
<group> <group>
...@@ -19,6 +42,10 @@ ...@@ -19,6 +42,10 @@
<group /> <group />
</group> </group>
</xpath> </xpath>
<field name="ticket_instructions" position="after">
<field name="end_registration_message" />
<field name="hide_dates_in_registration_complete" />
</field>
</field> </field>
</record> </record>
<record id="website_event_private.event_event_view_form" model="ir.ui.view"> <record id="website_event_private.event_event_view_form" model="ir.ui.view">
......
...@@ -29,4 +29,19 @@ ...@@ -29,4 +29,19 @@
</xpath> </xpath>
</template> </template>
<template
id="registration_complete_extra_message"
inherit_id="website_event.registration_complete"
name="Registration Completed"
>
<xpath expr="//u/a[@t-out='event.name']/.." position="after">
<span t-out="event.end_registration_message" />
</xpath>
<xpath expr="//span[@t-out='event.date_begin_located']/../.." position="attributes">
<attribute name="t-if">not event.hide_dates_in_registration_complete</attribute>
</xpath>
<xpath expr="//span[@t-out='event.date_end_located']/../.." position="attributes">
<attribute name="t-if">not event.hide_dates_in_registration_complete</attribute>
</xpath>
</template>
</odoo> </odoo>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter