[IMP]: Usability Improvements in Calendar

bzr revid: rpa@tinyerp.com-20100903131530-wqq4bb67nh9anr35
This commit is contained in:
P. Christeas 2010-09-03 18:45:30 +05:30 committed by rpa (Open ERP)
parent ff3296c56d
commit 3aa4446439
5 changed files with 27 additions and 23 deletions

View File

@ -403,6 +403,7 @@ property or property parameter."),
else:
return datetime.strptime(idate, '%Y-%m-%d %H:%M:%S')
try:
# FIXME: why isn't this in CalDAV?
import vobject
except ImportError:
return res
@ -1113,8 +1114,8 @@ class calendar_event(osv.osv):
('cancelled', 'Cancelled')], 'State', readonly=True),
'exdate': fields.text('Exception Date/Times', help="This property \
defines the list of date/time exceptions for a recurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="defines a \
rule or repeating pattern for an exception to a recurrence set"),
'exrule': fields.char('Exception Rule', size=352, help="Defines a \
rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, \
string='Recurrent Rule', store=True, \
fnct_inv=_set_rrulestring, help='Defines a\
@ -1123,8 +1124,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency', states={'done': [('readonly', True)]}),
'alarm_id': fields.many2one('res.alarm', 'Alarm', states={'done': [('readonly', True)]}),
('yearly', 'Yearly'), ('custom', 'Custom')],
'Recurrency', states={'done': [('readonly', True)]},
help="Let the event automatically repeat at that interval"),
'alarm_id': fields.many2one('res.alarm', 'Alarm', states={'done': [('readonly', True)]},
help="Set an alarm at this time, before the event occurs" ),
'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
'recurrent_uid': fields.integer('Recurrent ID'),
'recurrent_id': fields.datetime('Recurrent ID date'),
@ -1133,15 +1137,15 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with Organizer Attribure of VEvent.
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
('hourly', 'Hourly'), \
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
('yearly', 'Yearly')], 'Frequency'),
'interval': fields.integer('Interval'),
'count': fields.integer('Count'),
('hourly', 'Hours'), \
('daily', 'Days'), \
('weekly', 'Weeks'), \
('monthly', 'Months'), \
('yearly', 'Years'), \
('secondly', 'Seconds'), \
('minutely', 'Minutes') ], 'Frequency'),
'interval': fields.integer('Interval', help="Repeat every x"),
'count': fields.integer('Count', help="Repeat max that times"),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),
'we': fields.boolean('Wed'),

View File

@ -245,7 +245,7 @@
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
name="open_event" icon="gtk-edit"
type="object" />
<button string="ExRule"
<button string="Exclude range" groups="base.group_extended"
help="Add Exception Rule"
name="%(base_calendar.action_base_calendar_set_exrule)d" icon="gtk-zoom-out" type="action"
context="{'model' : 'calendar.event'}"
@ -255,8 +255,8 @@
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
<separator string="Select data for Custom Rule" colspan="8"/>
<group col="8" colspan="4">
<field name="freq" />
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_base_calendar_set_exrule" model="ir.ui.view">
<record id="view_base_calendar_set_exrule" model="ir.ui.view">
<field name="name">base.calendar.set.exrule.form</field>
<field name="model">base.calendar.set.exrule</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Set Exrule">
<separator string="Select data for ExRule" colspan="8"/>
<separator string="Select range to Exclude" colspan="8"/>
<group col="8" colspan="6">
<field name="freq" />
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>
@ -60,7 +60,7 @@
</record>
<record id="action_base_calendar_set_exrule" model="ir.actions.act_window">
<field name="name">Set Exrule</field>
<field name="name">Set Exclude range</field>
<field name="res_model">base.calendar.set.exrule</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>

View File

@ -59,10 +59,10 @@
</group>
</group>
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
<separator string="Data for Custom Rule" colspan="8"/>
<separator string="Custom Recurrency Rule" colspan="8"/>
<group col="8" colspan="4">
<field name="freq" />
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>

View File

@ -80,10 +80,10 @@
</group>
<newline/>
<group col="4" colspan="6" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
<separator string="Data for Custom Rule" colspan="8"/>
<separator string="Custom Recurrency Rule" colspan="8"/>
<group col="8" colspan="4">
<field name="freq" />
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>