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