forked from OCA/sale-workflow
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsale_order_view.xml
More file actions
45 lines (45 loc) · 2.02 KB
/
sale_order_view.xml
File metadata and controls
45 lines (45 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8" ?>
<!-- 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>
<field name="inherit_id" ref="sale.view_sales_order_filter" />
<field name="arch" type="xml">
<filter name="my_sale_orders_filter" position="after">
<filter
name="needs_review"
string="Needs my Review"
domain="[('reviewer_ids','in',uid), ('state', 'not in', ['done', 'cancel','to approve'])]"
help="My Sales to review"
/>
<filter
name="tier_validated"
string="Validated"
domain="[('validated', '=', True)]"
help="SOs validated and ready to be confirmed"
/>
</filter>
</field>
</record>
</odoo>