Repository
OCA/rma · module folder · Try on Runboat
Module version
2.5.1
Category
RMA
Folder size
0.28 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/rma
Last tracking update
2026-08-07 08:42:51
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Pedro M. Baeza, sbejaoui, Víctor Martínez, Weblate, Marie Lejeune, OCA-git-bot, oca-ci, eugenio
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
rma_inter_company, rma_sale_auto_detect, rma_sale_delivery, rma_sale_lot, rma_sale_mrp, rma_sale_reason
Description
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 order web
portal page.

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
portal_my_home_menu_sale portal_my_home_menu_sale ir.ui.view qweb Inherits sale.portal_my_home_menu_sale
portal_my_rmas_sale portal_my_rmas_sale ir.ui.view qweb Inherits rma.portal_my_rmas
portal_rma_page Show RMAs ir.ui.view qweb Inherits rma.portal_rma_page
report_rma_document report_rma_document ir.ui.view qweb Inherits rma.report_rma_document
request_rma_single_page Request RMA (single page) ir.ui.view qweb New
res_config_settings_view_form res.config.settings form Inherits sale.res_config_settings_view_form
rma_view_form rma.view.form rma form Inherits rma.rma_view_form
sale_order_portal_content Show RMAs ir.ui.view qweb Inherits sale.sale_order_portal_content
sale_order_portal_template Request RMA ir.ui.view qweb Inherits sale.sale_order_portal_template
sale_order_rma_wizard_form_view sale.order.rma.wizard.form sale.order.rma.wizard form New
sale_rma_request_form RMA Request Form ir.ui.view qweb New
view_move_form account.move.form - Add helper sale_line_ids account.move form Inherits account.view_move_form
view_order_form sale.order.form.inherit sale.order form Inherits sale.view_order_form
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/my/orders/<int:order_id>/requestrma CustomerPortal.request_rma public http POST sudo website
/my/requestrma/<int:order_id> CustomerPortal.request_sale_rma public http ALL website
Models touched (9)

New fields (0)

No new fields.

Public methods (3)
  • button_cancel(self)
    If this a refund linked to an RMA, undo the linking of the reception move for having proper quantities and status.
  • button_draft(self)
    Relink the reception move when passing the refund again to draft.
  • unlink(self)
    If the invoice is removed, rollback the quantities correction

New fields (1)
  • show_full_page_sale_rma Boolean
    help='From the frontend sale order page go to a single RMA page creation instead of the usual popup' string='Full page RMA creation'
Public methods (0)

No public methods.

New fields (1)
  • show_full_page_sale_rma Boolean
    readonly=False related='company_id.show_full_page_sale_rma'
Public methods (0)

No public methods.

New fields (10)
  • allowed_move_ids Many2many → stock.move
    comodel_name='stock.move' compute='_compute_allowed_move_ids'
  • allowed_picking_ids Many2many → stock.picking
    comodel_name='stock.picking' compute='_compute_allowed_picking_ids'
  • allowed_product_ids Many2many → product.product
    comodel_name='product.product' compute='_compute_allowed_product_ids' compute_sudo=True
  • can_be_refunded_with_invoice Boolean
    compute='_compute_can_be_refunded_with_invoice'
  • move_id Many2one
    domain="[('id', 'in', allowed_move_ids)]"
  • order_id Many2one → sale.order
    comodel_name='sale.order' compute='_compute_order_id' domain="[ ('partner_id', 'child_of', commercial_partner_id), ('state', '=', 'sale'),]" readonly=False store=True string='Sale Order'
  • picking_id Many2one
    domain="(order_id or partner_id) and [('id', 'in', allowed_picking_ids)] or [('state', '=', 'done'), ('picking_type_id.code', '=', 'outgoing')] "
  • product_id Many2one
    domain="order_id and [('id', 'in', allowed_product_ids)] or [('type', 'in', ['consu', 'product'])]"
  • refund_id Many2one
    index=True
  • sale_line_id Many2one
    related='move_id.sale_line_id'
Public methods (2)
  • action_refund_without_invoice(self)
  • create_replace(self, scheduled_date, warehouse, product, qty, uom)

New fields (2)
  • rma_count Integer
    compute='_compute_rma_count' string='RMA count'
  • rma_ids One2many → rma
    comodel_name='rma' copy=False inverse_name='order_id' string='RMAs'
Public methods (3)
  • action_create_rma(self)
  • action_view_rma(self)
  • get_delivery_rma_data(self)

New fields (0)

No new fields.

Public methods (2)
  • get_delivery_move(self)
  • prepare_sale_rma_data(self)

New fields (16)
  • allowed_picking_ids Many2many → stock.picking
    comodel_name='stock.picking' compute='_compute_allowed_picking_ids'
  • allowed_product_ids Many2many → product.product
    comodel_name='product.product' compute='_compute_allowed_product_ids'
  • allowed_quantity Float
    digits='Product Unit of Measure' readonly=True
  • description Text
  • different_return_product Boolean
    related='operation_id.different_return_product'
  • move_id Many2one → stock.move
    comodel_name='stock.move' compute='_compute_move_id'
  • operation_id Many2one → rma.operation
    comodel_name='rma.operation' compute='_compute_operation_id' readonly=False store=True string='Requested operation'
  • order_id Many2one → sale.order
    comodel_name='sale.order' default=<expr>
  • picking_id Many2one → stock.picking
    comodel_name='stock.picking' domain="[('id', 'in', allowed_picking_ids)]" string='Delivery order'
  • product_id Many2one → product.product
    comodel_name='product.product' domain="[('id', 'in', allowed_product_ids)]" required=True string='Product'
  • quantity Float
    compute='_compute_quantity' digits='Product Unit of Measure' readonly=False required=True store=True
  • return_product_id Many2one → product.product
    help="Product to be returned if it's different from the originally delivered item." args: 'product.product'
  • sale_line_id Many2one → sale.order.line
    comodel_name='sale.order.line'
  • uom_category_id Many2one → uom.category
    comodel_name='uom.category' related='product_id.uom_id.category_id'
  • uom_id Many2one → uom.uom
    comodel_name='uom.uom' domain="[('category_id', '=', uom_category_id)]" required=True string='Unit of Measure'
  • wizard_id Many2one → sale.order.rma.wizard
    comodel_name='sale.order.rma.wizard' string='Wizard'
Public methods (1)
  • onchange_product_id(self)
    @api.onchange('product_id')

New fields (8)
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' related='order_id.partner_id.commercial_partner_id' string='Commercial entity'
  • custom_description Text
    help='Values coming from portal RMA request form custom fields'
  • is_return_all Boolean
    default=True string='Return All?'
  • line_ids One2many → sale.order.line.rma.wizard
    comodel_name='sale.order.line.rma.wizard' inverse_name='wizard_id' string='Lines'
  • location_id Many2one → stock.location
    comodel_name='stock.location' default=<expr> domain=_domain_location_id string='RMA location'
  • operation_id Many2one → rma.operation
    comodel_name='rma.operation' string='Requested operation'
  • order_id Many2one → sale.order
    comodel_name='sale.order' default=<expr>
  • partner_shipping_id Many2one → res.partner
    comodel_name='res.partner' help='Will be used to return the goods when the RMA is completed' string='Shipping Address'
Public methods (2)
  • create_and_open_rma(self)
  • create_rma(self, from_portal=False)

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
8 days ago
Last activity
3 days ago
Repository
OCA/rma
Pull request
[19.0][MIG] rma_sale: Migration from 18.0 to 19.0 (#617)