-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] base_geoengine: Migration to 17.0
- Loading branch information
1 parent
ca91f65
commit 62abfac
Showing
30 changed files
with
201 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
base_geoengine/static/src/js/views/geoengine/geoengine_controller/geoengine_controller.xml
This file contains 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
2 changes: 1 addition & 1 deletion
2
base_geoengine/static/src/js/views/geoengine/geoengine_record/geoengine_record.xml
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.xml
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
base_geoengine/static/src/js/views/geoengine/layers_panel/layers_panel.xml
This file contains 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
2 changes: 1 addition & 1 deletion
2
base_geoengine/static/src/js/views/geoengine/records_panel/records_panel.xml
This file contains 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
2 changes: 1 addition & 1 deletion
2
...ine/static/src/js/views/geoengine/records_panel/search_bar_records/search_bar_records.xml
This file contains 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
22 changes: 22 additions & 0 deletions
22
.../domain_selector_geo_field/domain_selector_field_input/domain_selector_field_input.esm.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** @odoo-module **/ | ||
|
||
import {registry} from "@web/core/registry"; | ||
|
||
import {Component} from "@odoo/owl"; | ||
const parsers = registry.category("parsers"); | ||
|
||
export class DomainSelectorFieldInput extends Component { | ||
parseValue(value) { | ||
const parser = parsers.get(this.props.field.type, (value) => value); | ||
try { | ||
return parser(value); | ||
} catch (_) { | ||
return value; | ||
} | ||
} | ||
|
||
onChange(ev) { | ||
this.props.update({value: this.parseValue(ev.target.value)}); | ||
} | ||
} | ||
DomainSelectorFieldInput.template = "base_geoengine.DomainSelectorFieldInput"; |
13 changes: 13 additions & 0 deletions
13
...ets/domain_selector_geo_field/domain_selector_field_input/domain_selector_field_input.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
|
||
<t t-name="base_geoengine.DomainSelectorFieldInput"> | ||
<input | ||
type="text" | ||
class="o_input o_domain_leaf_value_input" | ||
t-att-value="props.value" | ||
t-on-change="onChange" | ||
/> | ||
</t> | ||
|
||
</templates> |
2 changes: 1 addition & 1 deletion
2
...domain_selector_field_input_for_active_ids/domain_selector_field_input_for_active_ids.xml
This file contains 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
26 changes: 26 additions & 0 deletions
26
..._field/domain_selector_field_input_with_tags/domain_selector_field_input_with_tags.esm.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** @odoo-module **/ | ||
|
||
import {Component, useRef} from "@odoo/owl"; | ||
|
||
export class DomainSelectorFieldInputWithTags extends Component { | ||
setup() { | ||
this.inputRef = useRef("input"); | ||
} | ||
|
||
removeTag(tagIndex) { | ||
const value = [...this.props.value]; | ||
value.splice(tagIndex, 1); | ||
this.props.update({value}); | ||
} | ||
addTag(value) { | ||
this.props.update({value: this.props.value.concat(value)}); | ||
} | ||
|
||
onBtnClick() { | ||
const value = this.inputRef.el.value; | ||
this.inputRef.el.value = ""; | ||
this.addTag(value); | ||
} | ||
} | ||
DomainSelectorFieldInputWithTags.template = | ||
"base_geoengine.DomainSelectorFieldInputWithTags"; |
36 changes: 36 additions & 0 deletions
36
...geo_field/domain_selector_field_input_with_tags/domain_selector_field_input_with_tags.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
|
||
<t t-name="base_geoengine.DomainSelectorFieldInputWithTags"> | ||
<div class="o_ds_value_cell"> | ||
<div class="o_domain_leaf_value_input"> | ||
<t t-foreach="props.value" t-as="tag" t-key="tag_index"> | ||
<span class="badge rounded-pill"> | ||
<t t-esc="tag" /> <i | ||
class="o_domain_leaf_value_remove_tag_button fa fa-times" | ||
role="img" | ||
aria-label="Remove tag" | ||
title="Remove tag" | ||
t-on-click="() => this.removeTag(tag_index)" | ||
/> | ||
</span> | ||
</t> | ||
</div> | ||
<div class="o_domain_leaf_value_tags"> | ||
<input | ||
type="text" | ||
class="o_input" | ||
placeholder="Add new value" | ||
t-ref="input" | ||
/> | ||
<button | ||
class="btn btn-sm btn-primary fa fa-plus o_domain_leaf_value_add_tag_button" | ||
aria-label="Add tag" | ||
title="Add tag" | ||
t-on-click="onBtnClick" | ||
/> | ||
</div> | ||
</div> | ||
</t> | ||
|
||
</templates> |
2 changes: 1 addition & 1 deletion
2
...widgets/domain_selector_geo_field/domain_selector_geo_field/domain_selector_geo_field.xml
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...in_selector_geo_field/domain_selector_geo_field_input/domain_selector_geo_field_input.xml
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...s/domain_selector_geo_field/domain_selector_number_field/domain_selector_number_field.xml
This file contains 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
Oops, something went wrong.