[IMP] crm: improve the view of opportunity2phonecall and fix the field value in wizard
authorsbh (Open ERP) <sbh@tinyerp.com>
Wed, 10 Mar 2010 06:46:24 +0000 (12:16 +0530)
committersbh (Open ERP) <sbh@tinyerp.com>
Wed, 10 Mar 2010 06:46:24 +0000 (12:16 +0530)
bzr revid: sbh@tinyerp.com-20100310064624-dlwt4rh32kl2ooqn

addons/crm/crm_opportunity_view.xml
addons/crm/wizard/__init__.py
addons/crm/wizard/opportunity2phonecall.py
addons/crm/wizard/opportunity2phonecall.xml

index 32d2a0a..d05de45 100644 (file)
@@ -68,7 +68,7 @@
                     <field name="probability"/>
                     <field name="date_deadline" string="Expected Closing"/>
                     <button string="Schedule Call"
-                        name="%(wizard_crm_opportunity_reschedule_phone_call)d" icon="gtk-redo" type="action"  />
+                        name="%(opportunity2phonecall_act)d" icon="gtk-redo" type="action"  />
                 </group>
                 <notebook colspan="4">
                 <page string="Opportunity">
index fac5ce9..72dfcca 100644 (file)
@@ -26,9 +26,10 @@ import crm_phonecall_wizard
 import wizard_crm_send_email
 import wizard_crm_new_send_email
 import wizard_history_event
-import crm_phonecall2phonecall
+
 
 import lead_to_partner
+import crm_phonecall2phonecall
 import phonecall2partner
 import phonecall2meeting
 import phonecall_to_opportunity
index 6bebf5d..25ac0d4 100644 (file)
@@ -71,15 +71,14 @@ class crm_opportunity2phonecall(osv.osv_memory):
         for opportunity in opportunites:            
             new_case = phonecall_case_obj.create(cr, uid, {
                     'name' : opportunity.name,
-                    'case_id' : opportunity.id,
-                    'user_id' : this.user_id,
-                    'categ_id' : opportunity.categ_id,
-                    'description' : opportunity.description,
+                    'case_id' : opportunity.id ,
+                    'user_id' : this.user_id and this.user_id.id or Flase,
+                    'categ_id' : opportunity.categ_id and opportunity.categ_id.id or Flase,
+                    'description' : opportunity.description or False,
                     'date' : this.date,
                     'section_id' : opportunity.section_id and opportunity.section_id.id or False,
                     'partner_id': opportunity.partner_id and opportunity.partner_id.id or False,
                     'partner_address_id':opportunity.partner_address_id and opportunity.partner_address_id.id or False,
-                    'description': opportunity.description or '',
                     'partner_phone' : opportunity.phone or (opportunity.partner_address_id and opportunity.partner_address_id.phone or False),
                     'partner_mobile' : opportunity.partner_address_id and opportunity.partner_address_id.mobile or False,
                     'priority': opportunity.priority,
index 9f24e5e..4823e54 100644 (file)
@@ -6,12 +6,14 @@
             <field name="model">crm.opportunity2phonecall</field>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="Schedule Other Call" col="2">
+                <form string="Schedule Other Call">
+                                       <group colspan="2" >
                                <field name="name"/>
+                               <field name="date" string="Planned Date"/>
+                               <newline/>
                                                <field name="user_id" />
-                                               <field name="date" string="Planned Date"/>
                                                <field name="section_id"/>
-                    <group colspan="2" col="2" >
+                                               <label string ="" colspan="2"/>
                         <button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
                         <button name="action_apply" type="object" string="_Apply" icon="gtk-apply" />
                     </group>