[FIX] account_budget: do not rely on account type name to make tests
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user