Skip to Content
Menú
This question has been flagged
1 Respondre
81 Vistes

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
Best Answer

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
Related Posts Respostes Vistes Activitat
2
de juny 25
2396
1
de des. 24
1501
1
d’oct. 25
635
2
de març 25
2495
0
de juny 24
2012