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

TypeError: Invalid attribute dictionary: str

اشتراك

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

لقد تم الإبلاغ عن هذا السؤال
_inherits
3 الردود
7929 أدوات العرض
الصورة الرمزية
oumaima

Hi everyone,i try to update the module calendar.event and to link it with another class but when i try to open the calendar view relating to emploi.temps i have this error : TypeError: Invalid attribute dictionary: str and when i try to add a new meeting in the class professeur.entity i have a disorganized calendar view??any idea please

emploi.py

class professeur_entity(osv.osv):

_name = 'professeur.entity'
_columns = {
    'name': fields.char('Nom', required=True, size=32),
    'prenom': fields.char('Prenom', required=True, size=32),
    'emp_ids': fields.one2many('emploi.temps','professeur_id', 'Emploi'),
}

professeur_entity()

class emploi_temps(osv.osv):

_name = 'emploi.temps'
_inherit = 'calendar.event'
_columns = {
  'professeur_id': fields.many2one('professeur.entity','Professeur', required=True),
}

emploi_temps()

emploi_view.xml

enter code here<?xml version="1.0" encoding="utf-8"?>

<openerp> <data>

<!-- <menuitem name="Gestion Emploi" id="menu_principal"/>-->


<!--  ce menu est celui existant dans la barre en haut -->
<menuitem name="Gestion professeur" id="menu_prof"/>

<menuitem name="Enseignant" id="menu_prof1" parent="menu_prof"/>

<record model="ir.ui.view" id="view_school_prof_form">
    <field name="name">prof.form</field>
    <field name="model">professeur.entity</field>
    <field name="type">form</field>
    <field name="arch" type="xml">
       <form string="Enseignant"  version="7.0">
           <group col="4" colspan="6">       
               <field name="name"/>
               <field name="prenom"/>
               <field name="emp_ids" colspan="4" nolabel="1" />
            </group>

       </form>
    </field>
</record>   

    <record model="ir.ui.view" id="view_school_prof_tree">
    <field name="name">prof.tree</field>
    <field name="model">professeur.entity</field>
    <field name="type">tree</field>
    <field name="arch" type="xml">
        <tree string="Enseignants"  version="7.0">
               <field name="name"/>
               <field name="prenom"/>

       </tree>
    </field>
</record>

<record model="ir.actions.act_window" id="action_school_prof_form">
    <field name="name">Liste des enseignants</field>
    <field name="res_model">professeur.entity</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,form</field>
</record>

    <!--  Et finalement il y a le menu qui contient l'action pour ouvrir la vue tree de ton module -->

<menuitem action="action_school_prof_form" id="menu_prof2" parent="menu_prof1" />

<menuitem name="Emploi" parent="menu_prof" id="menu"/>

 <record model="ir.ui.view" id="event_form_view_inherit">
        <field name="name">emploi.temps.form</field>
        <field name="model">emploi.temps</field>
        <field name="inherit_id" ref="base_calendar.event_form_view"/>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <field name="name" position="after">
      <field name="professeur_id" />

    </field>
        <field name="state" position="replace"/>
        </field>
    </record>


 <record model="ir.ui.view" id="event_tree_view_inherit">
        <field name="name">emploi.temps.tree</field>
        <field name="model">emploi.temps</field>
        <field name="inherit_id" ref="base_calendar.event_tree_view"/>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <field name="name" position="after">
      <field name="professeur_id" />
    </field>
        <field name="state" position="replace"/>
        </field>
    </record>


 <record model="ir.ui.view" id="event_calendar_view_inherit">
        <field name="name">emploi.temps.calendar</field>
        <field name="model">emploi.temps</field>
        <field name="inherit_id" ref="base_calendar.event_calendar_view"/>
        <field name="type">calendar</field>
        <field name="arch" type="xml">
          <calendar string="Events" date_start="date" color="show_as" date_delay="duration">
                <field name="name"/>
                <field name="class"/>
                <field name="show_as"/>
            </calendar>
        </field>
    </record>




     <record model="ir.actions.act_window" id="action_school_emploi_form">
    <field name="name">Emploi du temps</field>
    <field name="res_model">emploi.temps</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,form,calendar</field>
</record>

<menuitem name="Gestion d'emploi du temps" action="action_school_emploi_form" id="emploi" parent="menu" />

</data> </openerp>

#Traceback

OpenERP Server Error Client Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\http.py", line 203, in dispatch
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\controllers\main.py", line 1129, in call_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\controllers\main.py", line 1121, in _call_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 43, in proxy
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 31, in proxy_method
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 104, in send

Server Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 90, in send
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\netsvc.py", line 293, in dispatch_rpc
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\service\web_services.py", line 626, in dispatch
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 188, in execute_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 131, in wrapper
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 197, in execute
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 185, in execute_cr
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\orm.py", line 2244, in fields_view_get
  File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\orm.py", line 2010, in _get_default_calendar_view
  File "lxml.etree.pyx", line 2443, in lxml.etree.SubElement (src/lxml/lxml.etree.c:47341)
  File "apihelpers.pxi", line 204, in lxml.etree._makeSubElement (src/lxml/lxml.etree.c:11274)
  File "apihelpers.pxi", line 265, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:11823)
  TypeError: Invalid attribute dictionary: str
0
الصورة الرمزية
إهمال
patrick

Can you give us the stacktrace, or the relevant lines from openerp-server.log? That will definitely help finding the error.

