From a75b4c21eff46a0cd20ff1b161297d53e964a288 Mon Sep 17 00:00:00 2001 From: Fekete Mihai Date: Sat, 17 Mar 2018 17:43:55 +0200 Subject: [PATCH] Migrate account_move_fiscal_month to 11.0 --- account_move_fiscal_month/README.rst | 20 ++++++++++--------- account_move_fiscal_month/__manifest__.py | 7 ++----- .../models/account_move.py | 4 ++-- .../models/account_move_line.py | 4 ++-- .../tests/test_account_move_fiscal_month.py | 1 - 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/account_move_fiscal_month/README.rst b/account_move_fiscal_month/README.rst index 2e47a5e1..bace23cb 100644 --- a/account_move_fiscal_month/README.rst +++ b/account_move_fiscal_month/README.rst @@ -1,5 +1,5 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 ========================= @@ -8,23 +8,25 @@ Account Move Fiscal Month Display the fiscal month on journal entries/items. -Installation -============ - -You need to install account_fiscal_month. - Configuration ============= You just need to create date ranges associated to 'Fiscal Month' type. +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/92/11.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. +help us smash it by providing detailed and welcomed feedback. Credits ======= @@ -32,7 +34,7 @@ Credits Images ------ -* Odoo Community Association: `Icon `_. +* Odoo Community Association: `Icon `_. Contributors ------------ diff --git a/account_move_fiscal_month/__manifest__.py b/account_move_fiscal_month/__manifest__.py index 49a58f20..778c4e63 100644 --- a/account_move_fiscal_month/__manifest__.py +++ b/account_move_fiscal_month/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -6,10 +5,10 @@ 'name': 'Account Move Fiscal Month', 'summary': """ Display the fiscal month on journal entries/item""", - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', - 'website': 'https://www.acsone.eu', + 'website': 'https://github.com/OCA/account-financial-tools', 'depends': [ 'account_fiscal_month', ], @@ -17,6 +16,4 @@ 'views/account_move.xml', 'views/account_move_line.xml', ], - 'demo': [ - ], } diff --git a/account_move_fiscal_month/models/account_move.py b/account_move_fiscal_month/models/account_move.py index 29703273..338bf0ff 100644 --- a/account_move_fiscal_month/models/account_move.py +++ b/account_move_fiscal_month/models/account_move.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -12,7 +11,8 @@ class AccountMove(models.Model): date_range_fm_id = fields.Many2one( comodel_name='date.range', string="Fiscal month", - compute='_compute_date_range_fm', search='_search_date_range_fm') + compute='_compute_date_range_fm', search='_search_date_range_fm', + ) @api.multi @api.depends('date', 'company_id') diff --git a/account_move_fiscal_month/models/account_move_line.py b/account_move_fiscal_month/models/account_move_line.py index 33979183..7f1980a0 100644 --- a/account_move_fiscal_month/models/account_move_line.py +++ b/account_move_fiscal_month/models/account_move_line.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -10,4 +9,5 @@ class AccountMoveLine(models.Model): _inherit = 'account.move.line' date_range_fm_id = fields.Many2one( - related='move_id.date_range_fm_id', readonly=True) + related='move_id.date_range_fm_id', readonly=True, + store=True, copy=False) diff --git a/account_move_fiscal_month/tests/test_account_move_fiscal_month.py b/account_move_fiscal_month/tests/test_account_move_fiscal_month.py index c95c2f0c..e140f5dd 100644 --- a/account_move_fiscal_month/tests/test_account_move_fiscal_month.py +++ b/account_move_fiscal_month/tests/test_account_move_fiscal_month.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).