Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
fb0b3ffe
Commit
fb0b3ffe
authored
Dec 30, 2020
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_dqe: Implement 'ESTOCADE' call to DQE
parent
02197068
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
130 additions
and
13 deletions
+130
-13
bt5/erp5_dqe/DocumentTemplateItem/portal_components/document.erp5.DQEDataValidatorClientConnector.py
...mponents/document.erp5.DQEDataValidatorClientConnector.py
+30
-0
bt5/erp5_dqe/PathTemplateItem/portal_categories/http_exchange_resource/dqe/RelocationData.xml
..._categories/http_exchange_resource/dqe/RelocationData.xml
+81
-0
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/Base_getDQEServiceToErrorKeyDict.py
...portal_skins/erp5_dqe/Base_getDQEServiceToErrorKeyDict.py
+1
-0
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getDQENatureCaption.py
...portal_skins/erp5_dqe/HTTPExchange_getDQENatureCaption.py
+1
-0
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getDQEResponseDict.py
.../portal_skins/erp5_dqe/HTTPExchange_getDQEResponseDict.py
+8
-2
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getDQEResponseWording.py
...rtal_skins/erp5_dqe/HTTPExchange_getDQEResponseWording.py
+8
-11
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getSentToDQEValueCaption.py
...l_skins/erp5_dqe/HTTPExchange_getSentToDQEValueCaption.py
+1
-0
No files found.
bt5/erp5_dqe/DocumentTemplateItem/portal_components/document.erp5.DQEDataValidatorClientConnector.py
View file @
fb0b3ffe
...
@@ -123,3 +123,33 @@ class DQEDataValidatorClientConnector(XMLObject):
...
@@ -123,3 +123,33 @@ class DQEDataValidatorClientConnector(XMLObject):
archive_kw
=
archive_kw
,
archive_kw
=
archive_kw
,
)
)
return
response
return
response
def
checkRelocation
(
self
,
first_name
,
last_name
,
address
,
zip_code
,
city
,
service
,
social_title
=
''
,
complement
=
''
,
lieu_dit
=
''
,
archive_kw
=
None
,
):
response
=
self
.
call
(
'ESTOCADE'
,
service
,
params
=
{
'Nom'
:
last_name
,
'Prenom'
:
first_name
,
'Adresse'
:
address
,
'CodePostal'
:
zip_code
,
'Ville'
:
city
,
'Civilite'
:
social_title
,
'Complement'
:
complement
,
'LieuDit'
:
lieu_dit
,
},
archive_kw
=
archive_kw
,
)
return
response
bt5/erp5_dqe/PathTemplateItem/portal_categories/http_exchange_resource/dqe/RelocationData.xml
0 → 100644
View file @
fb0b3ffe
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
codification
</string>
</key>
<value>
<string>
ESTOCADE
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
RelocationData
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Relocation Data
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/Base_getDQEServiceToErrorKeyDict.py
View file @
fb0b3ffe
...
@@ -10,4 +10,5 @@ return {
...
@@ -10,4 +10,5 @@ return {
dqe_resource_category
.
DefaultAddress
:
'DQECodeDetail'
,
dqe_resource_category
.
DefaultAddress
:
'DQECodeDetail'
,
dqe_resource_category
.
DeliveryAddress
:
'DQECodeDetail'
,
dqe_resource_category
.
DeliveryAddress
:
'DQECodeDetail'
,
dqe_resource_category
.
OrganisationData
:
'DQE_status'
,
dqe_resource_category
.
OrganisationData
:
'DQE_status'
,
dqe_resource_category
.
RelocationData
:
'RESULT'
,
}
}
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getDQENatureCaption.py
View file @
fb0b3ffe
...
@@ -7,4 +7,5 @@ return {
...
@@ -7,4 +7,5 @@ return {
dqe_resource_category
.
DefaultAddress
:
"Adresse facturation"
,
dqe_resource_category
.
DefaultAddress
:
"Adresse facturation"
,
dqe_resource_category
.
DeliveryAddress
:
"Adresse livraison"
,
dqe_resource_category
.
DeliveryAddress
:
"Adresse livraison"
,
dqe_resource_category
.
OrganisationData
:
"Organisation"
,
dqe_resource_category
.
OrganisationData
:
"Organisation"
,
dqe_resource_category
.
RelocationData
:
"Déménagement"
,
}.
get
(
context
.
getResourceValue
(),
''
)
}.
get
(
context
.
getResourceValue
(),
''
)
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getDQEResponseDict.py
View file @
fb0b3ffe
...
@@ -9,7 +9,13 @@ try:
...
@@ -9,7 +9,13 @@ try:
except
ValueError
:
except
ValueError
:
return
{}
return
{}
# In all cases, the actual response is an inner dict that has key '1',
# In all cases, the actual response is an inner dict that has key '1',
# apart from 'SIRETINFO' ('OrganisationData' resource for us) that it is just the dict
# apart from 'SIRETINFO' ('OrganisationData' resource for us)
if
resource_value
==
context
.
getPortalObject
().
portal_categories
.
http_exchange_resource
.
dqe
.
OrganisationData
:
# and 'ESTOCADE' ('RelocationData' resource for us)
# that it is just the dict
http_exchange_resource
=
context
.
getPortalObject
().
portal_categories
.
http_exchange_resource
if
resource_value
in
(
http_exchange_resource
.
dqe
.
OrganisationData
,
http_exchange_resource
.
dqe
.
RelocationData
,
):
return
response_dict
return
response_dict
return
response_dict
.
get
(
'1'
,
{})
return
response_dict
.
get
(
'1'
,
{})
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getDQEResponseWording.py
View file @
fb0b3ffe
resource_value
=
context
.
getResourceValue
()
resource_value
=
context
.
getResourceValue
()
if
not
resource_value
.
isMemberOf
(
'http_exchange_resource/dqe'
):
if
not
resource_value
.
isMemberOf
(
'http_exchange_resource/dqe'
):
return
''
return
{}
response
=
context
.
getResponse
()
if
response
==
'TIMEOUT'
:
return
'Timeout'
elif
response
==
'FAILURE'
:
return
context
.
Base_translateString
(
'Failure'
)
response_dict
=
context
.
HTTPExchange_getDQEResponseDict
()
response_dict
=
context
.
HTTPExchange_getDQEResponseDict
()
dqe_resource_category
=
context
.
getPortalObject
().
portal_categories
.
http_exchange_resource
.
dqe
dqe_resource_category
=
context
.
getPortalObject
().
portal_categories
.
http_exchange_resource
.
dqe
...
@@ -18,8 +12,7 @@ if resource_value in (
...
@@ -18,8 +12,7 @@ if resource_value in (
dqe_resource_category
.
DefaultAddress
,
dqe_resource_category
.
DeliveryAddress
dqe_resource_category
.
DefaultAddress
,
dqe_resource_category
.
DeliveryAddress
):
):
return
response_dict
.
get
(
'DQELibErreur'
,
'Inconnue'
).
encode
(
'utf-8'
)
return
response_dict
.
get
(
'DQELibErreur'
,
'Inconnue'
).
encode
(
'utf-8'
)
elif
resource_value
==
dqe_resource_category
.
DefaultEmail
:
if
resource_value
==
dqe_resource_category
.
DefaultEmail
:
return
{
return
{
'00'
:
'E-mail valide'
,
'00'
:
'E-mail valide'
,
'01'
:
'E-mail correct, mais le nom n’a pas pu être contrôlé'
,
'01'
:
'E-mail correct, mais le nom n’a pas pu être contrôlé'
,
...
@@ -35,7 +28,7 @@ if resource_value == dqe_resource_category.DefaultEmail:
...
@@ -35,7 +28,7 @@ if resource_value == dqe_resource_category.DefaultEmail:
}.
get
(
}.
get
(
response_dict
.
get
(
'IdError'
),
'Inconnue'
response_dict
.
get
(
'IdError'
),
'Inconnue'
)
)
if
resource_value
in
(
el
if
resource_value
in
(
dqe_resource_category
.
DefaultTelephone
,
dqe_resource_category
.
MobileTelephone
,
dqe_resource_category
.
DefaultTelephone
,
dqe_resource_category
.
MobileTelephone
,
):
):
return
{
return
{
...
@@ -45,11 +38,15 @@ if resource_value in (
...
@@ -45,11 +38,15 @@ if resource_value in (
}.
get
(
}.
get
(
response_dict
.
get
(
'IdError'
),
'Inconnue'
response_dict
.
get
(
'IdError'
),
'Inconnue'
)
)
if
resource_value
==
dqe_resource_category
.
OrganisationData
:
el
if
resource_value
==
dqe_resource_category
.
OrganisationData
:
return
{
return
{
'FOUND'
:
'Organisation trouvée '
,
'FOUND'
:
'Organisation trouvée '
,
'NOT FOUND'
:
'Organisation introuvable'
,
'NOT FOUND'
:
'Organisation introuvable'
,
}.
get
(
}.
get
(
response_dict
.
get
(
'DQE_status'
,
'NOT FOUND'
),
'Inconnue'
response_dict
.
get
(
'DQE_status'
,
'NOT FOUND'
),
'Inconnue'
)
)
elif
resource_value
==
dqe_resource_category
.
RelocationData
:
if
response_dict
.
get
(
'RESULT'
,
'FALSE'
)
==
'TRUE'
:
return
'Déménagée'
return
'Non déménagée'
return
''
return
''
bt5/erp5_dqe/SkinTemplateItem/portal_skins/erp5_dqe/HTTPExchange_getSentToDQEValueCaption.py
View file @
fb0b3ffe
...
@@ -16,6 +16,7 @@ service_value_to_key_list_dict = {
...
@@ -16,6 +16,7 @@ service_value_to_key_list_dict = {
dqe_resource_category
.
DefaultAddress
:
(
'Adresse'
,
'Pays'
),
dqe_resource_category
.
DefaultAddress
:
(
'Adresse'
,
'Pays'
),
dqe_resource_category
.
DeliveryAddress
:
(
'Adresse'
,
'Pays'
),
dqe_resource_category
.
DeliveryAddress
:
(
'Adresse'
,
'Pays'
),
dqe_resource_category
.
OrganisationData
:
(
'Siret'
,
),
dqe_resource_category
.
OrganisationData
:
(
'Siret'
,
),
dqe_resource_category
.
RelocationData
:
(
'Adresse'
,
'CodePostal'
,
'Ville'
,
'Complement'
,
'LieuDit'
),
}
}
sent_value_list
=
[]
sent_value_list
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment