mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-24 07:02:07 +00:00
91 lines
3.3 KiB
XML
91 lines
3.3 KiB
XML
<?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"
|
|
/>
|
|
</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>
|