mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[MIG] rma_sale: Migration to 15.0
This commit is contained in:
committed by
Pedro M. Baeza
parent
04ff94bf6b
commit
efb0464833
@@ -14,13 +14,13 @@ Return Merchandise Authorization Management - Link with Sales
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/rma/tree/14.0/rma_sale
|
||||
:target: https://github.com/OCA/rma/tree/15.0/rma_sale
|
||||
:alt: OCA/rma
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-rma_sale
|
||||
:target: https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/145/14.0
|
||||
:target: https://runbot.odoo-community.org/runbot/145/15.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -79,7 +79,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/rma/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/rma/issues/new?body=module:%20rma_sale%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/rma/issues/new?body=module:%20rma_sale%0Aversion:%2015.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.
|
||||
|
||||
@@ -124,6 +124,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-ernestotejeda|
|
||||
|
||||
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/14.0/rma_sale>`_ project on GitHub.
|
||||
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/15.0/rma_sale>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Return Merchandise Authorization Management - Link with Sales",
|
||||
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
|
||||
"version": "14.0.2.1.0",
|
||||
"version": "15.0.1.0.0",
|
||||
"development_status": "Production/Stable",
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
@@ -13,7 +13,6 @@
|
||||
"depends": ["rma", "sale_stock"],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/assets.xml",
|
||||
"views/report_rma.xml",
|
||||
"views/rma_views.xml",
|
||||
"views/sale_views.xml",
|
||||
@@ -21,4 +20,10 @@
|
||||
"views/res_config_settings_views.xml",
|
||||
"wizard/sale_order_rma_wizard_views.xml",
|
||||
],
|
||||
"assets": {
|
||||
"web.assets_frontend": [
|
||||
"/rma_sale/static/src/js/rma_portal_form.js",
|
||||
"/rma_sale/static/src/scss/rma_sale.scss",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Project-Id-Version: Odoo Server 15.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@@ -204,14 +204,8 @@ msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_res_company__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_rma__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_stock_move__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
@@ -230,14 +224,8 @@ msgid "Full page RMA creation"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_res_company__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_rma__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard__id
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_stock_move__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
@@ -247,14 +235,8 @@ msgid "If no requested operation is set, the RMA won't be correctly fulfilled"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_res_company____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_res_config_settings____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_rma____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_rma_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_stock_move____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -105,8 +105,9 @@ class Rma(models.Model):
|
||||
|
||||
def _prepare_refund_line(self, line_form):
|
||||
"""Add line data"""
|
||||
super()._prepare_refund_line(line_form)
|
||||
res = super()._prepare_refund_line(line_form)
|
||||
line = self.sale_line_id
|
||||
if line:
|
||||
line_form.discount = line.discount
|
||||
line_form.sequence = line.sequence
|
||||
return res
|
||||
|
||||
@@ -86,13 +86,14 @@ class SaleOrder(models.Model):
|
||||
"""Search for possible RMA refunds and link them to the order. We
|
||||
don't want to link their sale lines as that would unbalance the
|
||||
qtys to invoice wich isn't correct for this case"""
|
||||
super()._get_invoiced()
|
||||
res = super()._get_invoiced()
|
||||
for order in self:
|
||||
refunds = order.sudo().rma_ids.mapped("refund_id")
|
||||
if not refunds:
|
||||
continue
|
||||
order.invoice_ids += refunds
|
||||
order.invoice_count = len(order.invoice_ids)
|
||||
return res
|
||||
|
||||
|
||||
class SaleOrderLine(models.Model):
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/rma/tree/14.0/rma_sale"><img alt="OCA/rma" src="https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-rma_sale"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/145/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/rma/tree/15.0/rma_sale"><img alt="OCA/rma" src="https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/rma-15-0/rma-15-0-rma_sale"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/145/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allows you to link a sales order to an RMA.
|
||||
This can be done by creating an RMA from scratch and selecting the sales
|
||||
order, creating one or more RMAs from a sales order form view or from a sales
|
||||
@@ -430,7 +430,7 @@ number greater than the order line product quantity.</li>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/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 smashing it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/rma/issues/new?body=module:%20rma_sale%0Aversion:%2014.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/OCA/rma/issues/new?body=module:%20rma_sale%0Aversion:%2015.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">
|
||||
@@ -463,7 +463,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/ernestotejeda"><img alt="ernestotejeda" src="https://github.com/ernestotejeda.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/14.0/rma_sale">OCA/rma</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/15.0/rma_sale">OCA/rma</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import Form, SavepointCase
|
||||
from odoo.tests import Form, TransactionCase
|
||||
|
||||
|
||||
class TestRmaSale(SavepointCase):
|
||||
class TestRmaSale(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(TestRmaSale, cls).setUpClass()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="assets_frontend" inherit_id="web.assets_frontend" name="Request RMA">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/rma_sale/static/src/js/rma_portal_form.js"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/scss"
|
||||
href="/rma_sale/static/src/scss/rma_sale.scss"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -66,9 +66,9 @@
|
||||
<i
|
||||
t-attf-class="text-secondary fa #{address.type == 'delivery' and 'fa-truck' or 'fa-user'}"
|
||||
/>
|
||||
<t t-esc="address.name" />
|
||||
<t t-out="address.name" />
|
||||
</strong>
|
||||
<pre><h6 t-esc="address.contact_address" /></pre>
|
||||
<pre><h6 t-out="address.contact_address" /></pre>
|
||||
</input>
|
||||
</label>
|
||||
</div>
|
||||
@@ -93,7 +93,7 @@
|
||||
<t t-if="data['quantity'] > 0 and data['picking']">
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<span t-esc="data['product'].display_name" />
|
||||
<span t-out="data['product'].display_name" />
|
||||
<input
|
||||
type="hidden"
|
||||
t-attf-name="#{data_index}-product_id"
|
||||
@@ -119,7 +119,7 @@
|
||||
style="max-width: 60px;"
|
||||
/>
|
||||
<span
|
||||
t-esc="data['uom'].name"
|
||||
t-out="data['uom'].name"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
<input
|
||||
@@ -131,7 +131,7 @@
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<span
|
||||
t-esc="data['picking'] and data['picking'].name"
|
||||
t-out="data['picking'] and data['picking'].name"
|
||||
/>
|
||||
<input
|
||||
type="hidden"
|
||||
@@ -147,7 +147,7 @@
|
||||
<option value="">---</option>
|
||||
<t t-foreach="operations" t-as="operation">
|
||||
<option t-att-value="operation.id">
|
||||
<t t-esc="operation.name" />
|
||||
<t t-out="operation.name" />
|
||||
</option>
|
||||
</t>
|
||||
</select>
|
||||
@@ -251,7 +251,7 @@
|
||||
class="btn btn-sm btn-secondary"
|
||||
>
|
||||
<span class="fa fa-reply" role="img" aria-label="RMA" title="RMA" />
|
||||
<span t-esc="sale_order.rma_count" />
|
||||
<span t-out="sale_order.rma_count" />
|
||||
<span>RMA</span>
|
||||
</a>
|
||||
</span>
|
||||
@@ -286,7 +286,7 @@
|
||||
<t t-set="card_header">
|
||||
<h5 class="mb-0">
|
||||
<span>
|
||||
RMA request for order <t t-esc="sale_order.name" />
|
||||
RMA request for order <t t-out="sale_order.name" />
|
||||
</span>
|
||||
</h5>
|
||||
</t>
|
||||
@@ -315,7 +315,7 @@
|
||||
<t t-else="">
|
||||
<li class="breadcrumb-item active">
|
||||
<a t-if="sale_order" t-att-href="default_url"><t
|
||||
t-esc="sale_order.name"
|
||||
t-out="sale_order.name"
|
||||
/></a>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
@@ -124,7 +124,6 @@ class SaleOrderLineRmaWizard(models.TransientModel):
|
||||
related="product_id.uom_id.category_id",
|
||||
)
|
||||
quantity = fields.Float(
|
||||
string="Quantity",
|
||||
digits="Product Unit of Measure",
|
||||
required=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user