Extend golem_activity_form to add registration_slot

This commit is contained in:
Youssef Elouahby 2018-11-01 02:16:57 +01:00
parent e8f60a8f97
commit 6e11886259
1 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
Copyright 2018 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/>.
-->
<odoo>
<data>
<!-- Forms -->
<record id="golem_activity_form_inherit_golem_activity_registration_slot"
model="ir.ui.view">
<field name="name">Add registration slot to activity form</field>
<field name="model">golem.activity</field>
<field name="inherit_id" ref="golem_activity.golem_activity_form" />
<field name="arch" type="xml">
<field name='list_price' position='after'>
<field name='individual_slots'/>
</field>
<page name='activity_others' position='before'>
<page name='individual_slots_tab' string='Individual Slots'
attrs="{'invisible': [('individual_slots', '!=', True)]}">
<group>
<field name='slots_number'/>
<field name='slots_duration' widget='float_time'/>
<field name='registration_slot_ids'>
<tree editable='bottom'>
<field name='hour_start' widget='float_time'/>
<field name='hour_stop' widget='float_time'/>
</tree>
</field>
</group>
</page>
</page>
</field>
</record>
</data>
</odoo>