geospatial
geospatial copied to clipboard
[14.0][FIX]base_geoengine: missing sidebar
I installed a fresh Odoo instance with the module fieldservice_geoengine (from OCA's field-service repo), added the geoengine view mode to the FSM Location action but the button didn't show up.
Opening up the browser console I was greeted by an error message stating that base_geoengine.GeoengineController couldn't be initialized because it was referencing web.Sidebar which was nowhere to be found.
After a bit of investigation I stumbled into this commit in Odoo 14.0 which essentially replaced web.Sidebar with web.ActionMenus.
We can verify this by reading the first comment in the newly added file
/** * Action menus (or Action/Print bar, previously called 'Sidebar') * * The side bar is the group of dropdown menus located on the left side of the * control panel. Its role is to display a list of items depending on the view * type and selected records and to execute a set of actions on active records. * It is made out of 2 dropdown menus: Print and Action. * * This component also provides a registry to use custom components in the ActionMenus's * Action menu. * @extends Component */
SOMEHOW running a clean runboat instance of the field-service repo and installing fieldservice_geoengine makes the geoengine action appear, but not on a local installation.
I don't understand what's happening here.
Please let me know if you encountered this situation before or if I'm just hallucinating.
Changes look good
@lmignon @yvaucher
SOMEHOW running a clean runboat instance of the field-service repo and installing fieldservice_geoengine makes the geoengine action appear, but not on a local installation.
I finally found an answer to this mistery.
Starting a Runboat instance for the field-service repo doesn't show any issue. Why is that?
We can get a clue by installing the fieldservice_geoengine module which requires base_geoengine, and looking at the latter's version.
14.0.1.0.3? But if I inspect the manifest of base_geoengine module in this repo I see another version: 14.0.1.0.1
https://github.com/OCA/geospatial/blob/d9d9a3ba12a906ca42ddcf9ff28dc151946b4c32/base_geoengine/manifest.py#L6
This is because of a past event regarding missing history https://github.com/OCA/geospatial/pull/316#issuecomment-1410353162
The whole module was re-merged into 14.0 https://github.com/OCA/geospatial/pull/326
Because of this some of the changes are still buried in the branch 14.0-bad-history.
In the lost changes the base_geoengine was at the version 14.0.1.0.3, the same we have in the Runboat.
In the bad-history repo we have this line in particular, which makes the geoengine action behave correctly
https://github.com/OCA/geospatial/blob/2818cc74e44fdd2f849c56043638df468f2c7246/base_geoengine/static/src/js/views/geoengine/geoengine_controller.js#L22
We can see the same line if we add geoengine to the Fieldservice Location action
And then reload the page with debug=assets, if we explore the static files that loaded by the browser and inspect base_geoengine/static/src/js/views/geoengine/geoengine_controller.js we see the same line I previously highlighted (line 22).
I suspect that even though this repo has been fixed, the module in the Runboat doesn't update because its version is higher than what we have in the most recent 14.0 branch.
I guess we could increase the version number in order to achieve consistency. Let me know what you think.
@PicchiSeba Thank you for the explanation. You could propose a PR with the missing part and we will merge it with a bump of the minor version. In this way we are sure that the one into pipy will be the lastest.
@lmignon I updated this PR with the changes. I tested it with the fieldservice_geoengine module
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
/ocabot merge minor
On my way to merge this fine PR! Prepared branch 14.0-ocabot-merge-pr-375-by-lmignon-bump-minor, awaiting test results.
@lmignon your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-375-by-lmignon-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
@lmignon Some tests failed during the merge but I cannot see them.
ping @OCA/geospatial-maintainers
/ocabot merge minor
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 14.0-ocabot-merge-pr-375-by-lmignon-bump-minor, awaiting test results.
@lmignon your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-375-by-lmignon-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
@lmignon your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-375-by-lmignon-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
@lmignon Is it necessary to do a rebase?
Please try a rebase. This is really weird, I don't see any error in the 2 last attempts of merge.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
/ocabot merge minor
On my way to merge this fine PR! Prepared branch 14.0-ocabot-merge-pr-375-by-yvaucher-bump-minor, awaiting test results.
@yvaucher your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-375-by-yvaucher-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
@yvaucher your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-375-by-yvaucher-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.