mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[mig] rma_sale_mrp: Migration to 14.0
[UPD] Update rma_sale_mrp.pot [UPD] README.rst
This commit is contained in:
committed by
Pedro M. Baeza
parent
dd83c1b9a3
commit
2cb2c73c74
@@ -14,13 +14,13 @@ Return Merchandise Authorization Management - Link with MRP Kits
|
||||
: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/13.0/rma_sale_mrp
|
||||
:target: https://github.com/OCA/rma/tree/14.0/rma_sale_mrp
|
||||
:alt: OCA/rma
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/rma-13-0/rma-13-0-rma_sale_mrp
|
||||
:target: https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-rma_sale_mrp
|
||||
: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/13.0
|
||||
:target: https://runbot.odoo-community.org/runbot/145/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -74,7 +74,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_mrp%0Aversion:%2013.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_mrp%0Aversion:%2014.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.
|
||||
|
||||
@@ -114,6 +114,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-chienandalu|
|
||||
|
||||
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/13.0/rma_sale_mrp>`_ project on GitHub.
|
||||
This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/14.0/rma_sale_mrp>`_ 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 MRP Kits",
|
||||
"summary": "Allow doing RMAs from MRP kits",
|
||||
"version": "13.0.2.0.1",
|
||||
"version": "14.0.1.0.0",
|
||||
"development_status": "Beta",
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
@@ -12,6 +12,7 @@
|
||||
"license": "AGPL-3",
|
||||
"depends": ["rma_sale", "mrp"],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/sale_order_portal_template.xml",
|
||||
"views/rma_views.xml",
|
||||
"views/report_rma.xml",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@@ -133,18 +133,30 @@ msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale_mrp
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_account_move__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_rma__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line_rma_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line_rma_wizard_component__display_name
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_rma_wizard__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale_mrp
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_account_move__id
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_rma__id
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order__id
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line__id
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line_rma_wizard__id
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line_rma_wizard_component__id
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_rma_wizard__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale_mrp
|
||||
#: model:ir.model,name:rma_sale_mrp.model_account_move
|
||||
msgid "Journal Entries"
|
||||
msgid "Journal Entry"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale_mrp
|
||||
@@ -164,7 +176,13 @@ msgid "Kit quantity"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale_mrp
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_account_move____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_rma____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line_rma_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_line_rma_wizard_component____last_update
|
||||
#: model:ir.model.fields,field_description:rma_sale_mrp.field_sale_order_rma_wizard____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
|
||||
2
rma_sale_mrp/security/ir.model.access.csv
Normal file
2
rma_sale_mrp/security/ir.model.access.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_sale_order_line_rma_wizard_component_user_all,sale.order.line.rma.wizard.component.user.all,model_sale_order_line_rma_wizard_component,rma.rma_group_user_all,1,1,1,1
|
||||
|
@@ -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="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/13.0/rma_sale_mrp"><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-13-0/rma-13-0-rma_sale_mrp"><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/13.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="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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_mrp"><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_mrp"><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>This module enables RMAs for kits, wich isn’t compatible with the base modules.
|
||||
In the backend side, we can return separate component while in the frontend
|
||||
side, customers can return the whole kit and the proper RMAs will be generated.</p>
|
||||
@@ -423,7 +423,7 @@ version to use the same rules so they fail for the same reasons.</p>
|
||||
<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_mrp%0Aversion:%2013.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_mrp%0Aversion:%2014.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">
|
||||
@@ -452,7 +452,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/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/13.0/rma_sale_mrp">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/14.0/rma_sale_mrp">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>
|
||||
|
||||
@@ -61,7 +61,9 @@ class TestRmaSaleMrp(SavepointCase):
|
||||
for line in cls.order_out_picking.move_lines:
|
||||
line.quantity_done = line.product_uom_qty - 7
|
||||
wiz_act = cls.order_out_picking.button_validate()
|
||||
wiz = cls.env["stock.backorder.confirmation"].browse(wiz_act["res_id"])
|
||||
wiz = Form(
|
||||
cls.env[wiz_act["res_model"]].with_context(wiz_act["context"])
|
||||
).save()
|
||||
wiz.process()
|
||||
cls.backorder = cls.sale_order.picking_ids - cls.order_out_picking
|
||||
for line in cls.backorder.move_lines:
|
||||
@@ -117,7 +119,7 @@ class TestRmaSaleMrp(SavepointCase):
|
||||
)
|
||||
order.user_id = user.id
|
||||
rma.reception_move_id.quantity_done = rma.product_uom_qty
|
||||
rma.reception_move_id.picking_id.action_done()
|
||||
rma.reception_move_id.picking_id._action_done()
|
||||
# All the component RMAs must be received if we want to make a refund
|
||||
with self.assertRaises(UserError):
|
||||
rma.action_refund()
|
||||
@@ -126,14 +128,14 @@ class TestRmaSaleMrp(SavepointCase):
|
||||
additional_rma.reception_move_id.quantity_done = (
|
||||
additional_rma.product_uom_qty
|
||||
)
|
||||
additional_rma.reception_move_id.picking_id.action_done()
|
||||
additional_rma.reception_move_id.picking_id._action_done()
|
||||
rma.action_refund()
|
||||
self.assertEqual(rma.refund_id.user_id, user)
|
||||
# The component RMAs get automatically refunded
|
||||
self.assertEqual(rma.refund_id, rmas_left.mapped("refund_id"))
|
||||
# The refund product is the kit, not the components
|
||||
self.assertEqual(rma.refund_id.invoice_line_ids.product_id, self.product_kit)
|
||||
rma.refund_id.post()
|
||||
rma.refund_id.action_post()
|
||||
# We can still return another kit
|
||||
wizard_id = order.action_create_rma()["res_id"]
|
||||
wizard = self.env["sale.order.rma.wizard"].browse(wizard_id)
|
||||
|
||||
@@ -1,77 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<odoo>
|
||||
<template id="report_rma_document" inherit_id="rma_sale.report_rma_document">
|
||||
<xpath expr="//div[@id='product_information']" position="after">
|
||||
<t t-if="doc.sudo().phantom_bom_product">
|
||||
<strong class="d-block mt32 mb-1">Kit information</strong>
|
||||
<div class="row mb32" id="kit_information">
|
||||
<div
|
||||
t-if="doc.sudo().phantom_bom_product"
|
||||
class="col-auto mw-100 mb-2"
|
||||
>
|
||||
<strong>Kit:</strong>
|
||||
<p
|
||||
class="m-0"
|
||||
t-field="doc.sudo().phantom_bom_product.display_name"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
t-if="doc.sudo().phantom_bom_product"
|
||||
class="col-auto mw-100 mb-2"
|
||||
>
|
||||
<strong>Kit Quantity:</strong>
|
||||
<p class="m-0" t-field="doc.kit_qty" />
|
||||
</div>
|
||||
<template id="report_rma_document" inherit_id="rma_sale.report_rma_document">
|
||||
<xpath expr="//div[@id='product_information']" position="after">
|
||||
<t t-if="doc.sudo().phantom_bom_product">
|
||||
<strong class="d-block mt32 mb-1">Kit information</strong>
|
||||
<div class="row mb32" id="kit_information">
|
||||
<div
|
||||
t-if="doc.sudo().phantom_bom_product"
|
||||
class="col-auto mw-100 mb-2"
|
||||
>
|
||||
<strong>Kit:</strong>
|
||||
<p
|
||||
class="m-0"
|
||||
t-field="doc.sudo().phantom_bom_product.display_name"
|
||||
/>
|
||||
</div>
|
||||
<strong class="d-block mb-1">Related Kit Components RMAs</strong>
|
||||
<t
|
||||
t-set="related_kit_rmas"
|
||||
t-value="doc.search([('rma_kit_register', '=', doc.rma_kit_register), ('id', '!=', doc.id)])"
|
||||
/>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<th>
|
||||
<span>RMA</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>Product</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>Quantity</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>State</span>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="related_kit_rmas" t-as="kit_rma">
|
||||
<td>
|
||||
<span t-field="kit_rma.name" />
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
t-if="doc.sudo().phantom_bom_product"
|
||||
class="col-auto mw-100 mb-2"
|
||||
>
|
||||
<strong>Kit Quantity:</strong>
|
||||
<p class="m-0" t-field="doc.kit_qty" />
|
||||
</div>
|
||||
</div>
|
||||
<strong class="d-block mb-1">Related Kit Components RMAs</strong>
|
||||
<t
|
||||
t-set="related_kit_rmas"
|
||||
t-value="doc.search([('rma_kit_register', '=', doc.rma_kit_register), ('id', '!=', doc.id)])"
|
||||
/>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<th>
|
||||
<span>RMA</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>Product</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>Quantity</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>State</span>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="related_kit_rmas" t-as="kit_rma">
|
||||
<td>
|
||||
<span t-field="kit_rma.name" />
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
t-if="kit_rma.product_id"
|
||||
t-field="kit_rma.product_id"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<t t-if="kit_rma.product_id">
|
||||
<span t-field="kit_rma.product_uom_qty" />
|
||||
<span
|
||||
t-if="kit_rma.product_id"
|
||||
t-field="kit_rma.product_id"
|
||||
t-field="kit_rma.uom_id"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<t t-if="kit_rma.product_id">
|
||||
<span t-field="kit_rma.product_uom_qty" />
|
||||
<span
|
||||
t-field="kit_rma.uom_id"
|
||||
groups="uom.group_uom"
|
||||
/>
|
||||
</t>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="kit_rma.state" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
</t>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="kit_rma.state" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user