diff --git a/pos_partner_location_map/__manifest__.py b/pos_partner_location_map/__manifest__.py
index 227c728dfd..dac31d50c7 100644
--- a/pos_partner_location_map/__manifest__.py
+++ b/pos_partner_location_map/__manifest__.py
@@ -8,7 +8,9 @@
"website": "https://github.com/OCA/pos",
"license": "AGPL-3",
"depends": ["base_geolocalize", "point_of_sale"],
- "data": [],
+ "data": [
+ "views/res_partner_views.xml",
+ ],
"assets": {
"point_of_sale.assets": [
"pos_partner_location_map/static/src/css/*.css",
diff --git a/pos_partner_location_map/models/pos_session.py b/pos_partner_location_map/models/pos_session.py
index b910d2259f..a3ab2e5ac5 100644
--- a/pos_partner_location_map/models/pos_session.py
+++ b/pos_partner_location_map/models/pos_session.py
@@ -8,8 +8,8 @@ def _loader_params_res_partner(self):
res = super()._loader_params_res_partner()
res["search_params"]["fields"] += [
"map_partner_address",
- "lat_address",
- "lang_address",
+ "partner_latitude",
+ "partner_longitude",
]
return res
diff --git a/pos_partner_location_map/models/res_partner.py b/pos_partner_location_map/models/res_partner.py
index d27a29d5f9..a80e6d3b9f 100644
--- a/pos_partner_location_map/models/res_partner.py
+++ b/pos_partner_location_map/models/res_partner.py
@@ -5,5 +5,3 @@ class ResPartner(models.Model):
_inherit = "res.partner"
map_partner_address = fields.Char()
- lat_address = fields.Char("Latitude")
- lang_address = fields.Char("Longitude")
diff --git a/pos_partner_location_map/static/src/js/PartnerMapEdit.esm.js b/pos_partner_location_map/static/src/js/PartnerMapEdit.esm.js
index f30791f501..fc973fb1c4 100644
--- a/pos_partner_location_map/static/src/js/PartnerMapEdit.esm.js
+++ b/pos_partner_location_map/static/src/js/PartnerMapEdit.esm.js
@@ -10,8 +10,8 @@ odoo.define("pos_partner_location_map.PartnerMapEdit", function (require) {
setup() {
super.setup();
this.partner = this.props.partner;
- this.lat = parseFloat(this.partner.lat_address) || 0;
- this.lng = parseFloat(this.partner.lang_address) || 0;
+ this.lat = parseFloat(this.partner.partner_latitude) || 0;
+ this.lng = parseFloat(this.partner.partner_longitude) || 0;
this.address = this.partner.map_partner_address || "";
this.mapContainerRef = useRef("map-container");
this.addrInput = useRef("addr-input");
@@ -71,8 +71,8 @@ odoo.define("pos_partner_location_map.PartnerMapEdit", function (require) {
async getPayload() {
return {
- lat_address: this.lat,
- lang_address: this.lng,
+ partner_latitude: this.lat,
+ partner_longitude: this.lng,
map_partner_address: this.address,
};
}
diff --git a/pos_partner_location_map/static/src/xml/PartnerDetailsEdit.xml b/pos_partner_location_map/static/src/xml/PartnerDetailsEdit.xml
index d127f8853a..0f4f54924a 100644
--- a/pos_partner_location_map/static/src/xml/PartnerDetailsEdit.xml
+++ b/pos_partner_location_map/static/src/xml/PartnerDetailsEdit.xml
@@ -32,17 +32,17 @@
Lat/Long
diff --git a/pos_partner_location_map/views/res_partner_views.xml b/pos_partner_location_map/views/res_partner_views.xml
new file mode 100644
index 0000000000..38b6aaf1bb
--- /dev/null
+++ b/pos_partner_location_map/views/res_partner_views.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ res.partner.location.map.form
+ res.partner
+
+
+
+
+
+
+
+
+