From 8cc216b6597a42a00dd07b2f52a7b730e3fc85df Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 1 Aug 2017 10:17:41 +0200 Subject: [PATCH] [IMP] account: Split clearly the accounting & invoicing applications PURPOSE ======= 1) Have a clear split between the invoicing and the accounting apps 2) Have a clear split between the community and the enterprise version (no accounting in community) SPECIFICATION ============= (1) When only invoicing installed, we shouldn't see accounts (for community and enterprise) (a) Perpetual Inventory Valuation: - Hide the field inventory valuation from the product category (b) Taxes - No accounts - No cash basis option - No tax adjustment (2) Remove from Community, modules: - Accounting - Budgets - Assets (3) No account_report in community, keep PDF reports for - sale/purchase journal - Aged partner balance - Partner Ledger (4) Clean split between invoicing and accounting in enterprise (a) When installing invoicing, I shouldn't have access to accounting just by changing my access right to adviser (b) Menus (when only invoicing installed) - Sales - Customer Invoices - Customer Credit Notes - Payments - Customer Statements - Customers - Sellable Products - Purchases - Vendor Bills - Vendor Credit Notes - Payments - Vendors - Purchasable Products - Reporting - Partner Reports - Partner Ledger - Aged Receivable - Aged Payable - Audit Reports - Tax report - Management - Invoices - Product Margins - Configuration - Settings - Products - Products - Accounting - Taxes - Fiscal Positions - Bank Accounts - Journals - Management - Payment Terms - Follow-up levels - Payments - Payment Acquirers (c) Settings (when only invoicing installed) - Fiscal Localization - Taxes - Default Taxes - Rounding Method - TaxCloud connection - TaxCloud Categories - EU Digital Goods VAT - VIES VAT CHECK - Currencies - Main currency - Multi-currencies - Invoicing - Warnings - Docsaway - Customer Payments - Follow-up levels - Payment Followup - Bills Payment - Bank & Cash - Analytics - Margin - Automated Entries Remarks - Test with the different access rights --- addons/account/demo/account_demo.xml | 2 +- addons/account/models/account_invoice.py | 2 + .../report/account_invoice_report_view.xml | 2 +- .../static/src/js/account_payment_field.js | 24 +- .../static/src/xml/account_payment.xml | 2 +- addons/account/tests/account_test_users.py | 2 +- .../views/account_config_settings_views.xml | 261 ++++++++++-------- addons/account/views/account_invoice_view.xml | 12 +- .../views/account_journal_dashboard_view.xml | 2 +- addons/account/views/account_menuitem.xml | 20 +- addons/account/views/account_payment_view.xml | 6 +- addons/account/views/account_report.xml | 4 +- addons/account/views/account_view.xml | 59 ++-- addons/account/views/partner_view.xml | 4 +- addons/account/views/product_view.xml | 4 +- .../wizard/account_financial_report_view.xml | 6 +- .../account_report_general_ledger_view.xml | 2 +- .../account_report_partner_ledger_view.xml | 2 +- .../account_report_trial_balance_view.xml | 3 +- .../views/account_config_settings_views.xml | 37 --- .../views/product_views.xml | 73 +++++ addons/account_asset/__manifest__.py | 2 +- .../__manifest__.py | 2 +- .../test/account_voucher_users.yml | 2 +- .../views/account_voucher_views.xml | 20 +- addons/hr_expense/__manifest__.py | 2 +- addons/hr_expense/models/hr_expense.py | 2 +- .../hr_expense_config_settings_views.xml | 2 +- addons/hr_expense/views/hr_expense_views.xml | 14 +- .../hr_payroll_config_settings_views.xml | 2 +- addons/l10n_be_intrastat/__manifest__.py | 2 +- addons/l10n_eu_service/__manifest__.py | 2 +- addons/l10n_fr_fec/__manifest__.py | 2 +- .../views/account_config_settings_views.xml | 2 +- addons/purchase/views/purchase_views.xml | 7 +- addons/stock_account/views/product_views.xml | 6 +- odoo/addons/test_main_flows/__manifest__.py | 2 +- 37 files changed, 358 insertions(+), 242 deletions(-) diff --git a/addons/account/demo/account_demo.xml b/addons/account/demo/account_demo.xml index 049c4462e9a..8f2f139f4b9 100644 --- a/addons/account/demo/account_demo.xml +++ b/addons/account/demo/account_demo.xml @@ -35,7 +35,7 @@ - + diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index e614b944287..5d92702c0bd 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -193,6 +193,8 @@ class AccountInvoice(models.Model): 'position': currency_id.position, 'date': payment.date, 'payment_id': payment.id, + 'account_payment_id': payment.payment_id.id, + 'invoice_id': payment.invoice_id.id, 'move_id': payment.move_id.id, 'ref': payment_ref, }) diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index ee545e04eb9..0502c7dcc68 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -125,7 +125,7 @@ - + diff --git a/addons/account/tests/account_test_users.py b/addons/account/tests/account_test_users.py index 5b5bde0a9cc..caa17a9a821 100644 --- a/addons/account/tests/account_test_users.py +++ b/addons/account/tests/account_test_users.py @@ -11,7 +11,7 @@ class AccountTestUsers(AccountingTestCase): self.main_company = self.env.ref('base.main_company') self.main_partner = self.env.ref('base.main_partner') self.main_bank = self.env.ref('base.res_bank_1') - res_users_account_user = self.env.ref('account.group_account_user') + res_users_account_user = self.env.ref('account.group_account_invoice') res_users_account_manager = self.env.ref('account.group_account_manager') partner_manager = self.env.ref('base.group_partner_manager') self.tax_model = self.env['account.tax'] diff --git a/addons/account/views/account_config_settings_views.xml b/addons/account/views/account_config_settings_views.xml index fd30bb12837..5ae93504618 100644 --- a/addons/account/views/account_config_settings_views.xml +++ b/addons/account/views/account_config_settings_views.xml @@ -22,40 +22,40 @@ -

Fiscal Localization

-
-
-
-
-