diff --git a/account_easy_reconcile/__init__.py b/account_easy_reconcile/__init__.py index 403b65d3..3ac78713 100755 --- a/account_easy_reconcile/__init__.py +++ b/account_easy_reconcile/__init__.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright 2012 Camptocamp SA (Guewen Baconnier) +# Copyright 2012, 2015 Camptocamp SA (Guewen Baconnier, Damien Crier) # Copyright (C) 2010 Sébastien Beau -# Copyright 2015 Camptocamp SA (Damien Crier) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/account_easy_reconcile/__openerp__.py b/account_easy_reconcile/__openerp__.py index e4c7cd55..36b54948 100755 --- a/account_easy_reconcile/__openerp__.py +++ b/account_easy_reconcile/__openerp__.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright 2012 Camptocamp SA (Guewen Baconnier) +# Copyright 2012, 2015 Camptocamp SA (Guewen Baconnier, Damien Crier) # Copyright (C) 2010 Sébastien Beau -# Copyright 2015 Camptocamp SA (Damien Crier) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/account_easy_reconcile/base_reconciliation.py b/account_easy_reconcile/base_reconciliation.py index 16843f77..78e8fe6f 100644 --- a/account_easy_reconcile/base_reconciliation.py +++ b/account_easy_reconcile/base_reconciliation.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright 2012-2013 Camptocamp SA (Guewen Baconnier) +# Copyright 2012-2013, 2015 Camptocamp SA (Guewen Baconnier, Damien Crier) # Copyright (C) 2010 Sébastien Beau -# Copyright 2015 Camptocamp SA (Damien Crier) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/account_easy_reconcile/easy_reconcile.py b/account_easy_reconcile/easy_reconcile.py index 38594603..7a7a1bf2 100644 --- a/account_easy_reconcile/easy_reconcile.py +++ b/account_easy_reconcile/easy_reconcile.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright 2012-2013 Camptocamp SA (Guewen Baconnier) +# Copyright 2012-2013, 2015 Camptocamp SA (Guewen Baconnier, Damien Crier) # Copyright (C) 2010 Sébastien Beau -# Copyright 2015 Camptocamp SA (Damien Crier) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -25,8 +24,6 @@ from openerp import models, api, fields, _ from openerp.exceptions import Warning from openerp import sql_db -# from openerp import pooler - import logging _logger = logging.getLogger(__name__) @@ -177,7 +174,7 @@ class AccountEasyReconcile(models.Model): readonly=True ) last_history = fields.Many2one('easy.reconcile.history', - string='readonly=True', + string='Last history', readonly=True, compute='_last_history', ) company_id = fields.Many2one('res.company', string='Company') @@ -253,7 +250,7 @@ class AccountEasyReconcile(models.Model): self.env['easy.reconcile.history'].create( { 'easy_reconcile_id': rec.id, - 'date': fields.datetime.now(), + 'date': fields.Datetime.now(), 'reconcile_ids': [ (4, rid) for rid in reconcile_ids ], @@ -269,7 +266,7 @@ class AccountEasyReconcile(models.Model): "The reconcile task %s had an exception: %s", rec.name, e.message ) - message = "There was an error during reconciliation : %s" \ + message = _("There was an error during reconciliation : %s") \ % e.message rec.message_post(body=message) self.env['easy.reconcile.history'].create( @@ -287,8 +284,7 @@ class AccountEasyReconcile(models.Model): return True -# @api.model -# def _no_history(self, rec): + @api.multi def _no_history(self): """ Raise an `orm.except_orm` error, supposed to be called when there is no history on the reconciliation @@ -327,7 +323,8 @@ class AccountEasyReconcile(models.Model): @api.multi def open_partial_reconcile(self): - """ Open the view of move line with the unreconciled move lines""" + """ Open the view of move line with the partially + reconciled move lines""" self.ensure_one() obj_move_line = self.env['account.move.line'] lines = obj_move_line.search( diff --git a/account_easy_reconcile/easy_reconcile_history.py b/account_easy_reconcile/easy_reconcile_history.py index 53d64aa8..ec864544 100644 --- a/account_easy_reconcile/easy_reconcile_history.py +++ b/account_easy_reconcile/easy_reconcile_history.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Author: Guewen Baconnier -# Copyright 2012 Camptocamp SA -# Copyright 2015 Camptocamp SA (Damien Crier) +# Author: Guewen Baconnier, Damien Crier +# Copyright 2012, 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -33,7 +32,7 @@ class EasyReconcileHistory(models.Model): @api.one @api.depends('reconcile_ids', 'reconcile_partial_ids') - def _reconcile_line_ids(self): + def _get_reconcile_line_ids(self): move_line_ids = [] for reconcile in self.reconcile_ids: move_lines = reconcile.mapped('line_id') @@ -68,13 +67,13 @@ class EasyReconcileHistory(models.Model): comodel_name='account.move.line', relation='account_move_line_history_rel', string='Reconciled Items', - _compute='_reconcile_line_ids' + compute='_get_reconcile_line_ids' ) partial_line_ids = fields.Many2many( comodel_name='account.move.line', relation='account_move_line_history_partial_rel', string='Partially Reconciled Items', - _compute='_reconcile_line_ids' + compute='_get_reconcile_line_ids' ) company_id = fields.Many2one( 'res.company', diff --git a/account_easy_reconcile/res_config.py b/account_easy_reconcile/res_config.py index e4e16da0..090810d3 100644 --- a/account_easy_reconcile/res_config.py +++ b/account_easy_reconcile/res_config.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Author: Leonardo Pistone -# Copyright 2014 Camptocamp SA -# Copyright 2015 Camptocamp SA (Damien Crier) +# Author: Leonardo Pistone, Damien Crier +# Copyright 2014, 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -30,7 +29,7 @@ class AccountConfigSettings(models.TransientModel): related="company_id.reconciliation_commit_every", string="How often to commit when performing automatic " "reconciliation.", - help="""Leave zero to commit only at the end of the process.""" + help="Leave zero to commit only at the end of the process." ) @api.multi diff --git a/account_easy_reconcile/simple_reconciliation.py b/account_easy_reconcile/simple_reconciliation.py index b54ffd03..4b511f20 100644 --- a/account_easy_reconcile/simple_reconciliation.py +++ b/account_easy_reconcile/simple_reconciliation.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Copyright 2012-2013 Camptocamp SA (Guewen Baconnier) +# Copyright 2012-2013, 2015 Camptocamp SA (Guewen Baconnier, Damien Crier) # Copyright (C) 2010 Sébastien Beau -# Copyright 2015 Camptocamp SA (Damien Crier) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as