[FIX] account_chart_update: Limit fiscal position search with same name (#651)

This commit is contained in:
moutio
2018-09-18 12:44:38 +02:00
committed by Pedro M. Baeza
parent d4514d2f66
commit 83447d36a4
3 changed files with 4 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ Contributors
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Jacques-Etienne Baudoux <je@bcim.be>
* Nacho Muñoz <nacmuro@gmail.com>
Maintainer
----------

View File

@@ -7,7 +7,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': "9.0.1.0.0",
'version': "9.0.1.0.1",
'author': "Tecnativa, "
"BCIM,"
"Odoo Community Association (OCA)",
@@ -18,6 +18,7 @@
'Pedro M. Baeza',
'Jairo Llopis',
'Jacques-Etienne Baudoux',
'Nacho Muñoz',
],
'license': "AGPL-3",
"data": [

View File

@@ -303,7 +303,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")