Skip to Content
Menu
This question has been flagged
2 Replies
6373 Views

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

Avatar
Discard
Best Answer

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


Avatar
Discard
Author

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

Author

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.

Best Answer

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


Avatar
Discard
Related Posts Replies Views Activity
3
Nov 23
1790
3
Dec 21
7963
0
Nov 19
37
3
Oct 19
3353
1
Aug 19
5039