Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

[SOLVED] How to setup Automated Actions to create new Stage and Task when a new Project is created

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
AutomatedActions
1 Răspunde
11631 Vizualizări
Imagine profil
Chrisy

[unsolved] How to setup Automated Actions to create new Stage and Task when a new Project is created.


This question was answered yesterday and being marked Solved, unfortunately, it's not solved.


When a new project is created based on a template project via a Service Product, it creates a new project based on an existing template, but it also it's still sharing the same Analytic Account as the template, which is just not how it should be when we need a unique analytic account for each project.  Furthermore,  we need project for more than just recording services.


Therefore, can anyone please help me on how to setup automated actions to create new stages & tasks whenever a new project is created?


Thank you. 


I feel the template function used to be in v8 was all we needed, but for some obvious reasons the developers decided to remove it.

0
Imagine profil
Abandonează
Lucas

Rather than an automated action to create a new stage/task, would it work for your flow to instead have an automated action that writes a new analytic account for the project?

Chrisy
Autor

Dear Lucas,


Unfortunately, the duplicated project based on a template also duplicates the Stage & Tasks, but the Stage are shared between the duplicated project and the template project.

What we need to do is to have the new project have the same stage & tasks names as the template project, but are unique, not linked to the template.

Imagine profil
Wainaina Joseph
Cel mai bun răspuns

Steps to Set up Automated Actions for Creating Stage and Task:

  1. Navigate to Automated Actions: Log in to your Odoo instance and go to the Settings menu. Scroll down to the Technical section and click on Automation -> Automated Actions.
  2. Create a New Action: Click on the "Create" button.
  3. Configure Action Settings:
    • Model: Choose Project from the list, which corresponds to project.project.
    • Trigger Condition: Select "On Creation" from the dropdown.
    • Action To Do: Select "Execute Python Code".
  4. Write Python Code: You will see a Python code box where you can write Python code to execute. Below is a sample code to create a new stage and task when a new project is created.
# Create a new stage related to the new project
stage = env['project.task.type'].create({
    'name': 'New Custom Stage',
    'project_ids': [(4, record.id)],
})

# Create a new task related to the new project
task = env['project.task'].create({
    'name': 'New Custom Task',
    'project_id': record.id,
    'stage_id': stage.id,
})
  1. Save and Test: After entering the code, save the Automated Action. To test it, create a new project. Upon its creation, a new Stage and Task should be automatically linked to it.

Explanation:

  • env['project.task.type'].create() is used to create a new stage.
  • env['project.task'].create() is used to create a new task.
  • The project_ids and project_id fields are used to relate the stage and task to the new project.

That's it! This is how you can set up an Automated Action in Odoo to create a new Stage and Task whenever a new Project is created.


4
Imagine profil
Abandonează
Chrisy
Autor

Wow, thank you!!! Your reply is by far the most accurate and well structured, especially for ppl like me who's not an IT person and have so little understanding to coding.

Thank you heaps!!!

Jayden Huebner

Hi there, is there any way to apply this to specific products? Say I want a stage to be named for one project, but I also want to that stage to have a different name when making a new project.

Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Fix Automated Action Based on Time Condition, From Odoo AutoAction(Done), to Code(Not yet)
AutomatedActions
Imagine profil
Imagine profil
Imagine profil
3
nov. 25
642
How to copy Transfer lines with an Automated Action
AutomatedActions
Imagine profil
0
sept. 24
2281
Automated action sends notification
AutomatedActions
Imagine profil
0
mai 24
27
Automated Action: 'Compute Price from BoM' when BOM is changed Rezolvat
AutomatedActions
Imagine profil
Imagine profil
1
apr. 24
6048
Create a new record automation
AutomatedActions
Imagine profil
0
mar. 24
2444
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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