Browse Source

[IMP] All partners reports: always force the computation of the opening balance.

We cannot rely on the OpenERP initial entries for the partners reports.
      They are not reliable because, for instance, it allows to reconcile entries
      between different partners. So we never display the initial entries regarding
      the partners.
(lp:c2c-addons/6.1  rev 80.1.3)
Guewen Baconnier @ Camptocamp 12 years ago
parent
commit
f5999b4dbe
  1. 5
      account_financial_report_webkit/report/common_partner_reports.py
  2. 10
      account_financial_report_webkit/report/partner_balance.py
  3. 10
      account_financial_report_webkit/report/partners_ledger.py

5
account_financial_report_webkit/report/common_partner_reports.py

@ -78,8 +78,9 @@ class CommonPartnersReportHeaderWebkit(CommonReportHeaderWebkit):
return sql_conditions, search_params
def _get_partners_move_line_ids(self, filter_from, account_id, start, stop, target_move, opening_mode='include_opening',
exclude_reconcile=False, partner_filter=False):
def _get_partners_move_line_ids(self, filter_from, account_id, start, stop,
target_move, opening_mode='exclude_opening',
exclude_reconcile=False, partner_filter=False):
final_res = defaultdict(list)

10
account_financial_report_webkit/report/partner_balance.py

@ -65,6 +65,16 @@ class PartnerBalanceWebkit(report_sxw.rml_parse, CommonPartnerBalanceReportHeade
],
})
def _get_initial_balance_mode(self, start_period):
""" Force computing of initial balance for the partner balance,
because we cannot use the entries generated by
OpenERP in the opening period.
OpenERP allows to reconcile move lines between different partners,
so the generated entries in the opening period are wrong.
"""
return 'initial_balance'
def set_context(self, objects, data, ids, report_type=None):
"""Populate a ledger_lines attribute on each browse record that will be used
by mako template"""

10
account_financial_report_webkit/report/partners_ledger.py

@ -66,6 +66,16 @@ class PartnersLedgerWebkit(report_sxw.rml_parse, CommonPartnersReportHeaderWebki
],
})
def _get_initial_balance_mode(self, start_period):
""" Force computing of initial balance for the partner ledger,
because we cannot use the entries generated by
OpenERP in the opening period.
OpenERP allows to reconcile move lines between different partners,
so the generated entries in the opening period are wrong.
"""
return 'initial_balance'
def set_context(self, objects, data, ids, report_type=None):
"""Populate a ledger_lines attribute on each browse record that will be used
by mako template"""

Loading…
Cancel
Save