Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Could not find client action

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
webwebmodule
3 Răspunsuri
21477 Vizualizări
Imagine profil
Samea

I was trying to follow this guide of building a web-module: https://doc.openerp.com/trunk/web/module/

I created the following files according to guide:

// static/src/js/first_module.js
openerp.web_example = function (instance) {
    instance.web.client_actions.add('example.action', 'instance.web_example.action');
    instance.web_example.action = function (parent, action) {
        console.log("Executed the action", action);
    };
};

__openerp__.py

# __openerp__.py
{
    'name': "Web Example",
    'description': "Basic example of a (future) web module",
    'category': 'Hidden',
    'depends': ['web'],
    'data': ['web_example.xml'],
    'js': ['static/src/js/first_module.js'],
}

web_example.xml

<!-- web_example/web_example.xml -->
<openerp>
    <data>
        <record model="ir.actions.client" id="action_client_example">
            <field name="name">Example Client Action</field>
            <field name="tag">example.action</field>
        </record>
        <menuitem action="action_client_example"
                  id="menu_client_example"/>
    </data>
</openerp>

__init__.py is empty.

Now the "Example Client Action" link appears to the topbar of the admin-panel like it should but when I click it I get a notification saying "Could not find client action example.action"

I have checked my code few times to ensure it's similar to guide's. Am I just blind to some minor error, is there a misconception or what could be the problem?  Should there be something in the __init__.py file? If yes, then what? 

1
Imagine profil
Abandonează
Peter Nietz

same problem here! but in v7 the module works fine.

Hamid Darabi

I had the same problem and I figured it out. I updated my old answer. I hope you find it helpful. If you like I can send you completed code.

Imagine profil
Wayan Sumitra
Cel mai bun răspuns

After a couple of hours I found out the right solution:

Simple Solution:
Just download another example file from here: https://github.com/odoo/petstore (its for Odoo v8)
Documentation: http://odoo-80.readthedocs.org/en/latest/tutorials.html

Advanced Solution:
Remove from file __openerp__.py the following line:

'js': ['static/src/js/first_module.js']

And add the follwing lines in your web_example.xml file: (after <openerp><data> and before <record ...>

 <template id="assets_backend" name="web_example_assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <script type="text/javascript" src="/web_example/static/src/js/first_module.js"/>
            </xpath>
   </template>

So your link to js or css has to be linked in your xml file!

2
Imagine profil
Abandonează
Imagine profil
Peter Nietz
Cel mai bun răspuns

ok, if you develop for Odoo, I think the problem is that the js files in the tutorial are included via the __openerp__py, but odoo needs them to include a

< script > tag 

with the js in your view xml file

0
Imagine profil
Abandonează
Imagine profil
Hamid Darabi
Cel mai bun răspuns

I have the same problem and I think it's because I'm using odoo 8 but the tutorial is for previous versions. Is there any documentation/tutorial on 8th version?

---

Update:

I had the exact same problem and finally I found out the problem is indentations. I was using notepad++ and sometimes I've copied lines of code from tutorial, sometimes I wrote code using keyboard, etc. aparantly I had the same indentation everywhere but in some lines of code I hade a couple of spaces and in some others I had tabs. Finaly I solved the problem with using the same indentation for the same groups of code.

I recently realized that notepad++ has helper lines for groups of code with same indentation and +/- signs to collapse/expand the code.

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Overriding odoo javascript function (start.js file in web addon)
webclient web webmodule
Imagine profil
0
dec. 24
2231
How to use dynamic snippet for local Seo
web
Imagine profil
Imagine profil
2
iul. 25
2255
European Accessibility Act compliance
web
Imagine profil
1
mai 25
1621
How to import owl CharField?
web
Imagine profil
Imagine profil
2
mai 25
2249
Problems migrating from Odoo14 to Odoo17 due to web.assets_backend problem
web
Imagine profil
Imagine profil
1
iul. 24
4607
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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