تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (BI)
    • المستندات
    • توقيع إلكتروني
    المبيعات
    • إدارة علاقات العملاء
    • المبيعات
    • نقطة البيع للمتاجر
    • نقطة البيع للمطاعم
    • الاشتراكات
    • تأجير
    المواقع الإلكترونية
    • أداة بناء المواقع الإلكترونية
    • متاجر إلكترونية
    • مدونة
    • المنتدى
    • دردشة مباشرة
    • التعليم الإلكتروني
    سلسلة التوريد
    • المستودعات
    • التصنيع
    • إدارة دورة حياة المنتج
    • المشتريات
    • الصيانة
    • الجودة
    الموارد البشرية
    • موظفون
    • التوظيف
    • إجازة عمل
    • التقييمات
    • الإحالات
    • تطبيق الأسطول
    التسويق
    • التسويق الإجتماعي
    • التسويق عبر البريد الإلكتروني
    • التسويق عبر الرسائل النصية
    • فعاليات
    • أتمتة التسويق
    • الاستطلاعات
    الخدمات
    • المشاريع
    • الجداول الزمنية
    • الخدمة الميدانية
    • مكتب المساعدة
    • التخطيط
    • مواعيد
    اﻹنتاجية
    • مناقشة
    • الموافقات
    • إنترنت الأشياء "IoT"
    • بروتوكول ربط المحادثات الصوتية عبر الإنترنت
    • المعرفة
    • WhatsApp
    التطبيقات الخارجية ستوديو أودو منصة أودو السحابية
  • قطاعات الأعمال
    البيع بالتجزئة
    • متجر كتب
    • متجر ملابس
    • متجر أثاث
    • متجر بقالة
    • متجر معدات
    • متجر ألعاب
    الطعام والضيافة
    • بار وحانة
    • المطعم
    • مطعم للوجبات السريعة
    • نزل للضيوف
    • موزّع مشروبات
    • فندق
    العقارات
    • وكالة عقارات
    • شركة هندسة معمارية
    • البناء
    • إدارة العقارات
    • العناية بالحدائق
    • اتحاد مُلاّك العقارات
    استشارة
    • مؤسسة محاسبية
    • شريك أودو
    • وكالة تسويقية
    • منشأة قانونية
    • استقطاب المواهب
    • التدقيق والتوثيق
    التصنيع
    • الأقمشة
    • معدني
    • الأثاث
    • الطعام
    • مصنع خمور
    • هدايا الشركات
    الصحة واللياقة البدنية
    • نادي رياضي
    • متجر نظارات
    • مركز لياقة بدنية
    • الممارسون الصحيون
    • صيدلية
    • صالون تصفيف الشعر
    التجارة
    • عامل صيانة
    • الأجهزة والمعدات التقنية ودعمها
    • أنظمة الطاقة الشمسية
    • صانع أحذية
    • خدمات التنظيف
    • خدمات التكييف (HVAC)
    غير ذلك
    • منظمة غير ربحية
    • وكالة بيئية
    • تأجير لوحات إعلانية
    • تصوير
    • تأجير دراجات
    • بائع وسيط للبرمجيات
    تصفح كافة قطاعات الأعمال
  • مجتمع أودو
    تعلم
    • دروس
    • التوثيق
    • شهادات
    • التدريب
    • مدونة
    • بودكاست
    قم بتعزيز التعليم
    • برنامج تعليم
    • Scale UP! لعبة الأعمال
    • قم بزيارة أودو
    احصل على البرنامج
    • تحميل
    • قارنْ الإصدارات
    • إطلاق
    تعاون
    • جيت هاب "Github"
    • المنتدى
    • فعاليات
    • الترجمات
    • كنْ شريكاً
    • خدمات الشركاء
    • سجل مكتب المحاسبة الخاص بك
    احصل على الخدمات
    • اعثر على شريك
    • اعثر على محاسب
    • قابل أحد مرشدي الأعمال
    • خدمات التنفيذ
    • مراجع العملاء
    • الدعم
    • الترقيات
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    الحصول على عرض توضيحي
  • الأسعار
  • المساعدة

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • إدارة علاقات العملاء
  • e-Commerce
  • المحاسبة
  • المخزون
  • PoS
  • المشروع
  • MRP
All apps
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
المساعدة

TypeError: argument of type 'bool' is not iterable in openerp

اشتراك

تسلم الإشعارات عندما يكون هناك نشاط في هذا المنشور

لقد تم الإبلاغ عن هذا السؤال
openerpfields_view_get
2 الردود
19575 أدوات العرض
الصورة الرمزية
Group ODOO

Here is the thing: I wanted to inherit the tree view(id is "view_employee_tree") of the moudle --hr: in the hr_contract module. Here is my code:

 <record id="hr_contract_hr_employee_tree" model="ir.ui.view">
                <field name="name">hr.contract.hr.employee.tree</field>
                <field name="model">hr.employee</field>
                <field name="inherit_id" ref="hr.view_employee_tree"/>
                <field name="arch" type="xml">
                    <field name="work_phone" position="after">
                        <field name="contract_ids"/>
                    </field>
                </field>
            </record>

After I update modules(hr,hr_contract),I get the error as follows:)

OpenERP Server Error Client Traceback (most recent call last): File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\http.py", line 204, in dispatch File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\controllers\main.py", line 1128, in call_kw File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\session.py", line 42, in proxy File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\session.py", line 30, in proxy_method File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\session.py", line 103, in send

