@@ -330,6 +584,12 @@
var CSV_STRING_FIELDS = ["languages", "specialities"];
var BOOL_FIELDS = ["OCA_member", "is_individual"];
var NUM_FIELDS = ["odoo4projects_clients"];
+ // Country VALUE FORMAT — what the Country select sends to the webhook.
+ // "code" → the ISO 3166-1 alpha-2 code, e.g. "DE" (default; stable, exact-matchable)
+ // "name" → the full English name, e.g. "Germany" (switch to this line if the
+ // workflow expects names instead of codes)
+ // The select always DISPLAYS the English name; this only changes the SUBMITTED value.
+ var COUNTRY_VALUE_FORMAT = "code";
var TEXT_FIELDS = [
"Name", "email", "Focus", "description", "Country",
"Linkedin", "upwork", "fiverr", "github", "oca_profile", "Image"
@@ -343,6 +603,18 @@
);
}
+ /* The Country value to submit: the ISO code by default, the English name when
+ COUNTRY_VALUE_FORMAT is "name". Empty until the owner picks a country. */
+ function countryValue(form) {
+ var sel = form.querySelector('select[name="Country"]');
+ if (!sel || !sel.value) return "";
+ if (COUNTRY_VALUE_FORMAT === "name") {
+ var opt = sel.options[sel.selectedIndex];
+ return opt ? opt.textContent.trim() : "";
+ }
+ return sel.value.trim();
+ }
+
function setStatus(el, message, state) {
if (!el) return;
el.textContent = message;
@@ -447,6 +719,12 @@
return;
}
+ if (name === "Country") {
+ var countryVal = countryValue(form);
+ if (countryVal !== "") payload[name] = countryVal;
+ return;
+ }
+
if (MULTI_FIELDS.indexOf(name) !== -1) {
var text = els[0].value || "";
var list = text
diff --git a/odoo-community-developers/index.html b/odoo-community-developers/index.html
index 97d562d..8088cf9 100644
--- a/odoo-community-developers/index.html
+++ b/odoo-community-developers/index.html
@@ -807,8 +807,261 @@
-
- Where you work from. A two-letter code is enough (NL, DE, US).
+
+ Where you work from. Pick one — this becomes a filter in the directory.
@@ -1009,6 +1262,12 @@
// STRINGS ("English,German"), NOT arrays — so the workflow can split one field.
// `odoo_versions` is still sent as an array. The build script splits BOTH shapes.
var MULTI_FIELDS = ["odoo_versions"]; // comma-separated → array
+ // Country VALUE FORMAT — what the Country select sends to the webhook.
+ // "code" → the ISO 3166-1 alpha-2 code, e.g. "DE" (default; stable, exact-matchable)
+ // "name" → the full English name, e.g. "Germany" (switch to this line if the
+ // workflow expects names instead of codes)
+ // The select always DISPLAYS the English name; this only changes the SUBMITTED value.
+ var COUNTRY_VALUE_FORMAT = "code";
var CSV_STRING_FIELDS = ["languages", "specialities"]; // comma-separated → STRING
var BOOL_FIELDS = ["OCA_member", "is_individual", "email_public_consent"];
var NUM_FIELDS = ["odoo4projects_clients"];
@@ -1019,6 +1278,18 @@
);
}
+ /* The Country value to submit: the ISO code by default, the English name when
+ COUNTRY_VALUE_FORMAT is "name". Empty until the visitor picks a country. */
+ function countryValue(form) {
+ var sel = form.querySelector('select[name="Country"]');
+ if (!sel || !sel.value) return "";
+ if (COUNTRY_VALUE_FORMAT === "name") {
+ var opt = sel.options[sel.selectedIndex];
+ return opt ? opt.textContent.trim() : "";
+ }
+ return sel.value.trim();
+ }
+
function buildPayload(form, withId) {
var payload = {};
var names = [];
@@ -1037,6 +1308,12 @@
return;
}
+ if (name === "Country") {
+ var countryVal = countryValue(form);
+ if (countryVal !== "") payload[name] = countryVal;
+ return;
+ }
+
if (MULTI_FIELDS.indexOf(name) !== -1) {
var text = els[0].value || "";
var list = text