[IMP] partner_autocomplete: do not fill email field on partner
- the email returned by Partner Autocomplete is often useless as it is quite generic/random e.g. info@company.com. As it is set automatically, the user might not realize he is going to send an email to that generic address. - not returning the email address faclitates some onboarding flows. It allows us to prompt the user to set his own email address to have a preview of the emails we are sending. Note that this information is not lost but rather displayed in the chatter of the partner record. However, we do not propagate this modification to other services like Lead Enrichment or Lead Generation since this kind of email is still relevant to: - approach a new prospect - enrich information and create leads based on the email domain TaskID 2321864 closes odoo/odoo#56038 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit is contained in:
@@ -115,7 +115,7 @@ var PartnerAutocompleteMixin = {
|
||||
var self = this;
|
||||
|
||||
var removeUselessFields = function (company) {
|
||||
var fields = 'label,description,domain,logo,legal_name,ignored'.split(',');
|
||||
var fields = 'label,description,domain,logo,legal_name,ignored,email'.split(',');
|
||||
fields.forEach(function (field) {
|
||||
delete company[field];
|
||||
});
|
||||
|
||||
@@ -107,7 +107,6 @@ odoo.define('partner_autocomplete.tests', function (require) {
|
||||
city: "Ramillies",
|
||||
zip: "1367",
|
||||
phone: "+1 650-691-3277",
|
||||
email: "info@odoo.com",
|
||||
vat: "BE0477472701",
|
||||
};
|
||||
|
||||
@@ -124,7 +123,6 @@ odoo.define('partner_autocomplete.tests', function (require) {
|
||||
parent_id: {string: "Company", type: "many2one", relation: "res.partner"},
|
||||
website: {string: "Website", type: "char", searchable: true},
|
||||
image_1920: {string: "Image", type: "binary", searchable: true},
|
||||
email: {string: "Email", type: "char", searchable: true},
|
||||
phone: {string: "Phone", type: "char", searchable: true},
|
||||
street: {string: "Street", type: "char", searchable: true},
|
||||
city: {string: "City", type: "char", searchable: true},
|
||||
@@ -187,7 +185,7 @@ odoo.define('partner_autocomplete.tests', function (require) {
|
||||
|
||||
|
||||
QUnit.test("Partner autocomplete : Company type = Company / Name search", async function (assert) {
|
||||
assert.expect(18);
|
||||
assert.expect(17);
|
||||
var fields = this.data['res.partner'].fields;
|
||||
var form = await createView({
|
||||
View: FormView,
|
||||
@@ -199,7 +197,6 @@ odoo.define('partner_autocomplete.tests', function (require) {
|
||||
'<field name="name" widget="field_partner_autocomplete"/>' +
|
||||
'<field name="website"/>' +
|
||||
'<field name="image_1920" widget="image"/>' +
|
||||
'<field name="email"/>' +
|
||||
'<field name="phone"/>' +
|
||||
'<field name="street"/>' +
|
||||
'<field name="city"/>' +
|
||||
@@ -261,7 +258,7 @@ odoo.define('partner_autocomplete.tests', function (require) {
|
||||
});
|
||||
|
||||
QUnit.test("Partner autocomplete : Company type = Company / VAT search", async function (assert) {
|
||||
assert.expect(29);
|
||||
assert.expect(27);
|
||||
var fields = this.data['res.partner'].fields;
|
||||
var form = await createView({
|
||||
View: FormView,
|
||||
@@ -273,7 +270,6 @@ odoo.define('partner_autocomplete.tests', function (require) {
|
||||
'<field name="name" widget="field_partner_autocomplete"/>' +
|
||||
'<field name="website"/>' +
|
||||
'<field name="image_1920" widget="image"/>' +
|
||||
'<field name="email"/>' +
|
||||
'<field name="phone"/>' +
|
||||
'<field name="street"/>' +
|
||||
'<field name="city"/>' +
|
||||
|
||||
Reference in New Issue
Block a user