Server Traceback (most recent call last): File "d:\Program Files\OpenERP 7.0-20130726-231403\Server\server\openerp\addons\web\session.py", line 89, in send File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\netsvc.py", line 292, in dispatch_rpc File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\osv\osv.py", line 188, in execute_kw File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\osv\osv.py", line 131, in wrapper File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\osv\osv.py", line 197, in execute File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\osv\osv.py", line 185, in execute_cr File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\osv\orm.py", line 2290, in fields_view_get File "D:\Program Files\OpenERP 7.0-20130726-231403\Server\server.\openerp\osv\orm.py", line 2270, in clean TypeError: argument of type 'bool' is not iterable

I have been tracking the bug for a whole day. i went to the file:\openerp\osv\orm.py,and get the codes near the line 2270:

            ir_values_obj = self.pool.get('ir.values')
            resprint = ir_values_obj.get(cr, user, 'action',
                    'client_print_multi', [(self._name, False)], False,
                    context)
            resaction = ir_values_obj.get(cr, user, 'action',
                    'client_action_multi', [(self._name, False)], False,
                    context)

            resrelate = ir_values_obj.get(cr, user, 'action',
                    'client_action_relate', [(self._name, False)], False,
                    context)

            #I added this for output
            for action in resaction:
                print 'orm debug : '
                print 'action[1]:',action[1]
                print 'action[2]',action[2]

            resaction = [clean(action) for action in resaction
                         if view_type == 'tree' or not action[2].get('multi')]
            resprint = [clean(print_) for print_ in resprint
                        if view_type == 'tree' or not print_[2].get('multi')]
            #When multi="True" set it will display only in More of the list view 
            resrelate = [clean(action) for action in resrelate
                         if (action[2].get('multi') and view_type == 'tree') or (not action[2].get('multi') and view_type == 'form')]

            for x in itertools.chain(resprint, resaction, resrelate):
                x['string'] = x['name']

And I added print code to output the var:resaction, and this is the output:

#output: orm_debug: Subordinate Hierarchy False

Excellent! It seems that the error:TypeError: argument of type 'bool' is not iterable makes sense. Subordinate Hierarchy is the name of an act_window in the file hr_view.xml:

<record id="action2" model="ir.actions.act_window">
        <field name="name">Subordinate Hierarchy</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">hr.employee</field>
        <field name="domain">[('id','in',active_ids)]</field>
        <field name="view_type">tree</field>
        <field name="view_id" ref="view_partner_tree2"/>
        <field name="view_id" ref="view_employee_tree"/>
</record>

But what is the real problem?? what did I do wrong ?

Any help is highly appreciated!! Thanks in advance!!

1
الصورة الرمزية
إهمال
الصورة الرمزية
Anil Kesariya
أفضل إجابة

Hello Letitgo,

What you exactly want ?

you want to add one2many field on of Contract object(hr.contract) to th Employee object (hr.employee) ?

for that you need to add this this code in your custom module.

Code in your py file....

class hr_employee(osv.osv)

    _inherit = 'hr.employee'
    _columns = { 
    'contract_ids' : fields.one2many('hr.contract', 'emp_id' string="Contracts")
   }

hr_employee()

class hr_contract(osv.osv)

    _inherit = 'hr.contract'

    _columns = { 
      'emp_id':fields.many2one('hr.employee', string="Employee"),
      }

hr_contract()

Now you can add your contracts in to employee objects. by using xpath.

This is the relationship fields scenario to add on object.

Check it will work.

Or else you need different thing tell me your exact requirement what you needed

Regards,

Anil Kesariya.

1
الصورة الرمزية
إهمال
الصورة الرمزية
Qutechs, Ahmed M.Elmubarak
أفضل إجابة

Hi,

you didn't want to go to the ORM, it is a python error, I thing you're trying to make a loop with not [iterable] variable , you can try this on your python

for i in True:
print 'hello'

you 'll get the same error msg ...

so you can check your .py file for something like this ...

Thanks..

0
الصورة الرمزية
إهمال
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
2 beginner questions about function(fields_view_get)
v7 openerp fields_view_get
الصورة الرمزية
الصورة الرمزية
1
مارس 15
8052
Create selection type field dynamically?
openerp
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
سبتمبر 23
8468
How to hide the create button dynamical tree view in openerp ? تم الحل
openerp
الصورة الرمزية
الصورة الرمزية
2
مارس 23
47713
ProgrammingError: can't adapt type 'dict' [SOLVED]
openerp
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
ديسمبر 23
58853
How to use the audit app
openerp
الصورة الرمزية
0
مارس 22
3025
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "Github"
  • المشغل الآلي رنبوت
  • الترجمات
خدماتنا
  • استضافة أودو إس إتش
  • الدعم
  • الترقية
  • التطويرات المخصصة
  • التعليم
  • اعثر على محاسب
  • اعثر على شريك
  • كنْ شريكاً
معلومات عنا
  • شركتنا
  • أصول العلامة التجارية
  • اتصلْ بنا
  • الوظائف
  • فعاليات
  • بودكاست
  • مدونة
  • عملاء
  • قانوني • الخصوصية
  • الحماية
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

أودو هو عبارة عن مجموعة من تطبيقات الأعمال مفتوحة المصدر التي تغطي جميع احتياجات شركتك، مثل: إدارة علاقات العملاء والتجارة الإلكترونية والمحاسبة والمخزون ونقاط البيع وإدارة المشاريع وما إلى ذلك.

ما يجعل من أودو مميزاً هو هدفه بأن يكون سهل الاستخدام للغاية ومتكاملاً تمامًا في الوقت ذاته.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now