Divyesh Makwana(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons_10_crm-mdi into
lp:openobject-addons.
Requested reviews:
Purnendu Singh (OpenERP) (psi-tinyerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_10_crm-mdi/+merge/124897
Hello Sir,
I have done the following changes:
- The 'After Sales Service' menu (helpdesk and claims) moved from Project to
Sales menu.
- Leads, Opportunities and Calls should be restricted to the group Sales/User
see all leads.
- Fix the 'Send Reminder' doesn't work.
- Place the Pricelists menu under Sales/Configuration/Pricelists.
- When lead has a customer and we click on 'Convert to Opportunity', it should
give 'Link to an Existing Customer' option with the customer assigned to that
lead.
- When selecting a customer, his adress appears in the lead view but not the
phone & email.
- Fix the issue : View type 'form' is not supported in One2Many.
- Added a functionality to open a google map based on partner's address.
Thanks,
Divyesh
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_10_crm-mdi/+merge/124897
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons_10_crm-mdi.
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py 2012-09-25 08:22:56 +0000
+++ base_calendar/base_calendar.py 2012-09-26 05:25:29 +0000
@@ -551,6 +551,8 @@
@param context: A standard dictionary for contextual values
@return: True
"""
+ meeting_obj = self.pool.get('crm.meeting')
+
if context is None:
context = {}
@@ -560,6 +562,20 @@
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
+ cr.execute('SELECT event_id '\
+ 'FROM meeting_attendee_rel '\
+ 'WHERE attendee_id = %s', (vals.id,))
+ res = cr.fetchone()
+ if res:
+ partner_ids = [partner.id for partner in meeting_obj.browse(cr, uid, res[0], context=context).partner_ids]
+ if vals.user_id and vals.user_id.partner_id:
+ if vals.user_id.partner_id.id not in partner_ids:
+ partner_ids.append(vals.user_id.partner_id.id)
+ meeting_obj.write(cr, uid, res[0], {'partner_ids': [(6, 0, partner_ids)]})
+ if vals.partner_id:
+ if vals.partner_id.id not in partner_ids:
+ partner_ids.append(vals.partner_id.id)
+ meeting_obj.write(cr, uid, res[0], {'partner_ids': [(6, 0, partner_ids)]})
return True
=== modified file 'base_calendar/crm_meeting_view.xml'
--- base_calendar/crm_meeting_view.xml 2012-09-25 08:29:29 +0000
+++ base_calendar/crm_meeting_view.xml 2012-09-26 05:25:29 +0000
@@ -118,7 +118,7 @@
attrs="{'readonly': [('recurrent_uid','!=',False)]}"/>
</group>
<group>
- <field name="alarm_id" widget="selection" groups="base.group_no_one"/>
+ <field name="alarm_id" widget="selection" invisible="1"/>
<field name="class"/>
<field name="show_as"/>
<field name="rrule" invisible="1" readonly="1"/>
=== modified file 'base_calendar/wizard/base_calendar_invite_attendee_view.xml'
--- base_calendar/wizard/base_calendar_invite_attendee_view.xml 2012-08-08 11:42:35 +0000
+++ base_calendar/wizard/base_calendar_invite_attendee_view.xml 2012-09-26 05:25:29 +0000
@@ -9,27 +9,28 @@
<field name="model">base_calendar.invite.attendee</field>
<field name="arch" type="xml">
<form string="Invite People" version="7.0">
- <separator string="Invite People" colspan="4"/>
- <field name="type"/>
- <field name="send_mail"/>
- <notebook colspan="4">
- <page string="Data">
- <group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'external')]}">
- <field name="email" colspan="4" attrs="{'required': [('type', '=', 'external')]}"/>
- </group>
- <group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'internal')]}">
- <separator string="Users" colspan="4"/>
- <field name="user_ids" colspan="4" nolabel="1" height="180"/>
- <newline/>
- </group>
- <group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'partner')]}">
- <field name="partner_id" colspan="2" on_change="onchange_partner_id(partner_id)" attrs="{'required': [('type', '=', 'partner')]}"/>
- <newline/>
- <separator string="Partner Contacts" colspan="6"/>
- <field name="contact_ids" colspan="4" nolabel="1" domain="[('id', 'child_of', [partner_id])]" attrs="{'readonly': [('type', '!=', 'partner')]}"/>
- </group>
- </page>
- </notebook>
+ <group>
+ <group>
+ <field name="type"/>
+ </group>
+ <group>
+ <field name="send_mail"/>
+ </group>
+ </group>
+ <group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'external')]}">
+ <field name="email" colspan="4" attrs="{'required': [('type', '=', 'external')]}"/>
+ </group>
+ <group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'internal')]}">
+ <separator string="Users" colspan="4"/>
+ <field name="user_ids" colspan="4" nolabel="1" height="180"/>
+ <newline/>
+ </group>
+ <group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'partner')]}">
+ <field name="partner_id" colspan="2" on_change="onchange_partner_id(partner_id)" attrs="{'required': [('type', '=', 'partner')]}"/>
+ <newline/>
+ <separator string="Partner Contacts" colspan="6"/>
+ <field name="contact_ids" colspan="4" nolabel="1" domain="[('id', 'child_of', [partner_id])]" attrs="{'readonly': [('type', '!=', 'partner')]}"/>
+ </group>
<footer>
<button name="do_invite" string="Invite" type="object" class="oe_highlight"/>
or
=== modified file 'base_status/base_stage.py'
--- base_status/base_stage.py 2012-09-20 07:38:24 +0000
+++ base_status/base_stage.py 2012-09-26 05:25:29 +0000
@@ -307,7 +307,7 @@
destination=False)
def remind_user(self, cr, uid, ids, context=None, attach=False, destination=True):
- if 'message_post' in self:
+ if hasattr(self, 'message_post'):
for case in self.browse(cr, uid, ids, context=context):
if destination:
recipient_id = case.user_id.partner_id.id
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-09-20 07:38:24 +0000
+++ crm/crm_lead.py 2012-09-26 05:25:29 +0000
@@ -300,6 +300,10 @@
'city' : partner.city,
'state_id' : partner.state_id and partner.state_id.id or False,
'country_id' : partner.country_id and partner.country_id.id or False,
+ 'email_from' : partner.email,
+ 'phone' : partner.phone,
+ 'mobile' : partner.mobile,
+ 'fax' : partner.fax,
}
return {'value' : values}
@@ -594,6 +598,8 @@
'stage_id': stage_id or False,
'date_action': time.strftime('%Y-%m-%d %H:%M:%S'),
'date_open': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'email_from': customer.email if customer else lead.email_from,
+ 'phone': customer.phone if customer else lead.phone,
}
def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None):
=== modified file 'crm/security/crm_security.xml'
--- crm/security/crm_security.xml 2012-09-16 14:45:29 +0000
+++ crm/security/crm_security.xml 2012-09-26 05:25:29 +0000
@@ -60,5 +60,12 @@
<field name="domain_force">['|',('user_id','=',user.id),('show_as','=','busy')]</field>
</record>
+ <record id="crm_rule_personal_phonecall" model="ir.rule">
+ <field name="name">Personal Phone Calls</field>
+ <field ref="model_crm_phonecall" name="model_id"/>
+ <field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
+ <field name="groups" eval="[(4, ref('base.group_sale_salesman'))]"/>
+ </record>
+
</data>
</openerp>
=== modified file 'crm/wizard/crm_lead_to_partner.py'
--- crm/wizard/crm_lead_to_partner.py 2012-09-12 17:55:27 +0000
+++ crm/wizard/crm_lead_to_partner.py 2012-09-26 05:25:29 +0000
@@ -64,6 +64,8 @@
partner_ids = partner.search(cr, uid, [('name', '=', this.partner_name)], context=context)
if partner_ids:
partner_id = partner_ids[0]
+ if this.partner_id:
+ partner_id = this.partner_id.id
return partner_id
def default_get(self, cr, uid, fields, context=None):
=== modified file 'crm_claim/crm_claim_menu.xml'
--- crm_claim/crm_claim_menu.xml 2012-09-12 10:02:59 +0000
+++ crm_claim/crm_claim_menu.xml 2012-09-26 05:25:29 +0000
@@ -10,7 +10,7 @@
<menuitem id="base.menu_aftersale" name="After-Sale Services"
groups="base.group_sale_salesman"
- parent="base.menu_main_pm" sequence="2" />
+ parent="base.menu_base_partner" sequence="2" />
<!-- Claims Menu -->
<record model="ir.actions.act_window" id="crm_case_categ_claim0">
=== modified file 'crm_helpdesk/crm_helpdesk.py'
--- crm_helpdesk/crm_helpdesk.py 2012-08-21 14:27:47 +0000
+++ crm_helpdesk/crm_helpdesk.py 2012-09-26 05:25:29 +0000
@@ -20,6 +20,7 @@
##############################################################################
from base_status.base_state import base_state
+from base_status.base_stage import base_stage
from crm import crm
from osv import fields, osv
import tools
@@ -31,7 +32,7 @@
crm.AVAILABLE_STATES[4][0], # Pending
)
-class crm_helpdesk(base_state, osv.osv):
+class crm_helpdesk(base_state, base_stage, osv.osv):
""" Helpdesk Cases """
_name = "crm.helpdesk"
=== modified file 'crm_helpdesk/crm_helpdesk_menu.xml'
--- crm_helpdesk/crm_helpdesk_menu.xml 2012-08-04 14:35:56 +0000
+++ crm_helpdesk/crm_helpdesk_menu.xml 2012-09-26 05:25:29 +0000
@@ -3,11 +3,10 @@
<data noupdate="1">
<!-- Top menu item -->
- <menuitem name="Project"
- id="base.menu_main_pm"
- sequence="90"/>
+ <menuitem name="Sales"
+ id="base.menu_base_partner"/>
- <menuitem id="base.menu_aftersale" name="After-Sale Services" sequence="2" parent="base.menu_main_pm" />
+ <menuitem id="base.menu_aftersale" name="After-Sale Services" sequence="2" parent="base.menu_base_partner" />
<!-- Help Desk (menu) -->
=== modified file 'crm_profiling/wizard/open_questionnaire_view.xml'
--- crm_profiling/wizard/open_questionnaire_view.xml 2012-08-08 12:19:50 +0000
+++ crm_profiling/wizard/open_questionnaire_view.xml 2012-09-26 05:25:29 +0000
@@ -34,7 +34,7 @@
<field name="arch" type="xml">
<form string="Open Questionnaire" version="7.0">
<separator colspan="4" string="Questionnaire"/>
- <field name="question_ans_ids" colspan="4" nolabel="1" mode="tree,form" width="550" height="200"/>
+ <field name="question_ans_ids" colspan="4" nolabel="1" mode="tree" width="550" height="200"/>
<footer>
<button name="questionnaire_compute" string="Save Data" type="object" class="oe_highlight"/>
or
=== modified file 'google_map/__openerp__.py'
--- google_map/__openerp__.py 2012-08-20 12:56:44 +0000
+++ google_map/__openerp__.py 2012-09-26 05:25:29 +0000
@@ -33,7 +33,9 @@
'website': 'http://www.openerp.com',
'images': ['images/google_map.jpeg'],
'depends': ['base'],
- 'data': [],
+ 'data': [
+ 'google_map_view.xml'
+ ],
'demo': [],
'js': ['static/src/js/google_map.js'],
'installable': True,
=== modified file 'google_map/google_map_launch.py'
--- google_map/google_map_launch.py 2012-03-23 08:53:41 +0000
+++ google_map/google_map_launch.py 2012-09-26 05:25:29 +0000
@@ -25,8 +25,7 @@
_inherit = "res.partner"
def open_map(self, cr, uid, ids, context=None):
- address_obj= self.pool.get('res.partner')
- partner = address_obj.browse(cr, uid, ids, context=context)[0]
+ partner = self.browse(cr, uid, ids, context=context)[0]
url="http://maps.google.com/maps?oi=map&q="
if partner.street:
url+=partner.street.replace(' ','+')
@@ -39,9 +38,9 @@
if partner.zip:
url+='+'+partner.zip.replace(' ','+')
return {
- 'type': 'ir.actions.act_url',
- 'url':url,
- 'target': 'new'
+ 'type': 'ir.actions.act_url',
+ 'url':url,
+ 'target': 'new'
}
launch_map()
=== added file 'google_map/google_map_view.xml'
--- google_map/google_map_view.xml 1970-01-01 00:00:00 +0000
+++ google_map/google_map_view.xml 2012-09-26 05:25:29 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="view_partner_google_map_inherit">
+ <field name="name">res.partner.google.map.inherit</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="base.view_partner_form"/>
+ <field name="arch" type="xml">
+ <field name="website" position="before">
+ <label for="open_map" string="Open Google Map"/>
+ <div>
+ <button name="open_map"
+ string="Map" type="object"/>
+ </div>
+ </field>
+ </field>
+ </record>
+
+ </data>
+</openerp>
+
=== modified file 'product/pricelist_view.xml'
--- product/pricelist_view.xml 2012-08-28 07:08:41 +0000
+++ product/pricelist_view.xml 2012-09-26 05:25:29 +0000
@@ -219,7 +219,7 @@
</record>
<menuitem
action="product_pricelist_action2" id="menu_product_pricelist_action2"
- parent="base.menu_base_config" sequence="20" groups="product.group_sale_pricelist"/>
+ parent="product.menu_product_pricelist_main" sequence="1" groups="product.group_sale_pricelist"/>
<record id="product_price_type_view" model="ir.ui.view">
<field name="name">product.price.type.form</field>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp