Commit Graph

158 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
acce14ce7e [IMP] rma: limit state statusbar 2023-02-22 15:36:52 +01:00
Lois Rilo
73b215b25c [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:01:31 +01:00
DavidJForgeFlow
878e64e614 [IMP] rma: cancel rma_lines 2023-02-20 20:33:06 +01:00
DavidJForgeFlow
cabb2a80d4 [14.0][FIX] rma: add stock move in supplier group 2023-02-01 13:55:40 +01:00
Lois Rilo
ef1b1ba576 [FIX] rma: remove "Add new line" in RMA group.
This was not the intended way to add RMA lines to a group.
Users are supposed to use the wizards to do so (add from stock
move, add from serial, etc.). Having the option to use "add
new line" was only leading to errors and confusion.
2023-01-09 17:07:41 +01:00
Lois Rilo
dbc616f12b [IMP] rma: print serial/lot number in RMA group report 2023-01-09 17:07:41 +01:00
Lois Rilo
25158ec25d [IMP] rma: order by id desc 2023-01-09 17:07:41 +01:00
Lois Rilo
b8c088687e [IMP] rma: add description to rma order and copy it over to new lines 2023-01-09 16:57:10 +01:00
Lois Rilo
6dcc76ca68 [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 16:56:32 +01:00
Lois Rilo
54b1cfd68e [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:50:14 +01:00
Florian da Costa
b6628e99c2 [FIX] count produced products going to customer as out pickings 2022-12-27 17:32:31 +01:00
DavidJForgeFlow
6dd4bcac8e [14.0][IMP] rma: add lot/serial in report 2022-12-27 09:54:05 +01:00
Lois Rilo
fe53e53269 Merge pull request #331 from ForgeFlow/15.0-fp-330
[15.0][IMP] rma: pass product in create lot
2022-12-27 09:18:24 +01:00
Lois Rilo
b7c91791aa Merge pull request #318 from ForgeFlow/15.0-imp-rma
[IMP] rma: add translations
2022-12-27 08:58:52 +01:00
Dariusz Kubiak
03778ab272 [12.0][FIX] fix empty parter on rma picking 2022-12-01 10:52:47 +01:00
DavidJForgeFlow
2a1ffb464d [14.0][IMP] rma: pass product in create lot 2022-11-30 13:27:33 +01:00
AnnaPForgeFlow
e2ed0f4689 [IMP] rma: add translations 2022-11-25 09:41:02 +01:00
Jordi Ballester Alomar
22c779da22 [IMP] centralize the logic to get the correct cost of the RMA. 2022-11-24 21:14:52 +01:00
Jordi Ballester Alomar
623b22c091 [FIX] include anglo-saxon price unit calculation in refunds.
Otherwise the anglo saxon entries won't be correct.
For example, the Interim (Delivered) account should balance
after receiving and triggering a refund on a customer rma.
2022-11-24 18:57:04 +01:00
Jordi Ballester
4ff4c727f1 [IMP] rma_sale: introduce new config settings.
- auto_confirm_rma_sale
- free_of_charge_rma_sale
2022-09-21 09:22:15 +02:00
Jordi Ballester Alomar
3626075960 Merge pull request #292 from ForgeFlow/15.0-fp-264
[15.0][IMP] rma: prevent the creation of zero qty moves
2022-07-26 18:29:24 +02:00
Lois Rilo
877f82df10 Merge pull request #285 from akretion/15-fwd-rma-line-simple-view
[15.0][IMP] Make rma order view cleaner for user
2022-07-15 11:39:35 +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
Florian da Costa
9ce5e22e97 [IMP] Make rma order view cleaner for user
Hide button and fields depending on the policy chosen on the rma line
2022-07-01 13:53:14 +02:00
Florian da Costa
71bc459033 Hide smart button when empty 2022-06-29 12:29:09 +02:00
Stefan Rijnhart
8a484ed3b9 [FIX] rma: improve check on rule selection during procurement
Fixes #274

Thanks to @florian-dacosta for suggesting this approach.
2022-06-24 12:08:40 +02:00
DavidJForgeFlow
9f2df0d29e [FIX]rma: remove test_rma dependency to Account 2022-06-16 12:43:38 +02:00
Jordi Ballester Alomar
7dd2a35626 Merge pull request #266 from 360ERP/15.0
[IMP] Improve multi-company record rules
2022-06-16 09:38:26 +02:00
Cas Vissers
b1d52355fe [IMP] Improve multi-company record rules 2022-06-16 09:30:13 +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
Lois Rilo
730156ab1d [IMP] rma: add rma lines to group selecting serial numbers 2022-05-27 09:18:01 +02:00
Lois Rilo
b974e8d9e1 [IMP] rma: add RMA reference to delivery slip report 2022-05-27 09:14:28 +02:00
Lois Rilo
c12f0f188e [FIX] rma: missing migration scripts and version bump
Those are needed after making some fields company dependent
2022-05-25 18:07:48 +02:00
DavidFIB
b19d81b04b [15.0][FIX/IMP] Make RMA Operation settings company dependent 2022-05-19 14:03:40 +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
Jordi Ballester
8ec2bde6e5 [IMP] rma: Refactor all rma modules in order to consider using the correct price unit in moves
Otherwise the inventory accounting will be completely wrong.
2022-05-13 10:49:32 +02:00
Florian da Costa
9981d8a3e5 Add missing fields in rma line editable tree in rma group 2022-05-12 17:02:28 +02:00
Florian da Costa
2bd84fd4a1 [FIX] Remove useless/bad wiz_id field in rma_make_picking.wizard item preparation 2022-05-12 17:02:04 +02:00
AaronHForgeFlow
b39efac5db [IMP] COPIER UPDATE: black, isort, prettier 2022-04-25 09:09:12 +02:00
Christopher Ormaza
84853a187e [14.0][FIX] rma: separate stock.move by rma_line_id to fix picking association 2022-03-07 07:57:39 -05:00
Lois Rilo
7c307c8d3d [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-03-07 07:57:29 -05:00
Jasmin Solanki
3f18a8964e [IMP] rma: Fix Route View 2022-02-23 17:33:40 +05:30
Christopher Ormaza
da1b0a4dad [15.0][ADD] Mass action for request approval RMA order line 2022-02-11 11:25:20 -05:00
Christopher Ormaza
3b68e993f0 [FIX] rma: add lot to pickings created from wizard on RMA lines 2022-02-10 13:48:36 +01:00
Christopher Ormaza
9a91869525 [IMP] rma, rma_sale: added select all, messages for UX 2022-02-10 13:37:18 +01:00
Christopher Ormaza
75d595a22b [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-02-10 13:36:49 +01:00