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
Klaus Wölfel
erp5
Commits
928b2449
Commit
928b2449
authored
Nov 18, 2024
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_interface_cxml: .
parent
3c48ed49
Changes
38
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
798 additions
and
220 deletions
+798
-220
bt5/erp5_interface_cxml/ModuleComponentTemplateItem/portal_components/document.erp5.CxmlOrderRequest.py
...eItem/portal_components/document.erp5.CxmlOrderRequest.py
+3
-3
bt5/erp5_interface_cxml/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+2
-0
bt5/erp5_interface_cxml/PortalTypeTemplateItem/portal_types/Network%20Id.xml
...cxml/PortalTypeTemplateItem/portal_types/Network%20Id.xml
+1
-1
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Base_getCxmlLanguageCode.py
...tal_skins/erp5_interface_cxml/Base_getCxmlLanguageCode.py
+7
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Base_getCxmlLanguageCode.xml
...al_skins/erp5_interface_cxml/Base_getCxmlLanguageCode.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/CxmlDocumentModule_viewCxmlDocumentList/listbox.xml
..._cxml/CxmlDocumentModule_viewCxmlDocumentList/listbox.xml
+1
-1
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/NetworkId_asText.py
...Item/portal_skins/erp5_interface_cxml/NetworkId_asText.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/NetworkId_asText.xml
...tem/portal_skins/erp5_interface_cxml/NetworkId_asText.xml
+20
-16
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Organisation_getCxmlTitle.py
...al_skins/erp5_interface_cxml/Organisation_getCxmlTitle.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Organisation_getCxmlTitle.xml
...l_skins/erp5_interface_cxml/Organisation_getCxmlTitle.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTranaction_getInvoiceDetailRequest.zpt
...ce_cxml/SaleInvoiceTranaction_getInvoiceDetailRequest.zpt
+0
-173
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getAribaNetworkPaymentTermsExplanation.py
...oiceTransaction_getAribaNetworkPaymentTermsExplanation.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getAribaNetworkPaymentTermsExplanation.xml
...iceTransaction_getAribaNetworkPaymentTermsExplanation.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getCxmlStatusText.py
...nterface_cxml/SaleInvoiceTransaction_getCxmlStatusText.py
+13
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getCxmlStatusText.xml
...terface_cxml/SaleInvoiceTransaction_getCxmlStatusText.xml
+70
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getInvoiceDetailRequest.zpt
...e_cxml/SaleInvoiceTransaction_getInvoiceDetailRequest.zpt
+37
-13
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getPaymentNote.py
...5_interface_cxml/SaleInvoiceTransaction_getPaymentNote.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getPaymentNote.xml
..._interface_cxml/SaleInvoiceTransaction_getPaymentNote.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierCommercialCredentials.py
...aleInvoiceTransaction_getSupplierCommercialCredentials.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierCommercialCredentials.xml
...leInvoiceTransaction_getSupplierCommercialCredentials.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierReference.py
...rface_cxml/SaleInvoiceTransaction_getSupplierReference.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierReference.xml
...face_cxml/SaleInvoiceTransaction_getSupplierReference.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierTaxId.py
...interface_cxml/SaleInvoiceTransaction_getSupplierTaxId.py
+1
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierTaxId.xml
...nterface_cxml/SaleInvoiceTransaction_getSupplierTaxId.xml
+62
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getTotalTaxData.py
..._interface_cxml/SaleInvoiceTransaction_getTotalTaxData.py
+4
-1
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleOrder_checkCxmlOrderRequestConsistency.py
...erface_cxml/SaleOrder_checkCxmlOrderRequestConsistency.py
+2
-2
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleOrder_getCxmlStatusText.py
..._skins/erp5_interface_cxml/SaleOrder_getCxmlStatusText.py
+13
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleOrder_getCxmlStatusText.xml
...skins/erp5_interface_cxml/SaleOrder_getCxmlStatusText.xml
+70
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SalePackingList_getCxmlStatusText.py
.../erp5_interface_cxml/SalePackingList_getCxmlStatusText.py
+13
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SalePackingList_getCxmlStatusText.xml
...erp5_interface_cxml/SalePackingList_getCxmlStatusText.xml
+70
-0
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SalePackingList_getShipNoticeRequest.zpt
...5_interface_cxml/SalePackingList_getShipNoticeRequest.zpt
+5
-4
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/interaction_SaleInvoiceTransaction_stop.xml
...tion_workflow/interaction_SaleInvoiceTransaction_stop.xml
+1
-1
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/interaction_SaleOrder_confirm.xml
...ml_interaction_workflow/interaction_SaleOrder_confirm.xml
+1
-1
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/interaction_SalePackingList_deliver.xml
...eraction_workflow/interaction_SalePackingList_deliver.xml
+1
-1
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/script_SaleInvoiceTransaction_sendInvoiceDetailRequest.py
...script_SaleInvoiceTransaction_sendInvoiceDetailRequest.py
+7
-1
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/script_SaleOrder_sendOrderConfirmationRequest.py
...workflow/script_SaleOrder_sendOrderConfirmationRequest.py
+7
-1
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/script_SalePackingList_sendShipNoticeRequest.py
..._workflow/script_SalePackingList_sendShipNoticeRequest.py
+7
-1
bt5/erp5_interface_cxml/bt/template_portal_type_property_sheet_list
...nterface_cxml/bt/template_portal_type_property_sheet_list
+2
-0
No files found.
bt5/erp5_interface_cxml/ModuleComponentTemplateItem/portal_components/document.erp5.CxmlOrderRequest.py
View file @
928b2449
...
...
@@ -139,7 +139,7 @@ class CxmlOrderRequest(CxmlDocument):
buyer_vat_id
=
''
.
join
(
order_request_header
.
xpath
(
'//Extrinsic[@name="buyerVatID"]/text()'
))
property_dict
[
'destination_section'
]
=
{
'portal_type'
:
'Organisation'
,
'corporate_name'
:
sold_to_name
or
bill_to_name
}
if
buyer_vat_id
:
property_dict
[
'destination_section
'
][
'
vat_code'
]
=
buyer_vat_id
property_dict
[
'destination_section
_
vat_code'
]
=
buyer_vat_id
property_dict
[
'destination_section_address'
]
=
self
.
_getAddressPropertyDict
(
address
,
corporate_name
=
sold_to_name
or
bill_to_name
,
name_on_address
=
bill_to_name
)
property_dict
[
'order_date'
]
=
DateTime
(
order_request_header
.
get
(
'orderDate'
))
ship_to
=
order_request_header
.
find
(
'ShipTo'
)
...
...
@@ -175,10 +175,10 @@ class CxmlOrderRequest(CxmlDocument):
short_name
=
description
.
find
(
'ShortName'
)
if
short_name
is
not
None
:
property_dict
[
'title'
]
=
s
(
short_name
.
text
)
property_dict
[
'description'
]
=
s
(
short_name
.
tail
)
#
property_dict['description'] = s(short_name.tail)
else
:
property_dict
[
'title'
]
=
s
(
description
.
text
)
property_dict
[
'description'
]
=
s
(
description
.
text
)
#
property_dict['description'] = s(description.text)
unit_of_measure_text
=
get_text
(
item_detail
,
'UnitOfMeasure'
)
assert
unit_of_measure_text
in
(
"EA"
,
"PC"
)
property_dict
[
'quantity_unit'
]
=
"unit/piece"
...
...
bt5/erp5_interface_cxml/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
928b2449
...
...
@@ -31,6 +31,8 @@
<item>
Version
</item>
</portal_type>
<portal_type
id=
"Sale Packing List"
>
<item>
CxmlDelivery
</item>
<item>
CxmlOrder
</item>
<item>
CxmlOrderConstraint
</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
bt5/erp5_interface_cxml/PortalTypeTemplateItem/portal_types/Network%20Id.xml
View file @
928b2449
...
...
@@ -74,7 +74,7 @@
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
XMLObject
</string>
</value>
<value>
<string>
Coordinate
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
...
...
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Base_getCxmlLanguageCode.py
0 → 100644
View file @
928b2449
language
=
context
.
getLanguage
()
if
not
language
:
return
"en-US"
if
language
==
"en"
:
return
"en-US"
if
language
==
"de"
:
return
"de-DE"
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Base_getCxmlLanguageCode.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getCxmlLanguageCode
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/CxmlDocumentModule_viewCxmlDocumentList/listbox.xml
View file @
928b2449
...
...
@@ -146,7 +146,7 @@
</tuple>
<tuple>
<string>
follow_up_title
</string>
<string>
Sale Order
</string>
<string>
Follow Up
</string>
</tuple>
<tuple>
<string>
from
</string>
...
...
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/NetworkId_asText.py
0 → 100644
View file @
928b2449
return
context
.
getReference
()
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/
SaleInvoiceTranaction_getInvoiceDetailReques
t.xml
→
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/
NetworkId_asTex
t.xml
View file @
928b2449
...
...
@@ -2,10 +2,14 @@
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"
ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate
"
/>
<global
name=
"
PythonScript"
module=
"Products.PythonScripts.PythonScript
"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
...
...
@@ -20,6 +24,18 @@
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
...
...
@@ -33,24 +49,12 @@
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/xml
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTranaction_getInvoiceDetailRequest
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
<value>
<string>
NetworkId_asText
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Organisation_getCxmlTitle.py
0 → 100644
View file @
928b2449
return
context
.
getCorporateName
()
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/Organisation_getCxmlTitle.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Organisation_getCxmlTitle
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTranaction_getInvoiceDetailRequest.zpt
deleted
100644 → 0
View file @
3c48ed49
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.060/InvoiceDetail.dtd">
<tal:block
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
tal:define=
"language string:de-DE;
cxml_url python:'%s/ERP5Site_cml' %here.getPortalObject().absolute_url();
source here/getSourceValue;
source_address python:here.Delivery_getSourceAddressText()[0];
source_telephone python: here.getSourceValue().getDefaultTelephoneValue();
source_section here/getSourceSectionValue;
source_section_address source_section/getDefaultAddressValue;
destination here/getDestinationValue;
destination_address python:here.Delivery_getDestinationAddressText()[0];
destination_section here/getDestinationSectionValue;
destination_section_address python: here.getPortalObject().restrictedTraverse(here.getDestinationSectionAddress());
order python:here.getCausalityValue(portal_type='Sale Order');
order_request order/Order_getRelatedOrderRequestValue;
data_dict here/Invoice_getODTDataDict;
connector here/Base_getCxmlConnectorValueForSale;"
>
<cXML
tal:attributes=
"xml:lang language; payloadID connector/getPayloadId; timestamp python:DateTime().ISO8601(); version connector/getCxmlVersion"
>
<Header>
<From>
<Credential
domain=
"NetworkID"
>
<Identity
tal:content=
"order_request/getTo"
></Identity>
</Credential>
</From>
<To>
<Credential
domain=
"NetworkID"
>
<Identity
tal:content=
"order_request/getFrom"
></Identity>
</Credential>
</To>
<Sender>
<Credential
domain=
"NetworkID"
>
<Identity
tal:content=
"here/Base_getCxmlUserIdForSale"
></Identity>
<SharedSecret>
REPLACE_WITH_PASSWORD
</SharedSecret>
</Credential>
<UserAgent
tal:content=
"here/Base_getCxmlUserIdForSale"
></UserAgent>
</Sender>
</Header>
<Request
Id=
"cXMLData"
tal:attributes=
"deploymentMode order_request/getDeploymentMode"
>
<InvoiceDetailRequest>
<InvoiceDetailRequestHeader
invoiceOrigin=
"supplier"
tal:attributes=
"invoiceID here/SaleInvoiceTransaction_getInvoiceId; invoiceDate python:here.getStartDate().ISO8601()"
purpose=
"standard"
operation=
"new"
>
<InvoiceDetailHeaderIndicator></InvoiceDetailHeaderIndicator>
<InvoiceDetailLineIndicator></InvoiceDetailLineIndicator>
<InvoicePartner>
<Contact
tal:attributes=
"addressID destination_section_address/getReference"
role=
"billTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"destination_section/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"destination_section_address/getStreetAddress"
></Street>
<City
tal:content=
"destination_section_address/getCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"destination_section_address/getZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode destination_section_address/getRegionReference"
tal:content=
"destination_section_address/getRegionTitle"
></Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact
role=
"from"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"source_section/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"source_section/getDefaultAddressStreetAddress"
></Street>
<City
tal:content=
"source_section/getDefaultAddressCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"source_section/getDefaultAddressZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode source_section_address/getRegionReference"
tal:content=
"source_section_address/getRegionTitle"
></Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact
tal:attributes=
"addressID destination_section_address/getReference"
role=
"soldTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"destination_section/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"destination_section_address/getStreetAddress"
></Street>
<City
tal:content=
"destination_section_address/getCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"destination_section_address/getZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode destination_section_address/getRegionReference"
tal:content=
"destination_section_address/getRegionTitle"
></Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner
tal:content=
"structure order_request/getContactSoldToXml"
/>
<InvoiceDetailShipping>
<Contact
role=
"shipFrom"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"source/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"source_address/getStreetAddress"
></Street>
<City
tal:content=
"source_address/getCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"source_address/getZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode source_address/getRegionReference"
tal:content=
"source_address/getRegionTitle"
></Country>
</PostalAddress>
</Contact>
<Contact
role=
"shipTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"destination/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"destination_address/getStreetAddress"
></Street>
<City
tal:content=
"destination_address/getCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"destination_address/getZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode destination_address/getRegionReference"
tal:content=
"destination_address/getRegionTitle"
></Country>
</PostalAddress>
</Contact>
</InvoiceDetailShipping>
<Extrinsic
name=
"buyerVatID"
tal:content=
"destination_section/getVatCode"
></Extrinsic>
<Extrinsic
name=
"supplierVatID"
tal:content=
"here/SaleInvoice_getSourceSectionVatCode"
></Extrinsic>
<Extrinsic
name=
"invoiceSourceDocument"
>
PurchaseOrder
</Extrinsic>
<Extrinsic
name=
"invoiceSubmissionMethod"
>
cXML
</Extrinsic>
</InvoiceDetailRequestHeader>
<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
<OrderReference
tal:attributes=
"orderDate python:order.getOrderDate().ISO8601(); orderID order/getDestinationReference"
>
<DocumentReference
tal:attributes=
"payloadID order/Order_getPayloadId"
></DocumentReference>
</OrderReference>
</InvoiceDetailOrderInfo>
<span
tal:omit-tag=
""
tal:repeat=
"line_dict data_dict/line_not_tax"
>
<InvoiceDetailItem
tal:define=
"line python: here[line_dict['id']]"
tal:attributes=
"invoiceLineNumber line_dict/int_index;
quantity line_dict/total_quantity"
>
<UnitOfMeasure
tal:content=
"line/Movement_getUnitOfMeasure"
></UnitOfMeasure>
<UnitPrice>
<Money
tal:attributes=
"currency line/getPriceCurrencyId"
tal:content=
"line/getPrice"
></Money>
</UnitPrice>
<InvoiceDetailItemReference
tal:attributes=
"lineNumber line/DeliveryLine_getOrderLineIntIndex"
>
<ItemID>
<SupplierPartID
tal:content=
"line/DeliveryLine_getSupplierPartIdIfProvidedInOrderRequest"
></SupplierPartID>
<BuyerPartID
tal:content=
"line/DeliveryLine_getResourceDestinationReference"
></BuyerPartID>
</ItemID>
<Description
tal:content=
"line/getDescription"
xml:lang=
"de-DE"
></Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money
tal:attributes=
"currency line/getPriceCurrencyId"
tal:content=
"line/getTotalPrice"
></Money>
</SubtotalAmount>
<GrossAmount>
<Money
tal:attributes=
"currency line/getPriceCurrencyId"
tal:content=
"line/getTotalPrice"
></Money>
</GrossAmount>
<NetAmount>
<Money
tal:attributes=
"currency line/getPriceCurrencyId"
tal:content=
"line/getTotalPrice"
></Money>
</NetAmount>
</InvoiceDetailItem>
</span>
</InvoiceDetailOrder>
<InvoiceDetailSummary>
<SubtotalAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"data_dict/total_price_novat"
></Money>
</SubtotalAmount>
<span
tal:omit-tag=
""
tal:repeat=
"line_tax python: here.SaleInvoiceTransaction_getTotalTaxData(data_dict['line_tax'])"
>
<Tax>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"line_tax/total_price"
></Money>
<Description
xml:lang =
"en-US"
></Description>
<TaxDetail
category=
"vat"
tal:attributes=
"percentageRate python: float(line_tax['base_price'] or 0) *100; taxPointDate python:here.getStartDate().ISO8601()"
>
<TaxableAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"line_tax/total_quantity"
></Money>
</TaxableAmount>
<TaxAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"line_tax/total_price"
></Money>
</TaxAmount>
<Description
xml:lang =
"en-US"
></Description>
</TaxDetail>
</Tax>
</span>
<GrossAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"data_dict/total_price"
></Money>
</GrossAmount>
<NetAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"data_dict/total_price"
></Money>
</NetAmount>
<DueAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"data_dict/total_price"
></Money>
</DueAmount>
</InvoiceDetailSummary>
</InvoiceDetailRequest>
</Request>
</cXML>
</tal:block>
\ No newline at end of file
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getAribaNetworkPaymentTermsExplanation.py
0 → 100644
View file @
928b2449
return
''
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getAribaNetworkPaymentTermsExplanation.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_getAribaNetworkPaymentTermsExplanation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getCxmlStatusText.py
0 → 100644
View file @
928b2449
document_list
=
context
.
getFollowUpRelatedValueList
(
portal_type
=
"Cxml Document"
)
for
start_date
,
cxml_document
in
reversed
(
sorted
([(
x
.
getStartDate
(),
x
)
for
x
in
document_list
])):
if
cxml_document
.
getDocumentType
()
==
"InvoiceDetailRequest"
:
response
=
cxml_document
.
getSuccessorValue
()
if
response
is
not
None
:
# Check if the response to the ShipNoticeRequest has a
# a status code 2xx. Only then we had a successfull
# ConfirmationRequest
if
response
.
getStatusCode
().
startswith
(
"2"
):
return
"Invoice accepted"
return
"Invoice not accepted"
return
"Invoice sent but no reply"
return
"Invoice not sent"
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getCxmlStatusText.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Auditor
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_getCxmlStatusText
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getInvoiceDetailRequest.zpt
View file @
928b2449
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.060/InvoiceDetail.dtd">
<tal:block
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
tal:define=
"language
string:de-DE
;
tal:define=
"language
here/Base_getCxmlLanguageCode
;
cxml_url python:'%s/ERP5Site_cml' %here.getPortalObject().absolute_url();
source here/getSourceValue;
source_address python:here.Delivery_getSourceAddressText()[0];
...
...
@@ -42,8 +42,21 @@
<InvoiceDetailHeaderIndicator></InvoiceDetailHeaderIndicator>
<InvoiceDetailLineIndicator></InvoiceDetailLineIndicator>
<InvoicePartner>
<Contact
tal:attributes=
"addressID destination_section_address/getReference"
role=
"billTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"destination_section/Entity_getTitle"
></Name>
<Contact
role=
"remitTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"source_section/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"source_section/getDefaultAddressStreetAddress"
></Street>
<City
tal:content=
"source_section/getDefaultAddressCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"source_section/getDefaultAddressZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode source_section_address/getRegionReference"
tal:content=
"python: source_section_address.getRegionId().capitalize()"
></Country>
</PostalAddress>
</Contact>
<IdReference
domain=
"supplierTaxID"
tal:attributes=
"identifier here/SaleInvoiceTransaction_getSupplierTaxId"
></IdReference>
</InvoicePartner>
<InvoicePartner>
<Contact
tal:attributes=
"addressID destination_section_address/getIntIndex"
role=
"billTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"here/Base_getBillToName"
></Name>
<PostalAddress>
<Street
tal:content=
"destination_section_address/getStreetAddress"
></Street>
<City
tal:content=
"destination_section_address/getCity"
></City>
...
...
@@ -61,19 +74,19 @@
<City
tal:content=
"source_section/getDefaultAddressCity"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"source_section/getDefaultAddressZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode source_section_address/getRegionReference"
tal:content=
"
source_section_address/getRegionTitle
"
></Country>
<Country
tal:attributes=
"isoCountryCode source_section_address/getRegionReference"
tal:content=
"
python: source_section_address.getRegionId().capitalize()
"
></Country>
</PostalAddress>
</Contact>
</InvoicePartner>
<InvoicePartner>
<Contact
tal:attributes=
"addressID destination_section_address/getReference"
role=
"soldTo
"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"
destination
_section/Entity_getTitle"
></Name>
<Contact
role=
"billFrom
"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"
source
_section/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"
destination_section_address/get
StreetAddress"
></Street>
<City
tal:content=
"
destination_section_address/get
City"
></City>
<Street
tal:content=
"
source_section/getDefaultAddress
StreetAddress"
></Street>
<City
tal:content=
"
source_section/getDefaultAddress
City"
></City>
<State
tal:omit-tag=
""
></State>
<PostalCode
tal:content=
"
destination_section_address/get
ZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode
destination_section_address/getRegionReference"
tal:content=
"destination_section_address/getRegionTitle
"
></Country>
<PostalCode
tal:content=
"
source_section/getDefaultAddress
ZipCode"
></PostalCode>
<Country
tal:attributes=
"isoCountryCode
source_section_address/getRegionReference"
tal:content=
"python: source_section_address.getRegionId().capitalize()
"
></Country>
</PostalAddress>
</Contact>
</InvoicePartner>
...
...
@@ -89,7 +102,7 @@
<Country
tal:attributes=
"isoCountryCode source_address/getRegionReference"
tal:content=
"source_address/getRegionTitle"
></Country>
</PostalAddress>
</Contact>
<Contact
role=
"shipTo"
>
<Contact
tal:attributes=
"addressID destination_address/getIntIndex"
role=
"shipTo"
>
<Name
tal:attributes=
"xml:lang language"
tal:content=
"destination/Entity_getTitle"
></Name>
<PostalAddress>
<Street
tal:content=
"destination_address/getStreetAddress"
></Street>
...
...
@@ -100,10 +113,20 @@
</PostalAddress>
</Contact>
</InvoiceDetailShipping>
<PaymentTerm
payInNumberOfDays=
"60"
>
<Discount>
<DiscountPercent
percent=
"0.000"
/>
</Discount>
</PaymentTerm>
<IdReference
domain=
"supplierReference"
tal:attributes=
"identifier here/SaleInvoiceTransaction_getSupplierReference"
/>
<Extrinsic
name=
"AribaNetwork.PaymentTermsExplanation"
tal:content=
"here/SaleInvoiceTransaction_getAribaNetworkPaymentTermsExplanation"
></Extrinsic>
<Extrinsic
name=
"buyerVatID"
tal:content=
"destination_section/getVatCode"
></Extrinsic>
<Extrinsic
name=
"supplierVatID"
tal:content=
"here/SaleInvoice_getSourceSectionVatCode"
></Extrinsic>
<Extrinsic
name=
"invoiceSourceDocument"
>
PurchaseOrder
</Extrinsic>
<Extrinsic
name=
"invoiceSubmissionMethod"
>
cXML
</Extrinsic>
<Extrinsic
name=
"paymentNote"
tal:content=
"here/SaleInvoiceTransaction_getPaymentNote"
></Extrinsic>
<Extrinsic
name=
"supplierCommercialIdentifier"
tal:content=
"python: here.getSourceSectionValue().getCorporateRegistrationCode()"
></Extrinsic>
<Extrinsic
name=
"supplierCommercialCredentials"
tal:content=
"here/SaleInvoiceTransaction_getSupplierCommercialCredentials"
></Extrinsic>
</InvoiceDetailRequestHeader>
<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
...
...
@@ -124,7 +147,7 @@
<SupplierPartID
tal:content=
"line/DeliveryLine_getSupplierPartIdIfProvidedInOrderRequest"
></SupplierPartID>
<BuyerPartID
tal:content=
"line/DeliveryLine_getResourceDestinationReference"
></BuyerPartID>
</ItemID>
<Description
tal:content=
"line/get
Description"
xml:lang=
"de-DE
"
></Description>
<Description
tal:content=
"line/get
Title"
tal:attributes=
"xml:lang language
"
></Description>
</InvoiceDetailItemReference>
<SubtotalAmount>
<Money
tal:attributes=
"currency line/getPriceCurrencyId"
tal:content=
"line/getTotalPrice"
></Money>
...
...
@@ -135,6 +158,7 @@
<NetAmount>
<Money
tal:attributes=
"currency line/getPriceCurrencyId"
tal:content=
"line/getTotalPrice"
></Money>
</NetAmount>
<Comments
tal:content=
"line/getDescription"
tal:attributes=
"xml:lang language"
></Comments>
</InvoiceDetailItem>
</span>
</InvoiceDetailOrder>
...
...
@@ -153,7 +177,7 @@
<TaxAmount>
<Money
tal:attributes=
"currency here/getPriceCurrencyId"
tal:content=
"line_tax/total_price"
></Money>
</TaxAmount>
<Description
xml:lang =
"en-US
"
></Description>
<Description
tal:attributes=
"xml:lang language"
tal:content=
"python: line_tax['description_text']
"
></Description>
</TaxDetail>
</Tax>
</span>
...
...
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getPaymentNote.py
0 → 100644
View file @
928b2449
return
""
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getPaymentNote.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_getPaymentNote
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierCommercialCredentials.py
0 → 100644
View file @
928b2449
return
''
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierCommercialCredentials.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_getSupplierCommercialCredentials
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierReference.py
0 → 100644
View file @
928b2449
return
context
.
getReference
()
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierReference.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_getSupplierReference
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierTaxId.py
0 → 100644
View file @
928b2449
return
''
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getSupplierTaxId.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_getSupplierTaxId
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleInvoiceTransaction_getTotalTaxData.py
View file @
928b2449
total_quantity
=
0
total_price
=
0
description_text
=
''
for
tax
in
line_tax
:
total_quantity
+=
tax
[
"total_quantity"
]
total_price
+=
tax
[
"total_price"
]
base_price
=
tax
[
"base_price"
]
description_text
=
tax
[
"description_text"
]
or
description_text
return
[{
"total_quantity"
:
total_quantity
,
"total_price"
:
total_price
,
"base_price"
:
base_price
}]
"base_price"
:
base_price
,
"description_text"
:
description_text
}]
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleOrder_checkCxmlOrderRequestConsistency.py
View file @
928b2449
...
...
@@ -77,7 +77,7 @@ property_title_dict = {
"zip_code"
:
"Postal Code"
,
"default_sale_supply_line_destination_reference"
:
"Customer Reference"
,
"resource"
:
"Product or Service"
,
"
vat_code"
:
"
VAT Code"
,
"
destination_section_vat_code"
:
"Client
VAT Code"
,
"payment_condition_hs_payment_condition"
:
"Payment Condition"
,
}
...
...
@@ -161,7 +161,7 @@ def compare(document, property_dict, context_key='', context_title='', parent_co
# necessary in fixit case because we need to already know about the
# organisation before we can find or create its address
for
key
,
value
in
sorted
(
property_dict
.
items
()):
if
document
.
getPortalType
()
==
"Sale Order Line"
and
key
==
"quantity"
:
if
document
.
getPortalType
()
in
(
"Sale Order Line"
,
"Sale Packing List Line"
)
and
key
==
"quantity"
:
if
context
.
getCxmlChanges
():
continue
if
context
.
getPortalType
()
in
(
"Sale Packing List"
,
"Sale Invoice Transaction"
)
and
key
in
(
'order_date'
,
'int_index'
):
...
...
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleOrder_getCxmlStatusText.py
0 → 100644
View file @
928b2449
document_list
=
context
.
getFollowUpRelatedValueList
(
portal_type
=
"Cxml Confirmation Request"
)
for
start_date
,
cxml_document
in
reversed
(
sorted
([(
x
.
getStartDate
(),
x
)
for
x
in
document_list
])):
if
cxml_document
.
getDocumentType
()
==
"ConfirmationRequest"
:
response
=
cxml_document
.
getSuccessorValue
()
if
response
is
not
None
:
# Check if the response to the ShipNoticeRequest has a
# a status code 2xx. Only then we had a successfull
# ConfirmationRequest
if
response
.
getStatusCode
().
startswith
(
"2"
):
return
"Confirmation accepted"
return
"Confirmation not accepted"
return
"Confirmation sent but no reply"
return
"Confirmation not sent"
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SaleOrder_getCxmlStatusText.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Auditor
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleOrder_getCxmlStatusText
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SalePackingList_getCxmlStatusText.py
0 → 100644
View file @
928b2449
document_list
=
context
.
getFollowUpRelatedValueList
(
portal_type
=
"Cxml Document"
)
for
start_date
,
cxml_document
in
reversed
(
sorted
([(
x
.
getStartDate
(),
x
)
for
x
in
document_list
])):
if
cxml_document
.
getDocumentType
()
==
"ShipNoticeRequest"
:
response
=
cxml_document
.
getSuccessorValue
()
if
response
is
not
None
:
# Check if the response to the ShipNoticeRequest has a
# a status code 2xx. Only then we had a successfull
# ConfirmationRequest
if
response
.
getStatusCode
().
startswith
(
"2"
):
return
"ASN accepted"
return
"ASN not accepted"
return
"ASN sent but no reply"
return
"ASN not sent"
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SalePackingList_getCxmlStatusText.xml
0 → 100644
View file @
928b2449
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Auditor
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SalePackingList_getCxmlStatusText
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_interface_cxml/SkinTemplateItem/portal_skins/erp5_interface_cxml/SalePackingList_getShipNoticeRequest.zpt
View file @
928b2449
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.060/Fulfill.dtd">
<tal:block
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
tal:define=
"language
string:de-DE
;
tal:define=
"language
here/Base_getCxmlLanguageCode
;
cxml_url python:'%s/ERP5Site_cml' %here.getPortalObject().absolute_url();
source here/getSourceValue;
source_address python:here.Delivery_getSourceAddressText()[0];
...
...
@@ -94,7 +94,7 @@
<TransportInformation
tal:omit-tag=
""
>
<ShippingContractNumber
tal:omit-tag=
""
></ShippingContractNumber>
<ShippingInstructions
tal:omit-tag=
""
>
<Description
tal:omit-tag=
""
xml:lang=
"de-DE
"
></Description>
<Description
tal:omit-tag=
""
tal:attributes=
"xml:lang language
"
></Description>
</ShippingInstructions>
</TransportInformation>
</ShipControl>
...
...
@@ -103,7 +103,7 @@
<DocumentReference
tal:attributes=
"payloadID order/Order_getPayloadId"
></DocumentReference>
</OrderReference>
<span
tal:omit-tag=
""
tal:repeat=
"line python:here.objectValues(sort_on=[('int_index', 'ascending')], portal_type='Sale Packing List Line')"
>
<ShipNoticeItem
tal:attributes=
"shipNoticeLineNumber line/getIntIndex; quantity line/getQuantity; lineNumber line/DeliveryLine_getOrderLineIntIndex"
>
<ShipNoticeItem
tal:
condition=
"line/getQuantity"
tal:
attributes=
"shipNoticeLineNumber line/getIntIndex; quantity line/getQuantity; lineNumber line/DeliveryLine_getOrderLineIntIndex"
>
<ItemID>
<SupplierPartID
tal:content=
"line/getResourceReference"
></SupplierPartID>
<BuyerPartID
tal:content=
"line/DeliveryLine_getResourceDestinationReference"
></BuyerPartID>
...
...
@@ -112,10 +112,11 @@
<UnitPrice>
<Money
tal:attributes=
"currency line/getPriceCurrencyTitle"
tal:content=
"line/getPrice"
></Money>
</UnitPrice>
<Description
tal:content=
"line/get
Description"
xml:lang=
"de-DE
"
></Description>
<Description
tal:content=
"line/get
Title"
tal:attributes=
"xml:lang language
"
></Description>
</ShipNoticeItemDetail>
<UnitOfMeasure
tal:content=
"line/Movement_getUnitOfMeasure"
></UnitOfMeasure>
<AssetInfo
tal:repeat=
"item_title python:line.getAggregateTitleList(portal_type='Item')"
tal:attributes=
"serialNumber item_title"
tagNumber=
""
></AssetInfo>
<Comments
tal:content=
"line/getDescription"
tal:attributes=
"xml:lang language"
></Comments>
</ShipNoticeItem>
</span>
</ShipNoticePortion>
...
...
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/interaction_SaleInvoiceTransaction_stop.xml
View file @
928b2449
...
...
@@ -10,7 +10,7 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
a
ctivate
_script/portal_workflow/cxml_interaction_workflow/script_SaleInvoiceTransaction_sendInvoiceDetailRequest
</string>
<string>
a
fter
_script/portal_workflow/cxml_interaction_workflow/script_SaleInvoiceTransaction_sendInvoiceDetailRequest
</string>
</tuple>
</value>
</item>
...
...
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/interaction_SaleOrder_confirm.xml
View file @
928b2449
...
...
@@ -10,7 +10,7 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
a
ctivate
_script/portal_workflow/cxml_interaction_workflow/script_SaleOrder_sendOrderConfirmationRequest
</string>
<string>
a
fter
_script/portal_workflow/cxml_interaction_workflow/script_SaleOrder_sendOrderConfirmationRequest
</string>
</tuple>
</value>
</item>
...
...
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/interaction_SalePackingList_deliver.xml
View file @
928b2449
...
...
@@ -10,7 +10,7 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
a
ctivate
_script/portal_workflow/cxml_interaction_workflow/script_SalePackingList_sendShipNoticeRequest
</string>
<string>
a
fter
_script/portal_workflow/cxml_interaction_workflow/script_SalePackingList_sendShipNoticeRequest
</string>
</tuple>
</value>
</item>
...
...
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/script_SaleInvoiceTransaction_sendInvoiceDetailRequest.py
View file @
928b2449
...
...
@@ -5,4 +5,10 @@ if not context.Base_isCxmlRelated():
return
text_content
=
context
.
SaleInvoiceTransaction_getInvoiceDetailRequest
().
encode
(
'utf-8'
)
connector
=
context
.
Base_getCxmlConnectorValueForSale
()
connector
.
sendOutgoingRequest
(
text_content
,
follow_up
=
context
.
getRelativeUrl
())
# calling sendOutgoingRequest should be done in an activity
# which NEVER retries.
connector
.
activate
(
activity
=
'SQLQueue'
,
conflict_retry
=
False
,
max_retry
=
0
,
).
sendOutgoingRequest
(
text_content
,
follow_up
=
context
.
getRelativeUrl
())
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/script_SaleOrder_sendOrderConfirmationRequest.py
View file @
928b2449
...
...
@@ -6,7 +6,13 @@ if not context.Base_isCxmlRelated(): #or str(context.getVersion()) != "1":
return
text_content
=
context
.
SaleOrder_getConfirmationRequest
().
encode
(
'utf-8'
)
connector
=
context
.
Base_getCxmlConnectorValueForSale
()
connector
.
sendOutgoingRequest
(
# calling sendOutgoingRequest should be done in an activity
# which NEVER retries.
connector
.
activate
(
activity
=
'SQLQueue'
,
conflict_retry
=
False
,
max_retry
=
0
,
).
sendOutgoingRequest
(
text_content
,
portal_type
=
"Cxml Confirmation Request"
,
follow_up
=
context
.
getRelativeUrl
()
...
...
bt5/erp5_interface_cxml/WorkflowTemplateItem/portal_workflow/cxml_interaction_workflow/script_SalePackingList_sendShipNoticeRequest.py
View file @
928b2449
...
...
@@ -5,4 +5,10 @@ if not context.Base_isCxmlRelated():
return
text_content
=
context
.
SalePackingList_getShipNoticeRequest
().
encode
(
'utf-8'
)
connector
=
context
.
Base_getCxmlConnectorValueForSale
()
connector
.
sendOutgoingRequest
(
text_content
,
follow_up
=
context
.
getRelativeUrl
())
# calling sendOutgoingRequest should be done in an activity
# which NEVER retries.
connector
.
activate
(
activity
=
'SQLQueue'
,
conflict_retry
=
False
,
max_retry
=
0
,
).
sendOutgoingRequest
(
text_content
,
follow_up
=
context
.
getRelativeUrl
())
bt5/erp5_interface_cxml/bt/template_portal_type_property_sheet_list
View file @
928b2449
...
...
@@ -13,4 +13,6 @@ Sale Invoice Transaction | CxmlOrderConstraint
Sale Order | CxmlOrder
Sale Order | CxmlOrderConstraint
Sale Order | Version
Sale Packing List | CxmlDelivery
Sale Packing List | CxmlOrder
Sale Packing List | CxmlOrderConstraint
\ No newline at end of file
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