콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
832 화면

i want to create an automation in which the customer will automatically added to the specific group when the subscription status is in progress

아바타
취소
베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
2
8월 25
488
2
8월 25
1500
0
2월 25
1613
1
8월 25
2222
2
12월 24
1875