From 73e63996646698bb7c01085e05373ae027f44587 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Fri, 3 Feb 2012 17:48:35 +0100
Subject: [PATCH] Relax rule a bit.

It need to be applied also on trade model generated movements.
---
 ...ib_invoice_transaction_simulation_rule.xml | 113 +++++++++++++++---
 master/bt5/vifib_data_simulation/bt/revision  |   2 +-
 2 files changed, 95 insertions(+), 20 deletions(-)

diff --git a/master/bt5/vifib_data_simulation/PathTemplateItem/portal_rules/vifib_invoice_transaction_simulation_rule.xml b/master/bt5/vifib_data_simulation/PathTemplateItem/portal_rules/vifib_invoice_transaction_simulation_rule.xml
index 18a6b137a..485249e6e 100644
--- a/master/bt5/vifib_data_simulation/PathTemplateItem/portal_rules/vifib_invoice_transaction_simulation_rule.xml
+++ b/master/bt5/vifib_data_simulation/PathTemplateItem/portal_rules/vifib_invoice_transaction_simulation_rule.xml
@@ -117,9 +117,7 @@
         <item>
             <key> <string>criterion_property</string> </key>
             <value>
-              <tuple>
-                <string>portal_type</string>
-              </tuple>
+              <tuple/>
             </value>
         </item>
         <item>
@@ -157,17 +155,13 @@
         <item>
             <key> <string>membership_criterion_base_category</string> </key>
             <value>
-              <tuple>
-                <string>trade_phase</string>
-              </tuple>
+              <tuple/>
             </value>
         </item>
         <item>
             <key> <string>membership_criterion_category</string> </key>
             <value>
-              <tuple>
-                <string>trade_phase/vifib/invoicing</string>
-              </tuple>
+              <tuple/>
             </value>
         </item>
         <item>
@@ -241,16 +235,7 @@
         <item>
             <key> <string>data</string> </key>
             <value>
-              <dictionary>
-                <item>
-                    <key> <string>portal_type</string> </key>
-                    <value>
-                      <list>
-                        <string>Simulation Movement</string>
-                      </list>
-                    </value>
-                </item>
-              </dictionary>
+              <dictionary/>
             </value>
         </item>
       </dictionary>
@@ -593,6 +578,96 @@
                 </value>
             </item>
           </dictionary>
+          <dictionary>
+            <item>
+                <key> <string>action</string> </key>
+                <value> <string>edit</string> </value>
+            </item>
+            <item>
+                <key> <string>actor</string> </key>
+                <value> <string>ERP5TypeTestCase</string> </value>
+            </item>
+            <item>
+                <key> <string>comment</string> </key>
+                <value>
+                  <none/>
+                </value>
+            </item>
+            <item>
+                <key> <string>error_message</string> </key>
+                <value> <string></string> </value>
+            </item>
+            <item>
+                <key> <string>serial</string> </key>
+                <value> <string>916.13573.26348.54664</string> </value>
+            </item>
+            <item>
+                <key> <string>state</string> </key>
+                <value> <string>current</string> </value>
+            </item>
+            <item>
+                <key> <string>time</string> </key>
+                <value>
+                  <object>
+                    <klass> <reference id="10.1"/> </klass>
+                    <tuple>
+                      <none/>
+                    </tuple>
+                    <state>
+                      <tuple>
+                        <float>1328287592.16</float>
+                        <string>GMT+1</string>
+                      </tuple>
+                    </state>
+                  </object>
+                </value>
+            </item>
+          </dictionary>
+          <dictionary>
+            <item>
+                <key> <string>action</string> </key>
+                <value> <string>edit</string> </value>
+            </item>
+            <item>
+                <key> <string>actor</string> </key>
+                <value> <string>ERP5TypeTestCase</string> </value>
+            </item>
+            <item>
+                <key> <string>comment</string> </key>
+                <value>
+                  <none/>
+                </value>
+            </item>
+            <item>
+                <key> <string>error_message</string> </key>
+                <value> <string></string> </value>
+            </item>
+            <item>
+                <key> <string>serial</string> </key>
+                <value> <string>916.13710.35136.46694</string> </value>
+            </item>
+            <item>
+                <key> <string>state</string> </key>
+                <value> <string>current</string> </value>
+            </item>
+            <item>
+                <key> <string>time</string> </key>
+                <value>
+                  <object>
+                    <klass> <reference id="10.1"/> </klass>
+                    <tuple>
+                      <none/>
+                    </tuple>
+                    <state>
+                      <tuple>
+                        <float>1328287641.06</float>
+                        <string>GMT+1</string>
+                      </tuple>
+                    </state>
+                  </object>
+                </value>
+            </item>
+          </dictionary>
         </list>
       </tuple>
     </pickle>
diff --git a/master/bt5/vifib_data_simulation/bt/revision b/master/bt5/vifib_data_simulation/bt/revision
index a46c9d226..69226f729 100644
--- a/master/bt5/vifib_data_simulation/bt/revision
+++ b/master/bt5/vifib_data_simulation/bt/revision
@@ -1 +1 @@
-91
\ No newline at end of file
+92
\ No newline at end of file
-- 
2.30.9