[FIX] stock: print traceability report

On a traceability report, if a user clicks on a lot and prints the new
report, an erorr will be displayed

To reproduce the issue:
(Need mrp)
1. Create two storable and tracked-by-lot products P_compo, P_finished
2. Update quantity of P_compo:
    - 1 x P_compo with lot L_compo
3. Create a bill of materials
    - Product: P_finished
    - Components
        - 1 x P_compo
4. Produce 1 x P_finished (lot L_finished)
5. Inventory > Products > Lots/Serial Numbers, open L_finished
6. Click on Traceability, unfold the line and click on L_compo
7. Print the report

Error: an Odoo Server Error is displayed (RPC_ERROR)

Since [1], the route has changed

[1] e2f59a6dd1

OPW-2773967

closes odoo/odoo#91453

X-original-commit: c0aefc788059499a745fc1787a253b3367dce8d5
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
This commit is contained in:
Adrien Widart
2022-05-16 13:57:16 +02:00
parent e18eeca7d1
commit aba89a0e89
@@ -43,7 +43,7 @@ var ReportWidget = Widget.extend({
context: {
active_id : $el.data('lot_id'),
active_model : 'stock.lot',
url: '/stock/output_format/stock/active_id'
url: '/stock/output_format/stock?active_id=:active_id&active_model=:active_model',
},
});
},