Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

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

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

How to search for methods inside models

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
modulestechnical
3 Respostas
106 Visualizações
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
Cancelar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Melhor resposta

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
Cancelar
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)
Melhor resposta

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
Cancelar
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
Melhor resposta
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
Cancelar
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.

Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Publicações relacionadas Respostas Visualizações Atividade
¿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 Resolvido
technical
Avatar
Avatar
Avatar
2
set. 25
1719
Nuevo menú en "CRM"
modules
Avatar
Avatar
Avatar
Avatar
3
jul. 25
2760
Allow Access to update module
modules
Avatar
Avatar
Avatar
Avatar
3
mai. 25
4631
Identify and terminate specific user's sessions
technical
Avatar
Avatar
Avatar
2
nov. 24
3841
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة 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 é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

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