summaryrefslogtreecommitdiff
path: root/addons/event_sale/wizard/event_configurator_views.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/event_sale/wizard/event_configurator_views.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/event_sale/wizard/event_configurator_views.xml')
-rw-r--r--addons/event_sale/wizard/event_configurator_views.xml48
1 files changed, 48 insertions, 0 deletions
diff --git a/addons/event_sale/wizard/event_configurator_views.xml b/addons/event_sale/wizard/event_configurator_views.xml
new file mode 100644
index 00000000..db1399cd
--- /dev/null
+++ b/addons/event_sale/wizard/event_configurator_views.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="event_configurator_view_form" model="ir.ui.view">
+ <field name="name">event.configurator.view.form</field>
+ <field name="model">event.event.configurator</field>
+ <field name="arch" type="xml">
+ <form js_class="event_configurator_form">
+ <group>
+ <field
+ name="event_id"
+ domain="[
+ ('event_ticket_ids.product_id','=', product_id),
+ ('date_end','&gt;=',time.strftime('%Y-%m-%d 00:00:00'))
+ ]"
+ required="1"
+ options="{'no_open': True, 'no_create': True}"
+ />
+ <field
+ name="event_ticket_id"
+ domain="[
+ ('event_id', '=', event_id),
+ ('product_id','=',product_id),
+ '|', ('seats_limited', '=', False), ('seats_available', '>', 0)
+ ]"
+ attrs="{
+ 'invisible': [('event_id', '=', False)],
+ 'required': [('event_id', '!=', False)],
+ }"
+ options="{'no_open': True, 'no_create': True}"
+ />
+ <field name="product_id" invisible="1"/>
+ </group>
+ <footer>
+ <button string="Ok" class="btn-primary o_event_sale_js_event_configurator_ok" special="save"/>
+ <button string="Cancel" class="btn-secondary" special="cancel"/>
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <record id="event_configurator_action" model="ir.actions.act_window">
+ <field name="name">Configure an event</field>
+ <field name="res_model">event.event.configurator</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ <field name="view_id" ref="event_configurator_view_form"/>
+ </record>
+</odoo>