mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[MIG] rma: Migration to 18.0
This commit is contained in:
@@ -17,7 +17,7 @@ RMA (Return Merchandise Authorization)
|
||||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
|
||||
:alt: License: LGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-ForgeFlow%2Fstock--rma-lightgray.png?logo=github
|
||||
:target: https://github.com/ForgeFlow/stock-rma/tree/17.0/rma
|
||||
:target: https://github.com/ForgeFlow/stock-rma/tree/18.0/rma
|
||||
:alt: ForgeFlow/stock-rma
|
||||
|
||||
|badge1| |badge2| |badge3|
|
||||
@@ -128,7 +128,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/ForgeFlow/stock-rma/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/ForgeFlow/stock-rma/issues/new?body=module:%20rma%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/ForgeFlow/stock-rma/issues/new?body=module:%20rma%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -155,6 +155,6 @@ Contributors
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
This module is part of the `ForgeFlow/stock-rma <https://github.com/ForgeFlow/stock-rma/tree/17.0/rma>`_ project on GitHub.
|
||||
This module is part of the `ForgeFlow/stock-rma <https://github.com/ForgeFlow/stock-rma/tree/18.0/rma>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
"name": "RMA (Return Merchandise Authorization)",
|
||||
"version": "17.0.1.0.0",
|
||||
"version": "18.0.1.0.0",
|
||||
"license": "LGPL-3",
|
||||
"category": "RMA",
|
||||
"summary": "Introduces the return merchandise authorization (RMA) process in odoo",
|
||||
|
||||
@@ -78,7 +78,6 @@ class StockMove(models.Model):
|
||||
self,
|
||||
need,
|
||||
location_id,
|
||||
quant_ids=None,
|
||||
lot_id=None,
|
||||
package_id=None,
|
||||
owner_id=None,
|
||||
@@ -94,7 +93,6 @@ class StockMove(models.Model):
|
||||
return super()._update_reserved_quantity(
|
||||
need,
|
||||
location_id,
|
||||
quant_ids=quant_ids,
|
||||
lot_id=lot_id,
|
||||
package_id=package_id,
|
||||
owner_id=owner_id,
|
||||
|
||||
@@ -69,7 +69,6 @@ class StockWarehouse(models.Model):
|
||||
"usage": "internal",
|
||||
"location_id": wh.view_location_id.id,
|
||||
"company_id": wh.company_id.id,
|
||||
"return_location": True,
|
||||
}
|
||||
)
|
||||
# RMA types
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="rma_order_line_report" model="ir.actions.report">
|
||||
<field name="name">RMA</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">rma.report_rma_order_line</field>
|
||||
<field name="report_file">rma.report_rma_order_line</field>
|
||||
<field name="print_report_name">('RMA - %s' % (object.name))</field>
|
||||
<field name="binding_model_id" ref="model_rma_order_line" />
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
<record id="rma_order_report" model="ir.actions.report">
|
||||
<field name="name">RMA Group</field>
|
||||
<field name="model">rma.order</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">rma.report_rma_order</field>
|
||||
<field name="report_file">rma.report_rma_order</field>
|
||||
<field name="print_report_name">('RMA Group - %s' % (object.name))</field>
|
||||
<field name="binding_model_id" ref="model_rma_order" />
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
<record id="rma_order_line_report" model="ir.actions.report">
|
||||
<field name="name">RMA</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">rma.report_rma_order_line</field>
|
||||
<field name="report_file">rma.report_rma_order_line</field>
|
||||
<field name="print_report_name">('RMA - %s' % (object.name))</field>
|
||||
<field name="binding_model_id" ref="model_rma_order_line" />
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
<record id="rma_order_report" model="ir.actions.report">
|
||||
<field name="name">RMA Group</field>
|
||||
<field name="model">rma.order</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">rma.report_rma_order</field>
|
||||
<field name="report_file">rma.report_rma_order</field>
|
||||
<field name="print_report_name">('RMA Group - %s' % (object.name))</field>
|
||||
<field name="binding_model_id" ref="model_rma_order" />
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})" />
|
||||
<div class="page">
|
||||
<div class="oe_structure" />
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<t
|
||||
@@ -39,11 +38,11 @@
|
||||
class="mt8"
|
||||
>
|
||||
<strong>Shipping address:</strong>
|
||||
<div
|
||||
<div
|
||||
t-field="doc.customer_address_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
|
||||
/>
|
||||
<p t-if="doc.customer_address_id.vat">VAT: <span
|
||||
<p t-if="doc.customer_address_id.vat">VAT: <span
|
||||
t-field="doc.customer_address_id.vat"
|
||||
/></p>
|
||||
</div>
|
||||
@@ -89,13 +88,15 @@
|
||||
<th name="quantity" class="text-right">Quantity</th>
|
||||
<th name="unit_price" class="text-right">Unit Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td name="product"><span t-field="doc.product_id" /></td>
|
||||
<td name="lot" t-if="doc.lot_id"><span
|
||||
t-field="doc.lot_id"
|
||||
/></td>
|
||||
<td name="product">
|
||||
<span t-field="doc.product_id" />
|
||||
</td>
|
||||
<td name="lot" t-if="doc.lot_id">
|
||||
<span t-field="doc.lot_id" />
|
||||
</td>
|
||||
<td name="quantity" class="text-right">
|
||||
<span t-field="doc.product_qty" />
|
||||
<span t-field="doc.uom_id" groups="uom.group_uom" />
|
||||
@@ -110,11 +111,15 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div t-if="doc.description">
|
||||
<strong><p>Description</p></strong>
|
||||
<strong>
|
||||
<p>Description</p>
|
||||
</strong>
|
||||
<span t-field="doc.description" />
|
||||
</div>
|
||||
<div t-if="doc.conditions">
|
||||
<strong><p>Term and conditions</p></strong>
|
||||
<strong>
|
||||
<p>Term and conditions</p>
|
||||
</strong>
|
||||
<span t-field="doc.conditions" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,7 +143,6 @@
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})" />
|
||||
<div class="page">
|
||||
<div class="oe_structure" />
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<t
|
||||
@@ -173,11 +177,11 @@
|
||||
class="mt8"
|
||||
>
|
||||
<strong>Shipping address:</strong>
|
||||
<div
|
||||
<div
|
||||
t-field="doc.customer_address_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'
|
||||
/>
|
||||
<p t-if="doc.customer_address_id.vat">VAT: <span
|
||||
<p t-if="doc.customer_address_id.vat">VAT: <span
|
||||
t-field="doc.customer_address_id.vat"
|
||||
/></p>
|
||||
</div>
|
||||
@@ -228,15 +232,21 @@
|
||||
<th class="text-right">Quantity</th>
|
||||
<th class="text-right">Unit Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="doc.rma_line_ids" t-as="l">
|
||||
<td><span t-field="l.origin" /></td>
|
||||
<td><span t-field="l.operation_id.name" /></td>
|
||||
<td><span t-field="l.product_id" /></td>
|
||||
<td name="lot" t-if="print_lot_column"><span
|
||||
t-field="l.lot_id"
|
||||
/></td>
|
||||
<td>
|
||||
<span t-field="l.origin" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="l.operation_id.name" />
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="l.product_id" />
|
||||
</td>
|
||||
<td name="lot" t-if="print_lot_column">
|
||||
<span t-field="l.lot_id" />
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.product_qty" />
|
||||
<span t-field="l.uom_id" groups="uom.group_uom" />
|
||||
@@ -248,7 +258,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div t-if="doc.comment">
|
||||
<strong><p>Additional Information</p></strong>
|
||||
<strong>
|
||||
<p>Additional Information</p>
|
||||
</strong>
|
||||
<span t-field="doc.comment" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
@@ -300,7 +301,7 @@ span.option {
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
@@ -368,7 +369,7 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:310ce4e3f5919e5be643c54f11481d09bb8fc79cab65f08ac969ef3bf9d799fe
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/ForgeFlow/stock-rma/tree/17.0/rma"><img alt="ForgeFlow/stock-rma" src="https://img.shields.io/badge/github-ForgeFlow%2Fstock--rma-lightgray.png?logo=github" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/ForgeFlow/stock-rma/tree/18.0/rma"><img alt="ForgeFlow/stock-rma" src="https://img.shields.io/badge/github-ForgeFlow%2Fstock--rma-lightgray.png?logo=github" /></a></p>
|
||||
<p>A Return Merchandise Authorization (RMA), is a part of the process of
|
||||
returning a product in order to receive a refund, replacement, or repair
|
||||
during the product’s warranty period.</p>
|
||||
@@ -485,7 +486,7 @@ showing “Vendor Address” while it should be “Customer Address”.</li>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/ForgeFlow/stock-rma/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/ForgeFlow/stock-rma/issues/new?body=module:%20rma%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/ForgeFlow/stock-rma/issues/new?body=module:%20rma%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -511,7 +512,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/ForgeFlow/stock-rma/tree/17.0/rma">ForgeFlow/stock-rma</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/ForgeFlow/stock-rma/tree/18.0/rma">ForgeFlow/stock-rma</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -150,7 +150,7 @@ class TestRma(common.TransactionCase):
|
||||
@classmethod
|
||||
def _create_product(cls, name):
|
||||
return cls.product_product_model.create(
|
||||
{"name": name, "categ_id": cls.category.id, "type": "product"}
|
||||
{"name": name, "categ_id": cls.category.id, "is_storable": True}
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -8,67 +8,40 @@
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form" position="inside">
|
||||
<div
|
||||
class="app_settings_block"
|
||||
<app
|
||||
data-string="RMA"
|
||||
string="RMA"
|
||||
data-key="rma"
|
||||
name="rma"
|
||||
groups="rma.group_rma_manager"
|
||||
>
|
||||
<h2>Return Merchandise Authorization</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div
|
||||
name="rma_delivery_address"
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
<block title="Return Merchandise Authorization" name="rma_config">
|
||||
<setting
|
||||
id="rma_delivery_address"
|
||||
help="Display 3 fields on rma: partner, invoice address, delivery address"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_rma_delivery_address" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_rma_delivery_address" />
|
||||
<div class="text-muted">
|
||||
Display 3 fields on rma: partner, invoice address, delivery address
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
name="group_rma_lines"
|
||||
class="col-12 col-lg-6 o_setting_box"
|
||||
<field name="group_rma_delivery_address" />
|
||||
</setting>
|
||||
<setting
|
||||
id="group_rma_lines"
|
||||
help="Group RMA lines in one RMA group"
|
||||
>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_rma_lines" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_rma_lines" />
|
||||
<div class="text-muted">
|
||||
Group RMA lines in one RMA group
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div name="rma_account" class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_rma_account" />
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_rma_account" />
|
||||
<div class="text-muted">
|
||||
Enable RMA invoicing
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<field name="group_rma_lines" />
|
||||
</setting>
|
||||
<setting id="rma_delivery_address" help="Enable RMA invoicing">
|
||||
<field name="module_rma_account" />
|
||||
</setting>
|
||||
</block>
|
||||
</app>
|
||||
</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'}</field>
|
||||
<field name="context">{'module' : 'rma', 'bin_size': False}</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="rma_operation_tree" model="ir.ui.view">
|
||||
<field name="name">rma.operation.tree</field>
|
||||
<field name="name">rma.operation.list</field>
|
||||
<field name="model">rma.operation</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA Operations">
|
||||
<list name="RMA Operations">
|
||||
<field name="active" invisible="1" />
|
||||
<field name="code" />
|
||||
<field name="name" />
|
||||
<field name="receipt_policy" />
|
||||
<field name="delivery_policy" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<record id="action_rma_operation_customer" model="ir.actions.act_window">
|
||||
<field name="name">Customer Operations</field>
|
||||
<field name="res_model">rma.operation</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'default_type': "customer"}</field>
|
||||
<field name="domain">[('type','=', 'customer')]</field>
|
||||
<field name="view_id" ref="rma_operation_tree" />
|
||||
@@ -80,7 +80,7 @@
|
||||
<record id="action_rma_operation_supplier" model="ir.actions.act_window">
|
||||
<field name="name">Supplier Operations</field>
|
||||
<field name="res_model">rma.operation</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="context">{'default_type': "supplier"}</field>
|
||||
<field name="domain">[('type','=', 'supplier')]</field>
|
||||
<field name="view_id" ref="rma_operation_tree" />
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<record id="view_rma_line_tree" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.tree</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
<field
|
||||
<record id="view_rma_line_tree" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.list</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
<field
|
||||
name="lot_id"
|
||||
groups="stock.group_production_lot"
|
||||
context="{'default_product_id': product_id,}"
|
||||
/>
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="origin" />
|
||||
<field name="date_rma" />
|
||||
<field name="operation_id" />
|
||||
<field name="supplier_address_id" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="origin" />
|
||||
<field name="date_rma" />
|
||||
<field name="operation_id" />
|
||||
<field name="supplier_address_id" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_tree" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.tree</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
<field
|
||||
<record id="view_rma_line_supplier_tree" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.list</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
<field
|
||||
name="lot_id"
|
||||
groups="stock.group_production_lot"
|
||||
context="{'default_product_id': product_id,}"
|
||||
/>
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="origin" />
|
||||
<field name="date_rma" />
|
||||
<field name="operation_id" domain="[('type','=','supplier')]" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="origin" />
|
||||
<field name="date_rma" />
|
||||
<field name="operation_id" domain="[('type','=','supplier')]" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Line">
|
||||
<header>
|
||||
<button
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Line">
|
||||
<header>
|
||||
<button
|
||||
name="action_rma_to_approve"
|
||||
type="object"
|
||||
string="Request Approval"
|
||||
@@ -65,14 +65,14 @@
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_draft"
|
||||
type="object"
|
||||
string="Back to Draft"
|
||||
invisible="state == 'draft'"
|
||||
groups="rma.group_rma_customer_user,rma.group_rma_supplier_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_approve"
|
||||
type="object"
|
||||
string="Approve"
|
||||
@@ -80,37 +80,37 @@
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_manager"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_approve"
|
||||
type="object"
|
||||
string="Back to Approved"
|
||||
invisible="state != 'done'"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_done"
|
||||
type="object"
|
||||
string="Done"
|
||||
invisible="state in ('done', 'draft', 'canceled')"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_cancel"
|
||||
type="object"
|
||||
string="Cancel"
|
||||
invisible="state in ('done', 'canceled')"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="state"
|
||||
widget="statusbar"
|
||||
statusbar_visible="draft,to_approve,approved,done"
|
||||
nolabel="1"
|
||||
/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div name="button_box" class="oe_button_box">
|
||||
<button
|
||||
</header>
|
||||
<sheet>
|
||||
<div name="button_box" class="oe_button_box">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_in_shipments"
|
||||
class="oe_stat_button"
|
||||
@@ -118,13 +118,13 @@
|
||||
invisible="in_shipment_count == 0"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
<field
|
||||
name="in_shipment_count"
|
||||
widget="statinfo"
|
||||
string="Shipments"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_out_shipments"
|
||||
class="oe_stat_button"
|
||||
@@ -132,19 +132,21 @@
|
||||
invisible="out_shipment_count == 0"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
<field
|
||||
name="out_shipment_count"
|
||||
widget="statinfo"
|
||||
string="Deliveries"
|
||||
/>
|
||||
</button>
|
||||
<!--Move this button to rma_account-->
|
||||
<!--<button type="object" name="action_view_invoice"
|
||||
</button>
|
||||
<!--Move
|
||||
this button to rma_account-->
|
||||
<!--<button
|
||||
type="object" name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
string="Origin Inv">
|
||||
</button>-->
|
||||
<button
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_rma_lines"
|
||||
class="oe_stat_button"
|
||||
@@ -152,14 +154,14 @@
|
||||
groups="stock.group_stock_user"
|
||||
invisible="rma_line_count == 0"
|
||||
>
|
||||
<field
|
||||
<field
|
||||
name="rma_line_count"
|
||||
widget="statinfo"
|
||||
string="Supplier RMA"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title" name="title">
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title" name="title">
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
@@ -167,16 +169,16 @@
|
||||
invisible="context.get('hide_title',False)"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group name="partner">
|
||||
<field
|
||||
</div>
|
||||
<group>
|
||||
<group name="partner">
|
||||
<field
|
||||
name="partner_id"
|
||||
context="{'res_partner_search_mode': 'customer'}"
|
||||
string="Customer"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="delivery_address_id"
|
||||
domain="['|', ('parent_id', '=', partner_id),
|
||||
('id', '=', partner_id)]"
|
||||
@@ -185,25 +187,25 @@
|
||||
groups='rma.group_rma_delivery_invoice_address'
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<group name="contact">
|
||||
<field name="date_rma" />
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" />
|
||||
<field name="type" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="product" string="Product">
|
||||
<field
|
||||
<group name="contact">
|
||||
<field name="date_rma" />
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" />
|
||||
<field name="type" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="product" string="Product">
|
||||
<field
|
||||
name="product_id"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<newline />
|
||||
<field name="product_tracking" invisible="1" />
|
||||
<field
|
||||
<newline />
|
||||
<field name="product_tracking" invisible="1" />
|
||||
<field
|
||||
name="lot_id"
|
||||
groups="stock.group_production_lot"
|
||||
required="product_tracking in ('serial', 'lot')"
|
||||
@@ -211,29 +213,29 @@
|
||||
domain="[('product_id', '=', product_id)]"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="under_warranty"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
</group>
|
||||
<group name="product_qty" string="Quantity">
|
||||
<field
|
||||
</group>
|
||||
<group name="product_qty" string="Quantity">
|
||||
<field
|
||||
name="product_qty"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="uom_id"
|
||||
groups="uom.group_uom"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="price_unit"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="main_info" string="Origin">
|
||||
<field
|
||||
</group>
|
||||
<group name="main_info" string="Origin">
|
||||
<field
|
||||
name="reference_move_id"
|
||||
options="{'no_create': True}"
|
||||
domain="[('picking_id.partner_id', '=', partner_id),
|
||||
@@ -241,70 +243,70 @@
|
||||
('state', '=', 'done')]"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<group name="operation" string="Operation">
|
||||
<field
|
||||
</group>
|
||||
<group>
|
||||
<group name="operation" string="Operation">
|
||||
<field
|
||||
name="operation_id"
|
||||
domain="[('type','=','customer')]"
|
||||
/>
|
||||
<field name="receipt_policy" />
|
||||
<field name="delivery_policy" />
|
||||
</group>
|
||||
<group name="description" string="Description">
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
</group>
|
||||
<field name="receipt_policy" />
|
||||
<field name="delivery_policy" />
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="quantities" string="Quantities">
|
||||
<group name="quantities" col="4" string="Quantities">
|
||||
<group
|
||||
<group name="description" string="Description">
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="quantities" string="Quantities">
|
||||
<group name="quantities" col="4" string="Quantities">
|
||||
<group
|
||||
name="receive"
|
||||
invisible="receipt_policy == 'no'"
|
||||
>
|
||||
<field name="qty_to_receive" />
|
||||
<field name="qty_incoming" />
|
||||
<field name="qty_received" />
|
||||
</group>
|
||||
<group
|
||||
<field name="qty_to_receive" />
|
||||
<field name="qty_incoming" />
|
||||
<field name="qty_received" />
|
||||
</group>
|
||||
<group
|
||||
name="deliver"
|
||||
invisible="delivery_policy == 'no'"
|
||||
>
|
||||
<field name="qty_to_deliver" />
|
||||
<field name="qty_outgoing" />
|
||||
<field name="qty_delivered" />
|
||||
</group>
|
||||
<group
|
||||
<field name="qty_to_deliver" />
|
||||
<field name="qty_outgoing" />
|
||||
<field name="qty_delivered" />
|
||||
</group>
|
||||
<group
|
||||
name="supplier_rma"
|
||||
invisible="type != 'customer' or not customer_to_supplier"
|
||||
>
|
||||
<field name="qty_to_supplier_rma" />
|
||||
<field name="qty_in_supplier_rma" />
|
||||
</group>
|
||||
<field name="qty_to_supplier_rma" />
|
||||
<field name="qty_in_supplier_rma" />
|
||||
</group>
|
||||
</page>
|
||||
<page name="route" string="Routes">
|
||||
<group name="inbound" string="Inbound">
|
||||
<field
|
||||
</group>
|
||||
</page>
|
||||
<page name="route" string="Routes">
|
||||
<group name="inbound" string="Inbound">
|
||||
<field
|
||||
name="in_warehouse_id"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="location_id"
|
||||
domain="[('usage', '=', 'internal')]"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="in_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="customer_to_supplier"
|
||||
invisible="type != 'customer'"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="supplier_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
@@ -312,23 +314,23 @@
|
||||
invisible="customer_to_supplier == False"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
</group>
|
||||
<group name="outbound" string="Outbound">
|
||||
<field
|
||||
</group>
|
||||
<group name="outbound" string="Outbound">
|
||||
<field
|
||||
name="out_warehouse_id"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="out_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="supplier_to_customer"
|
||||
invisible="type != 'supplier'"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="customer_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
@@ -336,212 +338,200 @@
|
||||
invisible="supplier_to_customer == False"
|
||||
readonly="state not in ['draft']"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
</group>
|
||||
</page>
|
||||
<page
|
||||
name="stock"
|
||||
string="Stock Moves"
|
||||
invisible="not move_ids"
|
||||
>
|
||||
<field name="move_ids" nolabel="1" readonly="1" />
|
||||
</page>
|
||||
<page name="other" string="Other Info">
|
||||
<group name="general" string="General">
|
||||
<field name="conditions" />
|
||||
<field
|
||||
name="rma_id"
|
||||
groups="rma.group_rma_groups"
|
||||
/>
|
||||
<field name="origin" />
|
||||
</group>
|
||||
<group
|
||||
<field name="move_ids" nolabel="1" readonly="1" />
|
||||
</page>
|
||||
<page name="other" string="Other Info">
|
||||
<group name="general" string="General">
|
||||
<field name="conditions" />
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="origin" />
|
||||
</group>
|
||||
<group
|
||||
name="company"
|
||||
string="Company"
|
||||
groups="base.group_multi_company"
|
||||
>
|
||||
<field name="company_id" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field
|
||||
name="message_follower_ids"
|
||||
widget="mail_followers"
|
||||
groups="base.group_user"
|
||||
/>
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<field name="company_id" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form" />
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
<record id="view_rma_line_supplier_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form" />
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//button[@name='action_view_rma_lines']/field"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="string">Customer RMA</attribute>
|
||||
</xpath>
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="string">Supplier</attribute>
|
||||
<attribute
|
||||
<attribute name="string">Customer RMA</attribute>
|
||||
</xpath>
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="string">Supplier</attribute>
|
||||
<attribute
|
||||
name="context"
|
||||
>{'res_partner_search_mode': 'supplier'}</attribute>
|
||||
</field>
|
||||
<field name="under_warranty" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="reference_move_id" position="attributes">
|
||||
<attribute
|
||||
name="domain"
|
||||
>[('picking_id.partner_id', '=', partner_id),
|
||||
('location_id.usage', '=', 'supplier'),
|
||||
('state', '=', 'done')]</attribute>
|
||||
</field>
|
||||
<field name="operation_id" position="attributes">
|
||||
<attribute name="domain">[('type','=','supplier')]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<field name="under_warranty" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="reference_move_id" position="attributes">
|
||||
<attribute name="domain">[('picking_id.partner_id', '=', partner_id),
|
||||
('location_id.usage', '=', 'supplier'),
|
||||
('state', '=', 'done')]</attribute>
|
||||
</field>
|
||||
<field name="operation_id" position="attributes">
|
||||
<attribute name="domain">[('type','=','supplier')]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_rma_line_filter" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.select</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search RMA line">
|
||||
<field name="name" />
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="partner_id" />
|
||||
<field name="requested_by" />
|
||||
<field name="assigned_to" />
|
||||
<field name="product_id" />
|
||||
<field name="lot_id" />
|
||||
<field name="date_rma" />
|
||||
<separator />
|
||||
<filter
|
||||
<record id="view_rma_rma_line_filter" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.select</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search RMA line">
|
||||
<field name="name" />
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="partner_id" />
|
||||
<field name="requested_by" />
|
||||
<field name="assigned_to" />
|
||||
<field name="product_id" />
|
||||
<field name="lot_id" />
|
||||
<field name="date_rma" />
|
||||
<separator />
|
||||
<filter
|
||||
name="assigned_to_filter"
|
||||
domain="[('assigned_to','=',uid)]"
|
||||
help="My RMAs"
|
||||
/>
|
||||
<separator />
|
||||
<group name="stock_quantities" groups="stock.group_stock_user">
|
||||
<filter
|
||||
<separator />
|
||||
<group name="stock_quantities" groups="stock.group_stock_user">
|
||||
<filter
|
||||
name="to_receive"
|
||||
domain="[('state','!=', 'done'),('qty_to_receive','>',0.0)]"
|
||||
help="To Receive"
|
||||
/>
|
||||
<filter
|
||||
<filter
|
||||
name="to_deliver"
|
||||
domain="[('state','!=', 'done'),('qty_to_deliver','>',0.0)]"
|
||||
help="To Deliver"
|
||||
/>
|
||||
</group>
|
||||
<group name="rma_supplier_quantities">
|
||||
<filter
|
||||
</group>
|
||||
<group name="rma_supplier_quantities">
|
||||
<filter
|
||||
name="to_send_to_supplier"
|
||||
domain="[('state','!=', 'done'),('qty_to_supplier_rma','>',0.0)]"
|
||||
help="To Send to Supplier RMA"
|
||||
/>
|
||||
</group>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
</group>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
name="status"
|
||||
string="State"
|
||||
domain="[]"
|
||||
context="{'group_by':'state'}"
|
||||
/>
|
||||
<filter
|
||||
<filter
|
||||
name="partner"
|
||||
string="Partner"
|
||||
domain="[]"
|
||||
context="{'group_by':'partner_id'}"
|
||||
/>
|
||||
<filter
|
||||
<filter
|
||||
name="operation"
|
||||
string="Operation"
|
||||
domain="[]"
|
||||
context="{'group_by':'operation_id'}"
|
||||
/>
|
||||
<filter
|
||||
<filter
|
||||
name="product"
|
||||
string="Product"
|
||||
domain="[]"
|
||||
context="{'group_by':'product_id'}"
|
||||
/>
|
||||
<filter
|
||||
<filter
|
||||
name="to_receive"
|
||||
string="To Receive"
|
||||
domain="[('qty_to_receive', '>', 0)]"
|
||||
context="{'group_by':'partner_id'}"
|
||||
/>
|
||||
<filter
|
||||
<filter
|
||||
name="to_deliver"
|
||||
string="To Deliver"
|
||||
domain="[('qty_to_deliver', '>', 0)]"
|
||||
context="{'group_by':'partner_id'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_rma_customer_lines" model="ir.actions.act_window">
|
||||
<field name="name">Customer RMA</field>
|
||||
<field name="res_model">rma.order.line</field>
|
||||
<field name="domain">[('type','=', 'customer')]</field>
|
||||
<field name="context">{"search_default_assigned_to_filter":1}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_rma_line_tree" />
|
||||
</record>
|
||||
<record id="action_rma_customer_lines" model="ir.actions.act_window">
|
||||
<field name="name">Customer RMA</field>
|
||||
<field name="res_model">rma.order.line</field>
|
||||
<field name="domain">[('type','=', 'customer')]</field>
|
||||
<field name="context">{"search_default_assigned_to_filter":1}</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_id" ref="view_rma_line_tree" />
|
||||
</record>
|
||||
|
||||
<record id="action_rma_supplier_lines" model="ir.actions.act_window">
|
||||
<field name="name">Supplier RMA</field>
|
||||
<field name="res_model">rma.order.line</field>
|
||||
<field name="domain">[('type','=', 'supplier')]</field>
|
||||
<field
|
||||
<record id="action_rma_supplier_lines" model="ir.actions.act_window">
|
||||
<field name="name">Supplier RMA</field>
|
||||
<field name="res_model">rma.order.line</field>
|
||||
<field name="domain">[('type','=', 'supplier')]</field>
|
||||
<field
|
||||
name="context"
|
||||
>{"search_default_assigned_to_filter":1, "supplier":1}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_rma_line_supplier_tree" />
|
||||
</record>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_id" ref="view_rma_line_supplier_tree" />
|
||||
</record>
|
||||
|
||||
<record id="action_rma_line_supplier_tree" model="ir.actions.act_window.view">
|
||||
<field eval="3" name="sequence" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_rma_supplier_lines" />
|
||||
</record>
|
||||
<record id="action_rma_line_supplier_tree" model="ir.actions.act_window.view">
|
||||
<field eval="3" name="sequence" />
|
||||
<field name="view_mode">list</field>
|
||||
<field name="act_window_id" ref="action_rma_supplier_lines" />
|
||||
</record>
|
||||
|
||||
<record id="action_rma_line_supplier_form" model="ir.actions.act_window.view">
|
||||
<field eval="4" name="sequence" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_rma_line_supplier_form" />
|
||||
<field name="act_window_id" ref="action_rma_supplier_lines" />
|
||||
</record>
|
||||
<record id="action_rma_line_supplier_form" model="ir.actions.act_window.view">
|
||||
<field eval="4" name="sequence" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_rma_line_supplier_form" />
|
||||
<field name="act_window_id" ref="action_rma_supplier_lines" />
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="action_request_approve_rma_order_line">
|
||||
<field name="name">Request Approval</field>
|
||||
<field name="model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="binding_model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records.filtered(lambda x: x.state == "draft"):
|
||||
records.filtered(lambda x: x.state == "draft").action_rma_to_approve()
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.server" id="action_request_approve_rma_order_line">
|
||||
<field name="name">Request Approval</field>
|
||||
<field name="model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="binding_model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records.filtered(lambda x: x.state == "draft"):
|
||||
records.filtered(lambda x: x.state == "draft").action_rma_to_approve()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.server" id="action_request_cancel_rma_order_line">
|
||||
<field name="name">Cancel</field>
|
||||
<field name="model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="binding_model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
records.action_rma_cancel()
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.server" id="action_request_cancel_rma_order_line">
|
||||
<field name="name">Cancel</field>
|
||||
<field name="model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="binding_model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
records.action_rma_cancel()
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<record id="view_rma_tree" model="ir.ui.view">
|
||||
<field name="name">rma.order.tree</field>
|
||||
<field name="name">rma.order.list</field>
|
||||
<field name="model">rma.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA">
|
||||
<list name="RMA">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="partner_id" groups="base.group_user" string="Customer" />
|
||||
<field name="date_rma" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_supplier_tree" model="ir.ui.view">
|
||||
<field name="name">rma.order.supplier.tree</field>
|
||||
<field name="name">rma.order.supplier.list</field>
|
||||
<field name="model">rma.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA">
|
||||
<list name="RMA">
|
||||
<field name="name" />
|
||||
<field name="reference" />
|
||||
<field name="partner_id" groups="base.group_user" string="Supplier" />
|
||||
<field name="date_rma" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
<field name="model">rma.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA">
|
||||
<header>
|
||||
<button
|
||||
<header>
|
||||
<button
|
||||
name="action_rma_to_approve"
|
||||
type="object"
|
||||
string="Request Approval"
|
||||
@@ -42,14 +42,14 @@
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_draft"
|
||||
type="object"
|
||||
string="Back to Draft"
|
||||
invisible="state == 'draft'"
|
||||
groups="rma.group_rma_customer_user,rma.group_rma_supplier_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_approve"
|
||||
type="object"
|
||||
string="Approve"
|
||||
@@ -57,72 +57,76 @@
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_manager"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_approve"
|
||||
type="object"
|
||||
string="Back to Approved"
|
||||
invisible="state != 'done'"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_done"
|
||||
type="object"
|
||||
string="Done"
|
||||
invisible="state in ('done', 'draft', 'cancel')"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
name="action_rma_cancel"
|
||||
type="object"
|
||||
string="Cancel"
|
||||
invisible="state in ('done', 'cancel')"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="state"
|
||||
widget="statusbar"
|
||||
statusbar_visible="draft,to_approve,approved,done"
|
||||
nolabel="1"
|
||||
/>
|
||||
</header>
|
||||
<sheet name='rma' string="RMA">
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
</header>
|
||||
<sheet name='rma' string="RMA">
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_in_shipments"
|
||||
class="oe_stat_button"
|
||||
icon="fa-truck"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
<field
|
||||
name="in_shipment_count"
|
||||
widget="statinfo"
|
||||
string="Shipments"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_out_shipments"
|
||||
class="oe_stat_button"
|
||||
icon="fa-truck"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
<field
|
||||
name="out_shipment_count"
|
||||
widget="statinfo"
|
||||
string="Deliveries"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_lines"
|
||||
class="oe_stat_button"
|
||||
icon="fa-list"
|
||||
groups="rma.group_rma_customer_user"
|
||||
>
|
||||
<field name="line_count" widget="statinfo" string="RMA Lines" />
|
||||
</button>
|
||||
<button
|
||||
<field
|
||||
name="line_count"
|
||||
widget="statinfo"
|
||||
string="RMA Lines"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_supplier_lines"
|
||||
class="oe_stat_button"
|
||||
@@ -130,61 +134,64 @@
|
||||
icon="fa-list"
|
||||
groups="rma.group_rma_supplier_user"
|
||||
>
|
||||
<field
|
||||
<field
|
||||
name="supplier_line_count"
|
||||
widget="statinfo"
|
||||
string="Rel. RMA Lines"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title" name="title">
|
||||
<h1>
|
||||
<field name="name" readonly="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group name="info">
|
||||
<field name="type" readonly="1" invisible="1" />
|
||||
<field
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title" name="title">
|
||||
<h1>
|
||||
<field name="name" readonly="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group name="info">
|
||||
<field name="type" readonly="1" invisible="1" />
|
||||
<field
|
||||
name="partner_id"
|
||||
context="{'res_partner_search_mode': 'customer'}"
|
||||
string="Customer"
|
||||
/>
|
||||
<field name="reference" invisible="type != 'supplier'" />
|
||||
<field name="date_rma" readonly="state != 'draft'" />
|
||||
<field name="reference" invisible="type != 'supplier'" />
|
||||
<field name="date_rma" readonly="state != 'draft'" />
|
||||
</group>
|
||||
<group name="contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" readonly="state != 'draft'" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" readonly="state != 'draft'" />
|
||||
<field name="company_id" groups="base.group_multi_company" />
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="inbound_route" string="Inbound">
|
||||
<field
|
||||
<group>
|
||||
<group name="inbound_route" string="Inbound">
|
||||
<field
|
||||
name="operation_default_id"
|
||||
domain="[('type','=','customer')]"
|
||||
/>
|
||||
<field name="in_warehouse_id" readonly="state != 'draft'" />
|
||||
<field name="in_route_id" readonly="state != 'draft'" />
|
||||
<field
|
||||
<field name="in_warehouse_id" readonly="state != 'draft'" />
|
||||
<field name="in_route_id" readonly="state != 'draft'" />
|
||||
<field
|
||||
name="out_warehouse_id"
|
||||
invisible="1"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
<field name="location_id" readonly="state != 'draft'" />
|
||||
<field
|
||||
<field name="location_id" readonly="state != 'draft'" />
|
||||
<field
|
||||
name="out_route_id"
|
||||
invisible="1"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="customer_to_supplier"
|
||||
readonly="state != 'draft'"
|
||||
invisible="type != 'customer'"
|
||||
/>
|
||||
<field name="state" invisible="1" />
|
||||
<field
|
||||
<field name="state" invisible="1" />
|
||||
<field
|
||||
name="supplier_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
@@ -192,74 +199,80 @@
|
||||
invisible="customer_to_supplier == False"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="comments" string="Description" colspan="2">
|
||||
<field
|
||||
<group>
|
||||
<group name="comments" string="Description" colspan="2">
|
||||
<field
|
||||
name="description"
|
||||
placeholder="This description will be copied to RMA lines."
|
||||
/>
|
||||
<field
|
||||
<field
|
||||
name="comment"
|
||||
placeholder="Additional information will be printed in RMA group report."
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="RMA Lines" name="lines">
|
||||
<field
|
||||
<notebook colspan="4">
|
||||
<page string="RMA Lines" name="lines">
|
||||
<field
|
||||
name="rma_line_ids"
|
||||
context="{'default_rma_id': id,
|
||||
'default_partner_id': partner_id,
|
||||
'hide_title': True}"
|
||||
context="{'default_rma_id': id,'default_partner_id': partner_id,'hide_title': True}"
|
||||
>
|
||||
<tree
|
||||
<list
|
||||
name="lines"
|
||||
editable="bottom"
|
||||
default_order="id asc"
|
||||
create="0"
|
||||
>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="partner_id" invisible="True" />
|
||||
<field name="product_id" />
|
||||
<field
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="partner_id" invisible="True" />
|
||||
<field name="product_id" />
|
||||
<field
|
||||
name="lot_id"
|
||||
groups="stock.group_production_lot"
|
||||
domain="[('product_id', '=', product_id)]"
|
||||
context="{'default_product_id': product_id}"
|
||||
/>
|
||||
<field name="name" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="operation_id" />
|
||||
<field name="location_id" invisible="True" />
|
||||
<field name="in_route_id" invisible="True" />
|
||||
<field name="out_route_id" invisible="True" />
|
||||
<field name="in_warehouse_id" invisible="True" />
|
||||
<field name="out_warehouse_id" invisible="True" />
|
||||
<field name="customer_to_supplier" invisible="True" />
|
||||
<field name="supplier_address_id" invisible="True" />
|
||||
<field name="supplier_to_customer" invisible="True" />
|
||||
<field name="customer_address_id" invisible="True" />
|
||||
<field name="receipt_policy" invisible="True" />
|
||||
<field name="delivery_policy" invisible="True" />
|
||||
<field name="delivery_address_id" invisible="True" />
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field
|
||||
name="message_follower_ids"
|
||||
widget="mail_followers"
|
||||
groups="base.group_user"
|
||||
/>
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
<field name="name" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="operation_id" />
|
||||
<field name="location_id" invisible="True" />
|
||||
<field name="in_route_id" invisible="True" />
|
||||
<field name="out_route_id" invisible="True" />
|
||||
<field name="in_warehouse_id" invisible="True" />
|
||||
<field name="out_warehouse_id" invisible="True" />
|
||||
<field
|
||||
name="customer_to_supplier"
|
||||
invisible="True"
|
||||
/>
|
||||
<field
|
||||
name="supplier_address_id"
|
||||
invisible="True"
|
||||
/>
|
||||
<field
|
||||
name="supplier_to_customer"
|
||||
invisible="True"
|
||||
/>
|
||||
<field
|
||||
name="customer_address_id"
|
||||
invisible="True"
|
||||
/>
|
||||
<field name="receipt_policy" invisible="True" />
|
||||
<field name="delivery_policy" invisible="True" />
|
||||
<field
|
||||
name="delivery_address_id"
|
||||
invisible="True"
|
||||
/>
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -342,7 +355,7 @@
|
||||
context="{'group_by':'date_rma'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -351,7 +364,7 @@
|
||||
<field name="res_model">rma.order</field>
|
||||
<field name="domain">[('type','=', 'customer')]</field>
|
||||
<field name="context">{'customer':1}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_id" ref="view_rma_tree" />
|
||||
</record>
|
||||
|
||||
@@ -360,13 +373,13 @@
|
||||
<field name="res_model">rma.order</field>
|
||||
<field name="domain">[('type','=', 'supplier')]</field>
|
||||
<field name="context">{'supplier':1}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_id" ref="view_rma_supplier_tree" />
|
||||
</record>
|
||||
|
||||
<record id="action_rma_supplier_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">list</field>
|
||||
<field name="act_window_id" ref="action_rma_supplier" />
|
||||
</record>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//page[@name='operations']/field[@name='move_ids_without_package']/tree"
|
||||
expr="//page[@name='operations']/field[@name='move_ids_without_package']/list"
|
||||
position="inside"
|
||||
>
|
||||
<field name="rma_line_id" optional="hide" invisible="not rma_line_id" />
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
<field name="partner_id" string="Customer" />
|
||||
</group>
|
||||
<separator string="Select Stock Moves to add" />
|
||||
<field name="move_ids">
|
||||
<tree>
|
||||
<field
|
||||
name="move_ids"
|
||||
domain="[('picking_id.partner_id', '=', partner_id)]"
|
||||
>
|
||||
<list>
|
||||
<field name="product_id" />
|
||||
<field name="product_uom_qty" />
|
||||
<field
|
||||
@@ -30,12 +33,13 @@
|
||||
<field name="create_date" groups="base.group_no_one" />
|
||||
<field name="date" string="Date" groups="base.group_no_one" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
<field name="show_lot_filter" invisible="1" />
|
||||
<field name="lot_domain_ids" widget="many2many_tags" invisible="1" />
|
||||
<div class="oe_grey" invisible="show_lot_filter == False">
|
||||
The creation of the RMA Lines will be separated according to the lots or serials selected
|
||||
The creation of the RMA Lines will be separated according to the lots or serials
|
||||
selected
|
||||
</div>
|
||||
<div class="o_row">
|
||||
<label
|
||||
@@ -64,9 +68,7 @@
|
||||
name="add_lines"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
or
|
||||
<button
|
||||
/> or <button
|
||||
name="action_cancel"
|
||||
string="Cancel"
|
||||
class="oe_link"
|
||||
@@ -146,9 +148,7 @@
|
||||
name="add_lines"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
or
|
||||
<button
|
||||
/> or <button
|
||||
name="action_cancel"
|
||||
string="Cancel"
|
||||
class="oe_link"
|
||||
|
||||
@@ -151,7 +151,7 @@ class RmaMakePicking(models.TransientModel):
|
||||
qty = item.qty_to_deliver
|
||||
values = self._get_procurement_data(item, group, qty, picking_type)
|
||||
product = item.line_id.product_id
|
||||
if float_compare(qty, 0, product.uom_id.rounding) != 1:
|
||||
if float_compare(qty, 0, precision_rounding=product.uom_id.rounding) != 1:
|
||||
raise ValidationError(
|
||||
_(
|
||||
"No quantity to transfer on %(arg1)s shipment of product %(arg2)s.",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<form string="Select lines for picking" name="lines">
|
||||
<separator string="Select lines for picking" />
|
||||
<field name="item_ids">
|
||||
<tree name="RMA Lines" editable="bottom" create="false">
|
||||
<list name="RMA Lines" editable="bottom" create="false">
|
||||
<field
|
||||
name="rma_id"
|
||||
groups="rma.group_rma_groups"
|
||||
@@ -18,7 +18,7 @@
|
||||
<field name="line_id" invisible="1" />
|
||||
<field name="uom_id" groups="uom.group_uom" readonly="1" />
|
||||
<field name="qty_to_receive" readonly="0" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
<footer>
|
||||
<button
|
||||
@@ -46,14 +46,14 @@
|
||||
<form string="Select lines for picking" name="lines">
|
||||
<separator string="Select lines for picking" />
|
||||
<field name="item_ids">
|
||||
<tree name="RMA Lines" editable="bottom" create="false">
|
||||
<list name="RMA Lines" editable="bottom" create="false">
|
||||
<field name="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="product_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="line_id" invisible="1" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
<field name="qty_to_deliver" readonly="0" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
<footer>
|
||||
<button
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
<newline />
|
||||
<group>
|
||||
<field name="item_ids" nolabel="1" colspan="2">
|
||||
<tree name="Details" editable="bottom" create="false">
|
||||
<list name="Details" editable="bottom" create="false">
|
||||
<field name="line_id" options="{'no_open': true}" />
|
||||
<field name="product_id" />
|
||||
<field name="name" />
|
||||
<field name="operation_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
<newline />
|
||||
|
||||
Reference in New Issue
Block a user