Delete string at view level and add to ir.model.button.
Add icon attribute to cls._buttons on model.
This commit is contained in:
parent
4de906bfa1
commit
feab60f287
|
@ -374,6 +374,7 @@ class QualityTest(Workflow, ModelSQL, ModelView):
|
|||
},
|
||||
'draft': {
|
||||
'invisible': (Eval('state') == 'draft'),
|
||||
'icon': 'tryton-clear',
|
||||
},
|
||||
'apply_templates': {
|
||||
'readonly': (
|
||||
|
|
|
@ -534,6 +534,7 @@
|
|||
<!-- Button -->
|
||||
<record model="ir.model.button" id="quality_draft_button">
|
||||
<field name="name">draft</field>
|
||||
<field name="string">Reset to Draft</field>
|
||||
<field name="model" search="[('model', '=', 'quality.test')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
|
@ -544,6 +545,7 @@
|
|||
|
||||
<record model="ir.model.button" id="quality_confirm_button">
|
||||
<field name="name">confirmed</field>
|
||||
<field name="string">Confirm</field>
|
||||
<field name="model" search="[('model', '=', 'quality.test')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
|
@ -554,6 +556,7 @@
|
|||
|
||||
<record model="ir.model.button" id="quality_manager_validate_button">
|
||||
<field name="name">manager_validate</field>
|
||||
<field name="string">Validate</field>
|
||||
<field name="model" search="[('model', '=', 'quality.test')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
|
@ -574,6 +577,8 @@
|
|||
|
||||
<record model="ir.model.button" id="quality_apply_templates_button">
|
||||
<field name="name">apply_templates</field>
|
||||
<field name="string">Apply Templates</field>
|
||||
<field name="confirm">Applying templates will remove any data already introduced in the test. Are you sure you want to apply templates?</field>
|
||||
<field name="model" search="[('model', '=', 'quality.test')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
|
|
|
@ -32,8 +32,7 @@ contains the full copyright notices and license terms. -->
|
|||
</page>
|
||||
<page string="Templates" id="templates">
|
||||
<field name="templates" colspan="4"/>
|
||||
<button string="Apply Templates" name="apply_templates" colspan="4"
|
||||
confirm="Applying templates will remove any data already introduced in the test. Are you sure you want to apply templates?"/>
|
||||
<button name="apply_templates" colspan="4"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="7" colspan="4" id="state">
|
||||
|
@ -44,9 +43,9 @@ contains the full copyright notices and license terms. -->
|
|||
<label name="success"/>
|
||||
<field name="success"/>
|
||||
<group col="3" id="buttons">
|
||||
<button name="confirmed" string="Confirm"/>
|
||||
<button name="manager_validate" string="Validate"/>
|
||||
<button string="Reset to Draft" name="draft" icon="tryton-clear"/>
|
||||
<button name="confirmed"/>
|
||||
<button name="manager_validate"/>
|
||||
<button name="draft"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue