Saturday, November 23, 2024
2 changes · master
Miscellaneous changes
Currently, An error occurs while opening a 'Production Analysis' report, and the module name `mrp_workorder` is not installed. Steps To Reproduced: - Install ```mrp_account_enterprise```. - Uninstall ```mrp_workorder```. - Open Manufacturing / Reporting / Production Analysis and an error is generated. ``` UndefinedColumn: column wc.employee_costs_hour does not exist LINE 248: * wc.employee_costs_hour * op.employee_ratio ``` An error occurs when the system tries to access fields
Original PR description
Currently, An error occurs while opening a 'Production Analysis' report, and the module name `mrp_workorder` is not installed. Steps To Reproduced: - Install ```mrp_account_enterprise```. - Uninstall…
Currently, An error occurs while opening a 'Production Analysis' report, and the module name `mrp_workorder` is not installed. Steps To Reproduced: - Install ```mrp_account_enterprise```. - Uninstall ```mrp_workorder```. - Open Manufacturing / Reporting / Production Analysis and an error is generated. ``` UndefinedColumn: column wc.employee_costs_hour does not exist LINE 248: * wc.employee_costs_hour * op.employee_ratio ``` An error occurs when the system tries to access fields like `employee_cost`, and `employee_costs_hour` at [1]. but it is unavailable as the module `mrp_workorder` has not been installed. These fields are defined in it. Link [1]: https://github.com/odoo/enterprise/blob/baba978bca701c589eb0d45527275b6275eec5c5/mrp_account_enterprise/reports/mrp_report.py#L206 To resolve this issue, Move the `_join_expected_component_cost_unit` method into bridge module `mrp_workorder_hr_account`, Additionally, Create dummy methods to provide a default value for fields([2]) that are not working and override these methods in the bridge module to return the correct values. Link [2]: https://github.com/odoo/enterprise/blob/baba978bca701c589eb0d45527275b6275eec5c5/mrp_account_enterprise/reports/mrp_report.py#L64-L78 Sentry-5794503324 Forward-Port-Of: odoo/enterprise#73695 Forward-Port-Of: odoo/enterprise#69559
Some clients were confused about not knowing why their shifts were not copied after setting a project to them (using the copy previous week feature). The reason was that the project linked to their shifts had allocated hours equal to 0. After this commit, if 0 hours are allocated to the project, we allow to copy the shift anyway to avoid confusion (as some clients are clearly not using this field). task-4074736 version-17.0 Forward-Port-Of: odoo/enterprise#73365
Original PR description
Some clients were confused about not knowing why their shifts were not copied after setting a project to them (using the copy previous week feature). The reason was that the project linked to their shifts had allocated hours equal to 0. After this commit, if 0 hours are allocated to the project, we allow to copy the shift anyway to avoid confusion (as some clients are clearly not using this field). task-4074736 version-17.0 Forward-Port-Of: odoo/enterprise#73365