Commit Graph

59 Commits

Author SHA1 Message Date
Joan Sisquella
2feb96db80 [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 15:49:37 +02:00
DavidJForgeFlow
621e5d4ec1 [FIX] rma: product_uom_qty not in move_line_ids 2023-03-03 17:00:11 +01:00
Lois Rilo
37088edc47 [FIX] rma: in multi step routes, only reserve first step
We shoul not force reservation on next steps on a multi step
route, oherwise a inconsistency is generated and the transfers
cannot be processed or cancel so the user gets stuck ("it is
not possible to unreserve more products that you have in stock"
error).
2023-02-21 15:06:38 +01:00
DavidJForgeFlow
00730ce592 [14.0][FIX] rma: add stock move in supplier group 2023-02-10 11:52:42 +01:00
Lois Rilo
79e1c5c2eb [IMP] rma: add description to rma order and copy it over to new lines 2023-01-09 17:19:24 +01:00
Lois Rilo
15f5819a8f [IMP] rma: rma group supplier form view as a inherited view.
The goal is to simplify view defintion and do not duplicate
things, requiring to do view changes in two places.

The same change was done from rma lines some time ago.
2023-01-09 17:19:13 +01:00
Lois Rilo
c975fb1464 [FIX] rma: Ensure that configuration on the operation is applied
Without this, some policies are not being copied from the
operation selected when creating new rma line from a rma group.

In v16 this patch and the usage of such onchange can be removed
in favor of (pre)computed stored editable fields for all policies
and configuration in the RMA operation.
2023-01-02 08:55:59 +01:00
Florian da Costa
2559cb4660 [16.0][MIG] Migrate rma module to v16 2022-11-28 16:24:49 +01:00
DavidJForgeFlow
284891c09b [15.0][FIX] rma_sale: fixup of procurement 2022-11-28 16:11:02 +01:00
Stefan Rijnhart
60a9d6decb [IMP] rma: prevent the creation of zero qty moves 2022-11-28 16:11:02 +01:00
Florian da Costa
c778c1db67 [IMP] Make rma order view cleaner for user
Hide button and fields depending on the policy chosen on the rma line
2022-11-28 16:11:02 +01:00
Stefan Rijnhart
a4e20f6abb [FIX] rma: improve check on rule selection during procurement
Fixes #274

Thanks to @florian-dacosta for suggesting this approach.
2022-11-28 16:11:02 +01:00
Stefan Rijnhart
cddf72d6c0 [FIX] rma: prevent against warehouse mismatch or missing rules
When creating pickings, ensure that the applied stock rule was taken from
the operation's routes. Otherwise, the default procurement rules for a
warehouse may kick in, creating incoming customer goods not from the customer
location but from the resupply warehouse.
2022-11-28 16:11:02 +01:00
Lois Rilo
83de39e65e [IMP] rma: add rma lines to group selecting serial numbers 2022-11-28 16:11:02 +01:00
Florian da Costa
6bb73225f2 [FIX] Remove useless/bad wiz_id field in rma_make_picking.wizard item preparation 2022-11-28 16:11:02 +01:00
AaronHForgeFlow
df52ec86f6 [IMP] COPIER UPDATE: black, isort, prettier 2022-11-28 16:11:02 +01:00
Lois Rilo
c2d491ede6 [FIX] rma: do not force reservation on supplier RMA deliveries
* remove code call to unexisting `force_asign`.
* only one model per model file and rename as appropriate.
2022-11-28 16:11:02 +01:00
Christopher Ormaza
3b3675501f [FIX] rma: add lot to pickings created from wizard on RMA lines 2022-11-28 16:11:02 +01:00
Christopher Ormaza
bcd4d337dd [IMP] rma, rma_sale: added select all, messages for UX 2022-11-28 16:11:02 +01:00
Christopher Ormaza
f1581f1ba4 [IMP] rma: Added serial/lot selection on from stock move wizard on rma groups
- added restriction to approve rma with product tracking on serial, should be only one to receive
2022-11-28 16:11:02 +01:00
Jasmin Solanki
7bc8ca36b1 [MIG] rma: Migration to 15.0 2022-11-28 16:11:02 +01:00
Lois Rilo
d0c010e5c1 [14.0][MIG] rma*: ir.actions.act_window has different access
right in v14. Actions that read those records need to use
`sudo` to allow non-admin users to be able to use these actions.
2022-11-28 16:11:02 +01:00
Lois Rilo
ddecc1dac9 [IMP] rma: Do not highlight all action buttons and simplify
rma.line views, supplier view is an extension of customer one.

This makes easier to edit common elements in both views and ease
maintenance.
2022-11-28 16:11:02 +01:00
Mateu Griful
2dbfa7deeb [FIX] rma: Create rma supplier action 2022-11-28 16:11:02 +01:00
Mateu Griful
eb59af80f6 [MIG] rma: Migration to 14.0 - fix 2022-11-28 16:11:02 +01:00
Mateu Griful
c8d492814b [MIG] rma: Migration to 14.0 - fix 2022-11-28 16:11:02 +01:00
Mateu Griful
b7c138f31b [MIG] rma: Migration to 14.0 - fix 2022-11-28 16:11:02 +01:00
Mateu Griful
8c1d65614b [MIG] rma: Migration to 14.0 2022-11-28 16:11:02 +01:00
Mateu Griful
1cdbb32240 [IMP] rma: black, isort, prettier 2022-11-28 16:11:02 +01:00
HviorForgeFlow
1d81412ce0 [IMP] Update pre-commit lints according with OCA ones 2022-11-28 16:11:02 +01:00
hveficent
c141fd0660 RMA as an APP 2022-11-28 16:11:02 +01:00
ahenriquez
8b202f9b97 [MIG] rma: Migration to 13.0 2022-11-28 16:11:02 +01:00
ahenriquez
e0c8c99df4 [IMP] : black, isort 2022-11-28 16:11:02 +01:00
mreficent
1ba0793010 [FIX] default_gets: avoid using shadowname 'fields' 2022-11-28 16:11:02 +01:00
Aaron Henriquez
ff17511ddc [FIX]wizard to create pickings, not to show rma groups if rma groups are not activated 2022-11-28 16:11:02 +01:00
Akim Juillerat
346f8dd960 [FIX] Remove picking_id from default_get as model does not define it 2022-11-28 16:11:02 +01:00
Akim Juillerat
0f2c3d837c rma: Fix stock_location res.groups 2022-11-28 16:11:02 +01:00
Adrià Gil Sorribes
6716a34b7b [12.0][MIG] Migrate rma module to v12.0 2022-11-28 16:11:02 +01:00
aheficent
4816d2f675 [FIX]text on create supplier rma button 2022-11-28 16:11:02 +01:00
aheficent
3329ab2ea1 [IMP] add group to manage rma groups 2022-11-28 16:11:02 +01:00
aheficent
2fd985f591 [FIX]views rma 2022-11-28 16:11:02 +01:00
aheficent
29e30d5ec9 [MIG]rma v110.0.2.0.0 2022-11-28 16:11:02 +01:00
Bhavesh Odedra
88f6ce72cd [FIX] TypeError: unhashable type: 'list' 2022-11-28 16:11:02 +01:00
Bhavesh Odedra
a183e09935 [IMP] Various improvements 2022-11-28 16:11:02 +01:00
Jordi Ballester
bcb9122649 multiple fixes 2022-11-28 16:11:02 +01:00
Maxime Chambreuil
3c74ad1414 [FIX] Errors from tests 2022-11-28 16:11:02 +01:00
Maxime Chambreuil
7171fabb30 [MIG] Migrate configuration and cleanup 2022-11-28 16:11:02 +01:00
Maxime Chambreuil
6e787bc3e0 [FIX] Permissions and remove (en)coding 2022-11-28 16:11:02 +01:00
Bhavesh Odedra
178e2e6bae [11.0] MIG: RMA module 2022-11-28 16:11:02 +01:00
Nikul Chaudhary
2f1fba7594 [IMP] Improved Unit Test Case and Fixed Travis 2022-11-28 16:11:02 +01:00