~unifield-team/unifield-wm/us-671-homere

« back to all changes in this revision

Viewing changes to unifield_setup/installer/currency_setup.py

  • Committer: chloups208
  • Date: 2012-11-21 11:15:15 UTC
  • mto: This revision was merged to the branch mainline in revision 1340.
  • Revision ID: chloups208@chloups208-laptop-20121121111515-myqv282h6xmgh053
utp-171 modification of fields po, po line, product, so, so line

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from osv import fields
24
24
from tools.translate import _
25
25
 
26
 
import time
27
 
 
28
26
 
29
27
class currency_setup(osv.osv_memory):
30
28
    _name = 'currency.setup'
124
122
            self.pool.get('account.analytic.account').write(cr, uid, [analytic_id], {'currency_id': cur_id})
125
123
 
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})
133
129
 
134
130
        # account.model
135
131
        model_ids = self.pool.get('account.model').search(cr, uid, [('currency_id', '=', 1)])