Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!