Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
74 Widoki

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)

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
cze 25
2396
1
gru 24
1501
1
paź 25
635
2
mar 25
2495
0
cze 24
2012