2
0

[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 Luis J. Salvatierra
parent 9b51612116
commit 45e6abae56
3 changed files with 4 additions and 2 deletions

View File

@ -58,6 +58,7 @@ Contributors
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Jacques-Etienne Baudoux <je@bcim.be>
* Sylvain Van Hoof <sylvain@okia.be>
* Nacho Muñoz <nacmuro@gmail.com>
Maintainer
----------

View File

@ -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": [

View File

@ -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")