<field name="partner_name" string="Company Name"/>
<!-- Preload all the partner's information -->
<field name="partner_id" string="Customer"
- on_change="on_change_partner(partner_id)"
+ on_change="on_change_partner_id(partner_id)"
options='{"create_name_field": "name"}'
context="{'default_name': contact_name, 'default_street': street, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_function': function, 'default_phone': phone, 'default_mobile': mobile, 'default_fax': fax, 'default_email': email_from, 'default_user_id': user_id, 'default_section_id': section_id}"/>
<label for="street" string="Address"/>
<field name="company_id"
groups="base.group_multi_company"
widget="selection" colspan="2"/>
+ <field name="state" groups="base.group_no_one"/>
</group>
<group string="Mailings">
<field name="opt_out"/>
+ <field name="message_bounce"/>
</group>
<group string="Misc">
<field name="probability" groups="base.group_no_one"/>
<field name="active"/>
<field name="referred"/>
</group>
+ <group>
+ <field name="date_open" groups="base.group_no_one"/>
+ <field name="date_closed" groups="base.group_no_one"/>
+ </group>
</group>
</page>
</notebook>
<field name="create_date"/>
<field name="country_id" context="{'invisible_country': False}"/>
<separator/>
- <filter string="Open" name="open" domain="[('user_id', '!=', 'False'), ('probability', '!=', 100)]" help="Open and Assigned Leads"/>
- <filter string="Dead" name="dead" domain="[('probability', '=', '0'), ('stage_id.sequence', '!=', 1)]"/>
- <filter string="Unassigned" name="unassigned" domain="[('user_id','=', False)]" help="No salesperson"/>
+ <filter string="Unassigned" name="unassigned"
+ domain="[('user_id','=', False)]"
+ help="No salesperson"/>
<filter string="Assigned to Me"
domain="[('user_id','=',uid)]" context="{'invisible_section': False}"
help="Leads that are assigned to me"/>
- <filter string="Assigned to My Team(s)"
+ <filter string="Assigned to My Team(s)" groups="base.group_multi_salesteams"
domain="[('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
- help="Leads that are assigned to any sales teams I am member of" groups="base.group_multi_salesteams"/>
- <filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]" help="Unread messages"/>
+ help="Leads that are assigned to any sales teams I am member of"/>
+ <filter string="Dead" name="dead"
+ domain="[('probability', '=', '0'), ('stage_id.sequence', '!=', 1)]"/>
<separator />
<filter string="Available for mass mailing"
name='not_opt_out' domain="[('opt_out', '=', False)]"
<button name="case_mark_won" string="Mark Won" type="object" class="oe_highlight"
attrs="{'invisible': [('probability', '=', 100)]}"/>
<button name="case_mark_lost" string="Mark Lost" type="object" class="oe_highlight"
- attrs="{'invisible': [('probability', 'in', [0,100])]}"/>
+ attrs="{'invisible': ['|', ('probability', '=', 0), ('probability', '=', 100)]}"/>
<field name="stage_id" widget="statusbar" clickable="True"
domain="['&', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"/>
</header>
<group>
<group>
<field name="partner_id"
- on_change="onchange_partner_id(partner_id, email_from)"
+ on_change="on_change_partner_id(partner_id)"
string="Customer"
context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
<field name="email_from" string="Email"/>
<field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
<field name="user_id"/>
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
- <field name="stage_id"/>
+ <field name="stage_id" domain="[]"/>
<field name="probability"/>
<separator/>
- <filter string="New" name="new" domain="[('probability', '=', 0), ('stage_id.sequence', '=', 1)]" help="New Opportunities"/>
- <filter string="Won" name="won" domain="[('probability', '=', 100)]"/>
- <filter string="Lost" name="lost" domain="[('probability', '=',0), ('stage_id.sequence, '!=', 1')]"/>
- <filter string="Unassigned" name="unassigned" domain="[('user_id','=', False)]" help="No salesperson"/>
- <filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]" help="Unread messages"/>
+ <filter string="New" name="new"
+ domain="[('probability', '=', 0), ('stage_id.sequence', '=', 1)]"/>
+ <filter string="Won" name="won"
+ domain="[('probability', '=', 100), ('stage_id.on_change', '=', 1)]"/>
+ <filter string="Lost" name="lost"
+ domain="[('probability', '=', 0), ('stage_id.sequence', '!=', 1)]"/>
+ <filter string="Unassigned" name="unassigned"
+ domain="[('user_id','=', False)]" help="No salesperson"/>
<filter string="My Opportunities" name="assigned_to_me"
- domain="[('user_id','=',uid)]" context="{'invisible_section': False}"
+ domain="[('user_id', '=', uid)]" context="{'invisible_section': False}"
help="Opportunities that are assigned to me"/>
<filter string="Assigned to My Team(s)"
domain="[('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
<filter string="Campaign" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
<filter string="Creation" domain="[]" context="{'group_by':'create_date'}"/>
- <filter string="Last Update Month" icon="terp-go-month"
- domain="[]" context="{'group_by':'write_date'}"/>
+ <filter string="Last Update Month" domain="[]" context="{'group_by':'write_date'}"/>
</group>
<group string="Display">
<filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team" groups="base.group_multi_salesteams"/>
'default_email_to':'{$object.email or \'\'}',
'default_use_template': True,
'default_template_id': ref('crm.email_template_opportunity_mail'),
- }"/>
+ }"
+ groups="base.group_sale_salesman"
+ />
<!--Update of email_template defined in crm_lead_data, to add ref_ir_act_window
allowing to have a well formed email template (context action considered as set). -->
if context.get('active_model') == 'crm.lead' and context.get('active_ids'):
self.case_mark_lost(cr, uid, context['active_ids'], context=context)
</field>
+ <field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
</record>
<record id="ir_mark_as_lost" model="ir.values">