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,6 +1,5 @@
|
||||
<?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>
|
||||
|
||||
@@ -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
|
||||
@@ -92,10 +91,12 @@
|
||||
</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
|
||||
@@ -231,12 +235,18 @@
|
||||
</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"
|
||||
</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">
|
||||
</setting>
|
||||
<setting id="rma_delivery_address" help="Enable RMA invoicing">
|
||||
<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>
|
||||
</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,10 +1,10 @@
|
||||
<?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="name">rma.order.line.list</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<list name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
@@ -22,15 +22,15 @@
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</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="name">rma.order.line.supplier.list</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<list name="RMA Line" decoration-info="state in ('draft','to_approve')">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="product_id" />
|
||||
@@ -47,7 +47,7 @@
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -138,8 +138,10 @@
|
||||
string="Deliveries"
|
||||
/>
|
||||
</button>
|
||||
<!--Move this button to rma_account-->
|
||||
<!--<button type="object" name="action_view_invoice"
|
||||
<!--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">
|
||||
@@ -348,10 +350,7 @@
|
||||
<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="rma_id" groups="rma.group_rma_groups" />
|
||||
<field name="origin" />
|
||||
</group>
|
||||
<group
|
||||
@@ -364,14 +363,7 @@
|
||||
</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>
|
||||
<chatter />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -398,9 +390,7 @@
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="reference_move_id" position="attributes">
|
||||
<attribute
|
||||
name="domain"
|
||||
>[('picking_id.partner_id', '=', partner_id),
|
||||
<attribute name="domain">[('picking_id.partner_id', '=', partner_id),
|
||||
('location_id.usage', '=', 'supplier'),
|
||||
('state', '=', 'done')]</attribute>
|
||||
</field>
|
||||
@@ -496,7 +486,7 @@
|
||||
<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_mode">list,form</field>
|
||||
<field name="view_id" ref="view_rma_line_tree" />
|
||||
</record>
|
||||
|
||||
@@ -507,13 +497,13 @@
|
||||
<field
|
||||
name="context"
|
||||
>{"search_default_assigned_to_filter":1, "supplier":1}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<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="view_mode">list</field>
|
||||
<field name="act_window_id" ref="action_rma_supplier_lines" />
|
||||
</record>
|
||||
|
||||
@@ -530,7 +520,7 @@
|
||||
<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"):
|
||||
if records.filtered(lambda x: x.state == "draft"):
|
||||
records.filtered(lambda x: x.state == "draft").action_rma_to_approve()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -120,7 +120,11 @@
|
||||
icon="fa-list"
|
||||
groups="rma.group_rma_customer_user"
|
||||
>
|
||||
<field name="line_count" widget="statinfo" string="RMA Lines" />
|
||||
<field
|
||||
name="line_count"
|
||||
widget="statinfo"
|
||||
string="RMA Lines"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
@@ -156,7 +160,10 @@
|
||||
<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" />
|
||||
<field
|
||||
name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
@@ -210,11 +217,9 @@
|
||||
<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"
|
||||
@@ -237,29 +242,37 @@
|
||||
<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="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="delivery_address_id"
|
||||
invisible="True"
|
||||
/>
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</list>
|
||||
</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>
|
||||
<chatter />
|
||||
</form>
|
||||
</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