mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-21 04:12:09 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
188
odoo-bringout-oca-rma-rma/rma/views/dashboard.xml
Normal file
188
odoo-bringout-oca-rma-rma/rma/views/dashboard.xml
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2024 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record id="rma_operation_kanban" model="ir.ui.view">
|
||||
<field name="model">rma.operation</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban
|
||||
class="oe_background_grey o_kanban_dashboard o_emphasize_colors"
|
||||
create="0"
|
||||
group_create="false"
|
||||
>
|
||||
<field name="color" />
|
||||
<field name="count_rma_draft" />
|
||||
<field name="count_rma_awaiting_action" />
|
||||
<field name="count_rma_processed" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}"
|
||||
name="rma_operation"
|
||||
>
|
||||
<div t-attf-class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<div class="o_primary" t-if="!selection_mode">
|
||||
<a type="object" name="get_action_all_rma">
|
||||
<field name="name" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="o_primary" t-if="selection_mode">
|
||||
<field name="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="o_kanban_manage_button_section"
|
||||
t-if="!selection_mode"
|
||||
>
|
||||
<a class="o_kanban_manage_toggle_button" href="#"><i
|
||||
class="fa fa-ellipsis-v"
|
||||
role="img"
|
||||
aria-label="Manage"
|
||||
title="Manage"
|
||||
/></a>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="container o_kanban_card_content"
|
||||
t-if="!selection_mode"
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-9 o_kanban_primary_left">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
name="get_action_rma_tree_draft"
|
||||
type="object"
|
||||
>
|
||||
<span>Draft</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-3 o_kanban_primary_right">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
name="get_action_rma_tree_draft"
|
||||
type="object"
|
||||
>
|
||||
<span
|
||||
t-esc="record.count_rma_draft.value"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-9 o_kanban_primary_left">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
name="get_action_rma_tree_awaiting_action"
|
||||
type="object"
|
||||
>
|
||||
<span>Awaiting action</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-3 o_kanban_primary_right">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
name="get_action_rma_tree_awaiting_action"
|
||||
type="object"
|
||||
>
|
||||
<span
|
||||
t-esc="record.count_rma_awaiting_action.value"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-9 o_kanban_primary_left">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
name="get_action_rma_tree_processed"
|
||||
type="object"
|
||||
>
|
||||
<span>Processed</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-3 o_kanban_primary_right">
|
||||
<button
|
||||
class="btn btn-link"
|
||||
name="get_action_rma_tree_processed"
|
||||
type="object"
|
||||
>
|
||||
<span
|
||||
t-esc="record.count_rma_processed.value"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="container o_kanban_card_manage_pane dropdown-menu"
|
||||
role="menu"
|
||||
>
|
||||
<div class="row">
|
||||
<div
|
||||
class="col-6 o_kanban_card_manage_section o_kanban_manage_new"
|
||||
>
|
||||
<div
|
||||
role="menuitem"
|
||||
class="o_kanban_card_manage_title"
|
||||
>
|
||||
<span>New</span>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a
|
||||
name="%(action_rma_form)d"
|
||||
type="action"
|
||||
>RMA</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
t-if="widget.editable"
|
||||
class="o_kanban_card_manage_settings row"
|
||||
>
|
||||
<div
|
||||
class="col-8"
|
||||
role="menuitem"
|
||||
aria-haspopup="true"
|
||||
>
|
||||
<ul
|
||||
class="oe_kanban_colorpicker"
|
||||
data-field="color"
|
||||
role="menu"
|
||||
/>
|
||||
</div>
|
||||
<div role="menuitem" class="col-4">
|
||||
<a
|
||||
class="dropdown-item"
|
||||
role="menuitem"
|
||||
type="edit"
|
||||
>Configuration</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="rma_dashboard_action" model="ir.actions.act_window">
|
||||
<field name="name">RMA Overview</field>
|
||||
<field name="res_model">rma.operation</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_mode">kanban,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face"> Create a new RMA operation </p>
|
||||
<p>The RMA operation system allows you to configure each return operation
|
||||
with specific settings that will adjust its behavior.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="rma_dashboard_action"
|
||||
id="rma_dashboard_menu"
|
||||
parent="rma_menu"
|
||||
sequence="0"
|
||||
name="Overview"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
19
odoo-bringout-oca-rma-rma/rma/views/menus.xml
Normal file
19
odoo-bringout-oca-rma-rma/rma/views/menus.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<menuitem id="rma_menu" name="RMA" web_icon="rma,static/description/icon.png" />
|
||||
<menuitem id="rma_orders_menu" parent="rma_menu" name="Orders" sequence="10" />
|
||||
<menuitem
|
||||
id="rma_reporting_menu"
|
||||
parent="rma_menu"
|
||||
name="Reporting"
|
||||
sequence="20"
|
||||
/>
|
||||
<menuitem
|
||||
id="rma_configuration_menu"
|
||||
parent="rma_menu"
|
||||
name="Configuration"
|
||||
sequence="30"
|
||||
/>
|
||||
</odoo>
|
||||
142
odoo-bringout-oca-rma-rma/rma/views/report_rma.xml
Normal file
142
odoo-bringout-oca-rma-rma/rma/views/report_rma.xml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="report_rma_document">
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" />
|
||||
<t t-if="doc.partner_id">
|
||||
<t t-set="address">
|
||||
<div
|
||||
t-field="doc.partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
|
||||
/>
|
||||
<p t-if="doc.partner_id.vat">
|
||||
<t t-esc="doc.company_id.country_id.vat_label or 'Tax ID'" />
|
||||
:
|
||||
<span t-field="doc.partner_id.vat" />
|
||||
</p>
|
||||
</t>
|
||||
</t>
|
||||
<t
|
||||
t-if="doc.partner_shipping_id == doc.partner_invoice_id
|
||||
and doc.partner_invoice_id != doc.partner_id
|
||||
or doc.partner_shipping_id != doc.partner_invoice_id"
|
||||
>
|
||||
<t t-set="information_block">
|
||||
<strong
|
||||
t-if="doc.partner_shipping_id == doc.partner_invoice_id"
|
||||
>Invoicing and Shipping Address:</strong>
|
||||
<strong
|
||||
t-if="doc.partner_shipping_id != doc.partner_invoice_id"
|
||||
>Invoicing Address:</strong>
|
||||
<div
|
||||
t-field="doc.partner_invoice_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'
|
||||
/>
|
||||
<t t-if="doc.partner_shipping_id != doc.partner_invoice_id">
|
||||
<strong>Shipping Address:</strong>
|
||||
<div
|
||||
t-field="doc.partner_shipping_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'
|
||||
/>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
<div class="page">
|
||||
<h2 class="mt16">
|
||||
<span t-if="doc.state not in ['draft', 'cancelled']">RMA # </span>
|
||||
<span t-field="doc.name" />
|
||||
</h2>
|
||||
<div class="row mt32 mb32" id="general_information">
|
||||
<div t-if="doc.origin" class="col-auto mw-100 mb-2">
|
||||
<strong>Origin:</strong>
|
||||
<p class="m-0" t-field="doc.origin" />
|
||||
</div>
|
||||
<div class="col-auto mw-100 mb-2">
|
||||
<strong>Date:</strong>
|
||||
<p class="m-0" t-field="doc.date" />
|
||||
</div>
|
||||
<div t-if="doc.deadline" class="col-auto mw-100 mb-2">
|
||||
<strong>Deadline:</strong>
|
||||
<p class="m-0" t-field="doc.deadline" />
|
||||
</div>
|
||||
<div t-if="doc.user_id" class="col-auto mw-100 mb-2">
|
||||
<strong>Responsible:</strong>
|
||||
<p class="m-0" t-field="doc.user_id" />
|
||||
</div>
|
||||
<div class="col-auto mw-100 mb-2">
|
||||
<strong>State:</strong>
|
||||
<p class="m-0">
|
||||
<t t-if="doc.state in ['refunded', 'replaced', 'returned']">
|
||||
<span
|
||||
class="small text-success orders_label_text_align"
|
||||
>
|
||||
<i class="fa fa-fw fa-check" />
|
||||
<b>
|
||||
<span t-field="doc.state" />
|
||||
</b>
|
||||
</span>
|
||||
</t>
|
||||
<t t-elif="doc.state in ['cancelled', 'locked']">
|
||||
<span class="small text-danger orders_label_text_align">
|
||||
<i class="fa fa-fw fa-times" />
|
||||
<b>
|
||||
<span t-field="doc.state" />
|
||||
</b>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="small text-info orders_label_text_align">
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
<b>
|
||||
<span t-field="doc.state" />
|
||||
</b>
|
||||
</span>
|
||||
</t>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm o_main_table table-borderless mt-4">
|
||||
<tbody>
|
||||
<tr t-if="doc.picking_id" name="tr_picking">
|
||||
<td>Origin delivery</td>
|
||||
<td><span t-field="doc.picking_id" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Product</td>
|
||||
<td><span t-field="doc.product_id" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quantity</td>
|
||||
<td>
|
||||
<span t-field="doc.product_uom_qty" />
|
||||
<span t-field="doc.product_uom" groups="uom.group_uom" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-if="doc.delivered_qty">
|
||||
<td>Delivered Quantity</td>
|
||||
<td>
|
||||
<span t-field="doc.delivered_qty" />
|
||||
<span t-field="doc.product_uom" groups="uom.group_uom" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Requested operation</td>
|
||||
<td><span t-field="doc.operation_id" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div t-if="doc.description">
|
||||
<strong>RMA Note:</strong>
|
||||
<p t-out="doc.description" />
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
<template id="report_rma">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="rma.report_rma_document" t-lang="doc.partner_id.lang" />
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div
|
||||
class="app_settings_block"
|
||||
data-string="RMA"
|
||||
string="RMA"
|
||||
data-key="rma"
|
||||
groups="rma.rma_group_manager"
|
||||
>
|
||||
<h2>Return Merchandise Authorization Management</h2>
|
||||
<div
|
||||
class="row mt16 o_settings_container"
|
||||
name="operations_setting_container"
|
||||
>
|
||||
<div class="col-12 col-lg-6 o_setting_box" title="Finish RMAs manually">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_rma_manual_finalization" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="group_rma_manual_finalization"
|
||||
string="RMA Manual Finalization"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
When the RMA is receive, allow to finsish it manually choosing
|
||||
a finalization reason.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="rma_return_grouping" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="rma_return_grouping" />
|
||||
<span
|
||||
class="fa fa-lg fa-building-o"
|
||||
title="Values set here are company-specific."
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
Group RMA returns by customer and warehouse.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
title="Send automatic RMA info to customer"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="send_rma_confirmation" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="send_rma_confirmation"
|
||||
string="RMA Confirmation Email"
|
||||
/>
|
||||
<span
|
||||
class="fa fa-lg fa-building-o"
|
||||
title="Values set here are company-specific."
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
When the RMA is confirmed, send an automatic information email.
|
||||
</div>
|
||||
<div
|
||||
class="row mt16"
|
||||
attrs="{'invisible': [('send_rma_confirmation', '=', False)]}"
|
||||
>
|
||||
<label
|
||||
for="rma_mail_confirmation_template_id"
|
||||
string="Email Template"
|
||||
class="col-lg-4 o_light_label"
|
||||
/>
|
||||
<field
|
||||
name="rma_mail_confirmation_template_id"
|
||||
class="oe_inline"
|
||||
attrs="{'required': [('send_rma_confirmation', '=', True)]}"
|
||||
context="{'default_model': 'rma'}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
title="Send automatic RMA products reception notification to customer"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="send_rma_receipt_confirmation" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="send_rma_receipt_confirmation"
|
||||
string="RMA Receipt Confirmation Email"
|
||||
/>
|
||||
<span
|
||||
class="fa fa-lg fa-building-o"
|
||||
title="Values set here are company-specific."
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
When the RMA products are received, send an automatic information email.
|
||||
</div>
|
||||
<div
|
||||
class="row mt16"
|
||||
attrs="{'invisible': [('send_rma_receipt_confirmation', '=', False)]}"
|
||||
>
|
||||
<label
|
||||
for="rma_mail_receipt_confirmation_template_id"
|
||||
string="Email Template"
|
||||
class="col-lg-4 o_light_label"
|
||||
/>
|
||||
<field
|
||||
name="rma_mail_receipt_confirmation_template_id"
|
||||
class="oe_inline"
|
||||
attrs="{'required': [('send_rma_receipt_confirmation', '=', True)]}"
|
||||
context="{'default_model': 'rma'}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
title="Send automatic notification when the customer places an RMA"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="send_rma_draft_confirmation" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label
|
||||
for="send_rma_draft_confirmation"
|
||||
string="RMA draft notification Email"
|
||||
/>
|
||||
<span
|
||||
class="fa fa-lg fa-building-o"
|
||||
title="Values set here are company-specific."
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<div class="text-muted">
|
||||
When customers themselves place an RMA from the portal, send an automatic notification acknowleging it.
|
||||
</div>
|
||||
<div
|
||||
class="row mt16"
|
||||
attrs="{'invisible': [('send_rma_draft_confirmation', '=', False)]}"
|
||||
>
|
||||
<label
|
||||
for="rma_mail_draft_confirmation_template_id"
|
||||
string="Email Template"
|
||||
class="col-lg-4 o_light_label"
|
||||
/>
|
||||
<field
|
||||
name="rma_mail_draft_confirmation_template_id"
|
||||
class="oe_inline"
|
||||
attrs="{'required': [('send_rma_draft_confirmation', '=', True)]}"
|
||||
context="{'default_model': 'rma'}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_rma_config_settings" model="ir.actions.act_window">
|
||||
<field name="name">Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="context">{'module' : 'rma', 'bin_size': False}</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_rma_general_settings"
|
||||
name="Settings"
|
||||
parent="rma_configuration_menu"
|
||||
sequence="0"
|
||||
action="action_rma_config_settings"
|
||||
groups="base.group_system"
|
||||
/>
|
||||
</odoo>
|
||||
25
odoo-bringout-oca-rma-rma/rma/views/res_partner_views.xml
Normal file
25
odoo-bringout-oca-rma-rma/rma/views/res_partner_views.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
Copyright 2023 Tecnativa - Pedro M. Baeza
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box">
|
||||
<button
|
||||
name="action_view_rma"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-reply"
|
||||
attrs="{'invisible': [('rma_count', '=', 0)]}"
|
||||
groups="rma.rma_group_user_own"
|
||||
>
|
||||
<field name="rma_count" widget="statinfo" string="RMA" />
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="rma_finalization_view_search" model="ir.ui.view">
|
||||
<field name="model">rma.finalization</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="RMA Finalization Reasons">
|
||||
<field name="name" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active','=',False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Active"
|
||||
name="active"
|
||||
domain="[('active','!=',False)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_finalization_form" model="ir.ui.view">
|
||||
<field name="name">Rma Finalization Reasons</field>
|
||||
<field name="model">rma.finalization</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Finalization">
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<field name="company_id" invisible="1" />
|
||||
<field name="active" invisible="1" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_finalization_list" model="ir.ui.view">
|
||||
<field name="name">RMA Finalization Reasons</field>
|
||||
<field name="model">rma.finalization</field>
|
||||
<field eval="6" name="priority" />
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<field name="company_id" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_rma_finalization" model="ir.actions.act_window">
|
||||
<field name="name">RMA Finalization Reasons</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">rma.finalization</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new RMA finalization
|
||||
</p>
|
||||
<p>
|
||||
Manage RMA finalization reasons to better classify them for tracking and analysis purposes.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="rma_configuration_rma_finalization_menu"
|
||||
name="RMA Finalization Reasons"
|
||||
parent="rma_configuration_menu"
|
||||
action="action_rma_finalization"
|
||||
groups="rma.group_rma_manual_finalization"
|
||||
/>
|
||||
</odoo>
|
||||
85
odoo-bringout-oca-rma-rma/rma/views/rma_operation.xml
Normal file
85
odoo-bringout-oca-rma-rma/rma/views/rma_operation.xml
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2024 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="rma_operation_form_view">
|
||||
<field name="model">rma.operation</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="active" widget="boolean_toggle" />
|
||||
</group>
|
||||
<group string="Settings" name="settings">
|
||||
<group>
|
||||
<field name="action_create_receipt" />
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="different_return_product"
|
||||
attrs="{'invisible': [('action_create_receipt', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="auto_confirm_reception"
|
||||
attrs="{'invisible': [('action_create_receipt', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="action_create_delivery" />
|
||||
|
||||
</group>
|
||||
<group />
|
||||
<group>
|
||||
<field name="action_create_refund" />
|
||||
|
||||
</group>
|
||||
<group />
|
||||
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="rma_operation_search_view">
|
||||
<field name="model">rma.operation</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="rma_operation_tree_view">
|
||||
<field name="model">rma.operation</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="action_create_receipt" />
|
||||
<field name="action_create_delivery" />
|
||||
<field name="action_create_refund" />
|
||||
<field name="active" widget="boolean_toggle" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="rma_operation_act_window">
|
||||
<field name="name">Operations</field>
|
||||
<field name="res_model">rma.operation</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.menu" id="rma_operation_menu">
|
||||
<field name="name">Operations</field>
|
||||
<field name="parent_id" ref="rma_configuration_menu" />
|
||||
<field name="action" ref="rma_operation_act_window" />
|
||||
<field name="sequence" eval="16" />
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
529
odoo-bringout-oca-rma-rma/rma/views/rma_portal_templates.xml
Normal file
529
odoo-bringout-oca-rma-rma/rma/views/rma_portal_templates.xml
Normal file
|
|
@ -0,0 +1,529 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<template
|
||||
id="portal_my_home_menu_rma"
|
||||
name="Portal layout : RMA menu entries"
|
||||
inherit_id="portal.portal_breadcrumbs"
|
||||
priority="35"
|
||||
>
|
||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||
<li
|
||||
t-if="page_name == 'RMA'"
|
||||
t-attf-class="breadcrumb-item #{'active ' if not rma else ''}"
|
||||
>
|
||||
<a t-if="rma" t-attf-href="/my/rmas?{{ keep_query() }}">RMA Orders</a>
|
||||
<t t-else="">RMA Orders</t>
|
||||
</li>
|
||||
<li t-if="rma" class="breadcrumb-item active">
|
||||
<t t-esc="rma.name" />
|
||||
</li>
|
||||
</xpath>
|
||||
</template>
|
||||
<template
|
||||
id="portal_my_home_rma"
|
||||
name="Portal My Home : RMA entries"
|
||||
inherit_id="portal.portal_my_home"
|
||||
priority="30"
|
||||
>
|
||||
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
|
||||
<t t-call="portal.portal_docs_entry">
|
||||
<t t-set="title">RMA Orders</t>
|
||||
<t t-set="url" t-value="'/my/rmas'" />
|
||||
<t t-set="placeholder_count" t-value="'rma_count'" />
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="portal_my_rmas" name="My RMA Orders">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="breadcrumbs_searchbar" t-value="True" />
|
||||
<t t-call="portal.portal_searchbar">
|
||||
<t t-set="title">RMA Orders</t>
|
||||
</t>
|
||||
<t t-if="rmas" t-call="portal.portal_table">
|
||||
<thead>
|
||||
<tr class="active">
|
||||
<th>RMA #</th>
|
||||
<th class='d-none d-md-table-cell'>Date</th>
|
||||
<th name="th_product">Product</th>
|
||||
<th class='text-right'>Quantity</th>
|
||||
<th class='d-none d-md-table-cell'>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="rmas" t-as="rma">
|
||||
<tr>
|
||||
<td>
|
||||
<a
|
||||
t-att-href="rma.get_portal_url()"
|
||||
t-att-title="rma.name"
|
||||
>
|
||||
<t t-esc="rma.name" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell">
|
||||
<span t-field="rma.date" />
|
||||
</td>
|
||||
<!-- Portal users don't have access to unpublished products -->
|
||||
<td name="td_product">
|
||||
<span t-esc="rma.sudo().product_id.display_name" />
|
||||
</td>
|
||||
<td class='text-right'>
|
||||
<span t-field="rma.product_uom_qty" />
|
||||
</td>
|
||||
<td class="d-none d-md-table-cell tx_status">
|
||||
<span class="badge badge-pill badge-secondary">
|
||||
<span t-field="rma.state" />
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
<template id="portal_rma_page" name="My RMA">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="o_portal_fullwidth_alert" groups="rma.rma_group_user_own">
|
||||
<t t-call="portal.portal_back_in_edit_mode">
|
||||
<t
|
||||
t-set="backend_url"
|
||||
t-value="'/web#return_label=Website&model=rma&id=%s&view_type=form' % (rma.id)"
|
||||
/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-call="portal.portal_record_layout">
|
||||
<t t-set="card_header">
|
||||
<h5 class="mb-0">
|
||||
<span>
|
||||
RMA Order -
|
||||
<span t-field="rma.name" />
|
||||
</span>
|
||||
<span
|
||||
style="position: absolute; left: 50%;"
|
||||
class="d-none d-sm-inline"
|
||||
>
|
||||
<a
|
||||
t-att-href="rma.get_portal_url(report_type='pdf', download=True)"
|
||||
>
|
||||
<i
|
||||
class="fa fa-download"
|
||||
role="img"
|
||||
aria-label="Download"
|
||||
title="Download"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
<span class="float-right">
|
||||
<!-- Tags -->
|
||||
<t
|
||||
t-set="tags"
|
||||
t-value="rma.tag_ids.filtered('is_public')"
|
||||
/>
|
||||
<!-- We don't have the color o_tag_color_# classes available in the frontend -->
|
||||
<t t-foreach="tags" t-as="tag">
|
||||
<span
|
||||
class="badge badge-pill badge-info label-text-align"
|
||||
t-esc="tag.name"
|
||||
/>
|
||||
</t>
|
||||
<t t-if="rma.state in ['refunded', 'returned', 'replaced']">
|
||||
<span
|
||||
class="small text-success orders_label_text_align"
|
||||
>
|
||||
<i class="fa fa-fw fa-check" />
|
||||
<b>
|
||||
<span t-field="rma.state" />
|
||||
</b>
|
||||
</span>
|
||||
</t>
|
||||
<t t-elif="rma.state in ['cancelled', 'locked']">
|
||||
<span class="small text-danger orders_label_text_align">
|
||||
<i class="fa fa-fw fa-times" />
|
||||
<b>
|
||||
<span t-field="rma.state" />
|
||||
</b>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="small text-info orders_label_text_align">
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
<b>
|
||||
<span t-field="rma.state" />
|
||||
</b>
|
||||
</span>
|
||||
</t>
|
||||
</span>
|
||||
</h5>
|
||||
</t>
|
||||
<t t-set="card_body">
|
||||
<div id="general_information">
|
||||
<div class="row mt4">
|
||||
<!-- Customer -->
|
||||
<div
|
||||
t-if="rma.partner_id"
|
||||
class="col-12 col-md-6 mb-4 mb-md-0"
|
||||
>
|
||||
<h6>
|
||||
<strong>Customer:</strong>
|
||||
</h6>
|
||||
<div class="row">
|
||||
<div class="col flex-grow-0 pr-3">
|
||||
<img
|
||||
t-if="rma.partner_id.image_1024"
|
||||
class="rounded-circle mt-1 o_portal_contact_img"
|
||||
t-att-src="image_data_uri(rma.partner_id.image_1024)"
|
||||
alt="Contact"
|
||||
/>
|
||||
<img
|
||||
t-else=""
|
||||
class="rounded-circle mt-1 o_portal_contact_img"
|
||||
src="/web/static/src/img/user_menu_avatar.png"
|
||||
alt="Contact"
|
||||
/>
|
||||
</div>
|
||||
<div class="col pl-sm-0">
|
||||
<address
|
||||
t-field="rma.partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Shipping Address -->
|
||||
<div
|
||||
t-if="rma.partner_shipping_id"
|
||||
class="col-12 col-md-6 mb-4 mb-md-0"
|
||||
>
|
||||
<h6>
|
||||
<strong>Shipping address:</strong>
|
||||
</h6>
|
||||
<div class="row">
|
||||
<div class="col flex-grow-0 pr-3">
|
||||
<img
|
||||
t-if="rma.partner_shipping_id.image_1024"
|
||||
class="rounded-circle mt-1 o_portal_contact_img"
|
||||
t-att-src="image_data_uri(rma.partner_shipping_id.image_1024)"
|
||||
alt="Contact"
|
||||
/>
|
||||
<img
|
||||
t-else=""
|
||||
class="rounded-circle mt-1 o_portal_contact_img"
|
||||
src="/web/static/src/img/user_menu_avatar.png"
|
||||
alt="Contact"
|
||||
/>
|
||||
</div>
|
||||
<div class="col pl-sm-0">
|
||||
<address
|
||||
t-field="rma.partner_shipping_id"
|
||||
t-options='{"widget": "contact", "fields": ["name", "email", "phone", "address"]}'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- RMA Info -->
|
||||
<div t-if="rma.user_id" class="col-12 col-md-6">
|
||||
<h6>
|
||||
<strong>Responsible:</strong>
|
||||
</h6>
|
||||
<div class="row">
|
||||
<div class="col flex-grow-0 pr-3">
|
||||
<img
|
||||
t-if="rma.user_id.image_1024"
|
||||
class="rounded-circle mt-1 o_portal_contact_img"
|
||||
t-att-src="image_data_uri(rma.user_id.image_1024)"
|
||||
alt="Contact"
|
||||
/>
|
||||
<img
|
||||
t-else=""
|
||||
class="rounded-circle mt-1 o_portal_contact_img"
|
||||
src="/web/static/src/img/user_menu_avatar.png"
|
||||
alt="Contact"
|
||||
/>
|
||||
</div>
|
||||
<div class="col pl-sm-0">
|
||||
<address
|
||||
t-field="rma.user_id"
|
||||
t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt32" id="product_information">
|
||||
<div class="col-12 col-md-6 mb-4 mb-md-0">
|
||||
<div t-if="rma.picking_id" class="row mb-2 mb-sm-1">
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>Origin delivery</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span t-field="rma.picking_id" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- We need to prevent access errors if the product is
|
||||
unpublished-->
|
||||
<div
|
||||
t-if="rma.sudo().product_id"
|
||||
class="row mb-2 mb-sm-1"
|
||||
>
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>Product</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span
|
||||
t-esc="rma.sudo().product_id.display_name"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
t-if="rma.product_uom_qty"
|
||||
class="row mb-2 mb-sm-1"
|
||||
>
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>Quantity</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span t-field="rma.product_uom_qty" />
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="rma.delivered_qty" class="row">
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>Delivered quantity</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span t-field="rma.delivered_qty" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<div t-if="rma.date" class="row mb-2 mb-sm-1">
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>RMA Date</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span
|
||||
t-field="rma.date"
|
||||
t-options='{"widget": "date"}'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="rma.deadline" class="row mb-2 mb-sm-1">
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>Deadline</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span
|
||||
t-field="rma.deadline"
|
||||
t-options='{"widget": "date"}'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="rma.origin" class="row">
|
||||
<div class="col-12 col-sm-4">
|
||||
<strong>Origin</strong>
|
||||
</div>
|
||||
<div class="col-12 col-sm-8">
|
||||
<span t-field="rma.origin" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section
|
||||
t-if="rma.reception_move_id"
|
||||
id="reception_section"
|
||||
style="page-break-inside: auto;"
|
||||
class="mt32"
|
||||
>
|
||||
<strong class="d-block mb-1">Reception</strong>
|
||||
<t t-set="picking" t-value="rma.reception_move_id.picking_id" />
|
||||
<t
|
||||
t-set="report_url"
|
||||
t-value="'/my/rma/picking/pdf/%s/%s?%s' % (rma.id, picking.id, keep_query())"
|
||||
/>
|
||||
<a
|
||||
class="list-group-item list-group-item-action d-flex flex-wrap align-items-center justify-content-between py-2 px-3"
|
||||
t-att-href="report_url"
|
||||
>
|
||||
<div>
|
||||
<i
|
||||
class="fa fa-truck mr-1"
|
||||
role="img"
|
||||
aria-label="Download"
|
||||
title="Download"
|
||||
/>
|
||||
<span t-esc="picking.name" class="mr-lg-3" />
|
||||
<div class="d-lg-inline-block">
|
||||
Date:
|
||||
<span class="text-muted" t-field="picking.date" />
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="picking.state == 'done'">
|
||||
<span class="badge badge-success label-text-align">
|
||||
<i class="fa fa-fw fa-truck" />
|
||||
Shipped
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="picking.state == 'partially_available'">
|
||||
<span class="badge badge-warning label-text-align">
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
Partially Available
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="picking.state == 'cancel'">
|
||||
<span class="badge badge-danger label-text-align">
|
||||
<i class="fa fa-fw fa-times" />
|
||||
Cancelled
|
||||
</span>
|
||||
</t>
|
||||
<t
|
||||
t-if="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
|
||||
>
|
||||
<span class="badge badge-info label-text-align">
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
Preparation
|
||||
</span>
|
||||
</t>
|
||||
</a>
|
||||
</section>
|
||||
<section
|
||||
t-if="rma.refund_id"
|
||||
id="refund_section"
|
||||
style="page-break-inside: auto;"
|
||||
class="mt32"
|
||||
>
|
||||
<strong class="d-block mb-1">Refund</strong>
|
||||
<t t-set="refund" t-value="rma.refund_id" />
|
||||
<t
|
||||
t-set="report_url"
|
||||
t-value="refund.get_portal_url(report_type='pdf')"
|
||||
/>
|
||||
<a
|
||||
class="list-group-item list-group-item-action d-flex flex-wrap align-items-center justify-content-between py-2 px-3"
|
||||
t-att-href="report_url"
|
||||
>
|
||||
<div>
|
||||
<i
|
||||
class="fa fa-pencil-square-o mr-1"
|
||||
role="img"
|
||||
aria-label="Download"
|
||||
title="Download"
|
||||
/>
|
||||
<span t-esc="refund.name" class="mr-lg-3" />
|
||||
<div class="d-lg-inline-block">
|
||||
Date:
|
||||
<span
|
||||
class="text-muted"
|
||||
t-field="refund.invoice_date"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<span
|
||||
t-if="refund.state == 'paid'"
|
||||
class="small text-success orders_label_text_align"
|
||||
>
|
||||
<i class="fa fa-fw fa-check" />
|
||||
<b>Paid</b>
|
||||
</span>
|
||||
<span
|
||||
t-else=""
|
||||
class="small text-info orders_label_text_align"
|
||||
>
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
<b>Waiting Payment</b>
|
||||
</span>
|
||||
</a>
|
||||
</section>
|
||||
<section
|
||||
t-if="rma.delivery_move_ids"
|
||||
id="reception_section"
|
||||
style="page-break-inside: auto;"
|
||||
class="mt32"
|
||||
>
|
||||
<strong class="d-block mb-1">Delivery</strong>
|
||||
<ul class="list-group mb-4">
|
||||
<t
|
||||
t-foreach="rma.delivery_move_ids.mapped('picking_id')"
|
||||
t-as="picking"
|
||||
>
|
||||
<t
|
||||
t-set="report_url"
|
||||
t-value="'/my/rma/picking/pdf/%s/%s?%s' % (rma.id, picking.id, keep_query())"
|
||||
/>
|
||||
<a
|
||||
class="list-group-item list-group-item-action d-flex flex-wrap align-items-center justify-content-between py-2 px-3"
|
||||
t-att-href="report_url"
|
||||
>
|
||||
<div>
|
||||
<i
|
||||
class="fa fa-truck mr-1"
|
||||
role="img"
|
||||
aria-label="Download"
|
||||
title="Download"
|
||||
/>
|
||||
<span t-esc="picking.name" class="mr-lg-3" />
|
||||
<div class="d-lg-inline-block">
|
||||
Date:
|
||||
<span
|
||||
class="text-muted"
|
||||
t-field="picking.date"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<t t-if="picking.state == 'done'">
|
||||
<span
|
||||
class="badge badge-success label-text-align"
|
||||
>
|
||||
<i class="fa fa-fw fa-truck" />
|
||||
Shipped
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="picking.state == 'partially_available'">
|
||||
<span
|
||||
class="badge badge-warning label-text-align"
|
||||
>
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
Partially Available
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="picking.state == 'cancel'">
|
||||
<span
|
||||
class="badge badge-danger label-text-align"
|
||||
>
|
||||
<i class="fa fa-fw fa-times" />
|
||||
Cancelled
|
||||
</span>
|
||||
</t>
|
||||
<t
|
||||
t-if="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
|
||||
>
|
||||
<span class="badge badge-info label-text-align">
|
||||
<i class="fa fa-fw fa-clock-o" />
|
||||
Preparation
|
||||
</span>
|
||||
</t>
|
||||
</a>
|
||||
</t>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="description" class="mt-5" t-if="rma.description">
|
||||
<h3 class="">Description</h3>
|
||||
<hr class="mt-0 mb-1" />
|
||||
<t t-out="rma.description" />
|
||||
</section>
|
||||
</t>
|
||||
</t>
|
||||
<!-- chatter -->
|
||||
<div id="rma_communication" class="mt-4">
|
||||
<h2>Communication</h2>
|
||||
<t t-call="portal.message_thread">
|
||||
<t t-set="object" t-value="rma" />
|
||||
<t t-set="token" t-value="rma.access_token" />
|
||||
<t t-set="pid" t-value="pid" />
|
||||
<t t-set="hash" t-value="hash" />
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
66
odoo-bringout-oca-rma-rma/rma/views/rma_tag_views.xml
Normal file
66
odoo-bringout-oca-rma-rma/rma/views/rma_tag_views.xml
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="rma_tag_view_search" model="ir.ui.view">
|
||||
<field name="model">rma.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="RMA Tags">
|
||||
<field name="name" />
|
||||
<filter
|
||||
string="Archived"
|
||||
name="inactive"
|
||||
domain="[('active','=',False)]"
|
||||
/>
|
||||
<filter
|
||||
string="Active"
|
||||
name="active"
|
||||
domain="[('active','!=',False)]"
|
||||
/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_tag_form" model="ir.ui.view">
|
||||
<field name="name">Rma Tags</field>
|
||||
<field name="model">rma.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Tag">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="is_public" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_tag_list" model="ir.ui.view">
|
||||
<field name="name">RMA Tags</field>
|
||||
<field name="model">rma.tag</field>
|
||||
<field eval="6" name="priority" />
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="is_public" />
|
||||
<field name="active" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_rma_tag" model="ir.actions.act_window">
|
||||
<field name="name">RMA Tags</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">rma.tag</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new RMA tag
|
||||
</p>
|
||||
<p>
|
||||
Manage RMA tags to better classify them for tracking and analysis purposes.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="rma_configuration_rma_tag_menu"
|
||||
name="RMA Tags"
|
||||
parent="rma_configuration_menu"
|
||||
action="action_rma_tag"
|
||||
/>
|
||||
</odoo>
|
||||
145
odoo-bringout-oca-rma-rma/rma/views/rma_team_views.xml
Normal file
145
odoo-bringout-oca-rma-rma/rma/views/rma_team_views.xml
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="rma_team_view_tree" model="ir.ui.view">
|
||||
<field name="model">rma.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="name" />
|
||||
<field name="user_id" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
<field name="company_id" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_team_view_form" model="ir.ui.view">
|
||||
<field name="name">rma.team.view.form</field>
|
||||
<field name="model">rma.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only" string="RMA Team" />
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id" />
|
||||
<field
|
||||
name="company_id"
|
||||
options="{'no_create': True}"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<field name="company_id" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="members" string="Team Members">
|
||||
<field
|
||||
name="member_ids"
|
||||
widget="many2many"
|
||||
options="{'not_delete': True}"
|
||||
>
|
||||
<kanban
|
||||
quick_create="false"
|
||||
create="true"
|
||||
delete="true"
|
||||
>
|
||||
<field name="id" />
|
||||
<field name="name" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
class="oe_kanban_global_click"
|
||||
style="max-width: 200px"
|
||||
>
|
||||
<div class="o_kanban_record_top">
|
||||
<img
|
||||
t-att-src="kanban_image('res.users', 'avatar_128', record.id.raw_value)"
|
||||
height="40"
|
||||
width="40"
|
||||
class="oe_avatar oe_kanban_avatar_smallbox mb0"
|
||||
alt="Avatar"
|
||||
/>
|
||||
<div
|
||||
class="o_kanban_record_headings ml8"
|
||||
>
|
||||
<strong
|
||||
class="o_kanban_record_title"
|
||||
>
|
||||
<field name="name" />
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
name="emails"
|
||||
string="Email"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}"
|
||||
>
|
||||
<group name="group_alias">
|
||||
<label for="alias_name" string="Email Alias" />
|
||||
<div name="alias_def">
|
||||
<field
|
||||
name="alias_id"
|
||||
class="oe_read_only oe_inline"
|
||||
string="Email Alias"
|
||||
required="0"
|
||||
/>
|
||||
<div
|
||||
class="oe_edit_only oe_inline"
|
||||
name="edit_alias"
|
||||
style="display: inline;"
|
||||
>
|
||||
<field
|
||||
name="alias_name"
|
||||
class="oe_inline"
|
||||
/>@<field
|
||||
name="alias_domain"
|
||||
class="oe_inline"
|
||||
readonly="1"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<field
|
||||
name="alias_contact"
|
||||
class="oe_inline oe_edit_only"
|
||||
string="Accept Emails From"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_team_action" model="ir.actions.act_window">
|
||||
<field name="name">RMA team</field>
|
||||
<field name="res_model">rma.team</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Click to add a new RMA.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="rma_configuration_rma_team_menu"
|
||||
name="RMA Team"
|
||||
parent="rma_configuration_menu"
|
||||
action="rma_team_action"
|
||||
/>
|
||||
</odoo>
|
||||
468
odoo-bringout-oca-rma-rma/rma/views/rma_views.xml
Normal file
468
odoo-bringout-oca-rma-rma/rma/views/rma_views.xml
Normal file
|
|
@ -0,0 +1,468 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
Copyright 2023 Tecnativa - Pedro M. Baeza
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="rma_view_search" model="ir.ui.view">
|
||||
<field name="name">rma.view.search</field>
|
||||
<field name="model">rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" />
|
||||
<field name="origin" />
|
||||
<field name="user_id" />
|
||||
<field name="product_id" />
|
||||
<field name="tag_ids" />
|
||||
<filter
|
||||
string="Awaiting Action"
|
||||
name="waiting_action"
|
||||
domain="[('state', 'in', ['waiting_return', 'waiting_replacement', 'confirmed'])]"
|
||||
/>
|
||||
<filter
|
||||
string="Processed"
|
||||
name="processed"
|
||||
domain="[('state', 'in', ['received', 'refunded', 'replaced', 'finished'])]"
|
||||
/>
|
||||
<filter
|
||||
string="Closed"
|
||||
name="closed"
|
||||
domain="[('state', 'in', ['locked', 'cancelled'])]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
name="draft_filter"
|
||||
string="Draft"
|
||||
domain="[('state','=', 'draft')]"
|
||||
/>
|
||||
<filter
|
||||
name="confirmed_filter"
|
||||
string="Confirmed"
|
||||
domain="[('state','=', 'confirmed')]"
|
||||
/>
|
||||
<filter
|
||||
name="received_filter"
|
||||
string="Received"
|
||||
domain="[('state','=', 'received')]"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Unresolved RMAs"
|
||||
name="undone_rma"
|
||||
domain="[('state', 'not in', ['refunded', 'returned', 'replaced', 'locked', 'cancelled', 'finished'])]"
|
||||
help="RMAs yet to be fully processed"
|
||||
/>
|
||||
<filter
|
||||
string="Late RMAs"
|
||||
name="late_rma"
|
||||
domain="[('deadline', '<', context_today().strftime('%Y-%m-%d')), ('state', 'not in', ['refunded', 'returned', 'replaced', 'locked', 'cancelled', 'finished'])]"
|
||||
help="RMAs which deadline has passed"
|
||||
/>
|
||||
<separator />
|
||||
<filter string="RMA Date" name="filter_rma_date" date="date" />
|
||||
<filter
|
||||
string="RMA Deadline"
|
||||
name="filter_rma_deadline"
|
||||
date="deadline"
|
||||
/>
|
||||
<filter
|
||||
name="no_user_id_filter"
|
||||
string="Unassigned RMAs"
|
||||
domain="[('user_id','=', False)]"
|
||||
/>
|
||||
<group string="Group By" name="group_by">
|
||||
<filter
|
||||
string="Partner"
|
||||
name="partner_id_group_by"
|
||||
context="{'group_by':'partner_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Responsible"
|
||||
name="user_id_group_by"
|
||||
context="{'group_by':'user_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="State"
|
||||
name="state_group_by"
|
||||
context="{'group_by':'state'}"
|
||||
/>
|
||||
<filter
|
||||
string="Date"
|
||||
name="date_group_by"
|
||||
context="{'group_by':'date'}"
|
||||
/>
|
||||
<filter
|
||||
string="Deadline"
|
||||
name="deadline_group_by"
|
||||
context="{'group_by':'deadline'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_view_tree" model="ir.ui.view">
|
||||
<field name="name">rma.view.tree</field>
|
||||
<field name="model">rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree
|
||||
decoration-muted="state in ['cancelled', 'locked']"
|
||||
decoration-bf="state == 'draft' and product_id == False"
|
||||
decoration-danger="deadline and (deadline < current_date)"
|
||||
>
|
||||
<field name="name" width="100px" />
|
||||
<field name="origin" />
|
||||
<field name="user_id" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
<field name="product_uom_qty" />
|
||||
<field name="product_uom" groups="uom.group_uom" />
|
||||
<field name="date" />
|
||||
<field name="deadline" />
|
||||
<field name="finalization_id" optional="hide" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_view_form" model="ir.ui.view">
|
||||
<field name="name">rma.view.form</field>
|
||||
<field name="model">rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button
|
||||
name="%(portal.portal_share_action)d"
|
||||
string="Share"
|
||||
type="action"
|
||||
class="oe_highlight oe_read_only"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Send by Email"
|
||||
name="action_rma_send"
|
||||
attrs="{'invisible':['|', ('sent','=',True), ('state', 'not in', ['draft', 'confirmed', 'received'])]}"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Send by Mail"
|
||||
name="action_rma_send"
|
||||
attrs="{'invisible':['|', ('sent','=',False), ('state', 'not in', ['draft', 'confirmed', 'received'])]}"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Confirm"
|
||||
name="action_confirm"
|
||||
states="draft"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
name="action_create_receipt"
|
||||
type="object"
|
||||
string="Create Receipt"
|
||||
attrs="{'invisible': [('show_create_receipt', '=', False)]}"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="To Refund"
|
||||
name="action_refund"
|
||||
attrs="{'invisible': [('show_create_refund', '=', False)]}"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Replace"
|
||||
name="action_replace"
|
||||
attrs="{'invisible': [('show_create_replace', '=', False)]}"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Return to customer"
|
||||
name="action_return"
|
||||
attrs="{'invisible': [('show_create_return', '=', False)]}"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Split"
|
||||
name="action_split"
|
||||
attrs="{'invisible': [('can_be_split', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Cancel"
|
||||
name="action_cancel"
|
||||
confirm="Are you sure you want to cancel this RMA"
|
||||
states="draft,confirmed"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Set to draft"
|
||||
name="action_draft"
|
||||
states="cancelled"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Lock"
|
||||
name="action_lock"
|
||||
attrs="{'invisible': [('can_be_locked', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
type="object"
|
||||
string="Unlock"
|
||||
name="action_unlock"
|
||||
states="locked"
|
||||
/>
|
||||
<button type="object" string="Preview" name="action_preview" />
|
||||
<field
|
||||
name="state"
|
||||
widget="statusbar"
|
||||
statusbar_visible="draft,confirmed,received"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_receipt"
|
||||
string="Receipt"
|
||||
class="oe_stat_button"
|
||||
icon="fa-truck"
|
||||
attrs="{'invisible': [('reception_move_id', '=', False)]}"
|
||||
>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_delivery"
|
||||
class="oe_stat_button"
|
||||
icon="fa-truck"
|
||||
attrs="{'invisible': [('delivery_picking_count', '=', 0)]}"
|
||||
>
|
||||
<field
|
||||
name="delivery_picking_count"
|
||||
widget="statinfo"
|
||||
string="Delivery"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
string="Refund"
|
||||
name="action_view_refund"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
attrs="{'invisible': [('refund_id', '=', False)]}"
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" readonly="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field
|
||||
name="partner_id"
|
||||
widget="res_partner_many2one"
|
||||
context="{'search_default_customer':1, 'show_address': 1, 'show_vat': True}"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
options="{'always_reload': True}"
|
||||
/>
|
||||
<field
|
||||
name="partner_shipping_id"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field
|
||||
name="partner_invoice_id"
|
||||
attrs="{'readonly': [('state', 'not in', ['draft', 'confirmed', 'received'])]}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field name="picking_id" options="{'no_create': True}" />
|
||||
<field
|
||||
name="move_id"
|
||||
attrs="{'required': [('picking_id', '!=', False)], 'readonly': ['|', ('picking_id', '=', False), ('state', '!=', 'draft')]}"
|
||||
options="{'no_create': True}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field
|
||||
name="product_id"
|
||||
force_save="1"
|
||||
attrs="{'readonly': ['|', ('picking_id', '!=', False), ('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field
|
||||
name="return_product_id"
|
||||
force_save="1"
|
||||
attrs="{'readonly': ['|', ('picking_id', '!=', False), ('state', '!=', 'draft')], 'invisible': [('different_return_product', '=', False)], 'required': [('different_return_product', '=', True)]}"
|
||||
/>
|
||||
<field name="uom_category_id" invisible="1" />
|
||||
<label for="product_uom_qty" />
|
||||
<div class="o_row">
|
||||
<field
|
||||
name="product_uom_qty"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field
|
||||
name="product_uom"
|
||||
groups="uom.group_uom"
|
||||
domain="[('category_id', '=', uom_category_id)]"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
force_save="1"
|
||||
/>
|
||||
<field name="product_uom" invisible="1" />
|
||||
</div>
|
||||
<field
|
||||
name="delivered_qty"
|
||||
attrs="{'invisible': [('delivered_qty', '=', 0.0)]}"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" />
|
||||
<field name="user_id" />
|
||||
<field name="team_id" />
|
||||
<field
|
||||
name="tag_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'color_field': 'color', 'no_create_edit': True}"
|
||||
placeholder="Tags..."
|
||||
/>
|
||||
<field name="origin" />
|
||||
<field name="operation_id" />
|
||||
<field
|
||||
name="finalization_id"
|
||||
attrs="{'invisible': [('state', '!=', 'finished')]}"
|
||||
/>
|
||||
<field
|
||||
name="company_id"
|
||||
options="{'no_create': True}"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
<field name="company_id" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="page_other" string="Other Information">
|
||||
<group>
|
||||
<group>
|
||||
<field name="procurement_group_id" />
|
||||
<field
|
||||
name="location_id"
|
||||
options="{'no_create': True, 'no_open': True}"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field name="location_id" invisible="1" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="deadline" />
|
||||
<field name="priority" widget="priority" />
|
||||
<field
|
||||
name="origin_split_rma_id"
|
||||
attrs="{'invisible': [('origin_split_rma_id', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="description" widget="html" colspan="4" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="sent" invisible="1" />
|
||||
<field name="reception_move_id" invisible="1" />
|
||||
<field name="refund_id" invisible="1" />
|
||||
<field name="show_create_receipt" invisible="1" />
|
||||
<field name="show_create_refund" invisible="1" />
|
||||
<field name="show_create_return" invisible="1" />
|
||||
<field name="show_create_replace" invisible="1" />
|
||||
<field name="different_return_product" invisible="1" />
|
||||
<field name="can_be_split" invisible="1" />
|
||||
<field name="can_be_locked" invisible="1" />
|
||||
<field name="can_be_finished" invisible="1" />
|
||||
<field name="commercial_partner_id" invisible="1" />
|
||||
<field name="remaining_qty" invisible="1" />
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="activity_ids" widget="mail_activity" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_finalization_form" model="ir.ui.view">
|
||||
<field name="model">rma</field>
|
||||
<field name="inherit_id" ref="rma.rma_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//form//header//button[@name='action_cancel']"
|
||||
position="before"
|
||||
>
|
||||
<button
|
||||
type="object"
|
||||
string="Finish"
|
||||
name="action_finish"
|
||||
class="btn-primary"
|
||||
attrs="{'invisible': [('can_be_finished', '=', False)]}"
|
||||
groups="rma.group_rma_manual_finalization"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_view_pivot" model="ir.ui.view">
|
||||
<field name="name">rma.pivot</field>
|
||||
<field name="model">rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot>
|
||||
<field name="date" type="row" />
|
||||
<field name="product_uom_qty" type="measure" />
|
||||
<field name="delivered_qty" type="measure" />
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_view_calendar" model="ir.ui.view">
|
||||
<field name="name">rma.calendar</field>
|
||||
<field name="model">rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar date_start="date" mode="month" color="state" quick_add="False">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
<field name="product_uom_qty" widget="monetary" />
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_refund_action_server" model="ir.actions.server">
|
||||
<field name="name">To Refund</field>
|
||||
<field name="model_id" ref="model_rma" />
|
||||
<field name="binding_model_id" ref="model_rma" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">records.action_refund()</field>
|
||||
</record>
|
||||
<record id="rma_action" model="ir.actions.act_window">
|
||||
<field name="name">RMA</field>
|
||||
<field name="res_model">rma</field>
|
||||
<field name="view_mode">tree,form,pivot,calendar,activity</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Click to add a new RMA.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="rma_orders_menu" model="ir.ui.menu">
|
||||
<field name="action" ref="rma_action" />
|
||||
</record>
|
||||
|
||||
<record id="action_rma_form" model="ir.actions.act_window">
|
||||
<field name="name">New RMA</field>
|
||||
<field name="res_model">rma</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="context">{
|
||||
'search_operation_id': [active_id],
|
||||
'default_operation_id': active_id,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
24
odoo-bringout-oca-rma-rma/rma/views/stock_picking_views.xml
Normal file
24
odoo-bringout-oca-rma-rma/rma/views/stock_picking_views.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_picking_form" model="ir.ui.view">
|
||||
<field name="name">stock.picking.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box">
|
||||
<button
|
||||
name="action_view_rma"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-reply"
|
||||
attrs="{'invisible': [('rma_count', '=', 0)]}"
|
||||
groups="rma.rma_group_user_own"
|
||||
>
|
||||
<field name="rma_count" widget="statinfo" string="RMA" />
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_warehouse_inherit_mrp" model="ir.ui.view">
|
||||
<field name="name">Stock Warehouse Inherit MRP</field>
|
||||
<field name="model">stock.warehouse</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='wh_output_stock_loc_id']/..">
|
||||
<field name="rma_loc_id" groups="rma.rma_group_user_own" />
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='out_type_id']/..">
|
||||
<field name="rma_in_type_id" groups="rma.rma_group_user_own" />
|
||||
<field name="rma_out_type_id" groups="rma.rma_group_user_own" />
|
||||
<field
|
||||
name="rma_out_replace_route_id"
|
||||
groups="rma.rma_group_user_own"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue