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

Uncaught TypeError: Type is not a constructor

By
Alejandro Concepción
on 7/12/16, 4:53 PM 607 views

I am developing in version 8 Odoo a module for tax annexes of Panama. In the report I am trying to do I want to include a search type view, but when you add to that view the <filter /> gives me the following error: Uncaught TypeError: Type is not a constructor

The view code is as follows:

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

<openerp>

<data>

<!-- Vista Busqueda-->

<record model="ir.ui.view" id="view_report_anexos_search">

<field name="name">report.anexos.search</field>

<field name="model">report.anexos</field>

<field name="arch" type="xml">

<search string="Reporte de Anexos DGI Panamá">

<filter name="filteranexo94" string="Filtro Anexo 94" domain="[('anexo', 'ilike', 'A94')]"/>

<field name="tipo_persona"/>

<field name="ruc"/>

<field name="dv"/>

<field name="nombre_proveedor"/>

<field name="codigo_tipo_pago"/>

<field name="concepto"/>

<field name="montos"/>

<field name="date_invoice"/>

<field name="anexo" string="Anexo" />

<field name="name" domain_filter="['|', ('name','ilike',self),('user_id','ilike',self)]"/>

<field name="periodo_fiscal"/>

</search>

</field>

</record>

<!-- Acciones <field name="search_view_id" ref="view_report_anexos_search"></field>-->

<record id="report_anexos_action" model="ir.actions.act_window">

<field name="name">Reporte de Anexos</field>

<field name="res_model">report.anexos</field>

<field name="view_type">form</field>

<field name="view_mode">tree,form</field>

<field name="context">{'search_default_filteranexo94':1}</field>

</record>

<!-- Menúes -->

<menuitem id="report_anexos_menu_action"

parent="anexos_conceptos_menu"

name="Reporte de Anexos"

sequence="10"

action="report_anexos_action"/>

</data>

</openerp>

0
kirubanidhi
On 7/13/16, 1:33 AM

hello,

<field name="name" domain_filter="['|', ('name','ilike',self),('user_id','ilike',self)]"/>

change domain_filter to filter_domain

<field name="name" filter_domain="['|', ('name','ilike',self),('user_id', 'child_of', self)]"/>

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: 7/12/16, 4:53 PM
Seen: 607 times
Last updated: 7/13/16, 1:33 AM