Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ | |
|
||
from . import account_invoice | ||
from . import account_journal | ||
from . import account_bank_statement |
54 changes: 54 additions & 0 deletions
54
l10n_es_account_invoice_sequence/models/account_bank_statement.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Copyright (c) 2011 NaN Projectes de Programari Lliure, S.L. | ||
# http://www.NaN-tic.com | ||
# Copyright (c) 2013 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) | ||
# Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com> | ||
# Copyright (c) 2014 Domatix (http://www.domatix.com) | ||
# Angel Moya <angel.moya@domatix.com> | ||
# Copyright (c) 2014 Eduardo Calleja <e.calleja.garcia@gmail.com> | ||
# | ||
# 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 <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from openerp.osv import osv | ||
import logging | ||
_logger = logging.getLogger("Starlab:Custom") | ||
|
||
|
||
class account_bank_statement(osv.osv): | ||
_inherit = 'account.bank.statement' | ||
|
||
def _prepare_move(self, cr, uid, st_line, st_line_number, context=None): | ||
"""Prepare the dict of values to create the move from a | ||
statement line. This method overrides the generic method on | ||
account bank statement module in order to adapt it to l10n_es. | ||
:param browse_record st_line: account.bank.statement.line record to | ||
create the move from. | ||
:param char st_line_number: will be used as the name of the | ||
generated account move | ||
:return: dict of value to create() the account.move | ||
""" | ||
re = super(account_bank_statement, self)._prepare_move(cr, uid, | ||
st_line, | ||
st_line_number, | ||
context) | ||
|
||
# Retrieving spanish journal sequence | ||
re['name'] = st_line.journal_id.sequence_id.id | ||
|
||
return re |