Odoo Help


Uncaught TypeError: object is not a function

aci aisha
on 2/4/15, 12:55 AM 4,057 views

Uncaught TypeError: object is not a function



Hello aci aisha, can you explain more details ?

Ankit H Gandhi(AHG)
on 2/4/15, 1:18 AM

Provide more details.

Emipro Technologies Pvt. Ltd.
on 2/4/15, 1:20 AM

I created a custom module for project... Add a menu password & create view for password.. when i click on password this error occured?

aci aisha
on 2/4/15, 1:56 AM
aci aisha
On 2/4/15, 1:58 AM

This is my .py file...

from openerp.osv import fields, osv
#from datetime import datetime
#from gdata.data import Visibility
#from docutils.nodes import Invisible

class project_password(osv.osv):
    _name = 'project.password'
    _inherit = ['project.project','res.partner','res.users']
    _description = 'Password'
    _columns = {
        'name': fields.many2one('res.partner','Customer Name', domain=[('customer', '=', True)], required=True),
        'password1': fields.char('Password 1', required=True),
        'password2': fields.char('Password 2'),
        'password3': fields.char('Password 3'),
        'viewed_by1': fields.many2many('res.users','name'),
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:


& this is my .xml file,

<?xml version="1.0" encoding="utf-8"?>

        <menuitem id="menu_project_password_sub" name="Password" parent="base.menu_main_pm"/>
         <record id="view_password" model="ir.ui.view">
            <field name="name">project.password.tree</field>
            <field name="model">project.password</field>
            <field name="arch" type="xml">
                <tree string="Password">
                      <field name="name"/>
                      <field name="password1"/>
                      <field name="password2"/>
                      <field name="password3"/>  
        <record id="view_password" model="ir.ui.view">
            <field name="name">project.password.form</field>
            <field name="model">project.password</field>
            <field name="arch" type="xml">
                <form string="Password">
                      <field name="name"/> 
                      <field name="password1"/>
                      <field name="password2"/>
                      <field name="password3"/>                
              <page string="Viewers">
                  <kanban quick_create="false" create="true" delete="true">
                                        <t t-name="kanban-box">
                                            <div style="position: relative">
                                                <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
                                                <div class="oe_module_vignette">
                                                    <img t-att-src="kanban_image('res.users', 'image_small', record.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>
                                                    <div class="oe_module_desc">
                                                        <field name="viewed_by1">
                                                           <field name="name"/>

        <record id="project_password_action" model="ir.actions.act_window">
            <field name="name">Password</field>
            <field name="res_model">project.password</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>           
        <menuitem action="project_password_action" id="menu_passwords" name="Password" parent="menu_project_password_sub"/>

You have given the same record id for both tree and form views. Any problem with that?

Akhil P Sivan
on 2/4/15, 2:11 AM

Let me try Akhil..Thanks

aci aisha
on 2/4/15, 2:17 AM

Great Akhil.... Perfect Observation.. If u put it as an answer i will mark it as true & will give u 1 vote!!! Thanks again...

aci aisha
on 2/4/15, 2:19 AM

But 1 more prblm occured... When i try to create a customer in this form it cause an error as follows, MissingError One of the documents you are trying to access has been deleted, please try again after refreshing.

aci aisha
on 2/4/15, 2:24 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/4/15, 12:55 AM
Seen: 4057 times
Last updated: 3/16/15, 8:10 AM