Commit 12692a24 authored by Aurel's avatar Aurel

when saving fast input, check variation even if not defined

fix accounting cancellation form and wf script

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16948 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a2a873e
......@@ -11,7 +11,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_source_credit</string> </value>
<value> <string>my_destination_credit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -11,7 +11,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_source_debit</string> </value>
<value> <string>my_destination_debit</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -192,7 +192,10 @@ for resource_id in per_resource_dict.keys():\n
variation = variation[\'variation\']\n
# check if variation exist for the resource\n
if column_base_category == "variation":\n
if variation != \'variation/not_defined\' and variation.replace(\'variation/\',\'\') not in resource_object.getVariationList():\n
# if variation != \'variation/not_defined\' and variation.replace(\'variation/\',\'\') not in resource_object.getVariationList():\n
# variation_not_defined = 1\n
# break\n
if variation.replace(\'variation/\',\'\') not in resource_object.getVariationList():\n
variation_not_defined = 1\n
break\n
# for the letter, if coin, must always be not_defined\n
......
......@@ -108,7 +108,7 @@ if nb_transfer_line == 0:\n
# Check each line\n
total_line_price = 0\n
for line in transaction.objectValues(portal_type=\'Accounting Cancellation Line\'):\n
total_line_price += line.getDestinationTotalAssetPrice()\n
total_line_price += abs(line.getQuantity())\n
# First check there is something defined on line\n
if line.getSourcePaymentReference(None) is None and \\\n
line.getSourceSection() is None:\n
......@@ -203,6 +203,7 @@ if total_line_price != transaction.getSourceTotalAssetPrice():\n
<string>_getiter_</string>
<string>line</string>
<string>_inplacevar_</string>
<string>abs</string>
<string>context</string>
</tuple>
</value>
......
367
\ No newline at end of file
368
\ 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