8f4b86bf82a1b8af247d6e0d1fb81fc0f52ff010
During the OWL refactoring of the reception report, the "Print" button was hardcoded to only work for pickings. Unfortunately this means the button did NOT work when the report was opened for a MO. This is due to the report printing being dependent on the report's context values which can either be `default_picking_ids` or `default_production_ids` (and this is by design to avoid additional file extensions to handle both cases). When this button was used in the previous legacy_web_report's client_action, the entire action's context + data used to be passed as part of the Print action: https://github.com/odoo/odoo/blob/30fcb2e60fed17a473353b21bac4916e9ab77b10/addons/stock/static/src/legacy_web_report/client_action.js#L109-L119 The `data` and `context` is then stringified and added into the reportURL: https://github.com/odoo/odoo/blob/30fcb2e60fed17a473353b21bac4916e9ab77b10/addons/web/static/src/webclient/actions/action_service.js#L1042-L1050 But passing of the data isn't necessary in this case, and most of the context's content is not needed since the backend is still receiving + apply the current user's context thanks to the action_service: https://github.com/odoo/odoo/blob/30fcb2e60fed17a473353b21bac4916e9ab77b10/addons/web/static/src/webclient/actions/action_service.js#L1079 always providing it to the backend https://github.com/odoo/odoo/blob/30fcb2e60fed17a473353b21bac4916e9ab77b10/addons/web/controllers/report.py#L87 Therefore, to avoid an extra long report URL of all of the report's data/context, this fix has been designed to capture only the necessary context value and manually build the print URL accordingly. Noticed during task: 3046178 closes odoo/odoo#120935 X-original-commit: 5d66b73cddce1aae2c52f0a0ec8f9885be67b7ae Signed-off-by: Steve Van Essche <svs@odoo.com> Signed-off-by: Tiffany Chang <tic@odoo.com>
…
…
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%