Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

v7 - How to "query-insert" a stage change in a task journal ?

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
postgresqlv7
4 Besvarelser
4350 Visninger
Avatar
François Dubois

Hello all,

When I am in a task, if I change the stage of this task, a log is generated in the journal at the bottom on the task page like this :

http://reho.st/self/e17d8c40b5ef23a7918cd6b6b1af6af310f2b31c.png

Now, I would like to do the same thing using postgreSQL query :

I succeed to update the current stage of the task (in table project_task, then I insert a line in the table project_task_history to save the action of "stage changed", but when I refresh the page, the stage change is not saved in the journal ar the bottom of the task page ...

Do I miss something so that the task change is inserted in this journal ?

Can someone help me please ?

Thanks a lot in advance.

0
Avatar
Kassér
Jérémy Kersten (jke)

why do you want to do it in sql ? At first view, It's seems a bad idea !

François Dubois
Forfatter

Thanks Jérémy Kersten for helping me.

I would like to do this, so that I can generate a report based on the database later. I will need to calculate duration between two stages, so I need to log these stage-changes. Of course I can let the users of the project do it themselves with their mouse/keyboard using the UI, but it'll be better for me to automatically change stage of tasks once their deadline_date is over.

Also, sometimes we will have a lot of tasks to stage-change, so it would be great if I can do it automatically. Actually I can do it, but my problem is that no log is generated to say "previous stage => next stage", and I need a date to create a report in the future.

Thanks a lot.

Avatar
François Dubois
Forfatter Bedste svar

Thanks Jeremy. 

You mean create a scheduled action via odoo ? 

Because I already do it using postgreSQL queries, it's working but like I said, the link "previous stage > new stage" is not done ... 




0
Avatar
Kassér
Jérémy Kersten (jke)

when you do it in sql, you bybass the write function of odoo which do the job...

You can do it in sql, with a message post, and reimplementing the logic of tracked field, but it is a really bad idea according to me...

One scheduled action that check a domain and change the stage is probably 3 lines of code... And workflow will be always ok... And you keep the logic in Odoo, you let Odoo do HIS job and you don't need to maintains 2 logics

Avatar
Jérémy Kersten (jke)
Bedste svar

Ok... so

Why not add a scheduled action that will check all deadline_date > now and stage != your_new_stage, and if needed change the stage...

Like that, you let Odoo make the job with all the workflow, and tracked fields will be correctly set...

Seems  the right way...

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Anyone using PostgreSQL 9.3 with OpenERP 7.0? Feedback? Good? Bad? Same?
postgresql v7
Avatar
Avatar
Avatar
2
mar. 15
6853
Why doesn't fetchall() return the same thing as the SQL request? Løst
postgresql v7 api
Avatar
Avatar
Avatar
Avatar
Avatar
18
aug. 18
22105
Add indices to PostgreSQL tables in custom module: Is overriding _auto_init and using _execute_sql the best way?
postgresql index v7
Avatar
Avatar
1
mar. 15
8971
How to add a "Delete" button on the popup form? Løst
v7
Avatar
Avatar
1
okt. 25
5457
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Avatar
0
feb. 25
2766
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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