Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Call an windows action from JS.

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
webtechincal
2 Replies
14548 Rodiniai
Portretas
A Nhomar Hernandez

Hello.

We are developing some features that require call a windows action with an specific id, somebody can share an specific snnipet with this?.

We read the code and we found this:

        on_edit_help: function() {                                                 
        var self = this;                                                        
            self.rpc("/web/action/load", { action_id: "module_name.action_object_tree" }).done(function(result) {
                self.getParent().do_action(result, {                                                                                      
                    additional_context: {                                      
                          //HERE WE ARE TRYING SOME OPTIONS.
                    },                                                         
                });                                                            
            });                                                                 
       },

This snnipet is in a widget inside openerp, and we set a DOM element with the "click" method calling this function, the function is being called actually, no problem with that.

OPTIONS USED:

'active_id': KnownId, //Not Work, 'active_id': [KnownId], //Not Work. 'search_default_FIELD': It is not working.

We think it is a matter of the field in the SEARCH view, we tryed too, but the search is filled and the filter is not excecuted.

Question, Am i doing something wrong or it is a bug, the API should work in this way?

We tryied other option,. Build dinamically the action:

var action = {
    //Parameters
}

But the effect is exactly the same.

Some Help?

If somebody can share with me what module do this exactly, i can copy the code, but all options in OpenERP actually are solved in differents way.

Basically the question is:

How do i call an existent view in OpenERP with a customized link from JavaScript?

Limitant: I dont want to use a Menu, because the behavior is so especific.

Regards.

2
Portretas
Atmesti
Portretas
A Nhomar Hernandez
Autorius Best Answer

Solved......

Just after the call of action add this 2 lines to be sure the search is executed, If somebody think it is incorrect, or not elegant tell me please:

                var v = new instance.web.View;                                                                                            
                v.reload();

In my case i put after the call of action.

1
Portretas
Atmesti
rongsy

I want to do like what you said in my case,but the result doesn't come out.the following is my code:

Portretas
rongsy
Best Answer

I want to do like what you said in my case,but the result doesn't come out.the following is my code:

var Product = instance.web.Class.extend({
    buach_add_to: function(){
        var self = this;
        self.rpc("/web/action/load", { action_id: "stock.action_receive_move" }).done(function(result) {
            self.getParent().do_action(result, {                                                                                      
                additional_context: {                                          
                },                                                         
            });                                                            
        });   
        var v = new instance.web.View;                                                                                            
        v.reload();
    },
});

can you tell me why I can't do that sucess?

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
How to use dynamic snippet for local Seo
web
Portretas
Portretas
2
liep. 25
2306
European Accessibility Act compliance
web
Portretas
1
geg. 25
1702
How to import owl CharField?
web
Portretas
Portretas
2
geg. 25
2337
Problems migrating from Odoo14 to Odoo17 due to web.assets_backend problem
web
Portretas
Portretas
1
liep. 24
4724
invalid website_form_signature
web
Portretas
0
rugp. 24
341
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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