[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:
Florian da Costa
2022-07-01 13:53:14 +02:00
committed by JasminSForgeFlow
parent 7404985dbb
commit 295f561b06
2 changed files with 17 additions and 7 deletions

View File

@@ -213,12 +213,18 @@
<notebook>
<page name="quantities" string="Quantities">
<group name="quantities" col="4" string="Quantities">
<group name="receive">
<group
name="receive"
attrs="{'invisible': [('receipt_policy', '=', 'no')]}"
>
<field name="qty_to_receive" />
<field name="qty_incoming" />
<field name="qty_received" />
</group>
<group name="deliver">
<group
name="deliver"
attrs="{'invisible': [('delivery_policy', '=', 'no')]}"
>
<field name="qty_to_deliver" />
<field name="qty_outgoing" />
<field name="qty_delivered" />
@@ -274,7 +280,11 @@
/>
</group>
</page>
<page name="stock" string="Stock Moves">
<page
name="stock"
string="Stock Moves"
attrs="{'invisible': [('move_ids', '=', [])]}"
>
<field name="move_ids" nolabel="1" readonly="1" />
</page>
<page name="other" string="Other Info">

View File

@@ -108,26 +108,26 @@
name="%(action_rma_picking_in)d"
string="Create Incoming Shipment"
class="oe_highlight"
attrs="{'invisible':['|', ('qty_to_receive', '=', 0), ('state', '!=', 'approved')]}"
attrs="{'invisible':['|', '|', ('qty_to_receive', '=', 0), ('state', '!=', 'approved'), ('receipt_policy', '=', 'no')]}"
type="action"
/>
<button
name="%(action_rma_picking_in)d"
string="Create Incoming Shipment"
attrs="{'invisible':['|', ('qty_to_receive', '!=', 0), ('state', '!=', 'approved')]}"
attrs="{'invisible':['|', '|', ('qty_to_receive', '!=', 0), ('state', '!=', 'approved'), ('receipt_policy', '=', 'no')]}"
type="action"
/>
<button
name="%(action_rma_picking_out)d"
string="Create Delivery"
class="oe_highlight"
attrs="{'invisible':['|', ('qty_to_deliver', '=', 0), ('state', '!=', 'approved')]}"
attrs="{'invisible':['|', '|', ('qty_to_deliver', '=', 0), ('state', '!=', 'approved'), ('delivery_policy', '=', 'no')]}"
type="action"
/>
<button
name="%(action_rma_picking_out)d"
string="Create Delivery"
attrs="{'invisible':['|', ('qty_to_deliver', '!=', 0), ('state', '!=', 'approved')]}"
attrs="{'invisible':['|', '|', ('qty_to_deliver', '!=', 0), ('state', '!=', 'approved'), ('delivery_policy', '=', 'no')]}"
type="action"
/>
</header>