Sigma Octantis
Sigma Octantis

Reputation: 942

Odoo 8 - Calendar View Error

Get an error: Odoo Warning - Insufficient fields for Calendar View! and the calendar, of course,never shows up.

I'm missing something but don't know what;

I have this view fragment:

<record model="ir.actions.act_window" id="action_soft_apps_event">
    <field name="name">Applications</field> 
    <field name="res_model">soft.app</field>      
    <field name="view_type">form</field>      
    <field name="view_mode">tree,form,calendar,graph</field>      
    <field name="arch" type="xml">       
        <calendar string="App Releases" color="dev_id" date_start="release" date_delay="1">            
            <field name="name"/>            
            <field name="desc"/>            
            <field name="downloads"/>            
            <field name="valid"/>        
        </calendar>      
    </field>      
    <field name="help" type="html">          
        <p class="oe_view_nocontent_create">Register a new App</p>      
    </field>    
</record>

And the model is the following:

class soft_app(osv.osv):
    """Apps"""
    _name = 'soft.app'
    _columns = {
        'name': fields.char('Name', size=32, required=True, help='This is the name of the application'),
        'desc': fields.text('Description', help='A brief description of the application'),
        'dev_id': fields.many2one('soft.dev','Developer',required=True, help='The app\'s developer'),
        'release': fields.datetime('Release Date', help='The date that the app was released'),
        'downloads': fields.integer('Download Count', help='Total amount of downloads'),
        'user_ids': fields.many2many('soft.user','soft_user_app_rel','app_id','user_id','Users Downloaded', help='Users that have downloaded the app'),
        'os_ids': fields.many2many('soft.os','soft_os_app_rel','app_id','os_id','Operating Systems', help='Operating systems survey data'),
        'valid': fields.boolean('Is Valid', help='Checks if the app is validated')
    }
soft_app()

Upvotes: 1

Views: 1755

Answers (1)

KbiR
KbiR

Reputation: 4174

I think you have to create separate calendar view and action

Like: Calendar view

    <record id="view_invoice_line_calendar" model="ir.ui.view">
        <field name="name">account.invoice.calendar</field>
        <field name="model">account.invoice</field>
        <field name="arch" type="xml">
            <calendar string="Invoices" color="journal_id" date_start="date_invoice">
                <field name="partner_id"/>
                <field name="amount_total"/>
            </calendar>
        </field>
    </record>

Action

    <record id="action_invoice_tree" model="ir.actions.act_window">
        <field name="name">Invoices</field>
        <field name="res_model">account.invoice</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,calendar,graph</field>
        <field name="view_id" ref="invoice_tree"/>
        <field name="context">{'type':'out_invoice'}</field>
        <field name="search_view_id" ref="view_account_invoice_filter"/>
    </record>

Upvotes: 1

Related Questions