mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_chart_update: Limit fiscal position search with same name (#651)
This commit is contained in:
@@ -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
|
||||
----------
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user