diff --git a/account_financial_test_data/README.rst b/account_financial_test_data/README.rst new file mode 100644 index 00000000..8c82d9bb --- /dev/null +++ b/account_financial_test_data/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=========================== +Account financial test data +=========================== + +This module provides demo data for the repo 'account-financial-reporting' +and will allow people to test all reports properly and make tests as well. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/91/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Taktik +* Alex Comba + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/account_financial_test_data/__init__.py b/account_financial_test_data/__init__.py index fddd5ef9..997f4f71 100644 --- a/account_financial_test_data/__init__.py +++ b/account_financial_test_data/__init__.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# © 2016 Taktik +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models from . pos_install import post_init_hook diff --git a/account_financial_test_data/__openerp__.py b/account_financial_test_data/__openerp__.py index 8f7c95e4..f1af1f4b 100644 --- a/account_financial_test_data/__openerp__.py +++ b/account_financial_test_data/__openerp__.py @@ -1,22 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2016 Taktik +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Account financial test data', @@ -25,8 +9,6 @@ 'author': "Taktik, Odoo Community Association (OCA)", 'category': 'Other', 'depends': [ - "base", - "account", "account_accountant", "l10n_fr", ], diff --git a/account_financial_test_data/data/partners_data.xml b/account_financial_test_data/data/partners_data.xml index a529e047..9ffefb7e 100644 --- a/account_financial_test_data/data/partners_data.xml +++ b/account_financial_test_data/data/partners_data.xml @@ -23,6 +23,7 @@ + PARTNER C @@ -33,6 +34,7 @@ + PARTNER D @@ -43,6 +45,7 @@ + PARTNER E @@ -53,6 +56,7 @@ + PARTNER F @@ -63,6 +67,7 @@ + PARTNER G diff --git a/account_financial_test_data/models/__init__.py b/account_financial_test_data/models/__init__.py index 955bc4c3..19e10397 100644 --- a/account_financial_test_data/models/__init__.py +++ b/account_financial_test_data/models/__init__.py @@ -1,3 +1,6 @@ # -*- coding: utf-8 -*- +# © 2016 Taktik +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import account_installer +from . import model_name +from . import account_installer diff --git a/account_financial_test_data/models/account_installer.py b/account_financial_test_data/models/account_installer.py index cd49d41a..ce26de83 100644 --- a/account_financial_test_data/models/account_installer.py +++ b/account_financial_test_data/models/account_installer.py @@ -1,7 +1,10 @@ # -*- coding: utf-8 -*- -import logging +# © 2016 Taktik +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import model_nameimport logging from openerp.osv import orm -from openerp import models, fields, api, _, exceptions +from openerp import models, api _logger = logging.getLogger(__name__) diff --git a/account_financial_test_data/pos_install.py b/account_financial_test_data/pos_install.py index b84eb843..7fbd15c7 100644 --- a/account_financial_test_data/pos_install.py +++ b/account_financial_test_data/pos_install.py @@ -1,8 +1,12 @@ # -*- coding: utf-8 -*- from datetime import date, datetime -from openerp import SUPERUSER_ID, api, tools, _ +from openerp import SUPERUSER_ID, api +# -*- coding: utf-8 -*- +# © 2016 Taktik +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + def post_init_hook(cr, registry): def update_partners(): @@ -56,7 +60,8 @@ def post_init_hook(cr, registry): account_setting = account_setting_obj.create({}) account_setting.group_multi_currency = True account_setting.default_sale_tax_id = env.ref('l10n_fr.tva_normale').id - account_setting.default_purchase_tax_id = env.ref('l10n_fr.tva_normale').id + account_setting.default_purchase_tax_id = env.ref( + 'l10n_fr.tva_normale').id account_setting.execute() return True @@ -110,7 +115,8 @@ def post_init_hook(cr, registry): invoice_obj = env['account.invoice'] - invoice_a = invoice_obj.create({ + # invoice_a + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_c').id, 'account_id': env.ref( @@ -121,7 +127,8 @@ def post_init_hook(cr, registry): 'date_due': date(last_year, 1, 31), }) - invoice_b = invoice_obj.create({ + # invoice_b + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_a').id, 'type': 'out_invoice', @@ -132,7 +139,8 @@ def post_init_hook(cr, registry): 'date_due': date(last_year, 2, 4), }) - invoice_c = invoice_obj.create({ + # invoice_c + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_d').id, 'type': 'out_invoice', @@ -143,7 +151,8 @@ def post_init_hook(cr, registry): 'date_due': date(this_year, 3, 10), }) - invoice_d = invoice_obj.create({ + # invoice_d + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_g').id, 'type': 'out_refund', @@ -154,7 +163,8 @@ def post_init_hook(cr, registry): 'date_due': date(this_year, 4, 15), }) - invoice_e = invoice_obj.create({ + # invoice_e + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_b').id, 'type': 'out_invoice', @@ -165,7 +175,8 @@ def post_init_hook(cr, registry): 'date_due': date(this_year, 2, 15), }) - invoice_f = invoice_obj.create({ + # invoice_f + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_a').id, 'type': 'out_invoice', @@ -176,7 +187,8 @@ def post_init_hook(cr, registry): 'date_due': date(this_year, 3, 24), }) - invoice_g = invoice_obj.create({ + # invoice_g + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_g').id, 'type': 'out_invoice', @@ -187,7 +199,8 @@ def post_init_hook(cr, registry): 'date_due': date(this_year, 4, 15), }) - invoice_h = invoice_obj.create({ + # invoice_h + invoice_obj.create({ 'partner_id': env.ref( 'account_financial_test_data.data_partner_f').id, 'type': 'out_invoice',