Repository
OCA/rma · module folder · Try on Runboat
Module version
1.0.0
Category
Generic Modules/CRM & SRM
Folder size
0.26 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/rma
Last tracking update
2026-08-07 07:17:45
Authors
Camptocamp, Akretion, Vauxoo, Odoo Community Association (OCA), MONK Software, Eezee-it, Techspawn Solutions
Maintainers
Camptocamp, Akretion, Vauxoo, Odoo Community Association (OCA), MONK Software, Eezee-it, Techspawn Solutions
Committers
Maxime Chambreuil, Pedro M. Baeza, GitHub, Stéphane Bidoul (ACSONE), Pierrick Brun, OCA-git-bot
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
crm_claim_categ_as_name, crm_rma_advance_location, crm_rma_lot_mass_return, crm_rma_stock_location
Description

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
crm_case_claims_tree_view CRM - Claims Tree crm.claim tree Inherits crm_claim.crm_case_claims_tree_view
crm_claim_line_form_view CRM - Claim product return line Form claim.line form New
crm_claim_line_tree_view CRM - Claims Tree claim.line tree New
crm_claim_rma_form CRM Claim RMA crm.claim form Inherits crm_claim.crm_case_claims_form_view
crm_claim_rma_form_view CRM - Claim product return Form crm.claim form Inherits crm_claim.crm_case_claims_form_view
invoice_form crm_claim_rma.invoice_form account.invoice form Inherits account.invoice_form
picking_in_form crm_claim_rma.picking_in_form stock.picking form Inherits stock.view_picking_form
search_crm_claim_rma_number CRM - Claims Search crm.claim search Inherits crm_claim.view_crm_case_claims_filter
stock_move_mail_thread stock_move_mail_thread stock.move form Inherits stock.view_move_form
tree_crm_claim_rma_number CRM - Claims Tree crm.claim tree Inherits crm_claim.crm_case_claims_tree_view
view_claim_picking claim_picking claim_make_picking.wizard form New
view_crm_case_claims_filter CRM - Claims Search crm.claim Inherits crm_claim.view_crm_case_claims_filter
view_crm_claim_lines_filter CRM - Claims Search claim.line search New
view_partner_contact_tree res.partner.contact.tree res.partner tree New
view_picking_internal_search_claim_id stock.picking.internal.search stock.picking search Inherits stock.view_picking_internal_search
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (10)

New fields (1)
  • claim_id Many2one → crm.claim
    string='Claim' args: 'crm.claim'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals)
    @api.model

New fields (1)
  • description Char
    default=_default_description
Public methods (1)
  • compute_refund(self, mode='refund')
    @api.multi

New fields (29)
  • applicable_guarantee Selection
    args: [('us', 'Company'), ('supplier', 'Supplier'), ('brand', 'Brand manufacturer')], 'Warranty type'
  • claim_diagnosis Selection
    help='To describe the line product diagnosis' args: [('damaged', 'Product Damaged'), ('repaired', 'Product Repaired'), ('good', 'Product in good condition'), ('hidden', 'Product with hidden physical damage')]
  • claim_id Many2one → crm.claim
    help='To link to the case.claim object' ondelete='cascade' string='Related claim' args: 'crm.claim'
  • claim_origin Selection
    help='To describe the line product problem' required=False args: SUBJECT_LIST, 'Claim Subject'
  • claim_type Many2one
    help='Claim classification' related='claim_id.claim_type' store=True string='Claim Line Type'
  • company_id Many2one → res.company
    change_default=True default=<expr> readonly=False string='Company' args: 'res.company'
  • date Date
    default=fields.date.today() index=True args: 'Claim Line Date'
  • display_name Char
    compute='_compute_display_name' args: 'Name'
  • guarantee_limit Date
    help='The warranty limit is computed as: invoice date + warranty defined on selected product.' readonly=True args: 'Warranty limit'
  • invoice_date Datetime
    help='Date of Claim Invoice' related='invoice_line_id.invoice_id.create_date'
  • invoice_line_id Many2one → account.invoice.line
    help='The invoice line related to the returned product' string='Invoice Line' args: 'account.invoice.line'
  • last_state_change Date
    help='To set thelast state / substate change' string='Last change'
  • location_dest_id Many2one → stock.location
    help='The return stock location of the returned product' string='Return Stock Location' args: 'stock.location'
  • move_in_id Many2one → stock.move
    help='The move line related to the returned product' string='Move Line from picking in' args: 'stock.move'
  • move_out_id Many2one → stock.move
    help='The move line related to the returned product' string='Move Line from picking out' args: 'stock.move'
  • name Char
    default='none' help='More precise description of the problem' required=False args: 'Description'
  • number Char
    default='/' help='Claim Line Identification Number' readonly=True
  • priority Selection
    default='0_not_define' help='Priority attention of claim line' readonly=False store=True args: [('0_not_define', 'Not Define'), ('1_normal', 'Normal'), ('2_high', 'High'), ('3_very_high', 'Very High')], 'Priority'
  • prodlot_id Many2one → stock.production.lot
    help='The serial/lot of the returned product' string='Serial/Lot number' args: 'stock.production.lot'
  • product_id Many2one → product.product
    help='Returned product' string='Product' args: 'product.product'
  • product_returned_quantity Float
    digits=(12, 2) help='Quantity of product returned' args: 'Quantity'
  • refund_line_id Many2one → account.invoice.line
    help='The refund line related to the returned product' string='Refund Line' args: 'account.invoice.line'
  • return_value Float
    compute='_compute_line_total_amount' help='Quantity returned * Unit sold price' string='Total return'
  • state Selection
    default='draft' string='State' args: [('draft', 'Draft'), ('refused', 'Refused'), ('confirmed', 'Confirmed, waiting for product'), ('in_to_control', 'Received, to control'), ('in_to_treate', 'Controlled, to treate'), ('treated', 'Treated')]
  • substate_id Many2one → substate.substate
    help='Select a sub state to precise the standard state. Example 1: state = refused; substate could be warranty over, not in warranty, no problem,... . Example 2: state = to treate; substate could be to refund, to exchange, to repair,...' string='Sub state' args: 'substate.substate'
  • unit_sale_price Float
    digits=(12, 2) help="Unit sale price of the product. Auto filled if retrun done by invoice selection. Be careful and check the automatic value as don't take into account previous refunds, invoice discount, can be for 0 if product for free,..."
  • warning Selection
    help='If warranty has expired' readonly=True args: WARRANT_COMMENT, 'Warranty'
  • warranty_return_partner Many2one → res.partner
    help='Where the customer has to send back the product(s)' string='Warranty Address' args: 'res.partner'
  • warranty_type Selection
    help='Who is in charge of the warranty return treatment towards the end customer. Company will use the current company delivery or default address and so on for supplier and brand manufacturer. Does not necessarily mean that the warranty to be applied is the one of the return partner (ie: can be returned to the company and be under the brand warranty' args: get_warranty_return_partner
