Commit 990f0021 authored by Jérome Perrin's avatar Jérome Perrin

only take movement from "accounting_movement" type group


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16414 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 542644d2
......@@ -100,7 +100,8 @@ class BalanceTransaction(AccountingTransaction, Inventory):
def _getGroupByNodeMovementList(self):
"""Returns movements that implies only grouping by node."""
movement_list = []
for movement in self.getMovementList():
for movement in self.getMovementList(
portal_type=self.getPortalAccountingMovementTypeList()):
if getattr(movement, 'isAccountable', 1):
if not (movement.getSourceSection() or
movement.getDestinationPayment()):
......@@ -110,7 +111,8 @@ class BalanceTransaction(AccountingTransaction, Inventory):
def _getGroupByPaymentMovementList(self):
"""Returns movements that implies grouping by node and payment"""
movement_list = []
for movement in self.getMovementList():
for movement in self.getMovementList(
portal_type=self.getPortalAccountingMovementTypeList()):
if getattr(movement, 'isAccountable', 1):
if movement.getDestinationPayment():
movement_list.append(movement)
......@@ -119,7 +121,8 @@ class BalanceTransaction(AccountingTransaction, Inventory):
def _getGroupByMirrorSectionMovementList(self):
"""Returns movements that implies only grouping by node and mirror section"""
movement_list = []
for movement in self.getMovementList():
for movement in self.getMovementList(
portal_type=self.getPortalAccountingMovementTypeList()):
if getattr(movement, 'isAccountable', 1):
if movement.getSourceSection():
movement_list.append(movement)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment