[IMP]: caldav,crm,project_calendar: Added wizard to change RRule
bzr revid: rpa@tinyerp.com-20091224120108-jpv931vjh3fetj3m
This commit is contained in:
@@ -284,12 +284,12 @@ class set_rrule_wizard(osv.osv_memory):
|
||||
|
||||
def add_rrule(self, cr, uid, ids, context={}):
|
||||
datas = self.read(cr, uid, ids)[0]
|
||||
if not context:
|
||||
if not context or not context.get('model'):
|
||||
return {}
|
||||
model = 'crm.case' # for now
|
||||
else:
|
||||
model = context.get('model')
|
||||
obj = self.pool.get(model)
|
||||
res_obj = obj.browse(cr, uid, context['active_id'])[0]
|
||||
|
||||
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
|
||||
weekstring = ''
|
||||
monthstring = ''
|
||||
@@ -342,4 +342,4 @@ class set_rrule_wizard(osv.osv_memory):
|
||||
|
||||
set_rrule_wizard()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -104,7 +104,8 @@
|
||||
<group string="Recurrency Details" col="5" colspan="4">
|
||||
<button string="Change RRule"
|
||||
name="%(caldav.action_view_caldav_set_rrule_wizard)d"
|
||||
icon="gtk-save-as" type="action" colspan="4"/>
|
||||
icon="gtk-save-as" type="action" colspan="4"
|
||||
context="{'model' : 'crm.case'}"/>
|
||||
<group col="1" colspan="2">
|
||||
<separator string="Recurrenet Rule" />
|
||||
<field name="rrule" nolabel="1" />
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
/>
|
||||
|
||||
<wizard string="Set RRULE" model="crm.case"
|
||||
name="caldav.set.rrule" id="wizard_crm_set_rrule"
|
||||
name="caldav.set.rrule" id="wizard_crm_set_rrule" menu="False"
|
||||
/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
@@ -109,7 +109,11 @@
|
||||
<newline/>
|
||||
<separator string="Location" colspan="4"/>
|
||||
<field name="location" colspan="4" nolabel="1"/>
|
||||
<group string="Recurrency Details" col="4" colspan="4">
|
||||
<group string="Recurrency Details" col="5" colspan="4">
|
||||
<button string="Change RRule"
|
||||
name="%(caldav.action_view_caldav_set_rrule_wizard)d"
|
||||
icon="gtk-save-as" type="action" colspan="4"
|
||||
context="{'model' : 'project.task'}"/>
|
||||
<group col="1" colspan="2">
|
||||
<separator string="Recurrenet Rule" />
|
||||
<field name="rrule" nolabel="1" />
|
||||
|
||||
@@ -8,5 +8,10 @@
|
||||
name="caldav.project.export" id="wizard_project_cal_export"
|
||||
multi="True"
|
||||
/>
|
||||
|
||||
<wizard string="Set RRULE" model="crm.case"
|
||||
name="caldav.set.rrule" id="wizard_crm_set_rrule" menu="False"
|
||||
/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user