From 829320dcd60937705a335b1f0150d77750471b81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 6 Oct 2006 08:15:33 +0000
Subject: [PATCH] origin is a better category for differenciating Invoice
 Transmission Sheet types.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10588 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../transmission_sheet_type.xml               | 128 ------------------
 .../base_category_list.xml                    |   3 +
 .../listbox.xml                               |  12 +-
 .../InvoiceTransmissionSheet_view.xml         |   2 +-
 ...nsmission_sheet_type.xml => my_origin.xml} |   6 +-
 bt5/erp5_accounting_l10n_fr_m9/bt/revision    |   2 +-
 .../bt/template_base_category_list            |   3 +-
 .../template_portal_type_base_category_list   |   1 +
 8 files changed, 16 insertions(+), 141 deletions(-)
 delete mode 100644 bt5/erp5_accounting_l10n_fr_m9/CategoryTemplateItem/portal_categories/transmission_sheet_type.xml
 rename bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/{my_transmission_sheet_type.xml => my_origin.xml} (96%)

diff --git a/bt5/erp5_accounting_l10n_fr_m9/CategoryTemplateItem/portal_categories/transmission_sheet_type.xml b/bt5/erp5_accounting_l10n_fr_m9/CategoryTemplateItem/portal_categories/transmission_sheet_type.xml
deleted file mode 100644
index ff77d47865..0000000000
--- a/bt5/erp5_accounting_l10n_fr_m9/CategoryTemplateItem/portal_categories/transmission_sheet_type.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.ERP5Type.Document.BaseCategory</string>
-          <string>BaseCategory</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>__ac_local_roles__</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <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>_owner</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_tree</string> </key>
-            <value>
-              <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
-            </value>
-        </item>
-        <item>
-            <key> <string>acquisition_portal_type</string> </key>
-            <value> <string>python: []</string> </value>
-        </item>
-        <item>
-            <key> <string>categories</string> </key>
-            <value>
-              <tuple>
-                <string>transmission_sheet_type</string>
-              </tuple>
-            </value>
-        </item>
-        <item>
-            <key> <string>description</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value>                 <string>transmission_sheet_type</string> </value>
-        </item>
-        <item>
-            <key> <string>last_id</string> </key>
-            <value> <string>1</string> </value>
-        </item>
-        <item>
-            <key> <string>portal_type</string> </key>
-            <value> <string>Base Category</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string>Transmission Sheet Type</string> </value>
-        </item>
-        <item>
-            <key> <string>uid</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>BTrees.Length</string>
-          <string>Length</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle> <int>0</int> </pickle>
-  </record>
-  <record id="3" aka="AAAAAAAAAAM=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>BTrees.OOBTree</string>
-          <string>OOBTree</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <none/>
-    </pickle>
-  </record>
-  <record id="4" aka="AAAAAAAAAAQ=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>BTrees.OOBTree</string>
-          <string>OOBTree</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <none/>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_accounting_l10n_fr_m9/PortalTypeBaseCategoryTemplateItem/base_category_list.xml b/bt5/erp5_accounting_l10n_fr_m9/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
index ced592ef45..bdcaa1290d 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
+++ b/bt5/erp5_accounting_l10n_fr_m9/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
@@ -1,4 +1,7 @@
 <base_category_list>
+ <portal_type id="Invoice Transmission Sheet">
+  <item>origin</item>
+ </portal_type>
  <portal_type id="Purchase Invoice Transaction">
   <item>aggregate</item>
  </portal_type>
diff --git a/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheetModule_viewInvoiceTransmissionSheetList/listbox.xml b/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheetModule_viewInvoiceTransmissionSheetList/listbox.xml
index b17d295bc1..31c458bf44 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheetModule_viewInvoiceTransmissionSheetList/listbox.xml
+++ b/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheetModule_viewInvoiceTransmissionSheetList/listbox.xml
@@ -326,8 +326,8 @@
                           <string>Transmission Sheet Reference</string>
                         </tuple>
                         <tuple>
