From 8561f1e528c3e713d2e9d0bc4101a86b26ea6bd2 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Fri, 16 Jan 2004 13:46:22 +0000
Subject: [PATCH] creation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@207 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../SalesOrder_importEdiForm.form             | 191 ++++++++++++++++++
 .../item_by_ean13_code_sql_search.zsql        |  17 ++
 .../item_by_title_sql_search.zsql             |  16 ++
 3 files changed, 224 insertions(+)
 create mode 100755 product/Coramy/skins/coramy_trade/SalesOrder_importEdiForm.form
 create mode 100755 product/Coramy/skins/coramy_trade/item_by_ean13_code_sql_search.zsql
 create mode 100755 product/Coramy/skins/coramy_trade/item_by_title_sql_search.zsql

diff --git a/product/Coramy/skins/coramy_trade/SalesOrder_importEdiForm.form b/product/Coramy/skins/coramy_trade/SalesOrder_importEdiForm.form
new file mode 100755
index 0000000000..c5d45bf1c5
--- /dev/null
+++ b/product/Coramy/skins/coramy_trade/SalesOrder_importEdiForm.form
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<form>
+  <title>Importer</title>
+  <name>SalesOrder_importEdiForm</name>
+  <action>SalesOrder_importEdiFiles</action>
+  <enctype>multipart/form-data</enctype>
+  <method>POST</method>
+  <pt>form_dialog</pt>
+
+  <groups>
+    <group>
+      <title>Default</title>
+      <fields>
+
+      <field><id>my_delivery_mode</id> <type>ListField</type>
+        <values>
+          <alternate_name></alternate_name>
+          <css_class></css_class>
+          <default></default>
+          <description></description>
+          <editable_expression></editable_expression>
+          <editable_permission></editable_permission>
+          <editable_role></editable_role>
+          <external_validator></external_validator>
+          <extra></extra>
+          <first_item type="int">0</first_item>
+          <hidden type="int">0</hidden>
+          <items type="list">[]</items>
+          <not_viewable type="int">0</not_viewable>
+          <read_only type="int">0</read_only>
+          <required type="int">0</required>
+          <size type="int">1</size>
+          <title>Mode de livraison</title>
+          <unicode type="int">0</unicode>
+          <viewable_expression></viewable_expression>
+          <viewable_permission></viewable_permission>
+          <viewable_role></viewable_role>
+          <whitespace_preserve type="int">0</whitespace_preserve>
+        </values>
+        <tales>
+          <default>python:here.portal_categories.delivery_mode.getFormItemList()[1][1]</default>
+          <items>here/portal_categories/delivery_mode/getFormItemList</items>
+        </tales>
+        <messages>
+          <message name="external_validator_failed">The input failed the external validator.</message>
+          <message name="required_not_found">Input is required but no input given.</message>
+          <message name="unknown_selection">You selected an item that was not in the list.</message>
+        </messages>
+      </field>
+      <field><id>my_incoterm</id> <type>ListField</type>
+        <values>
+          <alternate_name></alternate_name>
+          <css_class></css_class>
+          <default></default>
+          <description></description>
+          <editable_expression></editable_expression>
+          <editable_permission></editable_permission>
+          <editable_role></editable_role>
+          <external_validator></external_validator>
+          <extra></extra>
+          <first_item type="int">0</first_item>
+          <hidden type="int">0</hidden>
+          <items type="list">[]</items>
+          <not_viewable type="int">0</not_viewable>
+          <read_only type="int">0</read_only>
+          <required type="int">0</required>
+          <size type="int">1</size>
+          <title>Incoterm</title>
+          <unicode type="int">0</unicode>
+          <viewable_expression></viewable_expression>
+          <viewable_permission></viewable_permission>
+          <viewable_role></viewable_role>
+          <whitespace_preserve type="int">0</whitespace_preserve>
+        </values>
+        <tales>
+          <default>python:here.portal_categories.incoterm.getCategoryChildItemList(method_name = 'getTitle', start_with_empty_tuple=1)[1][1]</default>
+          <items>python:here.portal_categories.incoterm.getCategoryChildItemList(method_name = 'getTitle', start_with_empty_tuple=1)</items>
+        </tales>
+        <messages>
+          <message name="external_validator_failed">The input failed the external validator.</message>
+          <message name="required_not_found">Input is required but no input given.</message>
+          <message name="unknown_selection">You selected an item that was not in the list.</message>
+        </messages>
+      </field>
+      <field><id>my_order_type</id> <type>ListField</type>
+        <values>
+          <alternate_name></alternate_name>
+          <css_class></css_class>
+          <default></default>
+          <description></description>
+          <editable_expression></editable_expression>
+          <editable_permission></editable_permission>
+          <editable_role></editable_role>
+          <external_validator></external_validator>
+          <extra></extra>
+          <first_item>False</first_item>
+          <hidden>False</hidden>
+          <items type="list">[]</items>
+          <not_viewable type="int">0</not_viewable>
+          <read_only type="int">0</read_only>
+          <required>False</required>
+          <size type="int">1</size>
+          <title>Type de commande</title>
+          <unicode type="int">0</unicode>
+          <viewable_expression></viewable_expression>
+          <viewable_permission></viewable_permission>
+          <viewable_role></viewable_role>
+          <whitespace_preserve type="int">0</whitespace_preserve>
+        </values>
+        <tales>
+          <default>python:here.portal_categories.order_type.getFormItemList()[1][1]</default>
+          <items>here/portal_categories/order_type/getFormItemList</items>
+        </tales>
+        <messages>
+          <message name="external_validator_failed">The input failed the external validator.</message>
+          <message name="required_not_found">Input is required but no input given.</message>
+          <message name="unknown_selection">You selected an item that was not in the list.</message>
+        </messages>
+      </field>
+      <field><id>my_segmentation_strategique</id> <type>ListField</type>
+        <values>
+          <alternate_name></alternate_name>
+          <css_class></css_class>
+          <default></default>
+          <description></description>
+          <editable_expression></editable_expression>
+          <editable_permission></editable_permission>
+          <editable_role></editable_role>
+          <external_validator></external_validator>
+          <extra></extra>
+          <first_item type="int">0</first_item>
+          <hidden type="int">0</hidden>
+          <items type="list">[]</items>
+          <not_viewable type="int">0</not_viewable>
+          <read_only type="int">0</read_only>
+          <required type="int">0</required>
+          <size type="int">1</size>
+          <title>Segmentation</title>
+          <unicode type="int">0</unicode>
+          <viewable_expression></viewable_expression>
+          <viewable_permission></viewable_permission>
+          <viewable_role></viewable_role>
+          <whitespace_preserve type="int">0</whitespace_preserve>
+        </values>
+        <tales>
+          <default>python:here.portal_categories.segmentation_strategique.getFormItemList()[1][1]</default>
+          <items>here/portal_categories/segmentation_strategique/getFormItemList</items>
+        </tales>
+        <messages>
+          <message name="external_validator_failed">The input failed the external validator.</message>
+          <message name="required_not_found">Input is required but no input given.</message>
+          <message name="unknown_selection">You selected an item that was not in the list.</message>
+        </messages>
+      </field>
+      <field><id>my_travel_duration</id> <type>IntegerField</type>
+        <values>
+          <alternate_name></alternate_name>
+          <css_class></css_class>
+          <default></default>
+          <description></description>
+          <display_maxwidth></display_maxwidth>
+          <display_width type="int">20</display_width>
+          <end></end>
+          <external_validator></external_validator>
+          <extra></extra>
+          <hidden>False</hidden>
+          <required>False</required>
+          <start></start>
+          <title>Durée de l'expédition (jours)</title>
+        </values>
+        <tales>
+          <default>python: 0</default>
+        </tales>
+        <messages>
+          <message name="external_validator_failed">The input failed the external validator.</message>
+          <message name="required_not_found">Input is required but no input given.</message>
+          <message name="not_integer">You did not enter an integer.</message>
+          <message name="integer_out_of_range">The integer you entered was out of range.</message>
+        </messages>
+      </field>
+      </fields>
+    </group>
+    <group>
+      <title>hidden</title>
+      <fields>
+
+      </fields>
+    </group>
+  </groups>
+</form>
\ No newline at end of file
diff --git a/product/Coramy/skins/coramy_trade/item_by_ean13_code_sql_search.zsql b/product/Coramy/skins/coramy_trade/item_by_ean13_code_sql_search.zsql
new file mode 100755
index 0000000000..dba5f82158
--- /dev/null
+++ b/product/Coramy/skins/coramy_trade/item_by_ean13_code_sql_search.zsql
@@ -0,0 +1,17 @@
+<dtml-comment>
+title:
+connection_id:MySQL
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:ZSQLBrain
+class_file:zsqlbrain.py
+</dtml-comment>
+<params>organisation_ean
+portal_type</params>
+SELECT DISTINCT id, relative_url, path, Description
+
+FROM catalog
+WHERE portal_type REGEXP "<dtml-var portal_type>"
+AND ean13_code = organisation_ean
+
diff --git a/product/Coramy/skins/coramy_trade/item_by_title_sql_search.zsql b/product/Coramy/skins/coramy_trade/item_by_title_sql_search.zsql
new file mode 100755
index 0000000000..e9fffdd2c4
--- /dev/null
+++ b/product/Coramy/skins/coramy_trade/item_by_title_sql_search.zsql
@@ -0,0 +1,16 @@
+<dtml-comment>
+title:
+connection_id:MySQL
+max_rows:1000
+max_cache:100
+cache_time:0
+class_name:ZSQLBrain
+class_file:zsqlbrain.py
+</dtml-comment>
+<params>title
+portal_type</params>
+SELECT DISTINCT id, relative_url, path, Description
+
+FROM catalog
+WHERE portal_type = "<dtml-var portal_type>"
+AND Title REGEXP "<dtml-var title>"
-- 
2.30.9