Merge lp:~jeffery9/ocb-addons/ocb-addons-fixups into lp:ocb-addons

Proposed by jeffery chen fan
Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp:~jeffery9/ocb-addons/ocb-addons-fixups
Merge into: lp:ocb-addons
Diff against target: 93 lines (+20/-5)
6 files modified
crm/crm_lead.py (+5/-1)
crm/crm_phonecall_view.xml (+3/-3)
crm/wizard/crm_lead_to_opportunity.py (+3/-0)
crm/wizard/crm_lead_to_opportunity_view.xml (+1/-1)
crm/wizard/crm_partner_binding.py (+7/-0)
crm/wizard/crm_phonecall_to_phonecall_view.xml (+1/-0)
To merge this branch: bzr merge lp:~jeffery9/ocb-addons/ocb-addons-fixups
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp Disapprove
Stefan Rijnhart (Opener) Disapprove
Pedro Manuel Baeza Needs Information
Review via email: mp+194463@code.launchpad.net

Description of the change

fixed some bugs in crm application

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Jeffery, is there any bug report associated to this fix? If not, OCB contribution rules say that you have to publish a bug on official project and link it also with OCB to allow OpenERP to merge the fix on the main branch. Here are the details:

https://lists.launchpad.net/openerp-community/msg02197.html

Regards.

review: Needs Information
Revision history for this message
jeffery chen fan (jeffery9) wrote :

Hi, Pedro,

have linked the bugs, please review it. thanks, i'm newbie with launchpad.

On Fri, Nov 8, 2013 at 4:55 PM, Pedro Manuel Baeza
<email address hidden> wrote:
> Review: Needs Information
>
> Hi, Jeffery, is there any bug report associated to this fix? If not, OCB contribution rules say that you have to publish a bug on official project and link it also with OCB to allow OpenERP to merge the fix on the main branch. Here are the details:
>
> https://lists.launchpad.net/openerp-community/msg02197.html
>
> Regards.
> --
> https://code.launchpad.net/~jeffery9/ocb-addons/ocb-addons-fixups/+merge/194463
> You are the owner of lp:~jeffery9/ocb-addons/ocb-addons-fixups.

--
Jeffery
 ___
/\__\ "What is the world coming to?"
\/__/

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thank you very much, Jeffery. I don't bother you, but to make easier the review process, we need to have one MP per bug, so that it is easily verifiable the changes that fix the bug. Can you please make this?

Thank you again.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

I'm seeing that OpenERP has planned to include the fixes on stable v7, so it's very important that you make the changes exactly the same (spaces, indentation and so on), in order to not get conflicts when the fix will be merged on main branch.

This can be with the "bzr diff" command to extract changes from the fix branch, and apply it with "patch" command.

Thank you for your understanding.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :
review: Needs Information
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I agree with Pedro, please create separate proposals per bug. Thanks for helping out!

review: Disapprove
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) :
review: Disapprove
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Two disapprovals and no replies by the author in months, so I set this one to 'disapproved'.

Unmerged revisions

9648. By jeffery chen fan

merge with another fixups tree

9647. By jeffery chen fan

