注意这个地方一定要在模型里有一个states的字段
xxxxxxxxxx
1
<record id="view_base_module_import" model="ir.ui.view">
2
<field name="name">base.import.module.form</field>
3
<field name="model">base.import.module</field>
4
<field name="arch" type="xml">
5
<form string="Import module">
6
<field name="state" invisible="1"/>
7
<separator string="Import Module" colspan="4"/>
8
<group states="init" col="4">
9
<label string="Select module package to import (.zip file):" colspan="4"/>
10
<field name="module_file" colspan="4"/>
11
<field name="force"/>
12
</group>
13
<group states="done" col="4">
14
<field name="import_message" colspan="4" nolabel="1" readonly="1"/>
15
</group>
16
<footer>
17
<div states="init">
18
<button name="import_module" string="Import App" type="object" class="btn-primary"/>
19
<button special="cancel" string="Cancel" class="btn-default"/>
20
</div>
21
<div states="done">
22
<button name="action_module_open" string="Open Modules" type="object" class="btn-primary"/>
23
<button special="cancel" string="Close" class="btn-default"/>
24
</div>
25
</footer>
26
</form>
27
</field>
28
</record>
已复制