Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

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

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
postgresqlv7
4 Replies
4361 Rodiniai
Portretas
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
Portretas
Atmesti
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
Autorius

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.

Portretas
François Dubois
Autorius Best Answer

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
Portretas
Atmesti
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

Portretas
Jérémy Kersten (jke)
Best Answer

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
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

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

Registracija
Related Posts Replies Rodiniai Veikla
Anyone using PostgreSQL 9.3 with OpenERP 7.0? Feedback? Good? Bad? Same?
postgresql v7
Portretas
Portretas
Portretas
2
kov. 15
6872
Why doesn't fetchall() return the same thing as the SQL request? Solved
postgresql v7 api
Portretas
Portretas
Portretas
Portretas
Portretas
18
rugp. 18
22120
Add indices to PostgreSQL tables in custom module: Is overriding _auto_init and using _execute_sql the best way?
postgresql index v7
Portretas
Portretas
1
kov. 15
8990
How to add a "Delete" button on the popup form? Solved
v7
Portretas
Portretas
1
spal. 25
5473
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Portretas
0
vas. 25
2792
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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