[Erp5-report] r20688 - in /erp5/trunk/bt5/erp5_invoicing: SkinTemplateItem/portal_skins/erp...
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Apr 19 16:06:11 CEST 2008
Author: jerome
Date: Sat Apr 19 16:06:11 2008
New Revision: 20688
URL: http://svn.erp5.org?rev=20688&view=rev
Log:
To support Accounting genereation from tax in orders, SimulationMovement_testInvoiceTransactionRule must be applied on movements generated from Tax Rule.
SimulationMovement_is*Movement should check in a shallower level if there's no movement attached at current level - again, this happen when tax movements are in order and not in invoice.
Modified:
erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isDeliveryMovement.xml
erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isTaxMovement.xml
erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_testInvoiceTransactionRule.xml
erp5/trunk/bt5/erp5_invoicing/bt/revision
Modified: erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isDeliveryMovement.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isDeliveryMovement.xml?rev=20688&r1=20687&r2=20688&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isDeliveryMovement.xml (original)
+++ erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isDeliveryMovement.xml Sat Apr 19 16:06:11 2008
@@ -67,11 +67,15 @@
<key> <string>_body</string> </key>
<value> <string>"""Tests if this simulation movement is not related to a Tax Movement\n
"""\n
-real_movement = context.getDeliveryValue()\n
-if real_movement is None:\n
- real_movement = context.getOrderValue()\n
+def testSimulationMovement(movement):\n
+ real_movement = movement.getDeliveryValue()\n
+ if real_movement is None:\n
+ real_movement = movement.getOrderValue()\n
+ if real_movement is None:\n
+ return testSimulationMovement(movement.getParentValue().getParentValue())\n
+ return real_movement.getPortalType() not in context.getPortalTaxMovementTypeList()\n
\n
-return real_movement.getPortalType() not in context.getPortalTaxMovementTypeList()\n
+return testSimulationMovement(context)\n
</string> </value>
</item>
<item>
@@ -120,10 +124,8 @@
<key> <string>co_varnames</string> </key>
<value>
<tuple>
- <string>_getattr_</string>
-<string>context</string>
- <string>real_movement</string>
- <string>None</string>
+ <string>testSimulationMovement</string>
+ <string>context</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isTaxMovement.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isTaxMovement.xml?rev=20688&r1=20687&r2=20688&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isTaxMovement.xml (original)
+++ erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_isTaxMovement.xml Sat Apr 19 16:06:11 2008
@@ -67,11 +67,15 @@
<key> <string>_body</string> </key>
<value> <string>"""Tests if this simulation movement is related to a Tax Movement\n
"""\n
-real_movement = context.getDeliveryValue()\n
-if real_movement is None:\n
- real_movement = context.getOrderValue()\n
+def testSimulationMovement(movement):\n
+ real_movement = movement.getDeliveryValue()\n
+ if real_movement is None:\n
+ real_movement = movement.getOrderValue()\n
+ if real_movement is None:\n
+ return testSimulationMovement(movement.getParentValue().getParentValue())\n
+ return real_movement.getPortalType() == "Tax Line"\n
\n
-return real_movement.getPortalType() == "Tax Line"\n
+return testSimulationMovement(context)\n
</string> </value>
</item>
<item>
@@ -120,10 +124,8 @@
<key> <string>co_varnames</string> </key>
<value>
<tuple>
- <string>_getattr_</string>
-<string>context</string>
- <string>real_movement</string>
- <string>None</string>
+ <string>testSimulationMovement</string>
+ <string>context</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_testInvoiceTransactionRule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_testInvoiceTransactionRule.xml?rev=20688&r1=20687&r2=20688&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_testInvoiceTransactionRule.xml (original)
+++ erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SimulationMovement_testInvoiceTransactionRule.xml Sat Apr 19 16:06:11 2008
@@ -72,7 +72,9 @@
return False\n
\n
parent_rule = parent.getSpecialiseValue()\n
-if parent_rule.getPortalType() not in [\'Invoice Rule\', \'Invoicing Rule\']:\n
+if parent_rule.getPortalType() not in (\'Invoice Rule\',\n
+ \'Invoicing Rule\',\n
+ \'Tax Rule\'):\n
return False\n
\n
delivery_movement = movement.getDeliveryValue()\n
Modified: erp5/trunk/bt5/erp5_invoicing/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/bt/revision?rev=20688&r1=20687&r2=20688&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/bt/revision (original)
+++ erp5/trunk/bt5/erp5_invoicing/bt/revision Sat Apr 19 16:06:11 2008
@@ -1,1 +1,1 @@
-71
+75
More information about the Erp5-report
mailing list