Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sale_tier_validation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Known issues / Roadmap
- The sales order, when moved to the state sent, will still send the
email even if the validation is not approved by the corresponding
tier. Code to consider this particular case is not developed.
- If any module modifies the attrs of the confirm sales order button,
it will invalidate the expected behavior.

Bug Tracker
===========
Expand Down
2 changes: 2 additions & 0 deletions sale_tier_validation/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- The sales order, when moved to the state sent, will still send the
email even if the validation is not approved by the corresponding
tier. Code to consider this particular case is not developed.
- If any module modifies the attrs of the confirm sales order button,
it will invalidate the expected behavior.
2 changes: 2 additions & 0 deletions sale_tier_validation/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ <h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
<li>The sales order, when moved to the state sent, will still send the
email even if the validation is not approved by the corresponding
tier. Code to consider this particular case is not developed.</li>
<li>If any module modifies the attrs of the confirm sales order button,
it will invalidate the expected behavior.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
Expand Down
19 changes: 19 additions & 0 deletions sale_tier_validation/views/sale_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
<!-- Copyright 2019 Open Source Integrators
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_order_form" model="ir.ui.view">
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//button[@name='action_confirm'][1]" position="attributes">
<attribute
name="attrs"
>{'invisible':['|', ('validation_status', 'in', ('pending', 'rejected')),('state', '!=', 'sent')]}</attribute>
</xpath>
<xpath expr="//button[@name='action_confirm'][2]" position="attributes">
<attribute
name="attrs"
>{'invisible':['|', ('validation_status', 'in', ('pending', 'rejected')),('state', '!=', 'draft')]}</attribute>
</xpath>
<field name="state" position="after">
<field name="validation_status" invisible="1" />
</field>
</field>
</record>
<record id="view_sale_order_filter" model="ir.ui.view">
<field name="name">sale.order.select - sale_tier_validation</field>
<field name="model">sale.order</field>
Expand Down