Odoo Help

0

calendar view with one2many fields ?

By
tarek
on 4/9/16, 11:00 AM 500 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 

0
ELIASS BENFATEH
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.

0
tarek
On 4/10/16, 4:32 AM

thank you for help 


0

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
3108
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


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

Hi,

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.

Register

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)

Stats

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