mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[IMP] Make rma order view cleaner for user
Hide button and fields depending on the policy chosen on the rma line
This commit is contained in:
committed by
AaronHForgeFlow
parent
f4a7817dbe
commit
eca8bea60a
@@ -60,7 +60,11 @@
|
||||
<field name="refund_policy" />
|
||||
</field>
|
||||
<page name="stock" position="after">
|
||||
<page name="refunds" string="Refunds">
|
||||
<page
|
||||
name="refunds"
|
||||
string="Refunds"
|
||||
attrs="{'invisible': [('refund_line_ids', '=', [])]}"
|
||||
>
|
||||
<field name="refund_line_ids" nolabel="1" />
|
||||
</page>
|
||||
</page>
|
||||
@@ -71,7 +75,10 @@
|
||||
/>
|
||||
</field>
|
||||
<group name="supplier_rma" position="after">
|
||||
<group name="refund">
|
||||
<group
|
||||
name="refund"
|
||||
attrs="{'invisible': [('refund_policy', '=', 'no')]}"
|
||||
>
|
||||
<field name="qty_to_refund" />
|
||||
<field name="qty_refunded" />
|
||||
</group>
|
||||
|
||||
@@ -59,13 +59,13 @@
|
||||
name="%(action_rma_refund)d"
|
||||
string="Create Refund"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_refund', '=', 0), ('state', '!=', 'approved')]}"
|
||||
attrs="{'invisible':['|', '|', ('qty_to_refund', '=', 0), ('state', '!=', 'approved'), ('refund_policy', '=', 'no')]}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_refund)d"
|
||||
string="Create Refund"
|
||||
attrs="{'invisible':['|', ('qty_to_refund', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
attrs="{'invisible':['|', '|', ('qty_to_refund', '!=', 0), ('state', '!=', 'approved'), ('refund_policy', '=', 'no')]}"
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user