콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
6 답글
20151 화면

When you load the calendar (meetings) in odoo, the month view shows up by default.

How can I show the week or day view by default?

Is there any related configuration option or a custom module is needed?

아바타
취소
베스트 답변

(I know it's been too late but this could help someone)

You can use mode attribute of the calendar tag.

e.g. 

<calendar string="Invoices" color="journal_id" date_start="date_invoice" mode="week">

Best regards,

아바타
취소

Thank you, another reason why odoo documentation is lacking...

베스트 답변

Hello,

in my mind this configuration will require development.

Regards.

아바타
취소
베스트 답변

Hello George!

I do it that editting the file web_calendar.js in addons/web_calendar/statics/src/js/web_calendar.js in line 257 I modifyed this

defaultView: (this.mode == "month")?"month":
(this.mode == "week"?"agendaWeek":
(this.mode == "day"?"agendaDay":"month")),
defaultView: (this.mode == "month")?"month":
(this.mode == "week"?"agendaWeek":
(this.mode == "day"?"agendaDay":"agendaWeek")),

Setting the default value to "agendaWeek" and its working properly!

아바타
취소
베스트 답변

Show a by default week in calendar view use mode="week" attribute in calendar tag.


<calendar string="Calendar" date_start="date_start" date_stop="date_stop" color="user_id" avatar_model="res.users" display="[name]" mode="week">
    <field name="user_id" />
</calendar>
아바타
취소
베스트 답변

Hello, This will help you it is work for me.

CalendarView.include({
    get_fc_init_options: function () {
        var result = this._super();
        result.defaultView = 'month';
        return result
    },
});
아바타
취소
관련 게시물 답글 화면 활동
1
7월 25
625
2
6월 25
1019
1
5월 25
2554
1
4월 25
3730
3
8월 24
2787