[FIX] account_budget: do not rely on account type name to make tests

This commit is contained in:
qdp-odoo
2015-07-14 23:55:06 +02:00
parent 0c473de10c
commit 3e39aa1066
@@ -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',