Skip to content

Commit c3673e6

Browse files
committed
[FIX] mail: rename ambiguous get method in model manager
To ease debugging in general, avoid having multiple methods with the same name, especially in the same file. This is especially useful when the method name appears in a stack trace, for example in the performance tool. Part of task-2702450 closes odoo#81003 Signed-off-by: Alexandre Kühn (aku) <[email protected]>
1 parent b850a4d commit c3673e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/mail/static/src/model/model_manager.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ export class ModelManager {
714714
*/
715715
const nonProxyRecord = new Model({ localId, valid: true });
716716
const record = !this.env.isDebug() ? nonProxyRecord : new Proxy(nonProxyRecord, {
717-
get: function (record, prop) {
717+
get: function getFromProxy(record, prop) {
718718
if (
719719
!Model.__fieldMap[prop] &&
720720
!['_super', 'then'].includes(prop) &&
@@ -1321,7 +1321,7 @@ export class ModelManager {
13211321
// Add field accessors.
13221322
for (const field of Model.__fieldList) {
13231323
Object.defineProperty(Model.prototype, field.fieldName, {
1324-
get() { // this is bound to record
1324+
get: function getFieldValue() { // this is bound to record
13251325
for (const listener of this.modelManager._listeners) {
13261326
listener.lastObservedLocalIds.add(this.localId);
13271327
if (!this.modelManager._listenersObservingLocalId.has(this.localId)) {

0 commit comments

Comments
 (0)