From 3e39aa1066bb8588bcd17660d5336078b06ae6b4 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Tue, 14 Jul 2015 23:55:06 +0200 Subject: [PATCH] [FIX] account_budget: do not rely on account type name to make tests --- addons/account_budget/account_budget_demo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_budget/account_budget_demo.yml b/addons/account_budget/account_budget_demo.yml index fdad32352db..1aab9443b45 100644 --- a/addons/account_budget/account_budget_demo.yml +++ b/addons/account_budget/account_budget_demo.yml @@ -1,7 +1,8 @@ - !python {model: ir.model.data} : | import time - account_ids = self.pool.get('account.account').search(cr, uid, [('user_type_id.name', '=', 'Revenue'), ('tag_ids.name', 'in', ['Operating Activities'])]) + xml_id = self.pool.get('ir.model.data').xmlid_to_res_id(cr, uid, 'account.data_account_type_revenue') + account_ids = self.pool.get('account.account').search(cr, uid, [('user_type_id', '=', xml_id), ('tag_ids.name', 'in', ['Operating Activities'])]) if account_ids: vals = { 'name': 'Sales',