Only set account_id if not set by parser

This commit is contained in:
Matthieu Dietrich
2016-07-04 11:30:29 +02:00
parent 8a394445fd
commit cace39fc18
9 changed files with 13 additions and 4 deletions

View File

@@ -39,6 +39,7 @@ Contributors
------------
* Laurent Mignon <laurent.mignon@acsone.eu>
* Matthieu Dietrich <matthieu.dietrich@gmail.com>
Maintainer
----------

View File

@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from . import models

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{
'name': "Journal Entry completion from bank account number",

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from . import account_move
from . import res_partner_bank

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from openerp import _, fields, models
from openerp.addons.account_move_base_import.models.account_move \

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from openerp import api, models

View File

@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from . import test_bankaccount_completion

View File

@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2013 ACSONE SA/NV
# © 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from openerp.tests import common
from openerp import fields, tools

View File

@@ -29,8 +29,8 @@ class AccountJournal(models.Model):
string='Type of import',
default='generic_csvxls_so',
required=True,
help="Choose here the method by which you want to import bank "
"statement for this profile.")
help="Choose here the method by which you want to import account "
"moves for this journal.")
last_import_date = fields.Datetime(
string="Last Import Date")
@@ -59,7 +59,7 @@ class AccountJournal(models.Model):
launch_import_completion = fields.Boolean(
string="Launch completion after import",
help="Tic that box to automatically launch the completion "
"on each imported file using this profile.")
"on each imported file using this journal.")
def _get_rules(self):
# We need to respect the sequence order
@@ -190,7 +190,8 @@ class AccountJournal(models.Model):
values['company_currency_id'] = self.company_id.currency_id.id
values['journal_id'] = self.id
values['move_id'] = move.id
values['account_id'] = self.receivable_account_id.id
if not values.get('account_id', False):
values['account_id'] = self.receivable_account_id.id
values = move_line_obj._add_missing_default_values(values)
return values