[IMP] crm_meeting_view : Layout recurrency

bzr revid: tfr@openerp.com-20101220092105-dbpsk6h63esuq6i9
This commit is contained in:
Thibault Francois 2010-12-20 10:21:05 +01:00
parent b06f42a215
commit fd72b6e57d
3 changed files with 114 additions and 122 deletions

View File

@ -1130,7 +1130,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
rule or repeating pattern for recurring events\n\
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'),('daily_working', 'Daily(Working day)'), \
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
('yearly', 'Yearly'),],
'Recurrency', states={'done': [('readonly', True)]},
@ -1144,14 +1144,15 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'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'), \
('hourly', 'Hours'), \
('daily', 'Days'), \
('weekly', 'Weeks'), \
('monthly', 'Months'), \
'freq': fields.selection([('None', 'No Repeat'),
('hourly', 'Hours'),
('daily', 'Days'),
('weekly', 'Weeks'),
('monthly', 'Months'),
('yearly', 'Years'), ], 'Frequency'),
'interval': fields.integer('Interval', help="Repeat every (Days/Week/Month/Year)"),
'count': fields.integer('Count', help="Repeat max that times"),
'count': fields.integer('Repeat', help="Repeat x times"),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),
'we': fields.boolean('Wed'),
@ -1159,7 +1160,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'fr': fields.boolean('Fri'),
'sa': fields.boolean('Sat'),
'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
'select1': fields.selection([('date', 'Date of month'),
('day', 'Day of month')], 'Option'),
'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
@ -1176,7 +1177,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it."),
'recurrency': fields.boolean('Recurrency', help="Recurrent Meeting"),
'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"),
'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Meeting."),
}
def default_organizer(self, cr, uid, context=None):
@ -1359,16 +1360,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
elif datas.get('select1')=='date':
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
elif freq == 'yearly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
bymonth = ';BYMONTH=' + str(datas.get('month_list'))
if datas.get('select1')=='day':
bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
bystring = ';BYMONTHDAY=' + str(datas.get('day'))
yearstring = bymonth + bystring
if datas.get('end_date'):
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + 'T235959Z'
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\

View File

@ -344,57 +344,57 @@
</form>
</field>
</page>
<page string="Recurrency Option" attrs="{'invisible':[('recurrency','=',False)]}">
<group col="4" colspan="4" name="rrule">
<group col="2" colspan="2">
<field name="rrule_type" string="Recurrency"
attrs="{'readonly':[('recurrent_uid','!=',False)]}" colspan="2"/>
<label string="" colspan="2"/>
</group>
<separator string="Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<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" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<field name="su" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('rrule_type','!=','monthly'), ('rrule_type','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('rrule_type','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('rrule_type','=','yearly')]}" />
</group>
</group>
</group>
</page>
<page string="Recurrency Option" attrs="{'invisible':[('recurrency','=',False)]}">
<group col="4" colspan="4" name="rrule">
<group col="2" colspan="2">
<field name="rrule_type" string="Recurrency"
attrs="{'readonly':[('recurrent_uid','!=',False)]}" colspan="2"/>
<label string="" colspan="2"/>
</group>
<separator string="Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<field name="interval" string="Repeat Times"/>
<field name="count" attrs="{'readonly': [('end_date','!=',False)]}"/>
<field name="end_date" attrs="{'readonly': [('count','!=',False)]}"/>
</group>
<group col="14" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<field name="su" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('rrule_type','!=','monthly'), ('rrule_type','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('rrule_type','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('rrule_type','=','yearly')]}" />
</group>
</group>
</group>
</page>
</notebook>
</form>
</field>

View File

@ -166,56 +166,56 @@
</field>
</page>
<page string="Recurrency Option" attrs="{'invisible':[('recurrency','=',False)]}">
<group col="4" colspan="4" name="rrule">
<group col="2" colspan="2">
<field name="rrule_type" string="Recurrency"
attrs="{'readonly':[('recurrent_uid','!=',False)]}" colspan="2"/>
<label string="" colspan="2"/>
</group>
<separator string="Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<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" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<field name="su" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('rrule_type','!=','monthly'), ('rrule_type','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('rrule_type','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('rrule_type','=','yearly')]}" />
</group>
</group>
</group>
<group col="4" colspan="4" name="rrule">
<group col="4" colspan="4">
<field name="rrule_type" string="Recurrency period"
attrs="{'readonly':[('recurrent_uid','!=',False)]}" />
<label string="" colspan="2"/>
<separator string="End of recurrency" colspan="4"/>
<field name="count" attrs="{'readonly': [('end_date','!=',False)]}"/>
<label string=" times" colspan="2" />
<newline />
<field name="end_date" attrs="{'readonly': [('count','!=',False)]}"/>
<newline />
<separator string="Repeat interval" colspan="4"/>
<field name="interval" /> <label string="" colspan="2"/>
</group>
<group col="8" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
<separator string="Choose day where repeat the meeting" colspan="8"/>
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('rrule_type','!=','monthly')]}">
<separator string="Choose day in the month where repeat the meeting" colspan="12"/>
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date'), ('rrule_type','=','monthly')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date'), ('rrule_type','=','monthly')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}" />
</group>
</group>
</group>
</page>
</page>
</notebook>
</form>
</field>
@ -296,7 +296,7 @@
<group col="12" colspan="4">
<filter icon="terp-check" name="current" string="Current"
domain="[('state','in',('draft', 'open'))]"
groups="base.group_extended"
groups="base.group_extended"
help="Current Meetings"/>
<separator orientation="vertical"/>
<field name="name" select="1" string="Subject"/>
@ -325,8 +325,8 @@
context="{'group_by':'partner_id'}" />
<separator orientation="vertical" />
<filter string="Type" help="Meeting Type"
icon="terp-stock_symbol-selection" domain="[]"
context="{'group_by':'categ_id'}" />
icon="terp-stock_symbol-selection" domain="[]"
context="{'group_by':'categ_id'}" />
<filter string="Privacy" icon="terp-locked"
domain="[]" context="{'group_by':'class'}" />
<filter string="Show time as" icon="terp-project"