From 13094debab1e39f34917599e5604c53b1312db27 Mon Sep 17 00:00:00 2001 From: hveficent Date: Mon, 20 Jan 2020 10:41:00 +0100 Subject: [PATCH] [12.0] account_financial_tools: Lint fixing --- .../views/res_config_settings.xml | 1 + .../tests/test_check_deposit.py | 6 +++--- account_move_fiscal_year/readme/CONFIGURE.rst | 3 +-- .../readme/CONTRIBUTORS.rst | 1 - .../readme/DESCRIPTION.rst | 2 +- account_move_fiscal_year/readme/INSTALL.rst | 3 +-- account_move_fiscal_year/readme/USAGE.rst | 3 +-- .../test_account_move_line_purchase_info.py | 4 ++-- account_move_template/README.rst | 9 ++++++++- account_move_template/__manifest__.py | 4 ++-- .../models/account_move_template.py | 2 ++ account_move_template/readme/CONTRIBUTORS.rst | 7 +++++++ .../static/description/index.html | 19 +++++++++++++++---- 13 files changed, 44 insertions(+), 20 deletions(-) diff --git a/account_asset_management/views/res_config_settings.xml b/account_asset_management/views/res_config_settings.xml index da091cc5c..a8cc8014a 100644 --- a/account_asset_management/views/res_config_settings.xml +++ b/account_asset_management/views/res_config_settings.xml @@ -5,6 +5,7 @@ res.config.settings.view.form.inherit.account res.config.settings + diff --git a/account_check_deposit/tests/test_check_deposit.py b/account_check_deposit/tests/test_check_deposit.py index 92a918107..922810823 100644 --- a/account_check_deposit/tests/test_check_deposit.py +++ b/account_check_deposit/tests/test_check_deposit.py @@ -119,15 +119,15 @@ class TestPayment(AccountingTestCase): }) self.bank_journal.bank_account_id = self.partner_bank_id.id - def create_invoice(self, amount=100, type='out_invoice', currency_id=None): + def create_invoice(self, amount=100, inv_type='out_invoice', currency_id=None): """ Returns an open invoice """ invoice = self.invoice_model.create({ 'partner_id': self.partner_agrolait.id, 'currency_id': currency_id, - 'name': type == 'out_invoice' and + 'name': inv_type == 'out_invoice' and 'invoice to client' or 'invoice to supplier', 'account_id': self.account_receivable.id, - 'type': type, + 'type': inv_type, 'date_invoice': time.strftime('%Y-%m-%d'), }) self.invoice_line_model.create({ diff --git a/account_move_fiscal_year/readme/CONFIGURE.rst b/account_move_fiscal_year/readme/CONFIGURE.rst index 5090ddf53..4ff91ecd7 100644 --- a/account_move_fiscal_year/readme/CONFIGURE.rst +++ b/account_move_fiscal_year/readme/CONFIGURE.rst @@ -1,2 +1 @@ - -You just need to create date ranges associated to 'Fiscal Year' type. \ No newline at end of file +You just need to create date ranges associated to 'Fiscal Year' type. diff --git a/account_move_fiscal_year/readme/CONTRIBUTORS.rst b/account_move_fiscal_year/readme/CONTRIBUTORS.rst index 25156d806..eea6cac08 100644 --- a/account_move_fiscal_year/readme/CONTRIBUTORS.rst +++ b/account_move_fiscal_year/readme/CONTRIBUTORS.rst @@ -1,2 +1 @@ - * Benjamin Willig diff --git a/account_move_fiscal_year/readme/DESCRIPTION.rst b/account_move_fiscal_year/readme/DESCRIPTION.rst index dbc00857b..a3316ef7e 100644 --- a/account_move_fiscal_year/readme/DESCRIPTION.rst +++ b/account_move_fiscal_year/readme/DESCRIPTION.rst @@ -1 +1 @@ -Display the fiscal year on journal entries/items. \ No newline at end of file +Display the fiscal year on journal entries/items. diff --git a/account_move_fiscal_year/readme/INSTALL.rst b/account_move_fiscal_year/readme/INSTALL.rst index cb7efc18b..509508e12 100644 --- a/account_move_fiscal_year/readme/INSTALL.rst +++ b/account_move_fiscal_year/readme/INSTALL.rst @@ -1,2 +1 @@ - -You need to install account_fiscal_year. \ No newline at end of file +You need to install account_fiscal_year. diff --git a/account_move_fiscal_year/readme/USAGE.rst b/account_move_fiscal_year/readme/USAGE.rst index e2886e4b8..bac5a2067 100644 --- a/account_move_fiscal_year/readme/USAGE.rst +++ b/account_move_fiscal_year/readme/USAGE.rst @@ -1,3 +1,2 @@ - Go to Invoicing -> Configuration -> Date Ranges -> Fiscal Years to create a new -Fiscal Year. \ No newline at end of file +Fiscal Year. diff --git a/account_move_line_purchase_info/tests/test_account_move_line_purchase_info.py b/account_move_line_purchase_info/tests/test_account_move_line_purchase_info.py index c09df15b3..0925780b8 100644 --- a/account_move_line_purchase_info/tests/test_account_move_line_purchase_info.py +++ b/account_move_line_purchase_info/tests/test_account_move_line_purchase_info.py @@ -80,10 +80,10 @@ class TestAccountMoveLinePurchaseInfo(common.TransactionCase): }) return user.id - def _create_account_type(self, name, type): + def _create_account_type(self, name, account_type): acc_type = self.acc_type_model.create({ 'name': name, - 'type': type + 'type': account_type }) return acc_type diff --git a/account_move_template/README.rst b/account_move_template/README.rst index 045462eeb..f10ae4290 100644 --- a/account_move_template/README.rst +++ b/account_move_template/README.rst @@ -23,7 +23,7 @@ Account Move Template :target: https://runbot.odoo-community.org/runbot/92/12.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| The user can configure journal entries templates, useful for recurring entries. The amount of each template line can be computed (through python code) @@ -82,11 +82,18 @@ Authors Contributors ~~~~~~~~~~~~ +Module Authors +-------------- + * Davide Corio * Lorenzo Battistini * Paolo Chiara * Franco Tampieri * Alexis de Lattre (full re-write for v12) + +Module Contributors +------------------- + * Jalal ZAHID (port to v10) * Alex Comba (Port to V8) * Guewen Baconnier diff --git a/account_move_template/__manifest__.py b/account_move_template/__manifest__.py index 4c27a84d1..347c049f0 100644 --- a/account_move_template/__manifest__.py +++ b/account_move_template/__manifest__.py @@ -8,8 +8,8 @@ 'version': '12.0.1.0.0', 'category': 'Accounting', 'summary': "Templates for recurring Journal Entries", - 'author': "Agile Business Group, Odoo Community Association (OCA), Aurium " - "Technologies, Vauxoo, Eficent, Akretion", + 'author': "Agile Business Group, Aurium Technologies, Vauxoo, Eficent, " + "Akretion, Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/account-financial-tools', 'license': 'AGPL-3', 'depends': [ diff --git a/account_move_template/models/account_move_template.py b/account_move_template/models/account_move_template.py index 2c39871fd..34ca07b2e 100644 --- a/account_move_template/models/account_move_template.py +++ b/account_move_template/models/account_move_template.py @@ -28,6 +28,8 @@ class AccountMoveTemplate(models.Model): 'This name is already used by another template!' )] + @api.multi + @api.returns('self', lambda value: value.id) def copy(self, default=None): self.ensure_one() default = dict(default or {}, name=_('%s (copy)') % self.name) diff --git a/account_move_template/readme/CONTRIBUTORS.rst b/account_move_template/readme/CONTRIBUTORS.rst index f584031a8..3c18f6b05 100644 --- a/account_move_template/readme/CONTRIBUTORS.rst +++ b/account_move_template/readme/CONTRIBUTORS.rst @@ -1,8 +1,15 @@ +Module Authors +-------------- + * Davide Corio * Lorenzo Battistini * Paolo Chiara * Franco Tampieri * Alexis de Lattre (full re-write for v12) + +Module Contributors +------------------- + * Jalal ZAHID (port to v10) * Alex Comba (Port to V8) * Guewen Baconnier diff --git a/account_move_template/static/description/index.html b/account_move_template/static/description/index.html index ca1879a34..853135154 100644 --- a/account_move_template/static/description/index.html +++ b/account_move_template/static/description/index.html @@ -3,7 +3,7 @@ - + Account Move Template