From dadec5b9e3632f4f077d86b383e288c5703399cc Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Wed, 24 Apr 2013 16:41:52 +0300
Subject: [PATCH] Position can relate to Person.

---
 .../base_category_list.xml                    |   3 +
 .../portal_skins/erp5_hr/Position_view.xml    |   1 +
 .../erp5_hr/Position_view/my_agent_title.xml  | 113 ++++++++++++++++++
 bt5/erp5_hr/bt/revision                       |   2 +-
 .../template_portal_type_base_category_list   |   3 +-
 5 files changed, 120 insertions(+), 2 deletions(-)
 create mode 100644 bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view/my_agent_title.xml

diff --git a/bt5/erp5_hr/PortalTypeBaseCategoryTemplateItem/base_category_list.xml b/bt5/erp5_hr/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
index d1c9611fa9..07d3748213 100644
--- a/bt5/erp5_hr/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
+++ b/bt5/erp5_hr/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
@@ -5,6 +5,9 @@
  <portal_type id="Career">
   <item>specialise</item>
  </portal_type>
+ <portal_type id="Position">
+  <item>agent</item>
+ </portal_type>
  <portal_type id="Position Announcement">
   <item>aggregate</item>
   <item>classification</item>
diff --git a/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view.xml b/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view.xml
index 6df0ddf04b..bfb9208a24 100644
--- a/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view.xml
+++ b/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view.xml
@@ -92,6 +92,7 @@
                     <value>
                       <list>
                         <string>my_title</string>
+                        <string>my_agent_title</string>
                         <string>my_subordination_title</string>
                         <string>my_career_role</string>
                         <string>my_career_grade</string>
diff --git a/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view/my_agent_title.xml b/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view/my_agent_title.xml
new file mode 100644
index 0000000000..fca0e20ef8
--- /dev/null
+++ b/bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/Position_view/my_agent_title.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>catalog_index</string>
+                <string>portal_type</string>
+                <string>title</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_agent_title</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>catalog_index</string> </key>
+                    <value> <string>title</string> </value>
+                </item>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_relation_field</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>portal_type</string> </key>
+                    <value>
+                      <list>
+                        <tuple>
+                          <string>Position</string>
+                          <string>Position</string>
+                        </tuple>
+                      </list>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Parent Position</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_hr/bt/revision b/bt5/erp5_hr/bt/revision
index ca7bf83ac5..da2d3988d7 100644
--- a/bt5/erp5_hr/bt/revision
+++ b/bt5/erp5_hr/bt/revision
@@ -1 +1 @@
-13
\ No newline at end of file
+14
\ No newline at end of file
diff --git a/bt5/erp5_hr/bt/template_portal_type_base_category_list b/bt5/erp5_hr/bt/template_portal_type_base_category_list
index 7ea502a865..6bdc3fd5b6 100644
--- a/bt5/erp5_hr/bt/template_portal_type_base_category_list
+++ b/bt5/erp5_hr/bt/template_portal_type_base_category_list
@@ -12,4 +12,5 @@ Position Announcement | site
 Position Announcement | source
 Position Announcement | source_project
 Position Announcement | successor
-Position Opportunity | referral
\ No newline at end of file
+Position Opportunity | referral
+Position | agent
\ No newline at end of file
-- 
2.30.9