Files
gzth/room/views/inherit_calendar_event_views.xml
T
2024-09-26 09:20:48 +08:00

98 lines
5.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="room_inherit_calendar_event_form" model="ir.ui.view">
<field name="name">room.inherit.calendar.event.form</field>
<field name="model">calendar.event</field>
<field name="inherit_id" ref="calendar.view_calendar_event_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='page_invitations']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='user_can_edit']" position="after">
<button name="button_meet" string="安排会议" type="object" class="btn-primary"/>
</xpath>
<xpath expr="//form/div" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//sheet/div" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//group" position="replace">
<group>
<group>
<field name="start_date" widget="daterange" options="{'end_date_field': 'stop_date'}"
invisible="not allday" required="allday" readonly="not user_can_edit"/>
<field name="start" widget="daterange" options="{'end_date_field': 'stop'}" invisible="allday"
required="not allday" readonly="not user_can_edit"/>
<field name="stop_date" invisible="1"/>
<field name="stop" invisible="1"/>
<label for="duration" class="fw-bold text-900 opacity-100"/>
<div class="d-flex gap-2">
<div class="d-flex align-items-start" invisible="allday">
<field name="duration" widget="float_time" string="日程时长" class="oe_inline pe-2"/>
<span>小时</span>
</div>
<span invisible="allday" style="white-space: pre;">或</span>
<div class="d-flex gap-2">
<label for="allday" class=""/>
<field name="allday" class="oe_inline" widget="boolean_toggle" force_save="1"
options="{'autosave': False}" readonly="not user_can_edit"/>
</div>
</div>
<field name="recurrence_id" invisible="1"/>
<field name="sth_type"/>
<field name="room_booking_id" invisible="sth_type != 'meet'"/>
<field name="location" placeholder="Online Meeting" readonly="not user_can_edit"/>
<field name="videocall_source" invisible="1"/>
<field name="access_token" invisible="1" force_save="1"/>
<field name="user_id" widget="many2one_avatar_user" readonly="not user_can_edit"/>
<field name="partner_ids" widget="many2many_tags"/>
</group>
<group>
<field name="should_show_status" invisible="1"/>
<field name="current_status" class="w-auto" required="should_show_status"
readonly="not should_show_status" invisible="not should_show_status"/>
<field name="alarm_ids" widget="many2many_tags" options="{'no_quick_create': True}"
readonly="not user_can_edit"/>
</group>
<field name="description" options="{'height': 100}" placeholder="Add description"
readonly="not user_can_edit" widget="tinymce"/>
</group>
</xpath>
</field>
</record>
<record id="inherit_calender_view_form" model="ir.ui.view">
<field name="name">inherit.calender.view.form</field>
<field name="model">calendar.event</field>
<field name="arch" type="xml" >
<form string="新建" create="0" delete="0" edit="0">
<sheet>
<div class="row">
<div class="col-6 text-center">
<field name="name" invisible="1"/>
<button name="button_dates" string="安排日程" type="object" class="btn btn-primary"/>
</div>
<div class="col-6 text-center">
<button name="button_meet" string="安排会议" type="object" class="btn btn-primary"/>
</div>
</div>
</sheet>
<footer>
</footer>
</form>
</field>
</record>
<record id="room_view_calendar_event_calendar" model="ir.ui.view">
<field name="name">room.inherit.calendar.event.form.founded</field>
<field name="model">calendar.event</field>
<field name="inherit_id" ref="calendar.view_calendar_event_calendar"/>
<field name="arch" type="xml">
<xpath expr="//calendar" position="attributes">
<attribute name="quick_create_view_id">%(room.inherit_calender_view_form)d</attribute>
</xpath>
</field>
</record>
</odoo>