diff options
| author | Rvo (Open ERP) <rvo@tinyerp.co.in> | 2010-09-18 11:56:08 +0530 |
|---|---|---|
| committer | Rvo (Open ERP) <rvo@tinyerp.co.in> | 2010-09-18 11:56:08 +0530 |
| commit | bf1de4c7d5f95c577e3a67e68f8d595f3ebd4e73 (patch) | |
| tree | fd9221e330dfab98061dacafb33404ea567b1397 /addons/crm | |
| parent | 050344d175dc19e6b3cfa306bb2c01ddc977100a (diff) | |
| parent | 558352fba2af69a1015ec9a4c7bad90cc6683b4a (diff) | |
[MERGE]: lp:trunk-dev-addons2
bzr revid: rvo@tinyerp.co.in-20100918062608-gddpu7210ynvvuz4
Diffstat (limited to 'addons/crm')
| -rw-r--r-- | addons/crm/crm_action_rule.py | 6 | ||||
| -rw-r--r-- | addons/crm/crm_data.xml | 2 | ||||
| -rw-r--r-- | addons/crm/crm_lead_data.xml | 2 | ||||
| -rw-r--r-- | addons/crm/crm_lead_view.xml | 81 | ||||
| -rw-r--r-- | addons/crm/crm_opportunity_data.xml | 2 | ||||
| -rw-r--r-- | addons/crm/crm_opportunity_view.xml | 32 | ||||
| -rw-r--r-- | addons/crm/crm_phonecall_data.xml | 2 | ||||
| -rw-r--r-- | addons/crm/crm_phonecall_menu.xml | 5 | ||||
| -rw-r--r-- | addons/crm/crm_phonecall_view.xml | 4 | ||||
| -rw-r--r-- | addons/crm/crm_view.xml | 4 | ||||
| -rw-r--r-- | addons/crm/wizard/crm_lead_to_opportunity.py | 4 | ||||
| -rw-r--r-- | addons/crm/wizard/crm_merge_opportunities_view.xml | 5 | ||||
| -rw-r--r-- | addons/crm/wizard/crm_opportunity_to_phonecall_view.xml | 2 |
13 files changed, 79 insertions, 72 deletions
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index 074821691e8..f7df076e24d 100644 --- a/addons/crm/crm_action_rule.py +++ b/addons/crm/crm_action_rule.py @@ -121,7 +121,11 @@ this if you want the rule to send an email to the partner."), write['email_cc'] = obj.email_cc+','+obj.act_email_cc else: write['email_cc'] = obj.act_email_cc - + + # Put state change by rule in communication history + if hasattr(obj, 'state') and action.act_state: + model_obj._history(cr, uid, [obj], _(action.act_state)) + model_obj.write(cr, uid, [obj.id], write, context) emails = [] diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml index 60af74e9359..e494db325e5 100644 --- a/addons/crm/crm_data.xml +++ b/addons/crm/crm_data.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> - <data> + <data noupdate="1"> <record model="crm.case.section" id="section_sales_department"> <field name="name">Sales Department</field> <field name="code">Sales</field> diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml index 41eeb529154..566976c1d52 100644 --- a/addons/crm/crm_lead_data.xml +++ b/addons/crm/crm_lead_data.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <openerp> - <data> + <data noupdate="1"> <!-- CASE STATUS(stage_id) --> diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 95f81e0d813..7783c7be1b5 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -55,7 +55,7 @@ <field name="arch" type="xml"> <form string="Leads Form"> <group colspan="4" col="7"> - <field name="name" required="1" string="Name"/> + <field name="name" required="1" string="Contact Name"/> <field name="priority"/> <field name="categ_id" widget="selection" @@ -168,41 +168,36 @@ </group> </page> <page string="History" groups="base.group_extended"> - <group colspan="4"> - <field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/> - </group> - <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> - <tree string="Communication history"> + <group colspan="4"> + <field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/> + </group> + <field name="message_ids" colspan="4" nolabel="1" mode="tree,form" context="{'default_model': 'crm.lead', 'default_user_id': uid}" > + <tree string="History"> <field name="display_text" string="History Information"/> <field name="history" invisible="1"/> - <button - string="Reply" attrs="{'invisible': [('history', '!=', True)]}" - name="%(crm.action_crm_send_mail)d" - context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" - icon="terp-mail-replied" type="action" /> + <button string="Reply" attrs="{'invisible': [('history', '!=', True)]}" name="123" context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" icon="terp-mail-replied" type="action"/> </tree> - <form string="Communication history"> - <group col="4" colspan="4"> - <field name="email_from"/> - <field name="date"/> - <field name="email_to" widget="char" size="512"/> - <field name="email_cc" widget="char" size="512"/> - <field name="name" colspan="4" widget="char" size="512"/> - <field name="history" invisible="1"/> - </group> + <form string="History"> + <field name="history"/> + <field name="name" colspan="4" widget="char" size="512" required="1"/> + <field name="date" required="1"/> + <field name="user_id"/> + <field name="model" invisible="1"/> <notebook colspan="4"> <page string="Details"> - <group attrs="{'invisible': [('history', '!=', True)]}"> - <field name="description" colspan="4" nolabel="1" height="250"/> - <button colspan="4" - string="Reply" - name="%(crm.action_crm_send_mail)d" - context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" - icon="terp-mail-replied" type="action" /> + <group col="4" colspan="4" attrs="{'invisible': [('history', '!=', True)]}"> + <field name="email_from" attrs="{'required': [('history', '=', True)]}"/> + <field name="email_to" widget="char" size="512" attrs="{'required': [('history', '=', True)]}"/> + <field name="email_cc" widget="char" size="512"/> + </group> + <separator string="Description" colspan="4"/> + <group colspan="4" attrs="{'invisible': [('history', '!=', True)]}"> + <field name="description" colspan="4" nolabel="1" attrs="{'required': [('history', '=', True)]}"/> </group> - <group attrs="{'invisible': [('history', '=', True)]}"> - <field name="display_text" colspan="4" nolabel="1" height="250"/> + <group colspan="4" attrs="{'invisible': [('history', '=', True)]}"> + <field name="display_text" colspan="4" nolabel="1"/> </group> + <button colspan="4" string="Reply" name="123" context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" icon="terp-mail-replied" type="action"/> </page> <page string="Attachments"> <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/> @@ -237,7 +232,7 @@ <tree string="Leads" colors="blue:state=='pending';grey:state in ('cancel', 'done')"> <field name="date_deadline" invisible="1"/> <field name="create_date"/> - <field name="name"/> + <field name="name" string="Contact Name"/> <field name="partner_name"/> <field name="country_id" invisible="context.get('invisible_country', True)" /> <field name="email_from"/> @@ -338,19 +333,6 @@ help="Show Sales Team"/> </field> <newline/> - <group expand="0" string="Group By..."> - <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/> - <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/> - <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/> - <separator orientation="vertical"/> - <filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/> - <filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/> - <filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/> - <separator orientation="vertical"/> - <filter string="Creation" icon="terp-go-month" - domain="[]" context="{'group_by':'create_date'}" /> - </group> - <newline/> <group expand="0" string="Extended Filters..." groups="base.group_extended"> <field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/> <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/> @@ -364,6 +346,19 @@ <field name="create_date" string="Creation Date"/> <field name="date_closed"/> </group> + <newline/> + <group expand="0" string="Group By..."> + <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/> + <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/> + <filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/> + <separator orientation="vertical"/> + <filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/> + <filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/> + <filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/> + <separator orientation="vertical"/> + <filter string="Creation" icon="terp-go-month" + domain="[]" context="{'group_by':'create_date'}" /> + </group> </search> </field> </record> diff --git a/addons/crm/crm_opportunity_data.xml b/addons/crm/crm_opportunity_data.xml index fd4d76d5865..59e0828d0ee 100644 --- a/addons/crm/crm_opportunity_data.xml +++ b/addons/crm/crm_opportunity_data.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <openerp> -<data> +<data noupdate="1"> <record model="crm.case.categ" id="categ_oppor1"> <field name="name">Existing Customer</field> <field name="section_id" ref="section_sales_department"/> diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index d5a4963ed66..632cb2510c8 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -128,7 +128,7 @@ <field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/> </group> <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> - <tree string="Communication history"> + <tree string="History"> <field name="display_text" string="History Information"/> <field name="history" invisible="1"/> <button @@ -137,7 +137,7 @@ context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}" icon="terp-mail-replied" type="action" /> </tree> - <form string="Communication history"> + <form string="History"> <group col="4" colspan="4"> <field name="email_from"/> <field name="date"/> @@ -323,6 +323,20 @@ help="Show Sales Team"/> </field> <newline/> + <group expand="0" string="Extended Filters..." groups="base.group_extended"> + <field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/> + <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/> + <separator orientation="vertical"/> + <field name="country_id" context="{'invisible_country': False}"> + <filter icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/> + </field> + <separator orientation="vertical"/> + <field name="company_id" widget="selection" groups="base.group_multi_company"/> + <newline/> + <field name="create_date" string="Creation Date"/> + <field name="date_closed"/> + </group> + <newline/> <group expand="0" string="Group By..." colspan="16"> <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" /> @@ -345,20 +359,6 @@ help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" /> </group> - <newline/> - <group expand="0" string="Extended Filters..." groups="base.group_extended"> - <field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/> - <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/> - <separator orientation="vertical"/> - <field name="country_id" context="{'invisible_country': False}"> - <filter icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/> - </field> - <separator orientation="vertical"/> - <field name="company_id" widget="selection" groups="base.group_multi_company"/> - <newline/> - <field name="create_date" string="Creation Date"/> - <field name="date_closed"/> - </group> </search> </field> </record> diff --git a/addons/crm/crm_phonecall_data.xml b/addons/crm/crm_phonecall_data.xml index 723cfeaca26..097540bada4 100644 --- a/addons/crm/crm_phonecall_data.xml +++ b/addons/crm/crm_phonecall_data.xml @@ -1,8 +1,6 @@ <?xml version="1.0"?> <openerp> <data noupdate="1"> --> - <!-- Phonecall Categories --> diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml index 481e92ec134..8585ddc7fe4 100644 --- a/addons/crm/crm_phonecall_menu.xml +++ b/addons/crm/crm_phonecall_menu.xml @@ -13,7 +13,8 @@ groups="base.group_extended" /> - <act_window + <!-- TO CONFIRM: This is fine --> + <!-- act_window id="act_crm_phonecall_crm_meeting_new" name="Meetings" res_model="crm.meeting" @@ -21,7 +22,7 @@ view_mode="tree,form,calendar," context="{'default_duration': 4.0, 'default_phonecall_id': active_id}" domain="[('phonecall_id', '=', active_id)]" - view_type="form"/> + view_type="form"/--> <!-- PHONE CALLS (menu) --> diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 652e17df061..ae243b8cfb0 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -221,6 +221,10 @@ string="Type" /> <field name="state" invisible="1"/> <field name="create_date" invisible="1"/> + <button string="Schedule Other Call" + icon="terp-call-start" + name="%(phonecall_to_phonecall_act)d" + type="action" /> <button string="Opportunity" name="%(phonecall2opportunity_act)d" states="draft,open,pending" diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 1235bcc095a..133e8d13eeb 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -530,7 +530,7 @@ <field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/> </group> <field name="message_ids" colspan="4" nolabel="1" mode="tree,form"> - <tree string="Communication history"> + <tree string="History"> <field name="display_text" string="History Information"/> <field name="history" invisible="1"/> <button @@ -539,7 +539,7 @@ context="{'mail':'reply', 'model': 'crm.case.custom', 'include_original' : True}" icon="terp-mail-replied" type="action" /> </tree> - <form string="Communication history"> + <form string="History"> <group col="4" colspan="4"> <field name="email_from"/> <field name="date"/> diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index 79c833b278c..b02cc1f5197 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -106,7 +106,7 @@ class crm_lead2opportunity(osv.osv_memory): _columns = { 'name' : fields.char('Opportunity Summary', size=64, required=True, select=1), - 'probability': fields.float('Success Probability'), + 'probability': fields.float('Success Rate (%)'), 'planned_revenue': fields.float('Expected Revenue'), 'partner_id': fields.many2one('res.partner', 'Partner'), } @@ -149,7 +149,7 @@ Leads Could not convert into Opportunity")) res = super(crm_lead2opportunity, self).default_get(cr, uid, fields, context=context) for lead in lead_obj.browse(cr, uid, data, context=context): if 'name' in fields: - res.update({'name': lead.name}) + res.update({'name': lead.partner_name}) if 'partner_id' in fields: res.update({'partner_id': lead.partner_id.id or False}) return res diff --git a/addons/crm/wizard/crm_merge_opportunities_view.xml b/addons/crm/wizard/crm_merge_opportunities_view.xml index b6af1f27e8e..cf1a7ee09a4 100644 --- a/addons/crm/wizard/crm_merge_opportunities_view.xml +++ b/addons/crm/wizard/crm_merge_opportunities_view.xml @@ -34,5 +34,10 @@ <field name="target">new</field> </record> + <act_window id="action_merge_opportunities" + key2="client_action_multi" name="Merge Opportunities" + res_model="crm.merge.opportunity" src_model="crm.lead" + view_mode="form" target="new" view_type="form" /> + </data> </openerp>
\ No newline at end of file diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml index 4d0cf3129f6..3c27eef3d10 100644 --- a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml +++ b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml @@ -16,7 +16,7 @@ <field name="date" string="Planned Date"/> <newline/> <field name="user_id" /> - <field name="section_id"/> + <field name="section_id" widget="selection" /> <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/> <separator string="" colspan="4"/> <label string ="" colspan="2"/> |
