Sunday, March 3, 2024
1 change · saas-17.1
Miscellaneous changes
### Steps to reproduce: - Install **Manufacturing** app. - Open Shop Floor app and select work centers **Assembly Line 1** and **Drill Station 1** -This is not actually the only way to recreate the bug but the most forward-. - Open Manufacturing app. In the Work Centers Overview, open **Assembly Line 2** by clicking on the **desktop icon**. Notice how there's only one button on the top bar **Assembly Line 2** **_although_** we should have 3 buttons by now **Assembly Line 1**, **Drill Station
Original PR description
### Steps to reproduce: - Install **Manufacturing** app. - Open Shop Floor app and select work centers **Assembly Line 1** and **Drill Station 1** -This is not actually the only way to recreate the…
### Steps to reproduce:
- Install **Manufacturing** app.
- Open Shop Floor app and select work centers **Assembly Line 1** and **Drill Station 1** -This is not actually the only way to recreate the bug but the most forward-.
- Open Manufacturing app. In the Work Centers Overview, open **Assembly Line 2** by clicking on the **desktop icon**. Notice how there's only one button on the top bar **Assembly Line 2** **_although_** we should have 3 buttons by now **Assembly Line 1**, **Drill Station 1** and **Assembly Line 2**.
### Discussion:
- This Solution extends upon this PR https://github.com/odoo/enterprise/pull/52886 making some improvements
- when the `activeWorkcenter` doesn't exist on the array of the `workcenters`, add it to the array instead of reassigning the array with only the `activeWorkcenter`, That way we avoid the weird behavior of having the work center you selected get unselected implicitly https://github.com/odoo/enterprise/blob/adfe96612cfd0a0b29c8af7d03b19e87ed14155d/mrp_workorder/static/src/mrp_display/mrp_display.js#L108-L111
- U can select work centers inside the shop floor overview, using the **plus** icon. so an improvement was made to switch to the **All MO** tab if the user de-selected the _active_ work center in order:
- not to create inconsistency between the view of the work orders shown and the select buttons above.
- to prevent the error happening due to the inconsistency between the `activeWorkcenter` and the array of `workcenters` not including the `activeWorkcenter` anymore as it was de-selected.
opw-3638276
Forward-Port-Of: odoo/enterprise#53024