This question has been flagged
3 Replies
4023 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