Quantcast
Viewing all articles
Browse latest Browse all 224

How to inherit calendar.event with a different name?

Hi, I was trying to do a new object similar to calendar.event but keeping the original. I try like this in mymodule/mymodule.py: class radar_eventos(osv.osv): """ Model for Events """ _name = 'radar.eventos' _description = "Events" _inherit = "calendar.event" _columns = { 'eventotipo_ids': fields.many2many('radar.eventos.tipo', 'radar_tipo_eventos_rel', 'evento_id','tipo_id','Tipo de Evento'), } radar_eventos() In mymodule/mymodule_view.xml: Eventos Formradar.eventosEventos Treeradar.eventosEventos Calendarradar.eventosEventos Searchradar.eventosEventosir.actions.act_windowradar.eventosformcalendar,tree,formcalendartreeform With this code I don't have erros but the view is disorganized, like if I didn't have defined a view. But if I change the name of the model to "calendar.event" everything works fine.... I really want to keep the original and create my calendar based on the calendar of openerp, someone knows what I'm doing wrong ? Thanks UPDATE: With this last code the view it's ok when I go through the menu, but when I use the field in a relation view (in a view of an object that it is related to my new object radar.eventos) the view of radar.eventos is like it doesn't have any view defined. Do I forget some action view ? Thanks

Viewing all articles
Browse latest Browse all 224

Trending Articles