Merge lp:~yann-papouin/openobject-addons/6.1-bug-1222733-address-create-wpartner into lp:openobject-addons/6.1

Proposed by Yann Papouin
Status: Needs review
Proposed branch: lp:~yann-papouin/openobject-addons/6.1-bug-1222733-address-create-wpartner
Merge into: lp:openobject-addons/6.1
Diff against target: 168 lines (+24/-13)
12 files modified
crm/crm_lead_view.xml (+2/-0)
crm/crm_meeting_view.xml (+3/-1)
crm/crm_phonecall_view.xml (+3/-1)
crm_claim/crm_claim_view.xml (+3/-1)
crm_fundraising/crm_fundraising_view.xml (+2/-0)
crm_helpdesk/crm_helpdesk_view.xml (+2/-1)
hr_recruitment/hr_recruitment_view.xml (+1/-1)
project/project_view.xml (+2/-2)
project_issue/project_issue_view.xml (+1/-1)
purchase/purchase_view.xml (+1/-1)
purchase_requisition/wizard/purchase_requisition_partner_view.xml (+1/-1)
sale/sale_view.xml (+3/-3)
To merge this branch: bzr merge lp:~yann-papouin/openobject-addons/6.1-bug-1222733-address-create-wpartner
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+184542@code.launchpad.net

Description of the change

Basically, always add a context [1] to "partner_address_id" like fields and disable [2] quick create to allow the user to create firstname/surname of the contact.

[1] context="{'default_partner_id':partner_id}"
[2] options='{"quick_create": false}'

To post a comment you must log in.

Unmerged revisions

7255. By Yann Papouin

[FIX] When creating an address in crm_claim module, the partner is not set

7254. By Yann Papouin

[FIX] When creating an address in purchase_requisition module, the partner is not set

7253. By Yann Papouin

[FIX] When creating an address in project_issue module, the partner is not set

7252. By Yann Papouin

[FIX] When creating an address in hr_recruitment module, the partner is not set

7251. By Yann Papouin

[FIX] When creating an address in crm_fundraising module, the partner is not set

7250. By Yann Papouin

[FIX] When creating an address in crm_helpdesk module, the partner is not set

7249. By Yann Papouin

[FIX] When creating an address in crm module, the partner is not set

7248. By Yann Papouin

[FIX] When creating an address in project module, the partner is not set

7247. By Yann Papouin

[FIX] When creating an address in purchase module, the partner is not set

7246. By Yann Papouin

[FIX] When creating an address in sale module, the partner is not set

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'crm/crm_lead_view.xml'
2--- crm/crm_lead_view.xml 2012-11-20 11:39:58 +0000
3+++ crm/crm_lead_view.xml 2013-09-09 11:26:37 +0000
4@@ -483,6 +483,8 @@
5 <field name="partner_address_id"
6 string="Contact"
7 on_change="onchange_partner_address_id(partner_address_id, email_from)"
8+ options='{"quick_create": false}'
9+ context="{'default_partner_id':partner_id}"
10 colspan="1" />
11 <group col="3" colspan="2">
12 <field name="email_from" string="Email" />
13
14=== modified file 'crm/crm_meeting_view.xml'
15--- crm/crm_meeting_view.xml 2012-01-31 13:36:57 +0000
16+++ crm/crm_meeting_view.xml 2013-09-09 11:26:37 +0000
17@@ -62,7 +62,9 @@
18 on_change="onchange_partner_id(partner_id)" />
19 <field name="partner_address_id"
20 string="Contact"
21- on_change="onchange_partner_address_id(partner_address_id, email_from)" />
22+ on_change="onchange_partner_address_id(partner_address_id, email_from)"
23+ options='{"quick_create": false}'
24+ context="{'default_partner_id':partner_id}" />
25 <field name="email_from"/>
26 </group><group col="2" colspan="2">
27 <separator colspan="2" string="Visibility"/>
28
29=== modified file 'crm/crm_phonecall_view.xml'
30--- crm/crm_phonecall_view.xml 2011-12-21 13:10:28 +0000
31+++ crm/crm_phonecall_view.xml 2013-09-09 11:26:37 +0000
32@@ -92,7 +92,9 @@
33 groups="base.group_partner_manager"/>
34 <newline/>
35 <field name="partner_address_id"
36- on_change="onchange_partner_address_id(partner_address_id)" />
37+ on_change="onchange_partner_address_id(partner_address_id)"
38+ options='{"quick_create": false}'
39+ context="{'default_partner_id':partner_id}" />
40 <newline/>
41 <field name="partner_mobile" />
42 </group>
43
44=== modified file 'crm_claim/crm_claim_view.xml'
45--- crm_claim/crm_claim_view.xml 2012-01-31 13:36:57 +0000
46+++ crm_claim/crm_claim_view.xml 2013-09-09 11:26:37 +0000
47@@ -91,7 +91,9 @@
48 <field name="partner_id" string="Partner"
49 on_change="onchange_partner_id(partner_id)" />
50 <field name="partner_address_id" string="Contact"
51- on_change="onchange_partner_address_id(partner_address_id, email_from)" />
52+ on_change="onchange_partner_address_id(partner_address_id, email_from)"
53+ options='{"quick_create": false}'
54+ context="{'default_partner_id':partner_id}" />
55 <field name="partner_phone"/>
56 <field name="email_from" widget="email"/>
57 </group>
58
59=== modified file 'crm_fundraising/crm_fundraising_view.xml'
60--- crm_fundraising/crm_fundraising_view.xml 2011-12-19 16:54:40 +0000
61+++ crm_fundraising/crm_fundraising_view.xml 2013-09-09 11:26:37 +0000
62@@ -97,6 +97,8 @@
63 <field name="partner_address_id"
64 string="Contact"
65 on_change="onchange_partner_address_id(partner_address_id, email_from)"
66+ options='{"quick_create": false}'
67+ context="{'default_partner_id':partner_id}"
68 colspan="1" />
69 <field name="email_from" colspan="2"/>
70 </group>
71
72=== modified file 'crm_helpdesk/crm_helpdesk_view.xml'
73--- crm_helpdesk/crm_helpdesk_view.xml 2011-12-19 16:54:40 +0000
74+++ crm_helpdesk/crm_helpdesk_view.xml 2013-09-09 11:26:37 +0000
75@@ -49,7 +49,8 @@
76 select="1" />
77 <field name="partner_address_id" colspan="2"
78 on_change="onchange_partner_address_id(partner_address_id, email_from)"
79- />
80+ options='{"quick_create": false}'
81+ context="{'default_partner_id':partner_id}" />
82 <newline/>
83 <field name="email_from" colspan="2"/>
84 <button name="remind_partner"
85
86=== modified file 'hr_recruitment/hr_recruitment_view.xml'
87--- hr_recruitment/hr_recruitment_view.xml 2011-12-21 13:10:28 +0000
88+++ hr_recruitment/hr_recruitment_view.xml 2013-09-09 11:26:37 +0000
89@@ -104,7 +104,7 @@
90 name="%(action_hr_recruitment_partner_create)d"
91 icon="gtk-index" type="action" attrs="{'readonly':[('partner_id','!=',False)]}" groups="base.group_partner_manager"/>
92 <newline/>
93- <field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="3"/>
94+ <field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" options='{"quick_create": false}' context="{'default_partner_id':partner_id}" colspan="3"/>
95 <field name="email_from" colspan="3"/>
96 <field name="partner_phone" colspan="3"/>
97 <field name="partner_mobile" colspan="3"/>
98
99=== modified file 'project/project_view.xml'
100--- project/project_view.xml 2012-03-12 10:20:01 +0000
101+++ project/project_view.xml 2013-09-09 11:26:37 +0000
102@@ -68,8 +68,8 @@
103 </field>
104 </page>
105 <page string="Billing" groups="account.group_account_invoice">
106- <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer"/>
107- <field domain="[('partner_id','=',partner_id)]" name="contact_id" string="Contact Address"/>
108+ <field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" string="Customer" colspan="4" />
109+ <field name="contact_id" string="Contact Address" domain="[('partner_id','=',partner_id)]" options='{"quick_create": false}' context="{'default_partner_id':partner_id}" />
110 <field name="warn_customer"/>
111 <field name="currency_id" select="1" groups="base.group_multi_company" required="1"/>
112 <newline/>
113
114=== modified file 'project_issue/project_issue_view.xml'
115--- project_issue/project_issue_view.xml 2012-03-12 11:29:31 +0000
116+++ project_issue/project_issue_view.xml 2013-09-09 11:26:37 +0000
117@@ -68,7 +68,7 @@
118 <group col="2" colspan="2">
119 <separator colspan="2" string="Contact Information"/>
120 <field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
121- <field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
122+ <field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" options='{"quick_create": false}' context="{'default_partner_id':partner_id}" />
123 <field name="email_from"/>
124 </group>
125 <group col="3" colspan="2">
126
127=== modified file 'purchase/purchase_view.xml'
128--- purchase/purchase_view.xml 2012-10-23 07:56:26 +0000
129+++ purchase/purchase_view.xml 2013-09-09 11:26:37 +0000
130@@ -173,7 +173,7 @@
131 <notebook colspan="4">
132 <page string="Purchase Order">
133 <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('supplier', '=', True)]" context="{'search_default_supplier':1,'default_supplier':1,'default_customer':0}" options='{"quick_create": false}'/>
134- <field name="partner_address_id" options='{"quick_create": false}'/>
135+ <field name="partner_address_id" options='{"quick_create": false}' context="{'default_partner_id':partner_id}"/>
136 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
137 <field name="origin" groups="base.group_extended"/>
138 <newline/>
139
140=== modified file 'purchase_requisition/wizard/purchase_requisition_partner_view.xml'
141--- purchase_requisition/wizard/purchase_requisition_partner_view.xml 2011-01-14 00:11:01 +0000
142+++ purchase_requisition/wizard/purchase_requisition_partner_view.xml 2013-09-09 11:26:37 +0000
143@@ -9,7 +9,7 @@
144 <form string="Purchase Requisition">
145 <group colspan="2" col="2">
146 <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
147- <field domain="[('partner_id','=',partner_id)]" name="partner_address_id"/>
148+ <field name="partner_address_id" domain="[('partner_id','=',partner_id)]" options='{"quick_create": false}' context="{'default_partner_id':partner_id}" />
149 <separator string="" colspan="4" />
150 <button icon="gtk-cancel" special="cancel" string="_Cancel"/>
151 <button icon="gtk-ok" name="create_order" string="Create Quotation" type="object"/>
152
153=== modified file 'sale/sale_view.xml'
154--- sale/sale_view.xml 2013-01-02 11:50:01 +0000
155+++ sale/sale_view.xml 2013-09-09 11:26:37 +0000
156@@ -116,9 +116,9 @@
157 <notebook colspan="5">
158 <page string="Sales Order">
159 <field name="partner_id" options='{"quick_create": false}' on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1"/>
160- <field domain="[('partner_id','=',partner_id)]" name="partner_order_id" on_change="onchange_partner_order_id(partner_order_id, partner_invoice_id, partner_shipping_id)" options='{"quick_create": false}'/>
161- <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended" options='{"quick_create": false}'/>
162- <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended" options='{"quick_create": false}'/>
163+ <field domain="[('partner_id','=',partner_id)]" name="partner_order_id" on_change="onchange_partner_order_id(partner_order_id, partner_invoice_id, partner_shipping_id)" options='{"quick_create": false}' context="{'default_partner_id':partner_id}"/>
164+ <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended" options='{"quick_create": false}' context="{'default_partner_id':partner_id}"/>
165+ <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended" options='{"quick_create": false}' context="{'default_partner_id':partner_id}"/>
166 <field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
167 <field name="project_id" context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="analytic.group_analytic_accounting" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id), ('parent_id', '!=', False)]"/>
168 <newline/>