Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

disorganized view from an the module calendar.event

By
oumaima
on 6/5/13, 2:59 PM 821 views

Hi everyone, I'm trying to have the calendar.event view in a new module test that i created;the problem when i clik to add a new event i have a bad disorganized view from the calendar.event

my file.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 du temps',help="emploi du temps"),
    'emp_ids':fields.many2one('emploi.temps','Emploi', required=True),
}

professeur_entity()

class emploi_temps(osv.osv):

_name = 'emploi.temps'
_inherit = 'calendar.event'
_columns = {

}

emploi_temps()

my file.xml 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,calendar</field> </record>

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

You have to change the form view of 'calendar.event' module. Code is written in base_calendar_view.xml

Hiral Patel (hip)
on 6/6/13, 9:10 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/5/13, 2:59 PM
Seen: 821 times
Last updated: 3/16/15, 8:10 AM