yaltik_odoo_custom/note_dates/views/note_dates.xml

75 lines
2.8 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<openerp>
<data>
<!-- Form -->
<record model="ir.ui.view" id="note_dates_form">
<field name="name">Add dates fields for note form</field>
<field name="model">note.note</field>
<field name="inherit_id" ref="note_base.form" />
<field name="arch" type="xml">
<field name="tag_ids" position="after">
<field name="is_daily" />
<field name="moment" class="oe_edit_only"
attrs="{'invisible': [('is_daily', '=', True)]}" />
<field name="date_start"
attrs="{'invisible': [('is_daily', '=', True)]}" />
<field name="date_stop"
attrs="{'invisible': [('is_daily', '=', True)]}" />
</field>
</field>
</record>
<!-- Tree -->
<record model="ir.ui.view" id="note_dates_tree">
<field name="name">Add date_start to tree</field>
<field name="model">note.note</field>
<field name="inherit_id" ref="note.view_note_note_tree" />
<field name="arch" type="xml">
<field name="tag_ids" position="after">
<field name="is_daily" />
<field name="date_start" />
</field>
</field>
</record>
<!-- Action -->
<record model="ir.actions.act_window" id="note.action_note_note">
<field name="name">Notes</field>
<field name="res_model">note.note</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,calendar,form</field>
<field name="search_view_id" ref="note.view_note_note_filter"/>
<field name="context">{}</field>
</record>
<!-- Calendar -->
<record model="ir.ui.view" id="note_dates_calendar">
<field name="name">Add calendar view, based on date</field>
<field name="model">note.note</field>
<field name="arch" type="xml">
<calendar date_start="date_start" date_stop="date_stop"
color="stage_id" all_day="is_daily" mode="day"
display="[[tag_names]] - [name]" >
<field name="name" />
<field name="tag_names" />
</calendar>
</field>
</record>
</data>
</openerp>