[IMP] base_calendar,crm: improve the tooltips and view

bzr revid: sbh@tinyerp.com-20101217053121-m7m7oucxl61u7nxk
This commit is contained in:
Sbh (OpenERP) 2010-12-17 11:01:21 +05:30
parent f16dedfcd1
commit 7468d02118
2 changed files with 7 additions and 6 deletions

View File

@ -1088,8 +1088,8 @@ class calendar_event(osv.osv):
if datas.get('rrule_type') :
if datas.get('interval', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Interval can not be Negative'))
# if datas.get('count', 0) < 0:
# raise osv.except_osv(_('Warning!'), _('Count can not be Negative'))
if datas.get('count', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Count can not be Negative'))
rrule_custom = self.compute_rule_string(cr, uid, datas, \
context=context)
result[event] = rrule_custom
@ -1150,7 +1150,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('weekly', 'Weeks'), \
('monthly', 'Months'), \
('yearly', 'Years'), ], 'Frequency'),
'interval': fields.integer('Interval', help="Repeat every x"),
'interval': fields.integer('Interval', help="Repeat every (Days/Week/month/year)"),
'count': fields.integer('Count', help="Repeat max that times"),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),

View File

@ -173,9 +173,10 @@
<label string="" colspan="2"/>
</group>
<separator string="Recurrency Rule" colspan="8"/>
<group col="2" colspan="2">
<field name="interval" string="Repeat Times" attrs="{'invisible': [('end_date','!=',False)]}"/>
<field name="end_date" attrs="{'invisible': [('interval','!=',False)]}"/>
<group col="3" colspan="3">
<field name="interval" string="Repeat Times" attrs="{'readonly': [('end_date','!=',False)]}"/>
<field name="count" attrs="{'readonly': [('end_date','!=',False)]}"/>
<field name="end_date" attrs="{'readonly': [('interval','!=',False)]}"/>
</group>
<group col="14" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly','daily_working'])]}">
<field name="mo" colspan="1" />