Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    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
    Výroba
    • 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
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How to search for methods inside models

Odoberať

Get notified when there's activity on this post

This question has been flagged
modulestechnical
3 Replies
105 Zobrazenia
Avatar
Marcos Perez

Good morning,

Database: V19

I'm getting frustrated with the following, so any help would be greatly appreciated.

I have a scheduled action that calls a method that was supposed to have been added with the modification of the account.move model by an inheritance module.

For some reason, I can't get it to work, but the first thing I want to know is if there's a way to verify that the method was added correctly.

Thank you very much in advance.

0
Avatar
Zrušiť
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

To verify if a method was correctly added to the account.move model via inheritance in Odoo 19, use the Odoo shell to inspect the model directly with dir(move). Check the module's __manifest__.py for dependencies, ensure the module is installed and updated, and look for naming conflicts.

Review the inheritance code for correct model inheritance and method definition. Verify the scheduled action's configuration, clear the Odoo cache, and check the Odoo log file for errors. If the method is listed in the shell's output, it's been added; try calling it to confirm it executes correctly.


Hope it helps

1
Avatar
Zrušiť
Marcos Perez
Autor

I'm sorry, but could you explain it in a little more detail, step by step?

I think I understand what you're talking about, but I don't fully understand some parts.

Avatar
Ray Carnes (ray)
Best Answer

Use the new /doc URL endpoint?

  1. Navigate to your Odoo 19 instance
  2. Ensure you are logged in as ADMIN
  3. Remove /odoo from the URL and replace it with /doc 


https://www.zbeanztech.com/blog/general-11/api-documentation-url-in-odoo-19-runtime-documentation-193


1
Avatar
Zrušiť
Marcos Perez
Autor

I read it on another site and when I tried to check if it worked, it didn't show me the modified method.

Ray Carnes (ray)

If you don't see the method it is not available. Review the developer documentation at https://www.odoo.com/documentation/19.0/developer.html and complete one of the sample module creation tutorials - such as https://www.odoo.com/documentation/19.0/developer/tutorials/server_framework_101/02_newapp.html so you can understand why yours isn't working

Avatar
Bloopark systems GmbH & Co. KG
Best Answer
Hello,
Yes, it is possible to verify whether your custom function exists in the sale.order model. 
Please follow the steps below:

Step 1: Add the verification function to your model file
Insert the following method into the model file where your custom function is defined:

@api.model
def _cron_check_custom_function(self):
"""Check if a function exists on the custom model"""

model = self.env['sale.order'] # put your desired model here
method = "post_create_process" # your function name here

# Check on class, not on recordset
if hasattr(type(model), method):
_logger.info("✔ Function '%s' FOUND !!!!", method)
else:
_logger.warning("✘ Function '%s' NOT found !!!!", method)
return True

Step 2: Create a Scheduled Action

Create a new scheduled action and select the model where you want the function to run.

In the Python Code field, enter:
code to paste in the cron job:

model._cron_check_custom_function()

Step 3: Execute and Review Logs
Run the scheduled action manually and check the server logs to confirm whether the function was detected.

hope it helps.
1
Avatar
Zrušiť
Marcos Perez
Autor

This idea could work well, but the problem I have with it is that it's not a native feature. But I'll keep it in mind.

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

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
¿Cómo puedo comunicarme con Latam Perú?
modules module technical
Avatar
0
nov 25
54
where can i find user name and password and why it asks for Solved
technical
Avatar
Avatar
Avatar
2
sep 25
1719
Nuevo menú en "CRM"
modules
Avatar
Avatar
Avatar
Avatar
3
júl 25
2760
Allow Access to update module
modules
Avatar
Avatar
Avatar
Avatar
3
máj 25
4631
Identify and terminate specific user's sessions
technical
Avatar
Avatar
Avatar
2
nov 24
3841
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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