From 320d7adbfd5b76fb1febe093c1810f256521e1bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Thu, 20 Sep 2012 17:07:47 +0200
Subject: [PATCH] Expose action to apply model on computer.

---
 .../Computer/apply_computer_model.xml         | 85 +++++++++++++++++++
 bt5/erp5_computer_immobilisation/bt/revision  |  2 +-
 .../bt/template_action_path_list              |  1 +
 3 files changed, 87 insertions(+), 1 deletion(-)
 create mode 100644 bt5/erp5_computer_immobilisation/ActionTemplateItem/portal_types/Computer/apply_computer_model.xml

diff --git a/bt5/erp5_computer_immobilisation/ActionTemplateItem/portal_types/Computer/apply_computer_model.xml b/bt5/erp5_computer_immobilisation/ActionTemplateItem/portal_types/Computer/apply_computer_model.xml
new file mode 100644
index 0000000000..182045e232
--- /dev/null
+++ b/bt5/erp5_computer_immobilisation/ActionTemplateItem/portal_types/Computer/apply_computer_model.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>action_type/object_action</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>object_action</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>apply_computer_model</string> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>Modify portal content</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Action Information</string> </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>1.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Apply Computer Model</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Expression" module="Products.CMFCore.Expression"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/Computer_applyComputerModel</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_computer_immobilisation/bt/revision b/bt5/erp5_computer_immobilisation/bt/revision
index 6139554210..8783e30511 100644
--- a/bt5/erp5_computer_immobilisation/bt/revision
+++ b/bt5/erp5_computer_immobilisation/bt/revision
@@ -1 +1 @@
-52
\ No newline at end of file
+53
\ No newline at end of file
diff --git a/bt5/erp5_computer_immobilisation/bt/template_action_path_list b/bt5/erp5_computer_immobilisation/bt/template_action_path_list
index dfbed9042c..00f66b9b32 100644
--- a/bt5/erp5_computer_immobilisation/bt/template_action_path_list
+++ b/bt5/erp5_computer_immobilisation/bt/template_action_path_list
@@ -4,6 +4,7 @@ Computer Module | view
 Computer Network Module | view
 Computer Network | view
 Computer Partition | view
+Computer | apply_computer_model
 Computer | computer_partition
 Computer | tcp_port_number
 Computer | view
-- 
2.30.9