Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
80 Vistas

Hi everyone,

I have a question about linking Sale Orders with Project Templates in Odoo.

By default, Odoo creates one project per service line if each product is linked with a project template.

But I want a different behavior:

  • I want only one project per Sale Order, even if the order has multiple service products.
  • The project should be automatically created from a specific project template (for example, “Template A”) when the Sale Order is confirmed.
  • I don’t want users to manually select or create the project each time.

I can create a server action or automation rule( not python code)

Avatar
Descartar
Mejor respuesta

Hi,


Step 1: Create a Project Template


Make sure you already have a project template called “Template A”:


    Go to Projects → Configuration → Project Templates


Step 2: Create a Server Action


Go to:

Settings → Technical → Automation → Automated Actions (Rules)


Click Create and set:


Model = Sales Order (sale.order)


Trigger = On create and edit


Apply on = Domain (state = 'sale')

Action to do = Add an action :-

Type : Duplicate record

Record to create : Project

Duplicate from : Template A

Link field : Project (Sale order)


Now, whenever you confirm a sale order, a project copy from template A will be created and they will be connected.


Hope it helps

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jun 25
2396
1
dic 24
1501
1
oct 25
635
2
mar 25
2495
0
jun 24
2012