Skip to content
Snippets Groups Projects
Commit 71775e32 authored by Alexandre Kühn's avatar Alexandre Kühn
Browse files

[IMP] mail: turn 'SuggestedRecipientInfo/dialogText' into field


Task-2793280

closes odoo/odoo#86440

Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
parent 0e7f9052
No related branches found
No related tags found
No related merge requests found
......@@ -81,13 +81,6 @@ export class ComposerSuggestedRecipient extends Component {
));
}
/**
* @returns {string}
*/
get PLEASE_COMPLETE_CUSTOMER_S_INFORMATION() {
return this.env._t("Please complete customer's information");
}
/**
* @returns {SuggestedRecipientInfo}
*/
......
......@@ -32,7 +32,7 @@
on_saved: _onDialogSaved,
res_id: false,
res_model: 'res.partner',
title: PLEASE_COMPLETE_CUSTOMER_S_INFORMATION,
title: suggestedRecipientInfo.dialogText,
}"
/>
</t>
......
......@@ -7,6 +7,13 @@ registerModel({
name: 'SuggestedRecipientInfo',
identifyingFields: ['id'],
recordMethods: {
/**
* @private
* @returns {string}
*/
_computeDialogText() {
return this.env._t("Please complete customer's information");
},
/**
* Prevents selecting a recipient that does not have a partner.
*
......@@ -25,6 +32,9 @@ registerModel({
},
},
fields: {
dialogText: attr({
compute: '_computeDialogText',
}),
/**
* Determines the email of `this`. It serves as visual clue when
* displaying `this`, and also serves as default partner email when
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment