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

How to use calendarview ?

By
Trai Doan
on 12/5/14, 12:44 AM 305 views

class lich(osv.osv):
    _name = "tt_lich" 
    _columns = {
        'name': fields.char('Mã lịch trình',size=20,required=True),
       'date_start':fields.date('Ngày bắt đầu'),
       'date_stop':fields.date('Ngày kết thúc'),
    }
lich()

<record id="lichcalendar" model="ir.ui.view">
            <field name="name">Lịch sản xuất</field>
            <field name="model">tt_lich</field>
            <field name="arch" type="xml">
                    <calendar date_start="date_start" date_stop="date_stop">
                        <group col="2">
                            <field name="name"/>
                        </group>
                    </calendar>
             </field>
        </record>
        <record id="action_lich" model="ir.actions.act_window">
            <field name="name">Lịch sản xuất</field>
            <field name="res_model">tt_lich</field>
            <field name="view_mode">tree,form,calendar</field>
        </record>

I try to create some calendar view but when when i put start date and stop date in form view then i move to calendar view and it show this error "Uncaught TypeError: Cannot read property '0' of undefined" .Please help me to solve it .Thanks

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: 12/5/14, 12:44 AM
Seen: 305 times
Last updated: 3/16/15, 8:10 AM