oumaima
الكاتب

Hi thank you for youre reply i made the whole error
below

patrick

added the error to your question.

oumaima
الكاتب

Hi,i added the whole error to my question;any idea please??

الصورة الرمزية
oumaima
الكاتب أفضل إجابة

Hi everyone, finally it work's;i'll share the right code;

from osv import fields,osv

import time from datetime import datetime from tools.translate import _

class professeur_entity(osv.osv):

_name = 'professeur.entity'
_inherit=['crm.meeting','calendar.event']
_columns = {
    'name': fields.char('Nom', required=True, size=32),
    'prenom': fields.char('Prenom', required=True, size=32),
    'emp_ids':fields.many2one('crm.meeting','Emploi', required=True),
}

professeur_entity()

enter code here<openerp>

<data>

<menuitem name="Gestion professeur" id="menu_prof"/>

<menuitem name="Enseignant" id="menu_prof1" parent="menu_prof"/>

<record model="ir.ui.view" id="view_school_prof_form"> <field name="name">prof.form</field> <field name="model">professeur.entity</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Enseignant" version="7.0"> <group col="4" colspan="6">
<field name="name"/> <field name="prenom"/> <field name="emp_ids" context="{'form_view_ref':'base_calendar.view_crm_meeting_calendar'}"/> </group>

   </form>
</field>

</record>

<record model="ir.ui.view" id="view_school_prof_tree">
<field name="name">prof.tree</field>
<field name="model">professeur.entity</field>
<field name="type">tree</field>
<field name="arch" type="xml">
    <tree string="Enseignants"  version="7.0">
           <field name="name"/>
           <field name="prenom"/>

   </tree>
</field>

</record>

<record model="ir.actions.act_window" id="action_school_prof_form"> <field name="name">Liste des enseignants</field> <field name="res_model">professeur.entity</field> <field name="view_type">form</field>
<field name="view_id" ref="base_calendar.view_crm_meeting_calendar"/> <field name="view_mode">tree,form,calendar</field> </record>

<!--  Et finalement il y a le menu qui contient l'action pour ouvrir la vue tree de ton module -->

<menuitem action="action_school_prof_form" id="menu_prof2" parent="menu_prof1"/>

0
الصورة الرمزية
إهمال
الصورة الرمزية
oumaima
الكاتب أفضل إجابة

Hi,thank you for you're reply: the whole error is: OpenERP Server Error Client Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\http.py", line 203, in dispatch File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\controllers\main.py", line 1129, in call_kw File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\controllers\main.py", line 1121, in _call_kw File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 43, in proxy File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 31, in proxy_method File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 104, in send

Server Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server\openerp\addons\web\session.py", line 90, in send File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\netsvc.py", line 293, in dispatch_rpc File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 188, in execute_kw File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 131, in wrapper File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 197, in execute File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\osv.py", line 185, in execute_cr File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\orm.py", line 2244, in fields_view_get File "C:\Program Files (x86)\OpenERP 7.0-20130409-232349\Server\server.\openerp\osv\orm.py", line 2010, in _get_default_calendar_view File "lxml.etree.pyx", line 2443, in lxml.etree.SubElement (src/lxml/lxml.etree.c:47341) File "apihelpers.pxi", line 204, in lxml.etree._makeSubElement (src/lxml/lxml.etree.c:11274) File "apihelpers.pxi", line 265, in lxml.etree._initNodeAttributes (src/lxml/lxml.etree.c:11823) TypeError: Invalid attribute dictionary: str

0
الصورة الرمزية
إهمال
الصورة الرمزية
Ranjith Kurungadam
أفضل إجابة

Hi, Im new here. Just try removing the inherited calender view if you don't want to modify it. If you want to add your fields to calender do it just as you did it for tree and form.

Check "_name" of you class. Its inheriting by prototype. There are bug reports on that.

Hope this helps

0
الصورة الرمزية
إهمال
oumaima
الكاتب

Hi thank u for ure answer,i try it but i still have the same error any other idea please

Ranjith Kurungadam

If you are trying to add the field to calender.event you have to give ' _name=calender.event '

Ranjith Kurungadam

Or else add _table=calender_event for emploi.temp.

Ranjith Kurungadam

https://doc.openerp.com/trunk/server/03_module_dev_02/#object-inheritance-inherit

Ranjith Kurungadam

Check the links to find the ways in which you can inherit

oumaima
الكاتب

thank you a lot for your replay,i will see it.Now i can show the calendar event view;the problem is that i inherited the bad view i had to inherit for crm.meeting view;i update my question

هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

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

تسجيل
المنشورات ذات الصلة الردود أدوات العرض النشاط
unable to add column in res.users table تم الحل
_inherits
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
17
ديسمبر 21
26699
how to change default digits of precision?
_inherits
الصورة الرمزية
الصورة الرمزية
1
ديسمبر 18
21226
Reg - _inherits OpenERP
_inherits
الصورة الرمزية
الصورة الرمزية
1
يوليو 15
8231
aading a new menuitem in fleet module
_inherits
الصورة الرمزية
الصورة الرمزية
2
مارس 15
6604
TypeError: The model "fleet.vehicle" specifies an unexisting parent class "fleet.vehicle"
_inherits
الصورة الرمزية
الصورة الرمزية
الصورة الرمزية
2
مارس 15
10124
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "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 Svenska ภาษาไทย 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