Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
6 ตอบกลับ
20043 มุมมอง

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
    },
});
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 25
491
Internal Team Grouping for Calendar แก้ไขแล้ว
2
มิ.ย. 25
887
1
พ.ค. 25
2462
1
เม.ย. 25
3592
3
ส.ค. 24
2683