[16.0][IMP] base_geoengine: Avoid error seen clicking on RecordPanel#454
Open
anusriNPS wants to merge 1 commit into
Open
[16.0][IMP] base_geoengine: Avoid error seen clicking on RecordPanel#454anusriNPS wants to merge 1 commit into
anusriNPS wants to merge 1 commit into
Conversation
Contributor
Author
|
pre-commit fails which requires #442 to be merged which helps to update template |
When a record in record panel does not contain latitude and longitude details, it fails with error "feature is null". Avoiding this error and notifying the user to update required details to view the record.
bab27b0 to
da82969
Compare
HekkiMelody
suggested changes
May 15, 2026
Contributor
HekkiMelody
left a comment
There was a problem hiding this comment.
Code review. Please specify in the first message that this PR depends on #417
Comment on lines
+577
to
+580
| this.env._t( | ||
| "Please update latitude and longitude details for: " + | ||
| record.data.display_name | ||
| ), |
Contributor
There was a problem hiding this comment.
chore: This will not work for translations, only literal strings can be translated
https://www.odoo.com/documentation/18.0/developer/howtos/translations.html
Can you test formatting it like this to see if it's exported properly in the .pot file?
| onDisplayPopupRecord(record) { | ||
| const popup = this.getPopup(); | ||
| const feature = this.vectorSource.getFeatureById(record.resId); | ||
| if (feature === null) { |
Contributor
There was a problem hiding this comment.
question: this if can probably replace the other if at line 588
for example
if (feature) {
...
return false;
}
this.mountGeoengineRecord({
...What do you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a record in record panel does not contain latitude and
longitude details, it fails with error "feature is null". So, avoiding this error and notifying the user to update required details to view the record.
Below is the error seen without latitude and longitude details: