تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3910 أدوات العرض

The goal of the code is whenever a new thread is started, to create new records for a given Model type.

How do I complete the following code:

with Environment.manage() :
    with openerp.registry("mydb").cursor() as new_cr:
       new_env = Environment(new_cr, Environment.uid, None) # How properly to set the parameters?
  1. This has to be in a function named get_env_instance, which returns Environment instance.

  2. Can I access a list of active databases or something like that, to avoid hardcoding the db name ?

 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
ديسمبر 20
3577
2
أغسطس 25
2446
2
يونيو 25
828
3
يونيو 24
3619
1
مارس 23
4000