Commit Graph

36 Commits

Author SHA1 Message Date
Joan Sisquella
f752049a2f [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:27 +02:00
DavidJForgeFlow
c54d2337c5 [15.0][FIX] rma_sale: fixup of procurement 2022-07-11 10:35:04 +02:00
Stefan Rijnhart
0acd4e7b4c [IMP] rma: prevent the creation of zero qty moves 2022-07-11 10:04:12 +02:00
DavidJForgeFlow
9f2df0d29e [FIX]rma: remove test_rma dependency to Account 2022-06-16 12:43:38 +02:00
Stefan Rijnhart
6e6189d093 [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-06-15 17:35:17 +02:00
DavidFIB
67a9305868 [14.0][FIX/IMP] Make RMA Operation settings company dependent 2022-05-18 17:29:16 +02:00
Andrea
25a80ac77c [13.0][FIX/IMP] Make RMA Operation settings company dependent 2022-05-18 17:28:50 +02:00
AaronHForgeFlow
99c65d9b2e [15.0][IMP] Tests for stock valuation
[FIX] rma: rma_custmer_user has no write permissions in partner, so compute method fails.
[IMP] rma: use rma user in tests
[FIX] rma_account: move_line_id field string
[IMP] rma, rma_account, rma_sale, rma_purchase: tests for stock valuation
[FIX] account_move_line_rma_order_line: minor lint, make auto-install
2022-05-13 10:49:32 +02:00
AaronHForgeFlow
b39efac5db [IMP] COPIER UPDATE: black, isort, prettier 2022-04-25 09:09:12 +02:00
Jordi Ballester
c49191835a [FIX] rma: compute out_shipment_count correctly. Add test cases 2022-02-08 09:02:50 +01:00
Jasmin Solanki
59c8804a9d [MIG] rma: Migration to 15.0 2022-01-07 16:37:59 +05:30
Mateu Griful
0b898e5b1c [MIG] rma_account: Migration to 14.0 2022-01-06 15:44:33 +05:30
Mateu Griful
8381461308 [MIG] rma: Migration to 14.0 - fix 2022-01-06 15:44:33 +05:30
Mateu Griful
87a59a1aad [MIG] rma: Migration to 14.0 - fix 2022-01-06 15:44:33 +05:30
Mateu Griful
bf2c5d00db [MIG] rma: Migration to 14.0 2022-01-06 15:44:33 +05:30
hveficent
bab77f8b0e RMA as an APP 2022-01-06 15:44:33 +05:30
ahenriquez
932c5b2416 [MIG] rma: Migration to 13.0 2022-01-06 15:44:33 +05:30
ahenriquez
d1daf2cd52 [IMP] : black, isort 2022-01-06 15:44:33 +05:30
mreficent
77f242ba94 [FIX] tests 2022-01-06 15:44:33 +05:30
Adrià Gil Sorribes
316732686e [12.0][MIG] Migrate rma module to v12.0 2022-01-06 15:44:33 +05:30
aheficent
c721f283c8 [FIX]rma test 2022-01-06 15:44:33 +05:30
aheficent
b3f7f530b0 [FIX]views rma 2022-01-06 15:44:33 +05:30
Lois Rilo
9edec19484 [9.0][IMP] rma: tests moved to Savedpointcase and optimized (66% time reduction) 2022-01-06 15:44:33 +05:30
Jordi Ballester
2c6a3e6aa9 multiple fixes 2022-01-06 15:44:33 +05:30
Maxime Chambreuil
91365f3c0b [FIX] Errors from tests 2022-01-06 15:44:33 +05:30
Maxime Chambreuil
9f9fdddcf8 [MIG] Migrate configuration and cleanup 2022-01-06 15:44:33 +05:30
Maxime Chambreuil
93cf80ed14 [FIX] Permissions and remove (en)coding 2022-01-06 15:44:33 +05:30
Bhavesh Odedra
e1c2bd2935 [11.0] MIG: RMA module 2022-01-06 15:44:33 +05:30
Nikul Chaudhary
18f39cbd1e [IMP] Improved Code. 2022-01-06 15:44:33 +05:30
Nikul Chaudhary
b83fd55067 [MIG] Migrated UT & Fixed Travis 2022-01-06 15:44:33 +05:30
aheficent
2d36296325 [FIX]various fixes 2022-01-06 15:44:33 +05:30
Nikul Chaudhary
a662040da0 [IMP] Improved Unit Test Case and Fixed Travis 2022-01-06 15:44:33 +05:30
aheficent
3d63397d3f [MIG]rma v10 2022-01-06 15:44:33 +05:30
aheficent
df5244a8f4 [IMP] default operation in product and product_categ for customer and supplier
[IMP]Separate menus for customer and supplier operations
* Add active field to rma operation
* Added tests
* Fix travis
* Fix create supplier rma from customer rma
2022-01-06 15:44:33 +05:30
lreficent
5ee2a969e3 [9.0][FIX] rma:
* fix assignment of moves.
* default qty in rma lines.
* remove account dependency.
* test and flake8 fixes.
2022-01-06 15:44:33 +05:30
Jordi Ballester
12b0dbc623 init branch 2022-01-06 15:44:33 +05:30