Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
projectstagesautomatic
2 Respuestas
5606 Vistas
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
Descartar
Avatar
Jainesh Shah(Aktiv Software)
Mejor respuesta

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
Descartar
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
Mejor respuesta

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
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
"Stages" menu is not showing in the Project module. Resuelto
project stages
Avatar
Avatar
Avatar
2
mar 23
3459
Different Project Stages / Pipelines per Project Resuelto
project stages
Avatar
Avatar
2
jul 24
8872
Not to take a done task on the total amount of a project [Resolved]
project stages tasks
Avatar
1
mar 15
4615
Configure Proper Project Stages
project stages tasks
Avatar
Avatar
1
mar 15
8519
Allow "Project / Users" creating new task stages (Kanban view) Resuelto
project stages task groups
Avatar
Avatar
Avatar
2
mar 25
3219
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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