[IMP] mail: turn 'SuggestedRecipientInfo/dialogText' into field
Task-2793280 closes odoo/odoo#86440 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
-7
@@ -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}
|
||||
*/
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user