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

Hi All,

In my case kanban view's having default four stage. i made extra custom column(stage) name is Estimation when i drag & drop the record from default column into the Estimation Column so that time i need to show the Wizard. how to do this. if you know this please let me know. 

See the below Code

.xml file

<record model="crm.stage" id="stage_lead5">
    <field name="name">Estimation</field>
    <field name="probability">15</field>
    <field name="on_change">1</field>
    <field name="sequence">2</field>
</record>

Thanks in Advanced

아바타
취소
베스트 답변

Hi Kiran,

I assume that you are saying about CRM record stage change,

So there is a model (crm.stage) which contains different stages for lead/opportunity and this model is linked with lead/opportunity (crm.lead) as Many2one field (stage_id field).

So when you change the stage, actually it will change the many2one record. So for that you can write onchange method of stage_id and check that if stage is "Estimation" and if true then return wizard.

Let's  see how it will look like:

@api.onchange('stage_id')
def _onchange_stage_id(self):
    if self.stage_id and self.stage_id.name == 'Estimation':
        # do your code            

Hope it will work for you.

Thanks and regards

Haresh Kansara


아바타
취소
작성자

Hello @Haresh

i was try your code but i can't understand where and how return the wizard. if you know this then please explain me how to return the wizard code.

Thanks

작성자

Harsh, Actually what i'm trying to do, i need to call form of particular kanban at the time of moving from stage one to another stage.

베스트 답변

Hi​

It's not possible :(

above example will not work because  client will not handle action return by onchange.(client silently skip it and nothing happen)

as far as I remember onchange only return `domain` and `warning


아바타
취소
관련 게시물 답글 화면 활동
3
11월 23
3052
3
12월 21
9060
0
11월 19
37
3
10월 19
4582
1
8월 19
6320