Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

How to created a Log Note when a particulate field is updated?

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
Studio
2 Risposte
2783 Visualizzazioni
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
Abbandona
Avatar
Chris TRINGHAM
Risposta migliore

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
Abbandona
Avatar
David Paw
Risposta migliore

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
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Creating and using an app created with Studio. Risolto
Studio
Avatar
Avatar
1
ott 24
2684
Add table in Tab with Studio
Studio
Avatar
Avatar
Avatar
2
ott 24
4085
Odoo Studio hide field based on other Field Risolto
Studio
Avatar
Avatar
1
lug 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
giu 24
2017
Error On creating field from odoo studio
Studio
Avatar
Avatar
Avatar
2
feb 24
3743
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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