mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
@@ -7,7 +7,7 @@ Return Merchandise Authorization Management - Link with Sales
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:39fa5c0e9b816d7bf19689674b96c160586e4e716b0c028e6e94b7b2bc1f6a42
|
||||
!! source digest: sha256:7e0618b54228b56d98fe59f32f0d347363353c739194e3fbeb60760c7964b120
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
||||
@@ -106,6 +106,7 @@ Contributors
|
||||
|
||||
* Chafique Delli <chafique.delli@akretion.com>
|
||||
* Giovanni Serra - Ooops <giovanni@ooops404.com>
|
||||
* Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
# Copyright 2023 Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
@@ -116,3 +117,6 @@ class Rma(models.Model):
|
||||
if line:
|
||||
line_form.discount = line.discount
|
||||
line_form.sequence = line.sequence
|
||||
analytic_account = line.order_id.analytic_account_id
|
||||
if analytic_account:
|
||||
line_form.analytic_account_id = analytic_account
|
||||
|
||||
@@ -7,3 +7,4 @@
|
||||
|
||||
* Chafique Delli <chafique.delli@akretion.com>
|
||||
* Giovanni Serra - Ooops <giovanni@ooops404.com>
|
||||
* Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:39fa5c0e9b816d7bf19689674b96c160586e4e716b0c028e6e94b7b2bc1f6a42
|
||||
!! source digest: sha256:7e0618b54228b56d98fe59f32f0d347363353c739194e3fbeb60760c7964b120
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" 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 image-reference" 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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/rma&target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allows you to link a sales order to an RMA.
|
||||
@@ -455,6 +455,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
</li>
|
||||
<li>Chafique Delli <<a class="reference external" href="mailto:chafique.delli@akretion.com">chafique.delli@akretion.com</a>></li>
|
||||
<li>Giovanni Serra - Ooops <<a class="reference external" href="mailto:giovanni@ooops404.com">giovanni@ooops404.com</a>></li>
|
||||
<li>Michael Tietz (MT Software) <<a class="reference external" href="mailto:mtietz@mt-software.de">mtietz@mt-software.de</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Copyright 2020 Tecnativa - Ernesto Tejeda
|
||||
# Copyright 2022 Tecnativa - Víctor Martínez
|
||||
# Copyright 2023 Michael Tietz (MT Software) <mtietz@mt-software.de>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import Form, SavepointCase
|
||||
@@ -91,11 +92,18 @@ class TestRmaSale(SavepointCase):
|
||||
{"login": "test_refund_with_so", "name": "Test"}
|
||||
)
|
||||
order.user_id = user.id
|
||||
order.analytic_account_id = self.env["account.analytic.account"].create(
|
||||
{"name": "Test Account"}
|
||||
)
|
||||
rma.action_confirm()
|
||||
rma.reception_move_id.quantity_done = rma.product_uom_qty
|
||||
rma.reception_move_id.picking_id._action_done()
|
||||
rma.action_refund()
|
||||
self.assertEqual(rma.refund_id.user_id, user)
|
||||
self.assertEqual(
|
||||
rma.refund_id.invoice_line_ids.analytic_account_id,
|
||||
order.analytic_account_id,
|
||||
)
|
||||
|
||||
@users("partner@rma")
|
||||
def test_create_rma_from_so_portal_user(self):
|
||||
|
||||
Reference in New Issue
Block a user