fix logical bugs in crm_lead2opportunity_partner and _lead_create_contact
that should not create dupcated partner

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2013-08-27 16:20:36 +0000
+++ crm/crm_lead.py 2013-11-08 08:51:23 +0000
@@ -738,7 +738,11 @@
738 'is_company': is_company,738 'is_company': is_company,
739 'type': 'contact'739 'type': 'contact'
740 }740 }
741 partner = partner.create(cr, uid, vals, context=context)741 partner_ids = partner.search(cr, uid, [('name', '=', name),('is_company','=',True)], context=context)
742 if partner_ids:
743 partner = partner_ids[0]
744 else:
745 partner = partner.create(cr, uid, vals, context=context)
742 return partner746 return partner
743747
744 def _create_lead_partner(self, cr, uid, lead, context=None):748 def _create_lead_partner(self, cr, uid, lead, context=None):
745749
=== modified file 'crm/crm_phonecall_view.xml'
--- crm/crm_phonecall_view.xml 2012-10-23 16:05:04 +0000
+++ crm/crm_phonecall_view.xml 2013-11-08 08:51:23 +0000
@@ -133,12 +133,12 @@
133 <field name="partner_id"133 <field name="partner_id"
134 on_change="onchange_partner_id(partner_id)"/>134 on_change="onchange_partner_id(partner_id)"/>
135 <field name="partner_phone"135 <field name="partner_phone"
136 invisible="1"/>136 />
137 <field name="user_id"/>137 <field name="user_id"/>
138 <field name="categ_id" widget="selection"138 <field name="categ_id" widget="selection"
139 domain="[('object_id.model', '=', 'crm.phonecall')]"139 domain="[('object_id.model', '=', 'crm.phonecall')]"
140 invisible="1"/>140 />
141 <field name="state" invisible="1"/>141 <field name="state"/>
142 <field name="create_date" invisible="1"/>142 <field name="create_date" invisible="1"/>
143 <field name="opportunity_id" invisible="1" on_change="on_change_opportunity(opportunity_id)"/>143 <field name="opportunity_id" invisible="1" on_change="on_change_opportunity(opportunity_id)"/>
144 <button string="Schedule Other Call"144 <button string="Schedule Other Call"
145145
=== modified file 'crm/wizard/crm_lead_to_opportunity.py'
--- crm/wizard/crm_lead_to_opportunity.py 2013-09-30 14:12:02 +0000
+++ crm/wizard/crm_lead_to_opportunity.py 2013-11-08 08:51:23 +0000
@@ -37,6 +37,9 @@
37 'opportunity_ids': fields.many2many('crm.lead', string='Opportunities'),37 'opportunity_ids': fields.many2many('crm.lead', string='Opportunities'),
38 }38 }
3939
40 def onchange_action(self, cr, uid, ids, action, context=None):
41 return {'value': {'partner_id': False if action != 'exist' else self._find_matching_partner(cr, uid, context=context)}}
42
40 def default_get(self, cr, uid, fields, context=None):43 def default_get(self, cr, uid, fields, context=None):
41 """44 """
42 Default get for name, opportunity_ids.45 Default get for name, opportunity_ids.
4346
=== modified file 'crm/wizard/crm_lead_to_opportunity_view.xml'
--- crm/wizard/crm_lead_to_opportunity_view.xml 2012-10-23 16:05:04 +0000
+++ crm/wizard/crm_lead_to_opportunity_view.xml 2013-11-08 08:51:23 +0000
@@ -27,7 +27,7 @@
27 </field>27 </field>
28 </group>28 </group>
29 <group name="action" attrs="{'invisible': [('name', '!=', 'convert')]}">29 <group name="action" attrs="{'invisible': [('name', '!=', 'convert')]}">
30 <field name="action" class="oe_inline"/>30 <field name="action" on_change="onchange_action(action, context)" class="oe_inline"/>
31 <field name="partner_id"31 <field name="partner_id"
32 attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"32 attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"
33 class="oe_inline"/>33 class="oe_inline"/>
3434
=== modified file 'crm/wizard/crm_partner_binding.py'
--- crm/wizard/crm_partner_binding.py 2012-10-23 16:05:04 +0000
+++ crm/wizard/crm_partner_binding.py 2013-11-08 08:51:23 +0000
@@ -73,6 +73,13 @@
73 if partner_ids:73 if partner_ids:
74 partner_id = partner_ids[0]74 partner_id = partner_ids[0]
75 # Search through the existing partners based on the lead's partner or contact name75 # Search through the existing partners based on the lead's partner or contact name
76 elif active_model.partner_name and active_model.contact_name:
77 company_ids = partner_obj.search(cr, uid, [('name', 'ilike', '%'+active_model.partner_name+'%')], context=context)
78 if company_ids:
79 company_id = company_ids[0]
80 partner_ids = partner_obj.search(cr, uid, [('name', 'ilike', '%'+active_model.contact_name+'%'),('parent_id', '=', company_id)], context=context)
81 if partner_ids:
82 partner_id = partner_ids[0]
76 elif active_model.partner_name:83 elif active_model.partner_name:
77 partner_ids = partner_obj.search(cr, uid, [('name', 'ilike', '%'+active_model.partner_name+'%')], context=context)84 partner_ids = partner_obj.search(cr, uid, [('name', 'ilike', '%'+active_model.partner_name+'%')], context=context)
78 if partner_ids:85 if partner_ids:
7986
=== modified file 'crm/wizard/crm_phonecall_to_phonecall_view.xml'
--- crm/wizard/crm_phonecall_to_phonecall_view.xml 2012-10-23 16:05:04 +0000
+++ crm/wizard/crm_phonecall_to_phonecall_view.xml 2013-11-08 08:51:23 +0000
@@ -36,6 +36,7 @@
36 <field name="view_mode">form</field>36 <field name="view_mode">form</field>
37 <field name="view_id" ref="phonecall_to_phonecall_view"/>37 <field name="view_id" ref="phonecall_to_phonecall_view"/>
38 <field name="target">new</field>38 <field name="target">new</field>
39 <field name="context">{'default_state': 'open'}</field>
39 </record>40 </record>
4041
41 </data>42 </data>