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

Change default value in a field

By
Davide
on 6/26/14, 12:29 PM 599 views

How can I change default time (now it is from 8AM to 9AM) withint the leave request menu?

0
Davide
On 6/26/14, 1:07 PM

file location:

/usr/share/pyshared/openerp/addons/web_calendar/static/src/js/calendar.js

Code:

slow_create: function(event_id, event_obj) { var self = this; if (this.current_mode() === 'month') { event_obj['start_date'].addHours(8); if (event_obj._length === 1) { event_obj['end_date'] = new Date(event_obj['start_date']); event_obj['end_date'].addHours(1); } else { event_obj['end_date'].addHours(-4); } } [....]

 

I change:

event_obj['start_date'].addHours(8)

With:

event_obj['start_date'].addHours(7)

 

Now the default value is 7AM

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/26/14, 12:29 PM
Seen: 599 times
Last updated: 3/16/15, 8:10 AM