124
122
self.pool.get('account.analytic.account').write(cr, uid, [analytic_id], {'currency_id': cur_id})
126
124
# product.product
127
# UF-1766 : Pass out the OpenObject framework to gain time on currency change with a big amount of products
128
cr.execute('UPDATE product_product SET currency_id = %s, field_currency_id = %s', (cur_id, cur_id))
129
# product_ids = self.pool.get('product.product').search(cr, uid, [('currency_id', '=', 1)])
130
# product2_ids = self.pool.get('product.product').search(cr, uid, [('field_currency_id', '=', 1)])
131
# self.pool.get('product.product').write(cr, uid, product_ids, {'currency_id': cur_id})
132
# self.pool.get('product.product').write(cr, uid, product2_ids, {'field_currency_id': cur_id})
125
product_ids = self.pool.get('product.product').search(cr, uid, [('currency_id', '=', 1)])
126
product2_ids = self.pool.get('product.product').search(cr, uid, [('field_currency_id', '=', 1)])
127
self.pool.get('product.product').write(cr, uid, product_ids, {'currency_id': cur_id})
128
self.pool.get('product.product').write(cr, uid, product2_ids, {'field_currency_id': cur_id})
135
131
model_ids = self.pool.get('account.model').search(cr, uid, [('currency_id', '=', 1)])