[IMP] mail: voip refactoring
Adds useful fields to models needed for VoIP to work. closes odoo/odoo#115689 Related: odoo/enterprise#38339 Related: odoo/upgrade#5021 Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit is contained in:
@@ -45,6 +45,10 @@ export class Persona extends Record {
|
||||
id;
|
||||
/** @type {boolean | undefined} */
|
||||
is_company;
|
||||
/** @type {string} */
|
||||
landlineNumber;
|
||||
/** @type {string} */
|
||||
mobileNumber;
|
||||
/** @type {'partner' | 'guest'} */
|
||||
type;
|
||||
/** @type {string} */
|
||||
@@ -61,6 +65,13 @@ export class Persona extends Record {
|
||||
im_status;
|
||||
isAdmin = false;
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get hasPhoneNumber() {
|
||||
return Boolean(this.mobileNumber || this.landlineNumber);
|
||||
}
|
||||
|
||||
get nameOrDisplayName() {
|
||||
return this.name || this.displayName;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div t-if="activity.note" class="o-mail-Activity-note text-break" t-out="activity.note"/>
|
||||
<div t-if="activity.mail_template_ids.length > 0" class="o-mail-Activity-mailTemplates">
|
||||
<div t-if="activity.mail_template_ids?.length > 0" class="o-mail-Activity-mailTemplates">
|
||||
<ActivityMailTemplate activity="activity" onUpdate="props.onUpdate"/>
|
||||
</div>
|
||||
<div t-if="activity.can_write" class="lh-lg">
|
||||
|
||||
@@ -120,6 +120,7 @@ insertModelFields("res.users.settings", {
|
||||
|
||||
insertRecords("mail.activity.type", [
|
||||
{ icon: "fa-envelope", id: 1, name: "Email" },
|
||||
{ icon: "fa-phone", id: 2, name: "Call", category: "phonecall" },
|
||||
{ icon: "fa-upload", id: 28, name: "Upload Document" },
|
||||
]);
|
||||
insertRecords("mail.message.subtype", [
|
||||
|
||||
Reference in New Issue
Block a user