Files
odoo_source/addons/account/tests/account_test_users.py
T
Yannick Tivisse 8cc216b659 [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
2017-08-11 13:57:30 +02:00

36 lines
1.6 KiB
Python

from odoo.addons.account.tests.account_test_classes import AccountingTestCase
class AccountTestUsers(AccountingTestCase):
"""Tests for diffrent type of user 'Accountant/Adviser' and added groups"""
def setUp(self):
super(AccountTestUsers, self).setUp()
self.res_user_model = self.env['res.users']
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_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']
self.account_model = self.env['account.account']
self.account_type_model = self.env['account.account.type']
self.currency_euro = self.env.ref('base.EUR')
self.account_user = self.res_user_model.with_context({'no_reset_password': True}).create(dict(
name="Accountant",
company_id=self.main_company.id,
login="acc",
email="accountuser@yourcompany.com",
groups_id=[(6, 0, [res_users_account_user.id, partner_manager.id])]
))
self.account_manager = self.res_user_model.with_context({'no_reset_password': True}).create(dict(
name="Adviser",
company_id=self.main_company.id,
login="fm",
email="accountmanager@yourcompany.com",
groups_id=[(6, 0, [res_users_account_manager.id, partner_manager.id])]
))