-                          <string>transmission_sheet_type_title</string>
-                          <string>Transmission Sheet Type</string>
+                          <string>origin_title</string>
+                          <string>Transmission Sheet Origin</string>
                         </tuple>
                         <tuple>
                           <string>description</string>
@@ -363,8 +363,8 @@
                           <string>Transmission Sheet Reference</string>
                         </tuple>
                         <tuple>
-                          <string>transmission_sheet_type_title</string>
-                          <string>Transmission Sheet Type</string>
+                          <string>origin_title</string>
+                          <string>Transmission Sheet Origin</string>
                         </tuple>
                         <tuple>
                           <string>start_date</string>
@@ -512,8 +512,8 @@
                           <string>Transmission Sheet Reference</string>
                         </tuple>
                         <tuple>
-                          <string>transmission_sheet_type_title</string>
-                          <string>Transmission Sheet Type</string>
+                          <string>origin_title</string>
+                          <string>Transmission Sheet Origin</string>
                         </tuple>
                         <tuple>
                           <string>description</string>
diff --git a/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view.xml b/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view.xml
index faf3862ad1..04eafa28fa 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view.xml
+++ b/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view.xml
@@ -121,8 +121,8 @@
                         <string>my_start_date</string>
                         <string>my_visa_date</string>
                         <string>my_payment_date</string>
+                        <string>my_origin</string>
                         <string>my_translated_validation_state_title</string>
-                        <string>my_transmission_sheet_type</string>
                       </list>
                     </value>
                 </item>
diff --git a/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/my_transmission_sheet_type.xml b/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/my_origin.xml
similarity index 96%
rename from bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/my_transmission_sheet_type.xml
rename to bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/my_origin.xml
index 1a30a9cb9e..663027f73a 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/my_transmission_sheet_type.xml
+++ b/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/InvoiceTransmissionSheet_view/my_origin.xml
@@ -20,7 +20,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>my_transmission_sheet_type</string> </value>
+            <value> <string>my_origin</string> </value>
         </item>
         <item>
             <key> <string>message_values</string> </key>
@@ -257,7 +257,7 @@
                 </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>Transmission Sheet Type</string> </value>
+                    <value> <string>Transmission Sheet Origin</string> </value>
                 </item>
                 <item>
                     <key> <string>unicode</string> </key>
@@ -287,7 +287,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>here/portal_categories/transmission_sheet_type/getCategoryChildTranslatedTitleItemList</string> </value>
+            <value> <string>python: getattr(here.portal_categories.origin, here.getPortalType(), \'Accounting Transaction\').getCategoryChildTitleItemList(include_if_child=0)</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_accounting_l10n_fr_m9/bt/revision b/bt5/erp5_accounting_l10n_fr_m9/bt/revision
index 8fdd954df9..cabf43b5dd 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/bt/revision
+++ b/bt5/erp5_accounting_l10n_fr_m9/bt/revision
@@ -1 +1 @@
-22
\ No newline at end of file
+24
\ No newline at end of file
diff --git a/bt5/erp5_accounting_l10n_fr_m9/bt/template_base_category_list b/bt5/erp5_accounting_l10n_fr_m9/bt/template_base_category_list
index c35e109372..f6f82c1ddd 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/bt/template_base_category_list
+++ b/bt5/erp5_accounting_l10n_fr_m9/bt/template_base_category_list
@@ -1,2 +1 @@
-gap/fr
-transmission_sheet_type
\ No newline at end of file
+gap/fr
\ No newline at end of file
diff --git a/bt5/erp5_accounting_l10n_fr_m9/bt/template_portal_type_base_category_list b/bt5/erp5_accounting_l10n_fr_m9/bt/template_portal_type_base_category_list
index 94fdb06ccc..819db95cbc 100644
--- a/bt5/erp5_accounting_l10n_fr_m9/bt/template_portal_type_base_category_list
+++ b/bt5/erp5_accounting_l10n_fr_m9/bt/template_portal_type_base_category_list
@@ -1,2 +1,3 @@
+Invoice Transmission Sheet | origin
 Purchase Invoice Transaction | aggregate
 Sale Invoice Transaction | aggregate
\ No newline at end of file
-- 
2.30.9