Commit 21c2b398 authored by Julien Muchembled's avatar Julien Muchembled

Minimal changes to make testImmobilisation pass without ERP5Legacy product

Removal of 'divergence_scope' on movement groups may be wrong because
immobilisation still uses old solvers.
But this makes test_19_TestAccountingBuildingAndDivergence pass.
parent 9b7f2a9c
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>divergence_scope/category</string>
<string>collect_order_group/delivery</string> <string>collect_order_group/delivery</string>
</tuple> </tuple>
</value> </value>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>divergence_scope/category</string>
<string>collect_order_group/line</string> <string>collect_order_group/line</string>
</tuple> </tuple>
</value> </value>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string> <string>collect_order_group/delivery</string>
</tuple> </tuple>
</value> </value>
......
...@@ -57,7 +57,9 @@ ...@@ -57,7 +57,9 @@
<item> <item>
<key> <string>test_method_id</string> </key> <key> <string>test_method_id</string> </key>
<value> <value>
<tuple/> <tuple>
<string>Rule_testFalse</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -2,90 +2,123 @@ ...@@ -2,90 +2,123 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="Quantity Divergence Tester" module="erp5.portal_type"/> <global name="Net Converted Quantity Divergence Tester" module="erp5.portal_type"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>_count</string> </key> <key> <string>_identity_criterion</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>_mt_index</string> </key> <key> <string>_local_properties</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <tuple>
</value> <dictionary>
</item> <item>
<item> <key> <string>id</string> </key>
<key> <string>_tree</string> </key> <value> <string>use_delivery_ratio</string> </value>
<value> </item>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_range_min</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>quantity_range_max</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>int</string> </value>
</item>
</dictionary>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>_range_criterion</string> </key>
<value> <value>
<none/> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>default_quantity_tester</string> </value> <value> <string>quantity_tester</string> </value>
</item> </item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Quantity Divergence Tester</string> </value> <value> <string>Net Converted Quantity Divergence Tester</string> </value>
</item> </item>
<item> <item>
<key> <string>property_tester</string> </key> <key> <string>quantity_range_max</string> </key>
<value> <string>quantity</string> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>solver</string> </key> <key> <string>quantity_range_min</string> </key>
<value> <value> <int>0</int> </value>
<tuple>
<string>SplitAndDefer</string>
<string>CopyToTarget</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>solver_list</string> </key> <key> <string>tested_property</string> </key>
<value> <value>
<tuple> <tuple>
<string>Solver</string> <string>quantity</string>
<string>quantity_unit</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string>quantity divergence tester</string> </value>
</item>
<item>
<key> <string>use_delivery_ratio</string> </key>
<value> <int>1</int> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<global name="Length" module="BTrees.Length"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="OOBTree" module="BTrees.OOBTree"/> <dictionary>
</pickle> <item>
<pickle> <key> <string>data</string> </key>
<none/> <value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="OOBTree" module="BTrees.OOBTree"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
<pickle> <pickle>
<none/> <dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
</ZopeData> </ZopeData>
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
<portal_type id="Accounting Transaction Module"> <portal_type id="Accounting Transaction Module">
<item>Amortisation Transaction</item> <item>Amortisation Transaction</item>
</portal_type> </portal_type>
<portal_type id="Amortisation Rule">
<item>Category Divergence Tester</item>
</portal_type>
<portal_type id="Amortisation Transaction"> <portal_type id="Amortisation Transaction">
<item>Amortisation Transaction Line</item> <item>Amortisation Transaction Line</item>
</portal_type> </portal_type>
......
...@@ -44,11 +44,15 @@ ...@@ -44,11 +44,15 @@
</item> </item>
<item> <item>
<key> <string>init_script</string> </key> <key> <string>init_script</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>permission</string> </key> <key> <string>permission</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -58,6 +62,18 @@ ...@@ -58,6 +62,18 @@
<key> <string>type_class</string> </key> <key> <string>type_class</string> </key>
<value> <string>AmortisationRule</string> </value> <value> <string>AmortisationRule</string> </value>
</item> </item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
Accounting Transaction Module | Amortisation Transaction Accounting Transaction Module | Amortisation Transaction
Amortisation Rule | Category Divergence Tester
Amortisation Transaction | Amortisation Transaction Line Amortisation Transaction | Amortisation Transaction Line
Immobilisation Module | Immobilisation Immobilisation Module | Immobilisation
Immobilisation | Immobilisation Line Immobilisation | Immobilisation Line
\ No newline at end of file
...@@ -33,11 +33,11 @@ from string import capitalize ...@@ -33,11 +33,11 @@ from string import capitalize
from Products.ERP5Type.DateUtils import centis, getClosestDate, addToDate from Products.ERP5Type.DateUtils import centis, getClosestDate, addToDate
from Products.ERP5Type.DateUtils import getDecimalNumberOfYearsBetween from Products.ERP5Type.DateUtils import getDecimalNumberOfYearsBetween
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Legacy.Document.Rule import Rule from Products.ERP5.mixin.rule import RuleMixin
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5.Document.ImmobilisationMovement import NO_CHANGE_METHOD from Products.ERP5.Document.ImmobilisationMovement import NO_CHANGE_METHOD
class AmortisationRule(Rule): class AmortisationRule(RuleMixin):
""" """
Amortisation Rule object plans an item amortisation Amortisation Rule object plans an item amortisation
""" """
......
...@@ -3624,7 +3624,6 @@ class TestImmobilisation(TestImmobilisationMixin): ...@@ -3624,7 +3624,6 @@ class TestImmobilisation(TestImmobilisationMixin):
self.assertEquals(5000.0,account.AccountModule_getTotalSourceDebit(brain=account)) self.assertEquals(5000.0,account.AccountModule_getTotalSourceDebit(brain=account))
self.assertEquals(0.0,account.AccountModule_getTotalSourceCredit(brain=account)) self.assertEquals(0.0,account.AccountModule_getTotalSourceCredit(brain=account))
@newSimulationExpectedFailure
def test_19_TestAccountingBuildingAndDivergence(self, quiet=0, run=run_all_test): def test_19_TestAccountingBuildingAndDivergence(self, quiet=0, run=run_all_test):
if not run: return if not run: return
if not quiet: if not quiet:
...@@ -3718,7 +3717,6 @@ class TestImmobilisation(TestImmobilisationMixin): ...@@ -3718,7 +3717,6 @@ class TestImmobilisation(TestImmobilisationMixin):
parameter_dict = parameter_dict, parameter_dict = parameter_dict,
destination_section = self.getOrganisationModule()["A"]) destination_section = self.getOrganisationModule()["A"])
@newSimulationExpectedFailure
def test_20_TestAccountingAcceptDecisionSolver(self, quiet=0, run=run_all_test): def test_20_TestAccountingAcceptDecisionSolver(self, quiet=0, run=run_all_test):
if not run: return if not run: return
if not quiet: if not quiet:
......
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