On Friday, June 9, 2017 at 7:41:09 PM UTC+9, Sergi Almacellas Abellana 
wrote:
>
> El 09/06/17 a les 12:37, Dr. Praveen Bhatia ha escrit: 
> > 
> > 
> > On Friday, June 9, 2017 at 6:58:15 PM UTC+9, Sergi Almacellas Abellana 
> > wrote: 
> > 
> >     El 09/06/17 a les 11:43, Dr. Praveen Bhatia ha escrit: 
> >      > 
> >      > This is the code that I wrote: 
> >      > import os 
> >      > os.environ['DB_NAME']='mydb' 
> >      > 
> >      > from trytond.tests.test_tryton import db_exist, 
> >      > drop_create,create_db,drop_db 
> > 
> >     The problem is here. As you are using the tests functions, the 
> country 
> >     data is not loaded as it's skiped for tests. 
> > 
> > 
> > Yes, country is not getting loaded. What should I call to load the 
> > countries? 
> You should not import the test_tryton as it marks the Pool as testing [1] 
> which causes the skiptest [2] of country module to no import the country 
> data. 
>
> Updating the module on the database from the client will fix the issue. 
>
> [1] 
>
> http://hg.tryton.org/trytond/file/ecc6a9a0b7c1/trytond/tests/test_tryton.py#l38
>  
> [2] http://hg.tryton.org/modules/country/file/b5d61c215d91/data.xml#l3 
>
>
>
Great! That explains the mystery. Removing the Pool.test mode, solved the 
problem. Countries appear now !
 

> -- 
> Sergi Almacellas Abellana 
> www.koolpi.com 
> Twitter: @pokoli_srk 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/cad630c5-ab49-4ffc-98a1-4bad463edbbb%40googlegroups.com.

Reply via email to