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 created a Log Note when a particulate field is updated?

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
Studio
2 Respostas
2782 Visualizações
Avatar
Amir

Added a new field in Studio to a Delivery view and I want to record a line in the Log Note on that view every time anyone makes changes to that field.


Is there a way to do this from Studio?

0
Avatar
Cancelar
Avatar
Chris TRINGHAM
Melhor resposta

Yes - you should be able to change your new field to be tracked.  You can either find the field directly or from studio:



Then update the field definition:


You can't do this for standard fields, but there is a workaround

 

2
Avatar
Cancelar
Avatar
David Paw
Melhor resposta

Creating a log note when a particular field is updated in a system or database involves implementing a logging mechanism within your application or system. The exact steps may vary depending on the technology stack you're using, but here's a general outline of the process:

  1. Identify the Field to Monitor: Determine which field or fields you want to track for updates. This could be a user profile field, a configuration setting, or any other relevant data point.
  2. Database Design: If the field you're monitoring is stored in a database, ensure that your database schema has a structure to store the log notes. This may involve creating a separate table to store the log entries.
  3. Create a Log Table: If you don't already have one, create a table to store log entries. This table should include fields such as timestamp, user ID (if applicable), the field that was updated, the old value, the new value, and any other relevant information.
  4. Implement Triggers (if using a relational database): In relational databases, you can use triggers to automatically execute a set of instructions (such as inserting a log entry) when a specific event (such as an update to a certain field) occurs. Write a trigger that captures the necessary information and inserts a log entry into the log table.
    sqlCopy codeCREATE TRIGGER field_update_trigger
    AFTER UPDATE ON your_table
    FOR EACH ROW
    BEGIN
        IF NEW.updated_field acti https://www.finderlane.com OLD.updated_field THEN
            INSERT INTO log_table (timestamp, user_id, field_updated, old_value, new_value)
            VALUES (NOW(), NEW.user_id, 'updated_field', OLD.updated_field, NEW.updated_field);
        END IF;
    END;
    
    Note: This is just a simple example, and the actual implementation may vary based on your database system (e.g., MySQL, PostgreSQL, SQL Server).
  5. Implement Logging in Code (if not using triggers): If your application logic handles updates, incorporate logging directly into your code. When updating the field, add a step to log the change.
    pythonCopy codedef update_field(record_id, new_value, user_id):
        old_value = get_old_value(record_id)
        update_database(record_id, new_value)
    
        # Log the change
        log_entry = {
            'timestamp': current_timestamp(),
            'user_id': user_id,
            'field_updated': 'updated_field',
            'old_value': old_value,
            'new_value': new_value
        }
        insert_log_entry(log_entry)
    
  6. Testing: Thoroughly test your implementation to ensure that log entries are created only when the specified field is updated.

Remember to adapt these steps based on the specific technologies and frameworks you are using. Additionally, consider security measures, such as only allowing authorized users to update the monitored field and protecting the log entries from unauthorized access.


0
Avatar
Cancelar
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
Creating and using an app created with Studio. Resolvido
Studio
Avatar
Avatar
1
out. 24
2684
Add table in Tab with Studio
Studio
Avatar
Avatar
Avatar
2
out. 24
4085
Odoo Studio hide field based on other Field Resolvido
Studio
Avatar
Avatar
1
jul. 24
3452
How to Add a Serial Number in Purchase Order Line Automatically when adding line in odoo studio (NO Access To Backend)
Studio
Avatar
0
jun. 24
2017
Error On creating field from odoo studio
Studio
Avatar
Avatar
Avatar
2
fev. 24
3743
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