@ -36,7 +36,8 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
def _get_account_partners_details ( self , account_by_ids , main_filter ,
def _get_account_partners_details ( self , account_by_ids , main_filter ,
target_move , start , stop ,
target_move , start , stop ,
initial_balance_mode ,
initial_balance_mode ,
partner_filter_ids = False ) :
partner_filter_ids = False ,
display_partner = ' all ' ) :
res = { }
res = { }
filter_from = False
filter_from = False
if main_filter in ( ' filter_period ' , ' filter_no ' , ' filter_opening ' ) :
if main_filter in ( ' filter_period ' , ' filter_no ' , ' filter_opening ' ) :
@ -80,6 +81,11 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
get ( ' init_balance ' , 0.0 ) + \
get ( ' init_balance ' , 0.0 ) + \
details [ partner_id ] . get ( ' debit ' , 0.0 ) - \
details [ partner_id ] . get ( ' debit ' , 0.0 ) - \
details [ partner_id ] . get ( ' credit ' , 0.0 )
details [ partner_id ] . get ( ' credit ' , 0.0 )
if display_partner == ' non-zero_balance ' :
details = { k : v
for k , v in details . iteritems ( )
if abs ( v [ ' balance ' ] ) > 0.0001 }
res [ account_id ] = details
res [ account_id ] = details
return res
return res
@ -201,7 +207,9 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
partner_details_by_ids = self . _get_account_partners_details (
partner_details_by_ids = self . _get_account_partners_details (
accounts_by_ids , details_filter ,
accounts_by_ids , details_filter ,
target_move , start , stop , initial_balance_mode ,
target_move , start , stop , initial_balance_mode ,
partner_filter_ids = partner_filter_ids )
partner_filter_ids = partner_filter_ids ,
display_partner = data [ ' form ' ] [ ' display_partner ' ]
)
for account_id in account_ids :
for account_id in account_ids :
accounts_details_by_ids [ account_id ] [
accounts_details_by_ids [ account_id ] [
@ -263,7 +271,8 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
partner_details_by_ids = self . _get_account_partners_details (
partner_details_by_ids = self . _get_account_partners_details (
accounts_by_ids , main_filter , target_move , start , stop ,
accounts_by_ids , main_filter , target_move , start , stop ,
initial_balance_mode , partner_filter_ids = partner_ids )
initial_balance_mode , partner_filter_ids = partner_ids ,
display_partner = data [ ' form ' ] [ ' display_partner ' ] )
comparison_params = [ ]
comparison_params = [ ]
comp_accounts_by_ids = [ ]
comp_accounts_by_ids = [ ]