[IMP] crm, sale_crm: onboarding-related fixes
- lead name is now called Opportunity, clearer, added a placeholder on the form view; - type (contact type) field is now dedicated to the group_delivery_invoice_address group. It is set for technical groups only in base, then upgraded to the correct group in the sale module that defines this group
This commit is contained in:
@@ -203,7 +203,7 @@ class crm_lead(format_address, osv.osv):
|
||||
select=True, help="Linked partner (optional). Usually created when converting the lead."),
|
||||
|
||||
'id': fields.integer('ID', readonly=True),
|
||||
'name': fields.char('Subject', required=True, select=1),
|
||||
'name': fields.char('Opportunity', required=True, select=1),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<h1><field name="name" placeholder="e.g. Product Pricing"/></h1>
|
||||
<label for="planned_revenue" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="company_currency" invisible="1"/>
|
||||
|
||||
@@ -57,34 +57,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_address_type" model="ir.ui.view">
|
||||
<field name="name">res.partner.view.address_type</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='type']" position="attributes">
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
<attribute name="invisible">False</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='div_type']" position="attributes">
|
||||
<attribute name="invisible">False</attribute>
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
</xpath>
|
||||
<!-- Version-specific hacks to avoid breaking view inheritance when the sale module
|
||||
is installed on top of an older 7.0 version of the base module
|
||||
(as the second embedded div_type was added later in the 7.0 release)
|
||||
TODO: remove the hacks in trunk -->
|
||||
<xpath expr="//div[@name='div_type'][field[@name='use_parent_address']] | //field[@name='child_ids']//div[@name='div_type']" position="attributes">
|
||||
<attribute name="invisible">False</attribute>
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@for='type'][following-sibling::div[@name='div_type']/field[@name='use_parent_address']] | //field[@name='child_ids']//label[@for='type']" position="attributes">
|
||||
<attribute name="invisible">False</attribute>
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -37,5 +37,29 @@
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<record id="base.res_partner_address_type" model="ir.ui.view">
|
||||
<field name="name">res.partner.view.address_type</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//label[@for='type']" position="attributes">
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
<attribute name="invisible">False</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='div_type']" position="attributes">
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
<attribute name="invisible">False</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']//
|
||||
label[@for='type']" position="attributes">
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']//
|
||||
div[@name='contact_div_type']" position="attributes">
|
||||
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -148,8 +148,8 @@
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<label for="type" attrs="{'invisible': [('parent_id','=', False)]}"/>
|
||||
<div attrs="{'invisible': [('parent_id','=', False)]}" name="div_type">
|
||||
<label for="type" attrs="{'invisible': [('parent_id','=', False)]}" groups="base.group_no_one"/>
|
||||
<div attrs="{'invisible': [('parent_id','=', False)]}" name="div_type" groups="base.group_no_one">
|
||||
<field class="oe_inline"
|
||||
name="type"/>
|
||||
</div>
|
||||
@@ -273,8 +273,8 @@
|
||||
<field name="use_parent_address"/><label for="use_parent_address"/>
|
||||
</div>
|
||||
<group>
|
||||
<label for="type"/>
|
||||
<div name="div_type">
|
||||
<label for="type" groups="base.group_no_one"/>
|
||||
<div name="contact_div_type" groups="base.group_no_one">
|
||||
<field class="oe_inline" name="type"/>
|
||||
</div>
|
||||
<label for="street" string="Address" attrs="{'invisible': [('use_parent_address','=', True)]}"/>
|
||||
|
||||
Reference in New Issue
Block a user