Commit ff4846ab authored by Romain Courteaud's avatar Romain Courteaud

[erp5storage] do not use the portal type translated title value

Thanks to Thomas Gambier for the fix.
parent e723b3de
...@@ -103,7 +103,8 @@ ...@@ -103,7 +103,8 @@
function extractPropertyFromFormJSON(json) { function extractPropertyFromFormJSON(json) {
var form = json._embedded._view, var form = json._embedded._view,
converted_json = { converted_json = {
portal_type: json._links.type.name portal_type: new URI(json._links.type.href).segment(2)
.replace("portal_types/", "")
}, },
form_data_json = {}, form_data_json = {},
field, field,
......
...@@ -146,7 +146,8 @@ ...@@ -146,7 +146,8 @@
"_bar": "john doo", "_bar": "john doo",
"_links": { "_links": {
type: { type: {
name: "Person" name: "Translated Person",
href: "urn:jio:get:portal_types/Person"
} }
}, },
"_embedded": { "_embedded": {
...@@ -215,7 +216,8 @@ ...@@ -215,7 +216,8 @@
"_bar": "john doo", "_bar": "john doo",
"_links": { "_links": {
type: { type: {
name: "Person" name: "Translated Person",
href: "urn:jio:get:portal_types/Person"
} }
}, },
"_embedded": { "_embedded": {
...@@ -275,7 +277,8 @@ ...@@ -275,7 +277,8 @@
"_bar": "john doo", "_bar": "john doo",
"_links": { "_links": {
type: { type: {
name: "Person" name: "Translated Person",
href: "urn:jio:get:portal_types/Person"
}, },
parent: { parent: {
href: "urn:jio:get:foo_module" href: "urn:jio:get:foo_module"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment