Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Custom dashboard error: edit_custom() missing 1 required positional argument: 'custom_id'

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
javascriptdashboard
2 Besvarelser
11681 Visninger
Avatar
Buddy Lich

Hi, I'm new to python and odoo. I made a custom dashboard view. But when I drag one of the views inside, this error comes out:

Odoo Server Error
Traceback (most recent call last):
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "C:\Users\Administrator\odoo-13.0\odoo\tools\pycompat.py", line 14, in reraise
    raise value
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "C:\Users\Administrator\odoo-13.0\odoo\service\model.py", line 93, in wrapper
    return f(dbname, *args, **kwargs)
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "C:\Users\Administrator\odoo-13.0\odoo\http.py", line 515, in response_wrap
    response = f(*args, **kw)
TypeError: edit_custom() missing 1 required positional argument: 'custom_id'

The process of making a custom dashboard is from a youtube tutorial. The tutorial experienced the same issue and provided a solution, which is to change the js code in the dashboard module in odoo.

//before
_saveDashboard: function () {
        var board = this.renderer.getBoard();
        var arch = QWeb.render('DashBoard.xml', _.extend({}, board));
        return this._rpc({
                route: '/web/view/edit_custom',
                params: {
                    custom_id: this.customViewID,
                    arch: arch,
                }
            }).then(dataManager.invalidate.bind(dataManager));
    },

//after
_saveDashboard: function () {
var board = this.renderer.getBoard();
var arch = QWeb.render('DashBoard.xml', _.extend({}, board));
return this._rpc({
route: '/web/view/edit_custom',
params: {
custom_id: this.customViewID !=null? this.customViewID: '',
arch: arch,
}
}).then(dataManager.invalidate.bind(dataManager));
},

In the tutorial, it works. But what I desperately need is to write a js file to override this _saveDashboard method inside "/addons/board/static/src/js/board_view.js". I tried to google relevant issues on forums but still cannot find a solution or explanation of this. I tried to learn js to understand the issue but still not helpful.


Can anyone show me how to override this method in my custom module?

1
Avatar
Kassér
Niyas Raphy (Walnut Software Solutions)

The solution for this issue is shown in this video, which illustrate the steps of creating dashboard in odoo: https://youtu.be/kfffu4Uzo10?t=924

Avatar
Pierre Alain KOUAKOU
Bedste svar

_saveDashboard: function () {
        var board = this.renderer.getBoard();
        var arch = QWeb.render('DashBoard.xml', _.extend({}, board));
        return this._rpc({
                route: '/web/view/edit_custom',
                params: {
                    custom_id: this.customViewID ? this.customViewID : "",
                    arch: arch,
                }
            }).then(dataManager.invalidate.bind(dataManager));
    },

Replace this propertie in dashboard module static js code, can help anyone who have same issue !


1
Avatar
Kassér
Rob Bro

How can we do it in our own custom module?
It works if we edit it in the source code.

Avatar
July Chacko
Bedste svar

For a temporary solution, write the below code in your controller

@http.route('/web/view/edit_custom', type='json', auth="user")

def edit_custom(self, arch):

        return {'result': True}

Cheers!


1
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Cannot import @website_sale/js/utils
javascript
Avatar
Avatar
2
nov. 25
496
Cómo cerrar una transferencia interna al recibirla desde la vista de código de barras stock.picking
javascript
Avatar
0
jul. 25
1105
Why use the Lazy Translation function _lt()
javascript
Avatar
Avatar
1
jul. 25
6367
How to use ReactJS and Next.js to build a fully customizable, open-source headless frontend for Odoo
javascript
Avatar
0
jul. 25
2146
Odoo 18 custom event(s) within a JavaScript form controller
javascript
Avatar
0
jun. 25
2090
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now