diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2009-12-23 11:32:37 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2009-12-23 11:32:37 +0530 |
| commit | 125cccc07e9c1acecb75d90e922fcd3d3fdce0d4 (patch) | |
| tree | 081b85c08f8cf3997639cff93e7081faacace9eb | |
| parent | 7b898aabfc0b3f2d1ccdf9796cd7eb6c084a4d19 (diff) | |
[IMP]: crm, project_calendar: Improvement in export wizard, Added field name for file name
bzr revid: rpa@tinyerp.com-20091223060237-y0f572eyoud1vi0q
| -rw-r--r-- | addons/crm/wizard/wizard_cal_export.py | 17 | ||||
| -rw-r--r-- | addons/project_calendar/wizard/wizard_cal_export.py | 21 |
2 files changed, 26 insertions, 12 deletions
diff --git a/addons/crm/wizard/wizard_cal_export.py b/addons/crm/wizard/wizard_cal_export.py index 08e9de56945..a166e55f292 100644 --- a/addons/crm/wizard/wizard_cal_export.py +++ b/addons/crm/wizard/wizard_cal_export.py @@ -27,23 +27,30 @@ import pooler class crm_cal_export_wizard(wizard.interface): form1 = '''<?xml version="1.0"?> <form string="Export ICS"> - <separator string="Save ICS file"/> - <field name="file_path" colspan="4" width="300" nolabel="1"/> + <field name="name"/> + <field name="file_path" colspan="4" width="300"/> </form>''' form1_fields = { 'file_path': { - 'string': 'Select ICS file', + 'string': 'Save ICS file', 'type': 'binary', 'required' : True, 'filters' : '*.ics' - } + }, + 'name': { + 'string': 'File name', + 'type': 'char', + 'size': 34, + 'required': True, + 'help': 'Save in .ics format'}, } def _process_export_ics(self, cr, uid, data, context): case_obj = pooler.get_pool(cr.dbname).get('crm.case') calendar = case_obj.export_cal(cr, uid, data['ids'], context) - return {'file_path': base64.encodestring(calendar)} + return {'file_path': base64.encodestring(calendar), \ + 'name': 'OpenERP Events.ics'} states = { 'init': { diff --git a/addons/project_calendar/wizard/wizard_cal_export.py b/addons/project_calendar/wizard/wizard_cal_export.py index 430654d90f6..d8e70ca83fc 100644 --- a/addons/project_calendar/wizard/wizard_cal_export.py +++ b/addons/project_calendar/wizard/wizard_cal_export.py @@ -27,23 +27,30 @@ import pooler class project_cal_export_wizard(wizard.interface): form1 = '''<?xml version="1.0"?> <form string="Export ICS"> - <separator string="Save ICS file"/> - <field name="file_path" colspan="4" width="300" nolabel="1"/> + <field name="name"/> + <field name="file_path" colspan="4" width="300"/> </form>''' form1_fields = { 'file_path': { - 'string': 'Select ICS file', + 'string': 'Save ICS file', 'type': 'binary', - 'required': True, - 'filters': '*.ics' - } + 'required' : True, + 'filters' : '*.ics' + }, + 'name': { + 'string': 'File name', + 'type': 'char', + 'size': 34, + 'required': True, + 'help': 'Save in .ics format'}, } def _process_export_ics(self, cr, uid, data, context): task_obj = pooler.get_pool(cr.dbname).get('project.task') calendar = task_obj.export_cal(cr, uid, data['ids'], context) - return {'file_path': base64.encodestring(calendar)} + return {'file_path': base64.encodestring(calendar), \ + 'name': 'OpenERP Tasks.ics'} states = { 'init': { |
