Commit 92275f51 authored by Alexandre Boeglin's avatar Alexandre Boeglin

in SupplyLine_asPredicate and SupplyLine_asPredicate, deal with both source and destination.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19279 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 59869e6e
...@@ -65,11 +65,14 @@ ...@@ -65,11 +65,14 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if context.getDestinationValue() is None:\n <value> <string>base_category_tuple = (\'resource\',)\n
return context.generatePredicate(membership_criterion_base_category_list = (\'resource\',),\n
criterion_property_list = (\'start_date\',))\n
\n \n
return context.generatePredicate(membership_criterion_base_category_list = (\'destination\', \'resource\'),\n if context.getSource():\n
base_category_tuple += (\'source\',)\n
if context.getDestination():\n
base_category_tuple += (\'destination\',)\n
\n
return context.generatePredicate(membership_criterion_base_category_list = base_category_tuple,\n
criterion_property_list = (\'start_date\',))\n criterion_property_list = (\'start_date\',))\n
</string> </value> </string> </value>
</item> </item>
...@@ -121,9 +124,10 @@ return context.generatePredicate(membership_criterion_base_category_list = (\'de ...@@ -121,9 +124,10 @@ return context.generatePredicate(membership_criterion_base_category_list = (\'de
<tuple> <tuple>
<string>args</string> <string>args</string>
<string>kw</string> <string>kw</string>
<string>base_category_tuple</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>None</string> <string>_inplacevar_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -65,11 +65,14 @@ ...@@ -65,11 +65,14 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if context.getDestinationValue() is None:\n <value> <string>base_category_tuple = (\'resource\',)\n
return context.generatePredicate(membership_criterion_base_category_list = (\'resource\',),\n
criterion_property_list = (\'start_date\',))\n
\n \n
return context.generatePredicate(membership_criterion_base_category_list = (\'destination\', \'resource\'),\n if context.getSource():\n
base_category_tuple += (\'source\',)\n
if context.getDestination():\n
base_category_tuple += (\'destination\',)\n
\n
return context.generatePredicate(membership_criterion_base_category_list = base_category_tuple,\n
criterion_property_list = (\'start_date\',))\n criterion_property_list = (\'start_date\',))\n
</string> </value> </string> </value>
</item> </item>
...@@ -115,9 +118,10 @@ return context.generatePredicate(membership_criterion_base_category_list = (\'de ...@@ -115,9 +118,10 @@ return context.generatePredicate(membership_criterion_base_category_list = (\'de
<tuple> <tuple>
<string>args</string> <string>args</string>
<string>kw</string> <string>kw</string>
<string>base_category_tuple</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>None</string> <string>_inplacevar_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
177 181
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment