Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
How to access a data member or class in an included javascript in odoo?

I'm new to odoo, currently I'm trying to adding a data filter in account_report module, and it made me to modify the js file in odoo (which is I'm not well versed). I've tried to modify the source code js and it worked, but I didn't allowed to modify the source code, so I had to inherit or override the js from a custom module. But I kept having trouble to access the data member or the class (I'm not really sure what it is) because part of my code need to declare that class/data member from the parent/included class, can u guys guide me how to access or get the class/data member? thanks in advance

here is my Code:

odoo.define('nrs_de_financial_report_currency.account_report', function (require) {
'use strict';
    var account_report = require('account_reports.account_report');
    var core = require('web.core');
    var datepicker = require('web.datepicker');
    var QWeb = core.qweb;
    var _t = core._t;

    account_report.include({
        unfold: function(line) {
            var self = this;            
            var parent_result = this._super.apply(this, arguments);
            var line_id = line.data('id');
            .
            .
            .
        render_searchview_buttons: function() {
            var self = this;
            // bind searchview buttons/filter to the correct actions
            var $datetimepickers = this.$searchview_buttons.find('.js_account_reports_datetimepicker');
            .
            .
            .
                   

                if (!_.isEmpty(fields)) {
                        //this is the trouble part, when I must declare the new M2MFilters
                        this.M2MFilters = new M2MFilters(this, fields);
                        this.M2MFilters.appendTo(this.$searchview_buttons.find('.js_account_partner_m2m'));
                    }
                } else {
                    this.$searchview_buttons.find('.js_account_partner_m2m').append(this.M2MFilters.$el);
                }
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda