0

i have case about odoo, i was trying to give a condition for create in tree using attr. But, always not working. and here my code before i give a condition :

<tree string="Data" create="1" delete="1" edit="1" editable="bottom" >

i was trying add

attrs="{create:{'invisible': [('state', 'in', ('close', 'newer'))]}}"

But, that's not working.

Scarlett stone
  • 225
  • 1
  • 15

1 Answers1

0

Try with attrs="{'readonly': [('state', 'in', ['close', 'newer'])]}}". This only works if it is a one2many field

ChesuCR
  • 9,352
  • 5
  • 51
  • 114