mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
Only set account_id if not set by parser
This commit is contained in:
@@ -39,6 +39,7 @@ Contributors
|
||||
------------
|
||||
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>
|
||||
* Matthieu Dietrich <matthieu.dietrich@gmail.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user