File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class OpenSPPAreaImport(models.Model):
7878 )
7979
8080 locked = fields .Boolean (default = False )
81- locked_reason = fields .Char (readonly = True )
81+ locked_reason = fields .Text (readonly = True )
8282
8383 @api .onchange ("excel_file" )
8484 def excel_file_change (self ):
Original file line number Diff line number Diff line change 88 <field name =" arch" type =" xml" >
99 <form string =" Area Import" >
1010 <field name =" locked" invisible =" True" />
11- <header invisible = " locked " >
11+ <header >
1212 <button
1313 name =" parse_excel_to_json"
1414 type =" object"
1515 string =" Process"
1616 class =" btn-primary"
17- invisible =" state != 'Uploaded'"
17+ invisible =" state != 'Uploaded' or locked"
18+ />
19+ <button
20+ name =" import_data"
21+ type =" object"
22+ string =" Import"
23+ class =" btn-primary"
24+ invisible =" state != 'Parsed'"
1825 />
1926 <button
2027 name =" import_data"
2835 type =" object"
2936 string =" Save to Area"
3037 class =" btn-success"
31- invisible =" state != 'Validated'"
38+ invisible =" state != 'Validated' or locked "
3239 />
3340 <button
3441 name =" validate_raw_data"
3542 type =" object"
3643 string =" Validate Data"
3744 class =" btn-success"
38- invisible =" state != 'Imported'"
45+ invisible =" state != 'Imported' or locked "
3946 />
4047 <button
4148 name =" cancel_import"
4249 type =" object"
4350 string =" Cancel and Re-import"
4451 class =" btn-danger"
45- invisible =" state not in ('Uploaded', 'Imported', 'Validated')"
52+ invisible =" state not in ('Uploaded', 'Imported', 'Validated') or locked "
4653 />
4754 <field
4855 name =" state"
You can’t perform that action at this time.
0 commit comments