@@ -76,34 +76,29 @@ class BiSQLViewField(models.Model):
76
76
help = "Check this box if you want to create"
77
77
" an index on that field. This is recommended for searchable and"
78
78
" groupable fields, to reduce duration" ,
79
- states = {"model_valid" : [("readonly" , True )], "ui_valid" : [("readonly" , True )]},
80
79
)
81
80
82
81
is_group_by = fields .Boolean (
83
82
string = "Is Group by" ,
84
83
help = "Check this box if you want to create"
85
84
" a 'group by' option in the search view" ,
86
- states = {"ui_valid" : [("readonly" , True )]},
87
85
)
88
86
89
87
index_name = fields .Char (compute = "_compute_index_name" )
90
88
91
89
graph_type = fields .Selection (
92
90
selection = _GRAPH_TYPE_SELECTION ,
93
- states = {"ui_valid" : [("readonly" , True )]},
94
91
)
95
92
96
93
tree_visibility = fields .Selection (
97
94
selection = _TREE_VISIBILITY_SELECTION ,
98
95
default = "available" ,
99
96
required = True ,
100
- states = {"ui_valid" : [("readonly" , True )]},
101
97
)
102
98
103
99
field_description = fields .Char (
104
100
help = "This will be used as the name of the Odoo field, displayed for users" ,
105
101
required = True ,
106
- states = {"model_valid" : [("readonly" , True )], "ui_valid" : [("readonly" , True )]},
107
102
)
108
103
109
104
ttype = fields .Selection (
@@ -113,7 +108,6 @@ class BiSQLViewField(models.Model):
113
108
" Odoo field that will be created. Keep empty if you don't want to"
114
109
" create a new field. If empty, this field will not be displayed"
115
110
" neither available for search or group by function" ,
116
- states = {"model_valid" : [("readonly" , True )], "ui_valid" : [("readonly" , True )]},
117
111
)
118
112
119
113
selection = fields .Text (
@@ -123,28 +117,24 @@ class BiSQLViewField(models.Model):
123
117
" List of options, specified as a Python expression defining a list of"
124
118
" (key, label) pairs. For example:"
125
119
" [('blue','Blue'), ('yellow','Yellow')]" ,
126
- states = {"model_valid" : [("readonly" , True )], "ui_valid" : [("readonly" , True )]},
127
120
)
128
121
129
122
many2one_model_id = fields .Many2one (
130
123
comodel_name = "ir.model" ,
131
124
string = "Model" ,
132
125
help = "For 'Many2one' Odoo field.\n " " Comodel of the field." ,
133
- states = {"model_valid" : [("readonly" , True )], "ui_valid" : [("readonly" , True )]},
134
126
)
135
127
136
128
group_operator = fields .Selection (
137
129
selection = _GROUP_OPERATOR_SELECTION ,
138
130
help = "By default, Odoo will sum the values when grouping. If you wish "
139
131
"to alter the behaviour, choose an alternate Group Operator" ,
140
- states = {"model_valid" : [("readonly" , True )], "ui_valid" : [("readonly" , True )]},
141
132
)
142
133
143
134
field_context = fields .Char (
144
135
default = "{}" ,
145
136
help = "Context value that will be inserted for this field in all the views."
146
137
" Important note : please write a context with single quote." ,
147
- states = {"ui_valid" : [("readonly" , True )]},
148
138
)
149
139
150
140
# Constrains Section
@@ -255,7 +245,7 @@ def _prepare_tree_field(self):
255
245
return ""
256
246
visibility_text = ""
257
247
if self .tree_visibility == "invisible" :
258
- visibility_text = 'invisible ="1"'
248
+ visibility_text = 'column_invisible ="1"'
259
249
elif self .tree_visibility == "optional_hide" :
260
250
visibility_text = 'optional="hide"'
261
251
elif self .tree_visibility == "optional_show" :
0 commit comments