You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

184 lines
6.9 KiB

[FIX] account_financial_report_webkit: Fix error if column exists The code comments say this should be happening before, but it was actually failing with: 2018-12-03 11:31:49,074 48 ERROR test openerp.sql_db: Programming error: column "last_rec_date" of relation "account_move_line" already exists , in query alter table account_move_line add column last_rec_date date 2018-12-03 11:31:49,074 48 CRITICAL test openerp.service.server: Failed to initialize database `test`. Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/openerp/service/server.py", line 941, in preload_registries registry = RegistryManager.new(dbname, update_module=update_module) File "/opt/odoo/custom/src/odoo/openerp/modules/registry.py", line 370, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/custom/src/odoo/openerp/modules/loading.py", line 354, in load_modules loaded_modules, update_module) File "/opt/odoo/custom/src/odoo/openerp/modules/loading.py", line 255, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/odoo/custom/src/odoo/openerp/modules/loading.py", line 150, in load_module_graph getattr(py_module, pre_init)(cr) File "/opt/odoo/auto/addons/account_financial_report_webkit/hooks.py", line 11, in pre_init_hook 'alter table account_move_line add column last_rec_date date', File "/opt/odoo/custom/src/odoo/openerp/sql_db.py", line 171, in wrapper return f(self, *args, **kwargs) File "/opt/odoo/custom/src/odoo/openerp/sql_db.py", line 247, in execute res = self._obj.execute(query, params) ProgrammingError: column "last_rec_date" of relation "account_move_line" already exists
6 years ago
  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. ==========================
  5. Financial Reports - Webkit
  6. ==========================
  7. This module adds or replaces the following standard OpenERP financial reports:
  8. - General ledger
  9. - Trial Balance (simple or comparative view)
  10. - Partner ledger
  11. - Partner balance
  12. - Open invoices report
  13. - Aged Partner Balance
  14. Main improvements per report:
  15. -----------------------------
  16. The General ledger: details of all entries posted in your books sorted by
  17. account.
  18. * Filter by account is available in the wizard (no need to go to the
  19. Chart of Accounts to do this anymore) or by View account (the report
  20. will display all regular children accounts) i.e. you can select all
  21. P&L accounts.
  22. * The report only prints accounts with moves OR with a non
  23. null balance. No more endless report with empty accounts (field:
  24. display account is hidden)
  25. * initial balance computation on the fly if no open entry posted
  26. * Thanks to a new checkbox in the account form, you will have the
  27. possibility to centralize any account you like. This means you do
  28. not want to see all entries posted under the account ‘VAT on sales’;
  29. you will only see aggregated amounts by periods.
  30. * Counterpart account is displayed for each transaction (3 accounts max.)
  31. to ease searching.
  32. * Better ergonomy on the wizard: important information is displayed in
  33. the top part, filters are in the middle, and options are in the
  34. bottom or on a separate tab. There is more specific filtering on
  35. separate tabs. No more unique wizard layout for all financial
  36. reports (we have removed the journal tab for the GL report)
  37. * improved report style
  38. The partner ledger: details of entries relative to payable &
  39. receivable accounts posted in your books sorted by account and
  40. partner.
  41. * Filter by partner now available
  42. * Now you can see Accounts then Partner with subtotals for each
  43. account allowing you to check you data with trial balance and
  44. partner balance for instance. Accounts are ordered in the same way as
  45. in the Chart of account
  46. * Period have been added (date only is not filled in since date can be
  47. outside period)
  48. * Reconciliation code added
  49. * Subtotal by account
  50. * Alphabetical sorting (same as in partner balance)
  51. Open invoice report : other version of the partner ledger showing
  52. unreconciled / partially reconciled entries.
  53. * Possibility to print unreconciled transactions only at any date in
  54. the past (thanks to the new field: `last_rec_date` which computes
  55. the last move line reconciliation date). No more pain to get open
  56. invoices at the last closing date.
  57. * no initial balance computed because the report shows open invoices
  58. from previous years.
  59. The Trial balance: list of accounts with balances
  60. * You can either see the columns: initial balance, debit, credit,
  61. end balance or compare balances over 4 periods of your choice
  62. * You can select the "opening" filter to get the opening trial balance
  63. only
  64. * If you create an extra virtual chart (using consolidated account) of
  65. accounts for your P&L and your balance sheet, you can print your
  66. statutory accounts (with comparison over years for instance)
  67. * If you compare 2 periods, you will get the differences in values and
  68. in percent
  69. The Partner balance: list of account with balances
  70. * Subtotal by account and partner
  71. * Alphabetical sorting (same as in partner balance)
  72. Aged Partner Balance: Summary of aged open amount per partner
  73. This report is an accounting tool helping in various tasks.
  74. You can credit control or partner balance provisions computation for instance.
  75. The aged balance report allows you to print balances per partner
  76. like the trial balance but add an extra information :
  77. * It will split balances into due amounts
  78. (due date not reached à the end date of the report) and overdue amounts
  79. Overdue data are also split by period.
  80. * For each partner following columns will be displayed:
  81. * Total balance (all figures must match with same date partner balance
  82. report).
  83. This column equals the sum of all following columns)
  84. * Due
  85. * Overdue <= 30 days
  86. * Overdue <= 60 days
  87. * Overdue <= 90 days
  88. * Overdue <= 120 days
  89. * Older
  90. Hypothesis / Contraints of aged partner balance
  91. * Overdues columns will be by default be based on 30 days range fix number of
  92. days. This can be changed by changes the RANGES constraint
  93. * All data will be displayed in company currency
  94. * When partial payments, the payment must appear in the same colums than the
  95. invoice (Except if multiple payment terms)
  96. * Data granularity: partner (will not display figures at invoices level)
  97. * The report aggregate data per account with sub-totals
  98. * Initial balance must be calculated the same way that
  99. the partner balance / Ignoring the opening entry
  100. in special period (idem open invoice report)
  101. * Only accounts with internal type payable or receivable are considered
  102. (idem open invoice report)
  103. * If maturity date is null then use move line date
  104. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  105. :alt: Try me on Runbot
  106. :target: https://runbot.odoo-community.org/runbot/91/8.0
  107. Known issues / Roadmap
  108. ======================
  109. In order to run properly this module makes sure you have installed the
  110. library `wkhtmltopdf` for the pdf rendering (the library path must be
  111. set in a System Parameter `webkit_path`).
  112. Initial balances in these reports are based either on opening entry
  113. posted in the opening period or computed on the fly. So make sure
  114. that your past accounting opening entries are in an opening period.
  115. Initials balances are not computed when using the Date filter (since a
  116. date can be outside its logical period and the initial balance could
  117. be different when computed by data or by initial balance for the
  118. period). The opening period is assumed to be the Jan. 1st of the year
  119. with an opening flag and the first period of the year must start also
  120. on Jan 1st.
  121. Totals for amounts in currencies are effective if the partner belongs to
  122. an account with a secondary currency.
  123. HTML headers and footers are deactivated for these reports because of
  124. an issue in wkhtmltopdf
  125. (http://code.google.com/p/wkhtmltopdf/issues/detail?id=656) Instead,
  126. the header and footer are created as text with arguments passed to
  127. wkhtmltopdf. The texts are defined inside the report classes.
  128. Credits
  129. =======
  130. Contributors
  131. ------------
  132. * Nicolas Bessi
  133. * Guewen Baconnier
  134. * David Dufresne <david.dufresne@savoirfairelinux.com>
  135. * Luc De Meyer <luc.demeyer@noviat.com>
  136. * Jairo Llopis <jairo.llopis@tecnativa.com>
  137. Maintainer
  138. ----------
  139. .. image:: http://odoo-community.org/logo.png
  140. :alt: Odoo Community Association
  141. :target: http://odoo-community.org
  142. This module is maintained by the OCA.
  143. OCA, or the Odoo Community Association, is a nonprofit organization whose
  144. mission is to support the collaborative development of Odoo features and
  145. promote its widespread use.
  146. To contribute to this module, please visit http://odoo-community.org.