[MERGE] base: remove remaining company assignments on currencies, courtesy of Stefan Rijnhart (Therp)

Fix of the testsuite (in openerp/addons/base/test/test_osv_expression.yml)
done on top of Stefan's original patch

bzr revid: odo@openerp.com-20130606101123-1lqm1qesg9jol8gi
This commit is contained in:
Olivier Dony
2013-06-06 12:11:23 +02:00
3 changed files with 5 additions and 7 deletions
-6
View File
@@ -49,8 +49,6 @@
<field name="symbol">€</field>
<field name="rounding">0.01</field>
<field name="accuracy">4</field>
<!-- Company ID will be set later -->
<field name="company_id" eval="None"/>
</record>
<record id="rateEUR" model="res.currency.rate">
<field name="rate">1.0</field>
@@ -86,10 +84,6 @@ Administrator</field>
<field name="company_id" ref="main_company"/>
</record>
<record id="EUR" model="res.currency">
<field name="company_id" ref="main_company"/>
</record>
<record id="ir_mail_server_localhost0" model="ir.mail_server">
<field name="name">localhost</field>
<field name="smtp_host">localhost</field>
-1
View File
@@ -466,7 +466,6 @@
<field name="rounding">0.01</field>
<field name="accuracy">4</field>
<field name="symbol">¢</field>
<field name="company_id" ref="main_company"/>
</record>
<record id="rateCRC" model="res.currency.rate">
<field name="rate">691.3153</field>
@@ -375,6 +375,11 @@
currency_ids3 = self.pool.get('res.currency').search(cr, uid, [('id', 'not in', [])])
assert currency_ids1 == currency_ids2 == currency_ids3, 'All 3 results should have be the same: all currencies'
default_company = self.browse(cr, uid, 1)
# Due to currency data definition change (in relation with bug 1111298), this test now needs
# a manual setup where all currencies are assigned to the default company.
self.pool['res.currency'].write(cr, uid, currency_ids1, {'company_id': default_company.id})
# one2many towards same model
res_1 = self.search(cr, uid, [('child_ids', 'in', [x.id for x in company.child_ids])]) # any company having a child of company3 as child
res_2 = self.search(cr, uid, [('child_ids', 'in', [company.child_ids[0].id])]) # any company having the first child of company3 as child