i want to create an automation in which the customer will automatically added to the specific group when the subscription status is in progress
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi,
Steps:
1. Settings->Technical->Automation-> Automation rules
model: Sales order(Subscription model is also sale.order)
Tigger: State is set to Sales order (When a sale order is confirmed, the related subscription is considered to be in progress).
2. Add an action for the automation rule.
Hope it helps.
Go to: Settings > Technical > Automation > Automated Actions
Create a new automation Action
- Model: Subscription
- Trigger: On Update
- Trigger Fields: state
- Filter: State = 'in_progress'
- Action To Do: Execute Python Code
- python code
group = env.ref('base.group_user')
partner = record.partner_id
user = partner.user_ids and partner.user_ids[0]
if user and group not in user.groups_id:
user.groups_id += group
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
sie 25
|
106 | ||
|
2
sie 25
|
1246 | ||
|
0
lut 25
|
1424 | ||
|
1
sty 25
|
1956 | ||
|
2
gru 24
|
1633 |