From a303b4f8d8c617a48207063051a7846270902688 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@nexedi.com>
Date: Tue, 17 Mar 2020 01:50:03 +0000
Subject: [PATCH] erp5_document_scanner: Add preference properties required to
 configure scannerjs

---
 .../DocumentScannerPreference.xml             | 66 +++++++++++++++++++
 ...scanner_conversion_brightness_property.xml | 59 +++++++++++++++++
 ...canner_conversion_compression_property.xml | 59 +++++++++++++++++
 ...e_scanner_conversion_contrast_property.xml | 59 +++++++++++++++++
 ...r_conversion_enable_greyscale_property.xml | 59 +++++++++++++++++
 .../bt/template_property_sheet_id_list        |  1 +
 6 files changed, 303 insertions(+)
 create mode 100644 bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference.xml
 create mode 100644 bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_brightness_property.xml
 create mode 100644 bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_compression_property.xml
 create mode 100644 bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_contrast_property.xml
 create mode 100644 bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_enable_greyscale_property.xml
 create mode 100644 bt5/erp5_document_scanner/bt/template_property_sheet_id_list

diff --git a/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference.xml b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference.xml
new file mode 100644
index 0000000000..749538fd3c
--- /dev/null
+++ b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Property Sheet" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_count</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_mt_index</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_tree</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>DocumentScannerPreference</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Property Sheet</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Length" module="BTrees.Length"/>
+    </pickle>
+    <pickle> <int>0</int> </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <global name="OOBTree" module="BTrees.OOBTree"/>
+    </pickle>
+    <pickle>
+      <none/>
+    </pickle>
+  </record>
+  <record id="4" aka="AAAAAAAAAAQ=">
+    <pickle>
+      <global name="OOBTree" module="BTrees.OOBTree"/>
+    </pickle>
+    <pickle>
+      <none/>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_brightness_property.xml b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_brightness_property.xml
new file mode 100644
index 0000000000..981bc70917
--- /dev/null
+++ b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_brightness_property.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Standard Property" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_local_properties</string> </key>
+            <value>
+              <tuple>
+                <dictionary>
+                  <item>
+                      <key> <string>id</string> </key>
+                      <value> <string>mode</string> </value>
+                  </item>
+                  <item>
+                      <key> <string>type</string> </key>
+                      <value> <string>string</string> </value>
+                  </item>
+                </dictionary>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/float</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>preferred_image_scanner_conversion_brightness_property</string> </value>
+        </item>
+        <item>
+            <key> <string>mode</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>preference</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_compression_property.xml b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_compression_property.xml
new file mode 100644
index 0000000000..fb8a1a0eaf
--- /dev/null
+++ b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_compression_property.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Standard Property" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_local_properties</string> </key>
+            <value>
+              <tuple>
+                <dictionary>
+                  <item>
+                      <key> <string>id</string> </key>
+                      <value> <string>mode</string> </value>
+                  </item>
+                  <item>
+                      <key> <string>type</string> </key>
+                      <value> <string>string</string> </value>
+                  </item>
+                </dictionary>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/float</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>preferred_image_scanner_conversion_compression_property</string> </value>
+        </item>
+        <item>
+            <key> <string>mode</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>preference</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_contrast_property.xml b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_contrast_property.xml
new file mode 100644
index 0000000000..df0ebc4d79
--- /dev/null
+++ b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_contrast_property.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Standard Property" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_local_properties</string> </key>
+            <value>
+              <tuple>
+                <dictionary>
+                  <item>
+                      <key> <string>id</string> </key>
+                      <value> <string>mode</string> </value>
+                  </item>
+                  <item>
+                      <key> <string>type</string> </key>
+                      <value> <string>string</string> </value>
+                  </item>
+                </dictionary>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/int</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>preferred_image_scanner_conversion_contrast_property</string> </value>
+        </item>
+        <item>
+            <key> <string>mode</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>preference</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_enable_greyscale_property.xml b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_enable_greyscale_property.xml
new file mode 100644
index 0000000000..55f4127aa4
--- /dev/null
+++ b/bt5/erp5_document_scanner/PropertySheetTemplateItem/portal_property_sheets/DocumentScannerPreference/preferred_image_scanner_conversion_enable_greyscale_property.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Standard Property" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_local_properties</string> </key>
+            <value>
+              <tuple>
+                <dictionary>
+                  <item>
+                      <key> <string>id</string> </key>
+                      <value> <string>mode</string> </value>
+                  </item>
+                  <item>
+                      <key> <string>type</string> </key>
+                      <value> <string>string</string> </value>
+                  </item>
+                </dictionary>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/boolean</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>preferred_image_scanner_conversion_enable_greyscale_property</string> </value>
+        </item>
+        <item>
+            <key> <string>mode</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>preference</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_document_scanner/bt/template_property_sheet_id_list b/bt5/erp5_document_scanner/bt/template_property_sheet_id_list
new file mode 100644
index 0000000000..1158a56c5a
--- /dev/null
+++ b/bt5/erp5_document_scanner/bt/template_property_sheet_id_list
@@ -0,0 +1 @@
+DocumentScannerPreference
\ No newline at end of file
-- 
2.30.9