diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml
index 6f61b927b2393f55b660b16ac9893c4341eadf53..cb968ac0cc7fb176d268eec8be485ce6406d3fb5 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml
@@ -68,112 +68,12 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>src__ = 0\n
-if kw.has_key(\'src__\'): src__ = kw[\'src__\']\n
-precision = context.Base_getPreferredPrecision()\n
-r_ = lambda x: context.Base_getRoundValue(x, precision)\n
-\n
-# read settings from user preference\n
-preference       = context.getPortalObject().portal_preferences\n
-simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n
-section_category = preference.getPreferredAccountingTransactionSectionCategory()\n
-from_date        = preference.getPreferredAccountingTransactionFromDate()\n
-at_date          = preference.getPreferredAccountingTransactionAtDate()\n
-\n
-# Build the common inventory dict\n
-params = {}\n
-\n
-if kw.get(\'no_from_date\', False): from_date = None\n
-\n
-if simulation_state: params[\'simulation_state\'] = simulation_state\n
-if section_category: params[\'section_category\'] = section_category\n
-\n
-if kw.has_key(\'node_uid\')   : params[\'node_uid\']    = kw[\'node_uid\']\n
-if kw.has_key(\'portal_type\'): params[\'portal_type\'] = kw[\'portal_type\']\n
-\n
-# Create the related accouting line list\n
-new_result  = []\n
-net_balance = 0.0\n
-\n
-if from_date is not None:\n
-  # Create a new parameter list to get the previous balance\n
-  get_inventory_kw = params.copy()\n
-  get_inventory_kw.update({ \'omit_simulation\'   : True\n
-                          , \'to_date\'           : from_date\n
-                          , \'mirror_section_uid\': context.getUid()\n
-                          , \'where_expression\'  : " section.portal_type = \'Organisation\' "\n
-                          })\n
-  getInventory = context.getPortalObject().portal_simulation.getInventoryAssetPrice\n
-  # Get previous debit and credit\n
-  previous_total_debit  = r_(getInventory(omit_output=True, **get_inventory_kw))\n
-  previous_total_credit = r_(getInventory(omit_input =True, **get_inventory_kw))\n
-  if previous_total_credit != 0:\n
-    previous_total_credit = - previous_total_credit\n
-\n
-  # Show the previous balance if not empty\n
-  if previous_total_credit != 0 or previous_total_debit != 0:\n
-    from Products.ERP5Type.Document import newTempAccountingTransaction\n
-\n
-    net_balance = r_(previous_total_debit - previous_total_credit)\n
-    previous_balance = newTempAccountingTransaction( context.getPortalObject()\n
-                                                   , "temp_%s" % context.getUid()\n
-                                                   )\n
-    previous_balance.setUid(\'new_000\')\n
-\n
-    previous_balance.edit( \\\n
-        parent_title = context.Base_translateString("Previous Balance")\n
-      , section_title                     = ""\n
-      , date                              = from_date - 1\n
-      , portal_type                       = ""\n
-      , account_uid                       = None\n
-      , parent_reference                  = None\n
-      , parent_specific_reference         = None\n
-      , translated_simulation_state_title = None\n
-      , debit                             = previous_total_debit\n
-      , credit                            = previous_total_credit\n
-      , grouping_reference                = None\n
-      , balance                           = net_balance\n
-      , net_balance                       = net_balance\n
-      , is_previous_balance               = True\n
-      )\n
-    new_result.append(previous_balance)\n
-\n
-\n
-# Show / Hide grouping if needed\n
-if kw.has_key(\'hide_grouping\'): params[\'hide_grouping\'] = kw[\'hide_grouping\']\n
-\n
-# FIXME: same problem as in BankAccount_getAccountingTransactionList\n
-result = context.Entity_zGetAccountingTransactionList( from_date = from_date\n
-                                                     , at_date   = at_date\n
-                                                     , src__     = src__\n
-                                                     , **params\n
-                                                     )\n
-if src__:\n
-  return result\n
-\n
-# Add related accounting lines one by one in order to calculate intermediate balance\n
-for l in result:\n
-  o = l.getObject()\n
-  net_balance += l.balance or 0.0\n
-  if o is not None:\n
-    c = o.asContext( net_balance                       = net_balance\n
-                   , balance                           = l.balance\n
-                   , credit                            = l.credit\n
-                   , debit                             = l.debit\n
-                   , date                              = l.date\n
-                   , section_title                     = l.section_title\n
-                   , parent_reference                  = l.parent_reference\n
-                   , parent_specific_reference         = l.parent_specific_reference\n
-                   , translated_simulation_state_title = o.getTranslatedSimulationStateTitle()\n
-                   , account_uid                       = l.account_uid\n
-                   # FIXME: Overriding \'portal_type\' in asContext is clearly a bad idea,\n
-                   #        as many methods are storred on the portal type (hence the\n
-                   #        translated_simulation_state_title hack). --jerome\n
-                   , portal_type                       = l.portal_type\n
-                   )\n
-    new_result.append(c)\n
-\n
-return new_result\n
+            <value> <string>"""Returns Accounting Transactions where this entity is mirror section.\n
+"""\n
+kw[\'mirror_section_uid\'] = context.getUid()\n
+kw[\'node_category_strict_membership\'] = [\'account_type/asset/receivable\',\n
+                                         \'account_type/liability/payable\']\n
+return context.Node_getAccountingTransactionList(**kw)\n
 </string> </value>
         </item>
         <item>
@@ -223,37 +123,10 @@ return new_result\n
                         <value>
                           <tuple>
                             <string>kw</string>
-                            <string>src__</string>
                             <string>_getattr_</string>
-                            <string>_getitem_</string>
                             <string>context</string>
-                            <string>precision</string>
-                            <string>r_</string>
-                            <string>preference</string>
-                            <string>simulation_state</string>
-                            <string>section_category</string>
-                            <string>from_date</string>
-                            <string>at_date</string>
-                            <string>params</string>
-                            <string>False</string>
-                            <string>None</string>
                             <string>_write_</string>
-                            <string>new_result</string>
-                            <string>net_balance</string>
-                            <string>get_inventory_kw</string>
-                            <string>True</string>
-                            <string>getInventory</string>
                             <string>_apply_</string>
-                            <string>previous_total_debit</string>
-                            <string>previous_total_credit</string>
-                            <string>Products.ERP5Type.Document</string>
-                            <string>newTempAccountingTransaction</string>
-                            <string>previous_balance</string>
-                            <string>result</string>
-                            <string>_getiter_</string>
-                            <string>l</string>
-                            <string>o</string>
-                            <string>c</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceDebit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statBalance.xml
similarity index 87%
rename from bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceDebit.xml
rename to bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statBalance.xml
index 43956f22cc95aebaccac13b53e6bebacbb64fece..0a16e589ccd8274dbe1217750c2617c83b6353ec 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceDebit.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statBalance.xml
@@ -68,7 +68,13 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>return context.Entity_statSourceBalance(omit_input=1, **kw)\n
+            <value> <string>"""Total balance of all accounting transactions having this\n
+entity as a mirror section.\n
+"""\n
+kw[\'mirror_section_uid\']=context.getUid()\n
+kw[\'node_category_strict_membership\'] = [\'account_type/asset/receivable\',\n
+                                         \'account_type/liability/payable\']\n
+return context.Node_statAccountingBalance(**kw)\n
 </string> </value>
         </item>
         <item>
@@ -83,6 +89,12 @@
               <none/>
             </value>
         </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
         <item>
             <key> <string>_params</string> </key>
             <value> <string>**kw</string> </value>
@@ -112,9 +124,10 @@
                         <value>
                           <tuple>
                             <string>kw</string>
-                            <string>_apply_</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>_write_</string>
+                            <string>_apply_</string>
                           </tuple>
                         </value>
                     </item>
@@ -131,7 +144,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>Entity_statSourceDebit</string> </value>
+            <value> <string>Entity_statBalance</string> </value>
         </item>
         <item>
             <key> <string>warnings</string> </key>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statCredit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statCredit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..62a5bda5b3eef4b5475b9d41dd2645bfaf117aa9
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statCredit.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""Total credit of all accounting transactions having this\n
+entity as a mirror section\n
+"""\n
+kw[\'mirror_section_uid\'] = context.getUid()\n
+kw[\'omit_input\'] = 1\n
+kw[\'node_category_strict_membership\'] = [\'account_type/asset/receivable\',\n
+                                         \'account_type/liability/payable\']\n
+# here, or 0 is to prevent displaying "- 0"\n
+return - context.Node_statAccountingBalance(**kw) or 0\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+<string>context</string>
+                            <string>_write_</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Entity_statCredit</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statDebit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statDebit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..12609640682f380aabb5cb70b55c1384bfb16aee
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statDebit.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""Total debit of all accounting transactions having this\n
+entity as a mirror section\n
+"""\n
+kw[\'mirror_section_uid\'] = context.getUid()\n
+kw[\'omit_output\'] = 1\n
+kw[\'node_category_strict_membership\'] = [\'account_type/asset/receivable\',\n
+                                         \'account_type/liability/payable\']\n
+return context.Node_statAccountingBalance(**kw)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+<string>context</string>
+                            <string>_write_</string>
+                            <string>_apply_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Entity_statDebit</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox.xml
index 8263b15d801d620916103abc42e1ba615cd1bb4b..2638c672a5ebcb883e384efb9d687e060ecd1729 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox.xml
@@ -256,6 +256,10 @@
                     <key> <string>meta_types</string> </key>
                     <value> <string></string> </value>
                 </item>
+                <item>
+                    <key> <string>page_template</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>portal_types</string> </key>
                     <value>
@@ -344,7 +348,7 @@
                     <value>
                       <list>
                         <tuple>
-                          <string>parent_title</string>
+                          <string>Movement_getExplanationTitle</string>
                           <string>Title</string>
                         </tuple>
                         <tuple>
@@ -356,31 +360,31 @@
                           <string>Date</string>
                         </tuple>
                         <tuple>
-                          <string>translated_portal_type</string>
-                          <string>Transaction Type</string>
+                          <string>Movement_getExplanationTranslatedPortalType</string>
+                          <string>Type</string>
                         </tuple>
                         <tuple>
-                          <string>Entity_getAccountingTransactionGapId</string>
-                          <string>GAP</string>
+                          <string>Movement_getNodeGapId</string>
+                          <string>GAP ID</string>
                         </tuple>
                         <tuple>
-                          <string>parent_reference</string>
+                          <string>Movement_getExplanationReference</string>
                           <string>Invoice Number</string>
                         </tuple>
                         <tuple>
-                          <string>parent_specific_reference</string>
+                          <string>Movement_getSpecificReference</string>
                           <string>Transaction Reference</string>
                         </tuple>
                         <tuple>
-                          <string>translated_simulation_state_title</string>
+                          <string>getTranslatedSimulationStateTitle</string>
                           <string>State</string>
                         </tuple>
                         <tuple>
-                          <string>debit</string>
+                          <string>Movement_getDebitPrice</string>
                           <string>Debit</string>
                         </tuple>
                         <tuple>
-                          <string>credit</string>
+                          <string>Movement_getCreditPrice</string>
                           <string>Credit</string>
                         </tuple>
                         <tuple>
@@ -388,12 +392,12 @@
                           <string>Grouping</string>
                         </tuple>
                         <tuple>
-                          <string>balance</string>
+                          <string>total_price</string>
                           <string>Balance</string>
                         </tuple>
                         <tuple>
-                          <string>net_balance</string>
-                          <string>Net</string>
+                          <string>running_total_price</string>
+                          <string>Running Balance</string>
                         </tuple>
                       </list>
                     </value>
@@ -423,12 +427,17 @@
                 <item>
                     <key> <string>domain_root_list</string> </key>
                     <value>
-                      <list/>
+                      <list>
+                        <tuple>
+                          <string>group</string>
+                          <string>group</string>
+                        </tuple>
+                      </list>
                     </value>
                 </item>
                 <item>
                     <key> <string>domain_tree</string> </key>
-                    <value> <int>0</int> </value>
+                    <value> <int>1</int> </value>
                 </item>
                 <item>
                     <key> <string>editable</string> </key>
@@ -503,6 +512,10 @@
                     <key> <string>not_viewable</string> </key>
                     <value> <int>0</int> </value>
                 </item>
+                <item>
+                    <key> <string>page_template</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>portal_types</string> </key>
                     <value>
@@ -569,7 +582,16 @@
                 <item>
                     <key> <string>sort</string> </key>
                     <value>
-                      <list/>
+                      <list>
+                        <tuple>
+                          <string>stock.date</string>
+                          <string>ASC</string>
+                        </tuple>
+                        <tuple>
+                          <string>stock.uid</string>
+                          <string>ASC</string>
+                        </tuple>
+                      </list>
                     </value>
                 </item>
                 <item>
@@ -583,16 +605,16 @@
                     <value>
                       <list>
                         <tuple>
-                          <string>debit</string>
-                          <string>Entity_statSourceDebit</string>
+                          <string>Movement_getDebitPrice</string>
+                          <string>Entity_statDebit</string>
                         </tuple>
                         <tuple>
-                          <string>credit</string>
-                          <string>Entity_statSourceCredit</string>
+                          <string>Movement_getCreditPrice</string>
+                          <string>Entity_statCredit</string>
                         </tuple>
                         <tuple>
-                          <string>balance</string>
-                          <string>Entity_statSourceBalance</string>
+                          <string>total_price</string>
+                          <string>Entity_statBalance</string>
                         </tuple>
                       </list>
                     </value>
@@ -702,7 +724,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:[(\'hide_grouping\', 0)]</string> </value>
+            <value> <string>python:[(\'hide_grouping\', 0), ]</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -740,7 +762,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: getattr(cell, \'is_previous_balance\', False) and [(x[0], None) for x in form.listbox.get_value(\'columns\')]</string> </value>
+            <value> <string>python: getattr(request.cell, \'is_previous_balance\', False) and [(x[0], None) for x in form.listbox.get_value(\'columns\')]</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox_grouping_reference.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox_grouping_reference.xml
index a78c269a939cc1e7b3da0df0dbaf9ecfd978a340..37ed4763e06f2c40c6d43dc29dfa2dcb78f0fb09 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox_grouping_reference.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_viewAccountingTransactionList/listbox_grouping_reference.xml
@@ -279,7 +279,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: not getattr(cell, \'is_previous_balance\', False)</string> </value>
+            <value> <string>request/cell/is_previous_balance | python:1</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getCreditPrice.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getCreditPrice.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ba542dd60a664ace40eee06632ae232996eb79ec
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getCreditPrice.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>return -min(brain.total_price, 0)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>min</string>
+                            <string>_getattr_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getCreditPrice</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getDebitPrice.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getDebitPrice.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3aabf173644fa8b74d90cd6fa5b677f1bfab9e9e
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getDebitPrice.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>return max(brain.total_price, 0)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>max</string>
+                            <string>_getattr_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getDebitPrice</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationReference.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationReference.xml
new file mode 100644
index 0000000000000000000000000000000000000000..30f35fc15f08928967006a0e7fad964e5cb59b84
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationReference.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>return brain.getObject().getExplanationValue().getReference()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getExplanationReference</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTitle.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTitle.xml
new file mode 100644
index 0000000000000000000000000000000000000000..daa389cb00ec14efac3e9c6e51a233695b415fe1
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTitle.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>return brain.getObject().getExplanationValue().getTitle()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getExplanationTitle</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTranslatedPortalType.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTranslatedPortalType.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eae6875b42f40eb8d5239150d54f08a8799808fd
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getExplanationTranslatedPortalType.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>return brain.getObject().getExplanationValue().getTranslatedPortalType()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getExplanationTranslatedPortalType</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3a528db73f1b072c16c0a399637bdc87b2e1cfd4
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getMirrorSectionTitle.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""Retrieve the title of the mirror section\n
+"""\n
+if brain.mirror_section_uid:\n
+  return context.getPortalObject().portal_catalog.getObject(\n
+         uid=brain.mirror_section_uid).getTitle()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getMirrorSectionTitle</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeGapId.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeGapId.xml
new file mode 100644
index 0000000000000000000000000000000000000000..93e32bc3334c32f215f4084d81a060d169e5a7e4
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeGapId.xml
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>gap_id_cache = context.REQUEST.other.get(\'Movement_getNodeGapIdCache\', {})\n
+key = brain.node_relative_url\n
+gap_id = gap_id_cache.get(key)\n
+if gap_id is None:\n
+  gap_id = context.getPortalObject().restrictedTraverse(\n
+                    key).Account_getGapId()\n
+  gap_id_cache[key] = gap_id\n
+  context.REQUEST.other[\'Movement_getNodeGapIdCache\'] = gap_id_cache\n
+return gap_id\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain=None, selection=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>gap_id_cache</string>
+                            <string>key</string>
+                            <string>gap_id</string>
+                            <string>None</string>
+                            <string>_write_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getNodeGapId</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5090df655ecf3f85508a29ff5e5bffcc6c1d6c25
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml
@@ -0,0 +1,187 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""Return the \'side-specific\' reference, ie. the source reference or\n
+destination reference.\n
+"""\n
+delivery = brain.getObject().getExplanationValue()\n
+if delivery.getSourceSectionUid() == brain.section_uid:\n
+  return delivery.getSourceReference()\n
+return delivery.getDestinationReference()\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>brain, selection=None, **kwd</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>brain</string>
+                            <string>selection</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>delivery</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Movement_getSpecificReference</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
new file mode 100644
index 0000000000000000000000000000000000000000..775ac3591fdbd4146c7fb246d6e73a18acfa6ddb
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
@@ -0,0 +1,304 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>from Products.ERP5Type.Message import Message\n
+portal = context.getPortalObject()\n
+params = portal.ERP5Accounting_getParams(selection)\n
+N_ = lambda msg: Message(\'erp5_ui\', msg)\n
+\n
+if not from_date:\n
+  from_date = portal.portal_preferences\\\n
+                .getPreferredAccountingTransactionFromDate()\n
+\n
+# XXX needed ?\n
+if kw.get(\'no_from_date\') and from_date:\n
+  from_date = None\n
+\n
+# this script can be used for Node, Section or Payment\n
+if kw.get(\'node_uid\'):\n
+  params[\'node_uid\'] = kw[\'node_uid\']\n
+if kw.get(\'mirror_section_uid\'):\n
+  params[\'mirror_section_uid\'] = kw[\'mirror_section_uid\']\n
+if kw.get(\'payment_uid\'):\n
+  params[\'payment_uid\'] = kw[\'payment_uid\']\n
+if node_category_strict_membership:\n
+  params[\'node_category_strict_membership\'] = node_category_strict_membership\n
+if node_category:\n
+  params[\'node_category\'] = node_category\n
+\n
+# Create the related accouting line list\n
+new_result  = []\n
+net_balance = 0.0\n
+\n
+if from_date:\n
+  # Create a new parameter list to get the previous balance\n
+  get_inventory_kw = params.copy()\n
+  get_inventory_kw[\'to_date\'] = from_date\n
+  # TODO: using a list of section_uid \n
+  # \'where_expression\': " section.portal_type = \'Organisation\' " \n
+\n
+  # Get previous debit and credit\n
+  getInventoryAssetPrice = portal.portal_simulation.getInventoryAssetPrice\n
+  # XXX missing Inventory API Feature: this could be retrived in 1 SQL Query\n
+  previous_total_debit  = getInventoryAssetPrice(omit_output=True,\n
+                                                  **get_inventory_kw)\n
+  previous_total_credit = getInventoryAssetPrice(omit_input =True,\n
+                                                  **get_inventory_kw)\n
+  context.log(\'previous credit (%s) %s\' % (get_inventory_kw, previous_total_credit),\n
+          getInventoryAssetPrice(omit_input=True, src__=1, **get_inventory_kw))\n
+  if previous_total_credit != 0:\n
+    previous_total_credit = - previous_total_credit\n
+\n
+  # Show the previous balance if not empty\n
+  if previous_total_credit != 0 or previous_total_debit != 0:\n
+    from Products.ERP5Type.Document import newTempAccountingTransaction\n
+\n
+    net_balance = previous_total_debit - previous_total_credit\n
+    previous_balance = newTempAccountingTransaction(\n
+                            portal, \'_temp_accounting_transaction\')\n
+    previous_balance.edit(\n
+        uid=\'new_000\',\n
+        date=from_date,\n
+        simulation_state_title="",\n
+        Movement_getCreditPrice=previous_total_credit,\n
+        Movement_getDebitPrice=previous_total_debit,\n
+        total_price=net_balance,\n
+        running_total_price=net_balance,\n
+        is_previous_balance=True,\n
+        Movement_getSpecificReference=u\'%s\' % N_(\'Previous Balance\'),\n
+        Movement_getExplanationTitle=u\'%s\' % N_(\'Previous Balance\'),\n
+        Movement_getExplanationTranslatedPortalType=\'\',\n
+        Movement_getExplanationReference=\'\',\n
+        Movement_getMirrorSectionTitle=\'\',\n
+        Movement_getNodeGapId=\'\',\n
+        getTranslatedSimulationStateTitle=\'\',\n
+      )\n
+    new_result = [previous_balance]\n
+    new_result.extend(\n
+      portal.portal_simulation.getMovementHistoryList(\n
+                   from_date=from_date,\n
+                   initial_running_total_price=net_balance,\n
+                   # initial_running_quantity=net_balance, TODO\n
+                   selection_domain=selection.getDomain(),\n
+                   selection_domain_join_column=\'section_uid\',\n
+                   sort_on=sort_on,\n
+                   **params))\n
+    return new_result\n
+\n
+context.log(\'sql\\nparams=%s\\nsort_on=%s\' % (params, sort_on),\n
+              portal.portal_simulation.getMovementHistoryList(\n
+                 from_date=from_date,\n
+                 initial_running_total_price=net_balance,\n
+                 # initial_running_quantity=net_balance, TODO\n
+                 selection_domain=selection.getDomain(),\n
+                 selection_domain_join_column=\'section_uid\',\n
+                 sort_on=sort_on,\n
+                 src__=1,\n
+                 **params))\n
+  \n
+# We try not to convert to a list.\n
+return portal.portal_simulation.getMovementHistoryList(\n
+                 from_date=from_date,\n
+                 initial_running_total_price=net_balance,\n
+                 # initial_running_quantity=net_balance, TODO\n
+                 selection_domain=selection.getDomain(),\n
+                 selection_domain_join_column=\'section_uid\',\n
+                 sort_on=sort_on,\n
+                 **params)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>selection=None, sort_on=[], node_category=None, node_category_strict_membership=None, from_date=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>5</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>selection</string>
+                            <string>sort_on</string>
+                            <string>node_category</string>
+                            <string>node_category_strict_membership</string>
+                            <string>from_date</string>
+                            <string>kw</string>
+                            <string>Products.ERP5Type.Message</string>
+                            <string>Message</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>portal</string>
+                            <string>params</string>
+                            <string>N_</string>
+                            <string>None</string>
+                            <string>_getitem_</string>
+                            <string>_write_</string>
+                            <string>new_result</string>
+                            <string>net_balance</string>
+                            <string>get_inventory_kw</string>
+                            <string>getInventoryAssetPrice</string>
+                            <string>_apply_</string>
+                            <string>True</string>
+                            <string>previous_total_debit</string>
+                            <string>previous_total_credit</string>
+                            <string>Products.ERP5Type.Document</string>
+                            <string>newTempAccountingTransaction</string>
+                            <string>previous_balance</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+                <list/>
+                <none/>
+                <none/>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Node_getAccountingTransactionList</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceBalance.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
similarity index 71%
rename from bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceBalance.xml
rename to bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
index e730cc6cd8815f7193e8d60b5af8766d9bfb9d78..5187f7029d57063a7dc17730a54ffb821286c7bb 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceBalance.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.xml
@@ -68,44 +68,41 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>kw.update(selection.getParams())\n
-kwd = {}\n
-if kw.has_key(\'hide_grouping\'):\n
-  kwd[\'hide_grouping\'] = kw[\'hide_grouping\']\n
+            <value> <string>portal = context.getPortalObject()\n
+params = portal.ERP5Accounting_getParams(selection)\n
 \n
-# read settings from user preference\n
-preference = context.getPortalObject().portal_preferences\n
-if kw.get(\'no_from_date\', 0) :\n
-  from_date = None\n
-else :\n
-  from_date = preference.getPreferredAccountingTransactionFromDate()\n
-if from_date :\n
-  kwd[\'from_date\'] = from_date\n
-at_date = preference.getPreferredAccountingTransactionAtDate()\n
-if at_date :\n
-  kwd[\'at_date\'] = at_date\n
-simulation_state = preference.getPreferredAccountingTransactionSimulationStateList()\n
-if simulation_state :\n
-  kwd[\'simulation_state\'] = simulation_state\n
-section_category = preference.getPreferredAccountingTransactionSectionCategory()\n
-if section_category :\n
-  kwd[\'section_category\'] = section_category\n
+context.log(\'stat kw %s\'%kw,\'params %s\'%params)\n
 \n
-# parameters only used in reports\n
-if kw.has_key(\'node_uid\'):\n
-  kwd[\'node_uid\'] = kw[\'node_uid\']\n
-if kw.has_key(\'portal_type\'):\n
-  kwd[\'portal_type\'] = kw[\'portal_type\']\n
+if kw.get(\'node_uid\'):\n
+  params[\'node_uid\'] = kw[\'node_uid\']\n
+if kw.get(\'mirror_section_uid\'):\n
+  params[\'mirror_section_uid\'] = kw[\'mirror_section_uid\']\n
 \n
-if kw.get(\'omit_input\') :\n
-  kwd[\'omit_input\'] = 1\n
-if kw.get(\'omit_output\') :\n
-  kwd[\'omit_output\'] = 1\n
+# FIXME: bank account uses quantity, not total_price\n
+if kw.get(\'payment_uid\'):\n
+  params[\'payment_uid\'] = kw[\'payment_uid\']\n
+if kw.get(\'node_category_strict_membership\'):\n
+  params[\'node_category_strict_membership\'] = \\\n
+                kw[\'node_category_strict_membership\']\n
+if kw.get(\'node_category\'):\n
+  params[\'node_category\'] = kw[\'node_category\']\n
 \n
-kwd[\'stat\'] = 1\n
-result = context.Entity_zGetAccountingTransactionList(**kwd)\n
-row = result[0]\n
-return float(\'%.02f\' % row.total_price or 0)\n
+###\n
+# Get the \'where_expression\' parameter\n
+# XXX can be removed ?\n
+if kw.get(\'where_expression\'):\n
+  params[\'where_expression\'] = kw[\'where_expression\']\n
+\n
+# Don\'t use the from_date parameter if from_date_summary is present\n
+# XXX actually I never use from date here -jerome\n
+if kw.get(\'from_date_summary\', 0) and params.has_key(\'from_date\'):\n
+  del params[\'from_date\']\n
+\n
+return portal.portal_simulation.getInventoryAssetPrice(\n
+              omit_input=omit_input,\n
+              omit_output=omit_output,\n
+              selection_domain=selection.getDomain(),\n
+              **params)\n
 </string> </value>
         </item>
         <item>
@@ -128,7 +125,15 @@ return float(\'%.02f\' % row.total_price or 0)\n
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>selection, **kw</string> </value>
+            <value> <string>selection, omit_input=0, omit_output=0, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple>
+                <string>Manager</string>
+              </tuple>
+            </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -148,29 +153,23 @@ return float(\'%.02f\' % row.total_price or 0)\n
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>3</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>selection</string>
+                            <string>omit_input</string>
+                            <string>omit_output</string>
                             <string>kw</string>
                             <string>_getattr_</string>
-                            <string>kwd</string>
+                            <string>context</string>
+                            <string>portal</string>
+                            <string>params</string>
                             <string>_getitem_</string>
                             <string>_write_</string>
-                            <string>context</string>
-                            <string>preference</string>
-                            <string>None</string>
-                            <string>from_date</string>
-                            <string>at_date</string>
-                            <string>simulation_state</string>
-                            <string>section_category</string>
                             <string>_apply_</string>
-                            <string>result</string>
-                            <string>row</string>
-                            <string>float</string>
                           </tuple>
                         </value>
                     </item>
@@ -182,12 +181,15 @@ return float(\'%.02f\' % row.total_price or 0)\n
         <item>
             <key> <string>func_defaults</string> </key>
             <value>
-              <none/>
+              <tuple>
+                <int>0</int>
+                <int>0</int>
+              </tuple>
             </value>
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>Entity_statSourceBalance</string> </value>
+            <value> <string>Node_statAccountingBalance</string> </value>
         </item>
         <item>
             <key> <string>warnings</string> </key>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingCredit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingCredit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..08b8646351d4a693e99c1fa63e6ef0d208476f36
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingCredit.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>return - context.Node_statAccountingBalance(omit_input=1, **kw) or 0.0\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple>
+                <string>Manager</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_apply_</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Node_statAccountingCredit</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceCredit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingDebit.xml
similarity index 93%
rename from bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceCredit.xml
rename to bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingDebit.xml
index a61af0e5e77738b55f3a5ce462595f99c012df90..99b9a7083075cd1693d93bef820b9598df98181a 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_statSourceCredit.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingDebit.xml
@@ -68,7 +68,7 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>return - context.Entity_statSourceBalance(omit_output=1, **kw) or 0.00\n
+            <value> <string>return context.Node_statAccountingBalance(omit_output=1, **kw) or 0.0\n
 </string> </value>
         </item>
         <item>
@@ -93,6 +93,14 @@
             <key> <string>_params</string> </key>
             <value> <string>**kw</string> </value>
         </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple>
+                <string>Manager</string>
+              </tuple>
+            </value>
+        </item>
         <item>
             <key> <string>errors</string> </key>
             <value>
@@ -137,7 +145,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>Entity_statSourceCredit</string> </value>
+            <value> <string>Node_statAccountingDebit</string> </value>
         </item>
         <item>
             <key> <string>warnings</string> </key>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 8580e7b684b14da5d9f84ab4eaf2f5139d508cbe..1758dddccea2b3b02d21228a0d06a45a35c0d861 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-30
\ No newline at end of file
+32
\ No newline at end of file