From 45e6abae56118b0a1abaaeeb52740838b14e2ea0 Mon Sep 17 00:00:00 2001 From: moutio Date: Tue, 18 Sep 2018 12:44:38 +0200 Subject: [PATCH] [FIX] account_chart_update: Limit fiscal position search with same name (#651) --- account_chart_update/README.rst | 1 + account_chart_update/__manifest__.py | 3 ++- account_chart_update/wizard/wizard_chart_update.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/account_chart_update/README.rst b/account_chart_update/README.rst index 2407f0e1..a1d133ab 100644 --- a/account_chart_update/README.rst +++ b/account_chart_update/README.rst @@ -58,6 +58,7 @@ Contributors * Jairo Llopis * Jacques-Etienne Baudoux * Sylvain Van Hoof +* Nacho Muñoz Maintainer ---------- diff --git a/account_chart_update/__manifest__.py b/account_chart_update/__manifest__.py index 4d49e4c0..35282b52 100644 --- a/account_chart_update/__manifest__.py +++ b/account_chart_update/__manifest__.py @@ -8,7 +8,7 @@ { 'name': "Detect changes and update the Account Chart from a template", "summary": "Wizard to update a company's account chart from a template", - 'version': "10.0.1.0.1", + 'version': "10.0.1.0.2", 'author': "Tecnativa, " "BCIM, " "Okia, " @@ -21,6 +21,7 @@ 'Jairo Llopis', 'Jacques-Etienne Baudoux', 'Sylvain Van Hoof' + 'Nacho Muñoz', ], 'license': "AGPL-3", "data": [ diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 4c7b1896..36a8f5a8 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -284,7 +284,7 @@ class WizardUpdateChartsAccounts(models.TransientModel): """Find a real fiscal position from a template.""" return self.env['account.fiscal.position'].search( [('name', 'in', templates.mapped("name")), - ('company_id', '=', self.company_id.id)]) + ('company_id', '=', self.company_id.id)], limit=1) @api.multi @tools.ormcache("templates", "current_fp_accounts")