Skip to content

Commit

Permalink
- add support for field 'can_review' to hide the approve/reject buttons
Browse files Browse the repository at this point in the history
- add possibility to restart the validation at any point in time during the
approval process.
  • Loading branch information
JordiBForgeFlow committed Jul 3, 2018
1 parent 2d8ed47 commit a3ce7a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion oca_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
server-tools
purchase-workflow
purchase-workflow
server-ux https://github.com/Eficent/server-ux 11.0-base_tier_validation-can_review
22 changes: 12 additions & 10 deletions purchase_tier_validation/views/purchase_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
type="object"/>
<button name="restart_validation"
string="Restart Validation"
attrs="{'invisible': ['|','|',('review_ids', '=', []),('rejected','=',False),('state','not in',['draft','sent'])]}"
attrs="{'invisible': ['|',('review_ids', '=', []),('state','not in',['draft','sent'])]}"
type="object"/>
</button>
<header position="after">
Expand All @@ -29,17 +29,19 @@
style="margin-bottom:0px;">
<p><i class="fa fa-info-circle"/>This PO needs to be
validated.
<field name="can_review" invisible="1"/>
<button name="validate_tier"
string="Validate"
attrs="{'invisible': [('review_ids', '=', [])]}"
type="object"
class="oe_inline oe_button btn-success"
icon="fa-thumbs-up"/>
string="Validate"
attrs="{'invisible': [('can_review', '=', False)]}"
type="object"
class="oe_inline oe_button btn-success"
icon="fa-thumbs-up"/>
<button name="reject_tier"
string="Reject"
type="object"
class="btn-icon btn-danger"
icon="fa-thumbs-down"/>
string="Reject"
attrs="{'invisible': [('can_review', '=', False)]}"
type="object"
class="btn-icon btn-danger"
icon="fa-thumbs-down"/>
</p>
</div>
<div class="alert alert-success"
Expand Down

0 comments on commit a3ce7a1

Please sign in to comment.