[ADD] crm : add website field into lead and opportunity form view for company/customer information
This commit is contained in:
committed by
Denis Vermylen (dve)
parent
0f19e9fff2
commit
296494aaed
@@ -47,6 +47,7 @@ CRM_LEAD_FIELDS_TO_MERGE = [
|
||||
'date_action_next',
|
||||
'email_from',
|
||||
'email_cc',
|
||||
'website',
|
||||
'partner_name']
|
||||
|
||||
|
||||
@@ -75,6 +76,7 @@ class Lead(FormatAddress, models.Model):
|
||||
date_action_last = fields.Datetime('Last Action', readonly=True)
|
||||
date_action_next = fields.Datetime('Next Action', readonly=True)
|
||||
email_from = fields.Char('Email', help="Email address of the contact", index=True)
|
||||
website = fields.Char('Website', index=True, help="Website of the contact")
|
||||
team_id = fields.Many2one('crm.team', string='Sales Team', oldname='section_id', default=lambda self: self.env['crm.team'].sudo()._get_default_team_id(user_id=self.env.uid),
|
||||
index=True, track_visibility='onchange', help='When sending mails, the default email address is taken from the sales team.')
|
||||
kanban_state = fields.Selection([('grey', 'No next activity planned'), ('red', 'Next activity late'), ('green', 'Next activity is planned')],
|
||||
@@ -238,6 +240,7 @@ class Lead(FormatAddress, models.Model):
|
||||
'fax': partner.fax,
|
||||
'zip': partner.zip,
|
||||
'function': partner.function,
|
||||
'website': partner.website,
|
||||
}
|
||||
return {}
|
||||
|
||||
@@ -727,6 +730,7 @@ class Lead(FormatAddress, models.Model):
|
||||
'city': self.city,
|
||||
'country_id': self.country_id.id,
|
||||
'state_id': self.state_id.id,
|
||||
'website': self.website,
|
||||
'is_company': is_company,
|
||||
'type': 'contact'
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<!-- Preload all the partner's information -->
|
||||
<field name="partner_id" string="Customer"
|
||||
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_team_id': team_id}" groups="base.group_no_one"/>
|
||||
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_team_id': team_id, 'default_website': website}" groups="base.group_no_one"/>
|
||||
<field name="partner_name" string="Company Name"/>
|
||||
<label for="street" string="Address"/>
|
||||
<div class="o_address_format">
|
||||
@@ -73,6 +73,7 @@
|
||||
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
|
||||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
|
||||
</div>
|
||||
<field name="website" widget="url" placeholder="e.g. www.odoo.com"/>
|
||||
</group>
|
||||
<group>
|
||||
<label for="contact_name"/>
|
||||
@@ -419,7 +420,7 @@
|
||||
'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_team_id': team_id}"/>
|
||||
'default_user_id': user_id, 'default_team_id': team_id, 'default_website': website}"/>
|
||||
<field name="email_from" string="Email" widget="email"/>
|
||||
<field name="phone" widget="phone"/>
|
||||
</group>
|
||||
@@ -472,6 +473,7 @@
|
||||
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
|
||||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
|
||||
</div>
|
||||
<field name="website" widget="url" placeholder="e.g. www.odoo.com"/>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user