[IMP] caldav : Improve alarm view
bzr revid: hmo@tinyerp.com-20100106083649-ezlc080slryn67i8
This commit is contained in:
parent
6fe3829cfa
commit
15e558492e
|
@ -49,20 +49,22 @@
|
|||
<field name="model">crm.caldav.alarm</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Alarm details">
|
||||
<field name="action"/>
|
||||
<field name="name" select="1" attrs="{'required' : [('action','in',('EMAIL', 'DISPLAY'))]}"/>
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field name="description" colspan="4" nolabel="1" attrs="{'required' : [('action','in',('EMAIL'))]}"/>
|
||||
<group string="Reminder details" col="4" colspan="4">
|
||||
<form string="Reminder details">
|
||||
<field name="duration"/>
|
||||
<field name="repeat"/>
|
||||
<separator string="Reminder details" colspan="4" />
|
||||
<group col="4" colspan="4">
|
||||
<field name="trigger_duration" nolabel="1" select="1"/>
|
||||
<field name="trigger_interval" nolabel="1" select="1"/>
|
||||
<field name="trigger_occurs" nolabel="1" select="1"/>
|
||||
<field name="trigger_related" nolabel="1" select="1"/>
|
||||
</group>
|
||||
<field name="duration"/>
|
||||
<field name="repeat"/>
|
||||
<field name="attach" colspan="4" attrs="{'required' : [('action','in',('AUDIO', 'PROCEDURE'))]}"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4">
|
||||
<label string="" colspan="2"/>
|
||||
<button icon='gtk-cancel' special="cancel" string="Cancel"/>
|
||||
<button name="do_create" string="Ok" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -72,9 +74,8 @@
|
|||
<field name="model">crm.caldav.alarm</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Alarm details">
|
||||
<field name="name" select="1"/>
|
||||
<field name="action"/>
|
||||
<tree string="Reminder details">
|
||||
<field name="name" select="1"/>
|
||||
<field name="trigger_interval" select="1"/>
|
||||
<field name="trigger_duration" select="1"/>
|
||||
<field name="trigger_related" select="1"/>
|
||||
|
@ -84,6 +85,15 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_caldav_alarm_form" model="ir.actions.act_window">
|
||||
<field name="name">Alarm</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">crm.caldav.alarm</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="view_caldav_set_rrule_wizard" model="ir.ui.view">
|
||||
<field name="name">Add RRule</field>
|
||||
<field name="model">caldav.set.rrule</field>
|
||||
|
@ -135,8 +145,9 @@
|
|||
</group>
|
||||
</group>
|
||||
<separator string="" colspan="6" />
|
||||
<label string="" colspan="3"/>
|
||||
<button name="add_rrule" string="Ok" type="object" icon="gtk-ok"/>
|
||||
<label string="" colspan="2"/>
|
||||
<button icon='gtk-cancel' special="cancel" string="Cancel"/>
|
||||
<button name="do_add" string="Ok" type="object" icon="gtk-ok"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -292,7 +292,7 @@ class set_rrule_wizard(osv.osv_memory):
|
|||
'interval': lambda *x: 1,
|
||||
}
|
||||
|
||||
def add_rrule(self, cr, uid, ids, context={}):
|
||||
def do_add(self, cr, uid, ids, context={}):
|
||||
datas = self.read(cr, uid, ids)[0]
|
||||
if not context or not context.get('model'):
|
||||
return {}
|
||||
|
|
|
@ -107,14 +107,18 @@
|
|||
<notebook colspan="4">
|
||||
<page string="Meeting">
|
||||
<group colspan="2" col="3">
|
||||
<field name="alarm_id" colspan="1" string="Alarm"/>
|
||||
<field name="alarm_id" colspan="1" string="Alarm" widget="selection"/>
|
||||
<button string="Custom"
|
||||
name="%(caldav.action_view_caldav_alarm_form)d"
|
||||
icon="gtk-save-as" type="action" context="{'model' : 'crm.meeting'}"
|
||||
/>
|
||||
</group>
|
||||
<group colspan="2" col="3">
|
||||
<field name="rrule_type" string="Recurrency" colspan="1"/>
|
||||
<button string="Custom"
|
||||
name="%(caldav.action_view_caldav_set_rrule_wizard)d"
|
||||
icon="gtk-save-as" type="action" context="{'model' : 'crm.meeting'}"
|
||||
attrs="{'invisible':[('rrule_type','!=','custom')]}"
|
||||
attrs="{'readonly':[('rrule_type','!=','custom')]}"
|
||||
/>
|
||||
</group>
|
||||
<separator string="Description" colspan="4"/>
|
||||
|
|
Loading…
Reference in New Issue