Commit Graph

35 Commits

Author SHA1 Message Date
Joan Sisquella
6764221ee2 [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-29 16:32:42 +02:00
Jordi Ballester Alomar
dd29c431e9 [FIX] fix rma management using multi step routes 2022-11-24 18:04:05 +01:00
Stefan Rijnhart
54887ed141 [IMP] rma: prevent the creation of zero qty moves 2022-07-11 09:26:49 +02:00
Jordi Ballester Alomar
6977529152 Merge pull request #269 from ForgeFlow/14.0-fix-rma
[FIX]rma: remove test_rma dependency to Account
2022-06-16 13:57:36 +02:00
DavidJForgeFlow
e37d6eb6ab [FIX]rma: remove test_rma dependency to Account 2022-06-16 12:16:53 +02:00
Stefan Rijnhart
e8b7c07718 [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-16 11:26:03 +02:00
DavidFIB
e329a96f4e [14.0][FIX/IMP] Make RMA Operation settings company dependent 2022-05-18 17:12:34 +02:00
Andrea
519f7d9bd9 [13.0][FIX/IMP] Make RMA Operation settings company dependent 2022-05-18 10:44:28 +02:00
AaronHForgeFlow
c65856d717 [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
[IMP] rma_account_unreconciled: use manager user in test
2022-05-13 10:38:41 +02:00
AaronHForgeFlow
a08dc1f3db [IMP] rma: cosmetics due to copier update 2022-04-25 09:08:31 +02:00
Jordi Ballester
60b3e5fae3 [FIX] rma: compute out_shipment_count correctly. Add test cases 2022-02-07 18:01:20 +01:00
Mateu Griful
e5064332d2 [MIG] rma_account: Migration to 14.0 2021-01-18 09:29:25 +01:00
Mateu Griful
cd88128ca4 [MIG] rma: Migration to 14.0 - fix 2021-01-12 18:13:54 +01:00
Mateu Griful
ca605a5bbd [MIG] rma: Migration to 14.0 - fix 2021-01-12 16:54:43 +01:00
Mateu Griful
165191168d [MIG] rma: Migration to 14.0 2020-12-28 12:25:51 +01:00
ahenriquez
b3e5f67086 [MIG] rma: Migration to 13.0 2020-12-24 16:59:14 +01:00
ahenriquez
0cfa4e14a5 [IMP] : black, isort 2020-12-24 16:59:14 +01:00
mreficent
5cafc8f012 [FIX] tests 2020-12-24 16:59:14 +01:00
Adrià Gil Sorribes
5a2ca634c2 [12.0][MIG] Migrate rma module to v12.0 2020-12-24 16:59:14 +01:00
aheficent
eb1d78dcd2 [FIX]rma test 2020-12-24 16:59:14 +01:00
aheficent
d5b201d5dc [FIX]views rma 2020-12-24 16:59:14 +01:00
Lois Rilo
ec35c5e64f [9.0][IMP] rma: tests moved to Savedpointcase and optimized (66% time reduction) 2020-12-24 16:59:14 +01:00
Jordi Ballester
e8ddd7b31f multiple fixes 2020-12-24 16:59:14 +01:00
Maxime Chambreuil
7ffc1b77a3 [FIX] Errors from tests 2020-12-24 16:59:14 +01:00
Maxime Chambreuil
5fb6c8e1f3 [MIG] Migrate configuration and cleanup 2020-12-24 16:59:14 +01:00
Maxime Chambreuil
13edda084a [FIX] Permissions and remove (en)coding 2020-12-24 16:59:14 +01:00
Bhavesh Odedra
c8c497aadc [11.0] MIG: RMA module 2020-12-24 16:59:14 +01:00
Nikul Chaudhary
ff71f72ff1 [IMP] Improved Code. 2020-12-24 16:59:14 +01:00
Nikul Chaudhary
f37bbff5c0 [MIG] Migrated UT & Fixed Travis 2020-12-24 16:59:14 +01:00
aheficent
66d5d0651a [FIX]various fixes 2020-12-24 16:59:14 +01:00
Nikul Chaudhary
1c206cc221 [IMP] Improved Unit Test Case and Fixed Travis 2020-12-24 16:59:14 +01:00
aheficent
3cce8bd484 [MIG]rma v10 2020-12-24 16:59:14 +01:00
aheficent
b2a29a5cf2 [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
2020-12-24 16:59:14 +01:00
lreficent
387fe7a51c [9.0][FIX] rma:
* fix assignment of moves.
* default qty in rma lines.
* remove account dependency.
* test and flake8 fixes.
2020-12-24 16:59:14 +01:00
Jordi Ballester
a0c13245bd init branch 2020-12-24 16:59:14 +01:00