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
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    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

How to completely override payEvent function

Abonare

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

Această întrebare a fost marcată
javascriptoverrideodoov11
2 Răspunsuri
4261 Vizualizări
Imagine profil
jrmasis@dlocorp.com

Hello, I've been trying to override what the payEvent function does. This function is on the payment_form.js in the payment module payment/static/src/js. Here is the code I'm using:

odoo.define('test_overriding.test', function (require) ) {

"use strict";

var Payment_form = require('payment.payment_form');

Payment_form.include({

                        payEvent: function(ev){

                            console.log("test")

                        }

});

});

The problem is that when I go to the instance of odoo it gives me a Missing dependencies on the payment.payment_form

Any guidance would be helpful, thanks in advance.

Note: I'm using odoo v11

0
Imagine profil
Abandonează
Imagine profil
jrmasis@dlocorp.com
Autor Cel mai bun răspuns

Hello Kinjal, thanks for your help, did what you said but it keeps giving the same error, maybe I wasn't clear in what I was trying to accomplish, I created a new module called test_overriding in which I set to load assets.xml on the manifest, in there I have the code you gave me but with the data of this module, then in the same module in static/src/js I have the custom.js file with the code I gave at the beggining. What it seems to happen in my opinion is that I cannot inherit from the payment.payment_form function defined from the payment odoo default module, I'm not sure about this, maybe I'm not doing that correctly or there is another name for it or something? thanks in advance again for all your help

0
Imagine profil
Abandonează
Imagine profil
Silent Infotech Pvt. Ltd.
Cel mai bun răspuns

give file path in assets.xml like this

```
<template id="custom_js" inherit_id="web.assets_frontend"> <xpath expr="." position="inside"> <script type="text/javascript" src="/<path>/static/src/js/payment_form.js" /> </xpath> </template>

and write

"odoo.define('test_overriding.test', function (require) {" line instead of " odoo.define('test_overriding.test', function (require) ) {"

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
How i can override the activity js file in odoo 14?
javascript override
Imagine profil
Imagine profil
1
aug. 23
3756
Override JS mail Rezolvat
javascript override
Imagine profil
Imagine profil
Imagine profil
3
iul. 21
5940
inheriting Javascript file Odoo 12
javascript override
Imagine profil
Imagine profil
1
aug. 19
4125
Why odoo doesn't seem to load javascript files defined in odoo-js-demo code?
javascript odoov11
Imagine profil
0
oct. 18
4602
Bypass Javascript super call in v16
javascript class override
Imagine profil
Imagine profil
1
mai 23
3198
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