2018-01-17 08:28:52 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<flectra>
|
|
|
|
<record id="view_rma_request_tree" model="ir.ui.view">
|
|
|
|
<field name="name">rma.request.tree</field>
|
|
|
|
<field name="model">rma.request</field>
|
|
|
|
<field name="type">tree</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree>
|
|
|
|
<field name="name"/>
|
|
|
|
<field name="sale_order_id"/>
|
|
|
|
<field name="partner_id"/>
|
|
|
|
<field name="type"/>
|
|
|
|
<field name="team_id"/>
|
|
|
|
<field name="state"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="view_rma_request_form" model="ir.ui.view">
|
|
|
|
<field name="name">rma.request.form</field>
|
|
|
|
<field name="model">rma.request</field>
|
|
|
|
<field name="type">form</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Requests for RMA">
|
|
|
|
<header>
|
|
|
|
<button name="action_notify_warranty"
|
|
|
|
string="Send By Email"
|
2018-03-05 08:31:06 +01:00
|
|
|
type="object" class="oe_highlight"
|
|
|
|
groups="stock.group_stock_manager"
|
|
|
|
attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<button name="%(stock.act_stock_return_picking)d"
|
2018-03-05 08:31:06 +01:00
|
|
|
string="Create RMA"
|
2018-01-17 08:28:52 +01:00
|
|
|
type="action" class="btn-primary"
|
2018-03-05 08:31:06 +01:00
|
|
|
attrs="{'invisible': ['|', ('state', 'in', ['draft', 'rma_created', 'replacement_created']), ('is_website', '=', True)]}"
|
2018-01-17 08:28:52 +01:00
|
|
|
context="{'rma': True}"
|
|
|
|
groups="stock.group_stock_manager"/>
|
|
|
|
<button name="action_confirm_request"
|
|
|
|
string="Confirm"
|
|
|
|
type="object" class="oe_highlight"
|
2018-03-05 08:31:06 +01:00
|
|
|
attrs="{'invisible': [('state', 'in', ['confirmed', 'rma_created', 'replacement_created'])]}"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<field name="state" widget="statusbar"/>
|
|
|
|
</header>
|
|
|
|
<sheet>
|
|
|
|
<div class="oe_button_box" name="button_box">
|
|
|
|
<button type="object"
|
|
|
|
name="action_create_delivery"
|
|
|
|
class="oe_stat_button"
|
|
|
|
icon="fa-truck"
|
|
|
|
attrs="{'invisible': [('state', 'in', ['draft', 'confirmed'])]}">
|
|
|
|
<field name="picking_count"
|
|
|
|
widget="statinfo"
|
|
|
|
string="Delivery"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="oe_title">
|
|
|
|
<h1>
|
|
|
|
<field name="name" readonly="1"
|
|
|
|
attrs="{'invisible': [('state', '=', 'draft')]}"
|
|
|
|
nolabel="1"/>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="sale_order_id" required="1"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
|
|
|
options="{'no_create': True}"
|
|
|
|
/>
|
|
|
|
<field name="partner_id" required="1"
|
|
|
|
options="{'no_create': True}"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
|
|
|
/>
|
2018-03-05 08:31:06 +01:00
|
|
|
<field name="is_website" invisible="1"/>
|
|
|
|
<field name="picking_id"
|
2018-01-17 08:28:52 +01:00
|
|
|
options="{'no_create': True}"
|
|
|
|
domain="[('sale_id', '=', sale_order_id),
|
|
|
|
('state', '=', 'done'), ('picking_type_code', '=', 'outgoing')]"
|
2018-03-05 08:31:06 +01:00
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')], 'required': [('is_website', '=', False)],
|
|
|
|
'invisible': [('is_website', '=', True)]}"/>
|
|
|
|
<field name="is_replacement" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<field name="user_id" invisible="1"/>
|
|
|
|
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="date" required="1"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
|
|
|
<field name="team_id" required="1"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
|
|
|
options="{'no_create': True}"/>
|
|
|
|
<field name="type" required="1"
|
2018-03-05 08:31:06 +01:00
|
|
|
attrs="{'readonly': ['|', ('state', '!=', 'draft'), ('is_website', '=', True)]}"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<notebook>
|
|
|
|
<page string="RMA Lines">
|
|
|
|
<field name="rma_line"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}">
|
|
|
|
<tree editable="bottom" create="false">
|
|
|
|
<field name="product_id" readonly="1"
|
|
|
|
force_save="1"/>
|
|
|
|
<field name="uom_id" readonly="1"
|
|
|
|
force_save="1"/>
|
|
|
|
<field name="qty_delivered" readonly="1"
|
|
|
|
force_save="1"/>
|
2018-03-05 08:31:06 +01:00
|
|
|
<field name="qty_return" required="1"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<field name="reason_id" required="1"
|
|
|
|
options="{'no_create': True}"/>
|
|
|
|
<field name="remark"/>
|
|
|
|
<field name="rma_id" invisible="1"/>
|
|
|
|
<field name="move_line_id" invisible="1"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
<page string="Warranty Expire Lines">
|
|
|
|
<field name="warranty_expire_line"
|
|
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
</sheet>
|
|
|
|
<div class="oe_chatter">
|
2018-03-05 08:31:06 +01:00
|
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<field name="activity_ids" widget="mail_activity"/>
|
|
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="view_rma_request_filter" model="ir.ui.view">
|
|
|
|
<field name="name">rma.request.search.view</field>
|
|
|
|
<field name="model">rma.request</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Search RMA Request">
|
|
|
|
<field name="name" string="RMA Request"
|
|
|
|
filter_domain="[('name','ilike',self)]"/>
|
|
|
|
<field name="partner_id" operator="child_of"/>
|
|
|
|
<field name="user_id"/>
|
|
|
|
<field name="state"/>
|
|
|
|
<field name="team_id" string="Sales Channel"/>
|
|
|
|
<filter string="My Requests"
|
|
|
|
domain="[('user_id','=',uid)]"
|
|
|
|
name="my_rma_request_filter"/>
|
2018-03-05 08:31:06 +01:00
|
|
|
<filter string="RMA Created"
|
|
|
|
domain="[('state','=','rma_created')]"
|
2018-01-17 08:28:52 +01:00
|
|
|
name="rma_request_state_filter"/>
|
2018-03-05 08:31:06 +01:00
|
|
|
<filter string="Replacements"
|
|
|
|
domain="[('is_replacement', '=', True)]"
|
|
|
|
name="replacement_filter"/>
|
|
|
|
<filter string="Returns"
|
|
|
|
domain="[('is_replacement', '=', False)]"
|
|
|
|
name="return_filter"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<separator/>
|
|
|
|
<group expand="1" string="Group By">
|
|
|
|
<filter string="Partner" name="Partner"
|
|
|
|
context="{'group_by':'partner_id'}"/>
|
|
|
|
<filter string="Sale Order"
|
|
|
|
context="{'group_by':'sale_order_id'}"/>
|
|
|
|
<filter string="State"
|
|
|
|
context="{'group_by':'state'}"/>
|
2018-03-05 08:31:06 +01:00
|
|
|
<filter string="RMA Request type"
|
|
|
|
context="{'group_by':'type'}"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
<separator/>
|
|
|
|
<filter string="Request Month"
|
|
|
|
context="{'group_by':'date:month'}"/>
|
2018-03-05 08:31:06 +01:00
|
|
|
<filter string="Return/Replacement"
|
|
|
|
context="{'group_by':'is_replacement'}"/>
|
2018-01-17 08:28:52 +01:00
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.actions.act_window" id="act_open_rma_request_view">
|
|
|
|
<field name="name">RMA Request</field>
|
|
|
|
<field name="type">ir.actions.act_window</field>
|
|
|
|
<field name="res_model">rma.request</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="domain">[]</field>
|
|
|
|
<field name="context">{}</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.actions.act_window"
|
2018-03-05 08:31:06 +01:00
|
|
|
id="action_open_rma_request_rmateam">
|
2018-01-17 08:28:52 +01:00
|
|
|
<field name="name">RMA Request</field>
|
|
|
|
<field name="type">ir.actions.act_window</field>
|
|
|
|
<field name="res_model">rma.request</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="domain">[]</field>
|
|
|
|
<field name="context">{
|
|
|
|
'search_default_team_id': [active_id],
|
2018-03-05 08:31:06 +01:00
|
|
|
'search_default_return_filter': 1,
|
|
|
|
'default_team_id': active_id,
|
|
|
|
}
|
|
|
|
</field>
|
|
|
|
<field name="search_view_id" ref="view_rma_request_filter"/>
|
|
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window"
|
|
|
|
id="action_open_replacement_request_rmateam">
|
|
|
|
<field name="name">Replacement Request</field>
|
|
|
|
<field name="type">ir.actions.act_window</field>
|
|
|
|
<field name="res_model">rma.request</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="domain">[]</field>
|
|
|
|
<field name="context">{
|
|
|
|
'search_default_team_id': [active_id],
|
|
|
|
'search_default_replacement_filter': 1,
|
2018-01-17 08:28:52 +01:00
|
|
|
'default_team_id': active_id,
|
|
|
|
}
|
|
|
|
</field>
|
|
|
|
<field name="search_view_id" ref="view_rma_request_filter"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
</flectra>
|