Files
stock-rma/rma/wizards/rma_add_stock_move_view.xml
2022-02-10 13:37:18 +01:00

164 lines
6.6 KiB
XML

<?xml version="1.0" ?>
<odoo>
<record id="view_rma_add_stock_move_customer" model="ir.ui.view">
<field name="name">rma.add.stock.move.customer</field>
<field name="model">rma_add_stock_move</field>
<field name="arch" type="xml">
<form string="Select Move">
<group>
<field name="partner_id" string="Customer" />
</group>
<separator string="Select Stock Moves to add" />
<field name="move_ids">
<tree>
<field name="product_id" />
<field name="product_uom_qty" />
<field
name="product_uom"
string="Unit of Measure"
groups="uom.group_uom"
/>
<field name="picking_id" />
<field
name="location_id"
groups="stock.group_stock_multi_locations"
/>
<field
name="location_dest_id"
groups="stock.group_stock_multi_locations"
/>
<field name="create_date" groups="base.group_no_one" />
<field name="date" string="Date" groups="base.group_no_one" />
<field name="state" />
</tree>
</field>
<field name="show_lot_filter" invisible="1" />
<field name="lot_domain_ids" widget="many2many_tags" invisible="1" />
<div
class="oe_grey"
attrs="{'invisible': [('show_lot_filter', '=', False)]}"
>
The creation of the RMA Lines will be separated according to the lots or serials selected
</div>
<div class="o_row">
<label
for="lot_ids"
attrs="{'invisible': [('show_lot_filter', '=', False)]}"
string="Selected Lot/Serial Numbers"
/>
<field
name="lot_ids"
widget="many2many_tags"
domain="[('id', 'in', lot_domain_ids)]"
attrs="{'invisible': [('show_lot_filter', '=', False)]}"
options="{'no_create': True}"
/>
<button
name="select_all"
type="object"
string="Select all"
class="oe_inline"
attrs="{'invisible': [('show_lot_filter', '=', False)]}"
/>
</div>
<footer>
<button
string="Confirm"
name="add_lines"
type="object"
class="oe_highlight"
/>
or
<button
name="action_cancel"
string="Cancel"
class="oe_link"
special="cancel"
/>
</footer>
</form>
</field>
</record>
<record id="action_rma_add_stock_move_customer" model="ir.actions.act_window">
<field name="name">Add from Stock Move</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">rma_add_stock_move</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="view_rma_add_stock_move_customer" />
<field name="groups_id" eval="[(4, ref('rma.group_rma_customer_user'))]" />
</record>
<record id="view_rma_add_stock_move_customer_form" model="ir.ui.view">
<field name="name">rma.order.form - stock.move wizard</field>
<field name="model">rma.order</field>
<field name="inherit_id" ref="rma.view_rma_form" />
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button
name="%(action_rma_add_stock_move_customer)d"
string="Add From Stock Move"
type="action"
/>
</xpath>
</field>
</record>
<record id="view_rma_add_stock_move_supplier" model="ir.ui.view">
<field name="name">rma.add.stock.move.supplier</field>
<field name="model">rma_add_stock_move</field>
<field name="arch" type="xml">
<form string="Select Move">
<group>
<field name="partner_id" string="Supplier" />
</group>
<separator string="Select Stock Moves to add" />
<field name="move_ids" />
<footer>
<button
string="Confirm"
name="add_lines"
type="object"
class="oe_highlight"
/>
or
<button
name="action_cancel"
string="Cancel"
class="oe_link"
special="cancel"
/>
</footer>
</form>
</field>
</record>
<record id="action_rma_add_stock_move_supplier" model="ir.actions.act_window">
<field name="name">Add from Stock Move</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">rma_add_stock_move</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="view_rma_add_stock_move_supplier" />
<field name="groups_id" eval="[(4, ref('rma.group_rma_supplier_user'))]" />
</record>
<record id="view_rma_add_stock_move_button_supplier_form" model="ir.ui.view">
<field name="name">rma.order.supplier.form - stock.move wizard</field>
<field name="model">rma.order</field>
<field name="inherit_id" ref="rma.view_rma_supplier_form" />
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button
name="%(action_rma_add_stock_move_supplier)d"
string="Add From Stock Move"
type="action"
/>
</xpath>
</field>
</record>
</odoo>