You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

110 lines
5.7 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Movie Registration Search View -->
<record id="movie_registration_view_search" model="ir.ui.view">
<field name="name">movie.registration.view.search</field>
<field name="model">movie.registration</field>
<field name="arch" type="xml">
<search string="Search Tips">
<field name="movie_id" string="Movie"/>
<field name="name" string="Name"/>
<filter name="filter_movies_reg_draft" string="Draft" domain="[('state','=','draft')]"/>
<filter name="filter_movies_reg_done" string="Done" domain="[('state','=','done')]"/>
<filter name="filter_movies_reg_invoiced" string="Invoiced" domain="[('state','=','invoiced')]"/>
<group expand="0" string="Group By">
<filter name="Date" string="Date"
context="{'group_by':'date'}"/>
<filter name="Movie" string="Movie"
context="{'group_by':'movie_id'}"/>
</group>
</search>
</field>
</record>
<!-- Movie Registration Form View -->
<record id="movie_registration_view_form" model="ir.ui.view">
<field name="name">movie.registration.view.form</field>
<field name="model">movie.registration</field>
<field name="arch" type="xml">
<form string="Movie Bookings">
<header>
<button name="action_generate_ticket_pdf" type="object" string="Download Ticket"
invisible="state not in ['invoiced']" class="btn-primary"/>
<button name="action_submit" string="Submit"
type="object" class="btn-primary" invisible="state not in ['draft']"/>
<button name="action_invoice" string="Invoice"
type="object" class="btn-primary" invisible="state not in ['done']"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_open_invoices" class="oe_stat_button"
string="Invoices" type="object"
invisible="state not in ['invoiced']"
icon="fa-tasks"/>
</div>
<div class="oe_title">
<h1>
<field name="name" required="1"/>
</h1>
</div>
<group>
<group>
<field name="date" readonly="state == 'invoiced'"/>
<field name="movie_id" readonly="state == 'invoiced'"
options="{'no_create_edit': True, 'no_create': True}"/>
<field name="partner_id" readonly="state == 'invoiced'"/>
<field name="time_slot_id" readonly="state == 'invoiced'"
options="{'no_create_edit': True, 'no_create': True}"/>
<field name="screen_id" readonly="state == 'invoiced'"
options="{'no_create_edit': True, 'no_create': True}"/>
<field name="no_of_tickets" readonly="state == 'invoiced'"/>
<field name="available_movie_ids" invisible="1"/>
<field name="available_time_slot_ids" invisible="1"/>
<field name="available_screens_ids" invisible="1"/>
</group>
<group>
<field name="movie_type" widget="many2many_tags" invisible="not movie_id"/>
<field name="movie_lang" invisible="not movie_id"/>
<field name="movie_price" invisible="not movie_id"/>
<field name="movie_poster" widget="image" options="{'size': [185, 280]}" invisible="not movie_id"/>
<field name="currency_id" invisible="1"/>
</group>
</group>
<notebook invisible="not movie_id">
<page string="Movie Cast">
<field name="movie_cast_ids"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Movie Registration Tree View -->
<record id="movie_registration_view_tree" model="ir.ui.view">
<field name="name">movie.registration.view.tree</field>
<field name="model">movie.registration</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="movie_id"/>
<field name="movie_lang"/>
<field name="date"/>
<field name="state" widget="badge"
decoration-success="state == 'invoiced'"
decoration-warning="state == 'done'"
decoration-info="state == 'draft'"/>
</tree>
</field>
</record>
<!-- Action Movie Registration -->
<record id="movie_registration_action" model="ir.actions.act_window">
<field name="name">Show Bookings</field>
<field name="res_model">movie.registration</field>
<field name="view_mode">tree,form</field>
</record>
<!-- MenuItem for movie booking -->
<menuitem id="movie_registration" name="Show Bookings"
action="movie_registration_action"
parent="show_booking_management.movie"
sequence="2"/>
</odoo>