Odoo Help


calendar view with one2many fields ?

on 4/9/16, 11:00 AM 955 views

i want to make calendar view for planning of employee 

inherit = 'hr.employee'

_columns = {

'planing_line': fields.one2many('asc.rental.contract','rental_employ_id','planning driver'),

'is_driver': fields.boolean(' is driver'),


model  (asc.rental.contract) contain start_date and  end_date

how i can make calendar view for many period 

On 4/11/16, 6:21 AM

You can't: the Calendar view supports only one date field. For the effect you want you need four event records.

I suggest this design:

  • add to proevents.events a child model (one-to-many relation), proevents.events.date, to store the date records you need, and expected to have four rows.
  • have the calendar view use proevents.events.date.

Depending on your specific use case, you might need to add some logic to ensure that the four date lines are added for each event.

Note: your model should be named in singular and with the underlying main module as the first word: event.provevent.

On 4/10/16, 4:32 AM

thank you for help 

--Ahmed M.Elmubarak--

Ahmed M.Elmubarak
On 4/10/16, 1:18 AM


You can make the calendar in the asc.rental.contract and make the color in the employee_id field ..

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/9/16, 11:00 AM
Seen: 955 times
Last updated: 4/11/16, 6:21 AM