Joan Sisquella fad3ab7a79 [FIX] rma: procurement origin
In the current implementation of Odoo's _assign_picking() method in stock.move, there's a conditional check that looks at whether all the moves associated with a picking have the same partner_id and origin. If any move doesn't align with these conditions, the origin of the picking is set to False.

        if any(picking.partner_id.id != m.partner_id.id or
                picking.origin != m.origin for m in moves):
            # If a picking is found, we'll append `move` to its move list and thus its
            # `partner_id` and `ref` field will refer to multiple records. In this
            # case, we chose to  wipe them.
            picking.write({
                'partner_id': False,
                'origin': False,
            })
In the context of RMA when we have multiple moves associated with a picking, each coming from a different RMA order line, we encounter a problem. Each move has its origin set as the name of the RMA orde line (line.name), so as soon as a second move from a different line is appended to the picking, the origin of the picking is wiped, because it doesn't match the origin of the first move.

In order to prevent the partner_id of the picking from being set to False when there are multiple associated moves, I propose that we change the origin of the procurement from the name of the RMA line to the name of the procurement group (group.name). This way, all moves associated with a picking will share the same origin, preserving the origin of the picking and ensuring it doesn't get inadvertently set to False.
2023-05-30 17:39:08 +02:00
2023-02-07 10:06:16 +01:00
2023-05-30 17:39:08 +02:00
2020-12-24 14:54:45 +05:30
2023-02-07 10:06:16 +01:00
2020-01-14 16:19:04 +01:00
2023-02-07 10:06:16 +01:00
2023-02-07 10:06:16 +01:00
2023-02-07 10:06:16 +01:00
2023-02-07 10:06:16 +01:00
2023-02-07 10:06:16 +01:00
2020-01-14 16:36:03 +01:00
2023-02-07 10:06:16 +01:00

Pre-commit Status Build Status codecov

stock-rma

Manage returns authorizations

This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to ForgeFlow policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


Description
Stock RMA
Readme 12 MiB
Languages
Python 100%