server-ux/base_tier_validation/templates/tier_validation_templates.xml

92 lines
3.4 KiB
XML
Raw Normal View History

2021-03-23 19:15:27 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<flectra>
<template id="tier_validation_buttons">
<div>
<button
name="request_validation"
string="Request Validation"
t-attf-attrs="{'invisible': ['|','|',('need_validation', '!=', True),('rejected','=',True),('#{state_field}', 'not in', [#{state_from}])]}"
type="object"
/>
<button
name="restart_validation"
string="Restart Validation"
t-attf-attrs="{'invisible': ['|',('review_ids', '=', []),('#{state_field}', 'not in', [#{state_from}])]}"
type="object"
/>
</div>
</template>
<template id="tier_validation_label">
<div>
<field name="need_validation" invisible="1" />
<field name="validated" invisible="1" />
<field name="rejected" invisible="1" />
<div
class="alert alert-warning"
role="alert"
t-attf-attrs="{'invisible': ['|', '|', '|',
('validated', '=', True), ('#{state_field}', 'not in', [#{state_from}]),
('rejected', '=', True), ('review_ids', '=', [])]}"
style="margin-bottom:0px;"
>
<p>
<i class="fa fa-info-circle" />
This Record needs to be
validated.
<field name="can_review" invisible="1" />
<button
name="validate_tier"
string="Validate"
t-attf-attrs="{'invisible': [('can_review', '=', False)]}"
type="object"
class="oe_inline oe_button btn-success"
icon="fa-thumbs-up"
/>
<button
name="reject_tier"
string="Reject"
t-attf-attrs="{'invisible': [('can_review', '=', False)]}"
type="object"
class="btn-icon btn-danger"
icon="fa-thumbs-down"
/>
2021-11-14 03:13:16 +00:00
<br /><field name="next_review" />
2021-03-23 19:15:27 +00:00
</p>
</div>
<div
class="alert alert-success"
role="alert"
t-attf-attrs="{'invisible': ['|', '|', ('validated', '!=', True), ('#{state_field}', 'not in', [#{state_from}]), ('review_ids', '=', [])]}"
style="margin-bottom:0px;"
>
<p>
<i class="fa fa-thumbs-up" />
Operation has been
<b>validated</b>
!
</p>
</div>
<div
class="alert alert-danger"
role="alert"
t-attf-attrs="{'invisible': ['|', '|', ('rejected', '!=', True), ('#{state_field}', 'not in', [#{state_from}]), ('review_ids', '=', [])]}"
style="margin-bottom:0px;"
>
<p>
<i class="fa fa-thumbs-down" />
Operation has been
<b>rejected</b>
.
</p>
</div>
</div>
</template>
<template id="tier_validation_reviews">
<field
name="review_ids"
widget="tier_validation"
attrs="{'invisible':[('review_ids', '=', [])]}"
/>
</template>
</flectra>