Skip to content

Commit 6182871

Browse files
victoralmaups-tubtim
authored andcommitted
[IMP] stock_request + stock_request_submit: Change the approach to Confirm and Submit buttons
Related to OCA#1514 (comment)
1 parent 00f9bc6 commit 6182871

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

stock_request_submit/views/stock_request_order_views.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@
77
<field name="model">stock.request.order</field>
88
<field name="inherit_id" ref="stock_request.stock_request_order_form" />
99
<field name="arch" type="xml">
10-
<button name="action_confirm" position="after">
10+
<button name="action_confirm" position="attributes">
11+
<attribute name="name">action_submit</attribute>
12+
<attribute
13+
name="attrs"
14+
>{'invisible': [('state', '!=', 'draft')]}</attribute>
15+
</button>
16+
<button name="action_submit" position="after">
1117
<button
12-
name="action_submit"
18+
name="action_confirm"
1319
string="Submit"
1420
type="object"
15-
attrs="{'invisible': [('state', '!=', 'draft')]}"
21+
attrs="{'invisible': [('state', '!=', 'submitted')]}"
22+
groups="stock_request.group_stock_request_manager"
1623
/>
1724
</button>
18-
<button name="action_confirm" position="attributes">
19-
<attribute
20-
name="attrs"
21-
>{'invisible': [('state', '!=', 'submitted')]}</attribute>
22-
</button>
2325
<button name="action_draft" position="attributes">
2426
<attribute name="states">submitted,cancel</attribute>
2527
</button>

0 commit comments

Comments
 (0)