[IMP]Improved demo data
authorDharti Ratani (Open ERP) <dhr@tinyerp.com>
Wed, 6 Mar 2013 05:31:38 +0000 (11:01 +0530)
committerDharti Ratani (Open ERP) <dhr@tinyerp.com>
Wed, 6 Mar 2013 05:31:38 +0000 (11:01 +0530)
bzr revid: dhr@tinyerp.com-20130306053138-nf7hfjxb8ujqyic3

addons/crm/crm_lead_demo.xml
addons/google_docs/google_docs.py

index 2478673..85752d1 100644 (file)
@@ -712,8 +712,8 @@ Andrew</field>
       <record id="template_crm" model="google.docs.config">
           <field name="model_id" ref="crm.model_crm_lead"/>
           <field name="filter_id" ref="filter_crm"/>
-          <field name="template_url">https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0</field>
-          <field name="name_template">lead_sales-department_%(name)s_review</field>
+          <field name="gdocs_template_url">https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0</field>
+          <field name="name_template">Plan to attend meeting_Leads_Agrolait_gdoc</field>
       </record>
     </data>
 </openerp>
index 0998906..c41f1b5 100644 (file)
@@ -262,7 +262,8 @@ class config(osv.osv):
             model_fields_dic = self.pool.get(action.model_id.model).read(cr, uid, record_id, [], context=context)
             name_gdocs = action.name_template
             name_gdocs = name_gdocs.replace('model',action.model_id.name)
-            name_gdocs = name_gdocs.replace('filter',action.filter_id.name)
+            if action.filter_id:
+                name_gdocs = name_gdocs.replace('filter',action.filter_id.name)
             try:
                 name_gdocs = name_gdocs % model_fields_dic
             except: