Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

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

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

Automatically move project to a stage when all tasks reach that stage

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
projectstagesautomatic
2 Respostas
5590 Visualizações
Avatar
Diego Avila

Hello,

We are trying to create an automatic rule that moves the project to a stage, when ALL tasks inside that project reach the mirrored task stage.
(for example: if all project tasks are in stage 2, automatically project will move to stage 2).

we tried creating a studio automatic rule but it doesn't work, could you please tell us what we are doing wrong? 

(V. 16)

Model: Project
trigger: Update
Activation fields: Task (project)
Apply to: Task>Stage = In progress

Action to do: udate record

Field: Task (project)
Type of evaluation: Value
record: In progress
Value: 2


thank you!

0
Avatar
Cancelar
Avatar
Jainesh Shah(Aktiv Software)
Melhor resposta

Hello Diego Avila,

You can move project to a stage when all tasks reach that stage using Automated Action.

Find Example in comment.

I hope you are doing well.

For Example -

Note - Check Indentation of the code after pasting the code
- stage_id stores the stage to which you want to move the project

- Create an automated action by adding
name, model( Task (project.task) as per your requirement),
trigger(update as per your requirement), Trigger fields (Stage (project.task) as per your requirement),
, Action To Do ( Execute Python Code )

- Search the Stage you want to move.

- In the Python Code Below Paste this code:-
if len(records.project_id.task_ids.mapped('stage_id.name'))==1:
stage_id = env['project.project.stage'].search([('name','=','In Progress')])
records.project_id.write({"stage_id":stage_id})

I hope this would be helpful.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

0
Avatar
Cancelar
Diego Avila
Autor

Hello Jainesh,

Thank you for looking into this! Unfortunately It didn't work, but I am sure it is because I am doing something wrong because I don't know coding or phyton. (I can't send screenshots because I don't have karma, so I will list below what I entered in all fields: ("entrega final" is the name of the stage all tasks are moved to/project consequently needs to be moved to)

Model: Project
trigger: Update
Activation fields: Task stage (project.project)

Before updating the domain: (I didn't touch this field)
Apply to: (I didn't touch this field)

Action to do: execute phyton code

Phyton code:
1.if len(records.project_id.task_ids.mapped('stage_id.name'))==1:
2.   stage_id = env['project.project.stage'].search([('name','=','entrega final')])
3.   records.project_id.write({"stage_id":stage_id})

(I left 3 spaces as "indent" in the second 2 lines)

Thank you very much for all your help!

Diego Avila
Autor

Hello Jainesh,
please disregard my previous comment, I had the Model wrong :(,
We corrected the model and now the code did work in a part: what happens now is that when all tasks are moved to the stage "entrega final" the project is moved to a non-existing stage that is created by the system :/

could you please help us with this?

Diego Avila
Autor

This is the correct answer! The code did work, we were placing it incorrectly. Thank you very much for all your help!

Avatar
Simone Franceschetti
Melhor resposta

Hello I want to implement this code with a small upgrade. 

This code work very well if I have to move a project when i have a specific task_ids stage. 
But if i want to make this code dinamically? For example if i have 3 stage_id for task inside a project(stage1, stage2, stage3) and i have 3 stage_id for project. 

I want that when task stage inside project are all to stage2 the relative project move on stage2 and if task stage move all from stage2 to stage3 project does same. 

How to implement this in the pythone code?

Thank you

0
Avatar
Cancelar
Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Publicações relacionadas Respostas Visualizações Atividade
"Stages" menu is not showing in the Project module. Resolvido
project stages
Avatar
Avatar
Avatar
2
mar. 23
3448
Different Project Stages / Pipelines per Project Resolvido
project stages
Avatar
Avatar
2
jul. 24
8866
Not to take a done task on the total amount of a project [Resolved]
project stages tasks
Avatar
1
mar. 15
4613
Configure Proper Project Stages
project stages tasks
Avatar
Avatar
1
mar. 15
8516
Allow "Project / Users" creating new task stages (Kanban view) Resolvido
project stages task groups
Avatar
Avatar
Avatar
2
mar. 25
3210
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة 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 é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

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