Skip to content

Commit

Permalink
[FIX] account_chart_update: Limit fiscal position search with same na…
Browse files Browse the repository at this point in the history
…me (OCA#651)
  • Loading branch information
MouTio authored and ernestotejeda committed Jan 8, 2020
1 parent c97708c commit bb5cae8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions account_chart_update/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Contributors
* Jairo Llopis <[email protected]>
* Jacques-Etienne Baudoux <[email protected]>
* Sylvain Van Hoof <[email protected]>
* Nacho Muñoz <[email protected]>

Maintainer
----------
Expand Down
3 changes: 2 additions & 1 deletion account_chart_update/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, "
Expand All @@ -21,6 +21,7 @@
'Jairo Llopis',
'Jacques-Etienne Baudoux',
'Sylvain Van Hoof'
'Nacho Muñoz',
],
'license': "AGPL-3",
"data": [
Expand Down
2 changes: 1 addition & 1 deletion account_chart_update/wizard/wizard_chart_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def find_fp_by_templates(self, templates):
"""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")
Expand Down

0 comments on commit bb5cae8

Please sign in to comment.