Public methods (9)
  • auto_set_warranty(self)
    @api.model
    Set warranty automatically if the user has not himself pressed on 'Calculate warranty state' button, it sets warranty for him
  • copy(self, default=None)
    @api.multi
  • create(self, vals)
    @api.model
    Return write the identify number once the claim line is create.
  • get_destination_location(self, product_id, warehouse_id)
    @api.returns('stock.location')
    Compute and return the destination location to take for a return. Always take 'Supplier' one when return type different from company.
  • get_warranty_return_partner(self)
    @api.model
  • set_warranty(self)
    @api.multi
    Calculate warranty limit and address
  • set_warranty_limit(self)
  • set_warranty_return_address(self)
  • warranty_limit(start, warranty_duration)
    @staticmethod
    Take a duration in float, return the duration in relativedelta ``relative_delta(months=...)`` only accepts integers. We have to extract the decimal part, and then, extend the delta with days.

New fields (4)
  • claim_line_dest_location_id Many2one → stock.location
    default=_default_claim_line_dest_location_id help='Location where the system will stock the returned products.' required=True string='Dest. Location' args: 'stock.location'
  • claim_line_ids Many2many → claim.line
    default=_default_claim_line_ids string='Claim lines' args: 'claim.line', 'claim_line_picking', 'claim_picking_id', 'claim_line_id'
  • claim_line_source_location_id Many2one → stock.location
    default=_default_claim_line_source_location_id help='Location where the returned products are from.' string='Source Location' args: 'stock.location'
  • delivery_warehouse_id Many2one → stock.warehouse
    default=<expr> help='Warehouse where to take the replacement products for customers.' string='Source Warehouse' args: 'stock.warehouse'
Public methods (2)
  • action_cancel(self)
    @api.multi
  • action_create_picking(self)
    @api.multi

New fields (15)
  • claim_line_ids One2many → claim.line
    string='Return lines' args: 'claim.line', 'claim_id'
  • claim_type Many2one
    default=_get_claim_type_default help='Claim classification' required=True
  • company_id Many2one
    change_default=True default=<expr>
  • delivery_address_id Many2one → res.partner
    help='This address will be used to deliver repaired or replacement products.' string='Partner delivery address' args: 'res.partner'
  • invoice_id Many2one → account.invoice
    help='Related original Cusotmer invoice' string='Invoice' args: 'account.invoice'
  • invoice_ids One2many → account.invoice
    copy=False args: 'account.invoice', 'claim_id', 'Refunds'
  • pick Boolean
    args: 'Pick the product in the store'
  • picking_ids One2many → stock.picking
    compute=_get_picking_ids copy=False string='RMA' args: 'stock.picking'
  • planned_cost Float
    args: 'Expected cost'
  • planned_revenue Float
    args: 'Expected revenue'
  • real_cost Float
  • real_revenue Float
  • rma_number Char
    help='RMA Number provided by supplier' size=128
  • sequence Integer
    default=<expr>
  • warehouse_id Many2one → stock.warehouse
    default=_get_default_warehouse required=True string='Warehouse' args: 'stock.warehouse'
Public methods (5)
  • copy(self, default=None)
    @api.multi
  • create(self, values)
    @api.model
  • message_get_reply_to(self, res_ids, default=None)
    @api.model
    Override to get the reply_to of the parent project.
  • message_get_suggested_recipients(self)
    @api.multi
  • name_get(self)
    @api.multi

New fields (1)
  • claim_id Many2one → crm.claim
    args: 'crm.claim', 'Claim'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals)
    @api.model
    In case of a wrong picking out, We need to create a new stock_move in a picking already open. To avoid having to confirm the stock_move, we override the create and confirm it at the creation only for this case.

New fields (1)
  • claim_id Many2one → crm.claim
    args: 'crm.claim', 'Claim'
Public methods (0)

No public methods.

New fields (2)
  • name Char
    required=True args: 'Sub state'
  • substate_descr Text
    help='To give more information about the sub state' args: 'Description'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…