Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

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

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
AutomatedActions
1 Odpowiedz
11644 Widoki
Awatar
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
Awatar
Odrzuć
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.

Awatar
Wainaina Joseph
Najlepsza odpowiedź

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
Awatar
Odrzuć
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.

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Fix Automated Action Based on Time Condition, From Odoo AutoAction(Done), to Code(Not yet)
AutomatedActions
Awatar
Awatar
Awatar
3
lis 25
644
How to copy Transfer lines with an Automated Action
AutomatedActions
Awatar
0
wrz 24
2281
Automated action sends notification
AutomatedActions
Awatar
0
maj 24
27
Automated Action: 'Compute Price from BoM' when BOM is changed Rozwiązane
AutomatedActions
Awatar
Awatar
1
kwi 24
6050
Create a new record automation
AutomatedActions
Awatar
0
mar 24
2447
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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