Skip to Content
Menu
This question has been flagged
3 Replies
4308 Views

I have tried widget.model == 'report.pos.order' but not worked 

I want these in odoo 10

Avatar
Discard
Best Answer

Try this: 

widget.model == 'report.pos.order'

Avatar
Discard
Best Answer

Have you tried using the code below?

widget.modelName == 'report.pos.order'
Avatar
Discard
Best Answer

Hi, try also depending on where you are:

  1. this.value.model

  2. this.state.model

If it doesn't help,

  1. add a few loggers, like console.log(this), console.log(widget)

  2. Press F12 --> choose console --> reload page

  3. You would see a js object with all available attributes. One of those would definitely have model or res_model


Avatar
Discard
Related Posts Replies Views Activity
2
Nov 24
25060
2
May 24
5510
3
Mar 24
4960
0
Mar 24
261
3
Feb 24
11413