← Back to team overview

openerp-community team mailing list archive

Re: [Merge] lp:~openerp-community/openobject-addons/trunk-bug-923440-base_contact_finalise6.1 into lp:openobject-addons/6.1

 

Dear Stuart,

Please find attached another diff that fixes bug
https://bugs.launchpad.net/openobject-addons/+bug/940264 additionally.

Please commit it to your trunk as I can't if you agree and reference the
bug.

For the correct address creation I saw another proposal that if it works
is the better approach than a separate module:
https://bugs.launchpad.net/openobject-addons/+bug/938256

Best Regards

Etienne

On 06.03.2012 00:49, Stuart Longland wrote:
> Hi Etienne,
> On 06/03/12 09:34, Etienne Hirt wrote:
>> Dear Stuart,
>>
>> Thanks a lot for fixing the branch. Please remove the
>> security/base_contact_security.xml. This is a leftover of 6.0.x and
>> added by mistake. The .po came in from updates from the branch but you
>> did well to ommit them.
> 
> Yeah, I wasn't sure exactly what was happening, but I noted a number of
> them had merge conflicts committed there, which definitely wasn't right.
>  I figured they came along by mistake along with
> base_contact_security.xml. :-)
> 
>> I had a quick look at crm_lead.py and saw that
>> _lead_create_partner_address would have to be overwritten to fix the
>> break. However, we are not using this functionality and I guess this fix
>> is to be added into a separate module for correct dependency of modules.
>> Have you seen other breaks in the CRM?
> 
> Well, where I noticed it was as I say, creating a lead, then trying to
> turn it into an opportunity.  I found this late yesterday afternoon, and
> so now this morning's task is to open up this can of worms and figure
> out how to fix it.
> 
> I suspect you're right; and the fix would be most likely more
> appropriate in crm_base_contact.  Leave "crm" intended as-is so it works
> with OpenERP sans base_contact, but then fix crm_base_contact so that
> crm works with base_contact.  I have a branch of crm_base_contact here:
> 
> https://code.launchpad.net/~vrt-openerp/domsense-agilebg-addons/6.1-addons
> 
> Exactly how to do this is going to be the interesting bit, I'm quite new
> to OpenERP and this 6.0-6.1 migration project so far has been somewhat
> of a baptism of fire. :-)
> 
> Regards,
Index: /media/truecrypt1/work/Openerp/trunk-addons/base_contact/base_contact_view.xml
===================================================================
--- /media/truecrypt1/work/Openerp/trunk-addons/base_contact/base_contact_view.xml	(revision 13001)
+++ /media/truecrypt1/work/Openerp/trunk-addons/base_contact/base_contact_view.xml	(revision 13013)
@@ -254,8 +254,13 @@
         <field name="inherit_id" ref="base.view_partner_address_form1"/>
         <field name='type'>form</field>
         <field name='arch' type='xml'>
+            
+        	<field name="partner_id" position="replace">
+        		<field name="partner_id" colspan="2" attrs="{'required':[('contact_id','=', False)]}"/>
+        	</field> 
+        	   
             <field name="name" position="replace">
-                <field name="contact_id" on_change="onchange_contact_id(contact_id)" />
+                <field name="contact_id" on_change="onchange_contact_id(contact_id)" attrs="{'required':[('partner_id','=', False)]}"/>
                 <!-- <field name="name" string="use this field for initial name only" /> would require adaption of create-->
             </field>
             <separator string="Postal Address" position="after">

References