Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions rma_refund_reason/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
=============================
RMA Refund Reason Integration
=============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2e403ef31b1be93acf0bed913183ea60c20dc9f6279eee6ae5fab018049bfb44
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-ForgeFlow%2Fstock--rma-lightgray.png?logo=github
:target: https://github.com/ForgeFlow/stock-rma/tree/18.0/rma_refund_reason
:alt: ForgeFlow/stock-rma

|badge1| |badge2| |badge3|

Add refund reason on rma refund creation process

The default return reason can be configured in the RMA operations

**Table of contents**

.. contents::
:local:

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_refund_reason%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.

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- Christopher Ormaza <chris.ormaza@forgeflow.com>

Maintainers
-----------

This module is part of the `ForgeFlow/stock-rma <https://github.com/ForgeFlow/stock-rma/tree/18.0/rma_refund_reason>`_ project on GitHub.

You are welcome to contribute.
2 changes: 2 additions & 0 deletions rma_refund_reason/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
20 changes: 20 additions & 0 deletions rma_refund_reason/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2023 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "RMA Refund Reason Integration",
"version": "18.0.1.0.0",
"summary": "RMA Refund Reason Integration",
"category": "RMA",
"author": "ForgeFlow",
"website": "https://github.com/ForgeFlow",
"license": "AGPL-3",
"depends": ["rma_account", "account_invoice_refund_reason"],
"data": [
"views/rma_operation_view.xml",
"views/rma_order_line_view.xml",
"wizard/rma_refund_view.xml",
],
"installable": True,
"auto_install": True,
}
2 changes: 2 additions & 0 deletions rma_refund_reason/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import rma_operation
from . import rma_order_line
13 changes: 13 additions & 0 deletions rma_refund_reason/models/rma_operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2023 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class RmaOperation(models.Model):
_inherit = "rma.operation"

refund_reason_id = fields.Many2one(
comodel_name="account.move.refund.reason",
string="Refund reason",
)
20 changes: 20 additions & 0 deletions rma_refund_reason/models/rma_order_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2023 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class RmaOrderLine(models.Model):
_inherit = "rma.order.line"

refund_reason_id = fields.Many2one(
comodel_name="account.move.refund.reason",
string="Refund reason",
)

@api.onchange("operation_id")
def _onchange_operation_id(self):
result = super()._onchange_operation_id()
if self.operation_id:
self.refund_reason_id = self.operation_id.refund_reason_id.id
return result
3 changes: 3 additions & 0 deletions rma_refund_reason/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions rma_refund_reason/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Christopher Ormaza \<<chris.ormaza@forgeflow.com>\>
3 changes: 3 additions & 0 deletions rma_refund_reason/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Add refund reason on rma refund creation process

The default return reason can be configured in the RMA operations
Loading