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

All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

By
Roberto Novelo
on 3/14/14, 6:53 PM 3,554 views

Hi,

When I click my menu and OpenERP try to show my view of my custom module, system displays this error:

All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

What I'm doing wrong in my xml view? How can I detect non Unicode or non ASCII characteres?

XML file:

<openerp> <data> <menuitem name="Actividades" id="base.menu_main_imprex_act" sequence="45"/>

    <menuitem id="imprex_act.menu_asignacion" name="Asignaciones" parent="base.menu_main_imprex_act" sequence="1"/>

    <!-- Asignacion -->
    <record id="view_asignacion_form" model="ir.ui.view">
        <field name="name">imprex.act.asignacion.form</field>
        <field name="model">imprex.act.asignacion</field>
        <field name="arch" type="xml">
            <form string="Asignacion" version="7.0">
                <sheet>
                    <group col="4">
                        <field name="name"/>
                        <field name="referencia_id"/>
                        <field name="solicitante_id"/>
                        <field name="responsable_id"/>
                        <field name="dias_estimados"/>
                        <field name="fecha_compromiso"/>
                        <field name="descripcion"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_asignacion_tree" model="ir.ui.view">
        <field name="name">imprex.act.asignacion.tree</field>
        <field name="model">imprex.act.asignacion</field>
        <field name="arch" type="xml">
            <field name="name"/>
            <field name="referencia_id"/>
            <field name="solicitante_id"/>
            <field name="responsable_id"/>
            <field name="dias_estimados"/>
            <field name="fecha_compromiso"/>
        </field>
    </record>

    <record id="view_asignacion_filter" model="ir.ui.view">
        <field name="name">Asignaciones</field>
        <field name="model">imprex.act.asignacion</field>
        <field name="arch" type="xml">
            <search string="Asignaciones">
                <field name="name" string="Asignacion"/>
                <field name="solicitante_id" />
                <field name="responsable_id"/>
            </search>
         </field>
    </record>

    <record id="open_module_tree_asignacion" model="ir.actions.act_window">
        <field name="name">Asignaciones</field>
        <field name="res_model">imprex.act.asignacion</field>
        <field name="view_type">form</field>
        <field name="search_view_id" ref="view_asignacion_filter"/>
        <field name="help" type="html">
          <p class="oe_view_nocontent_create">
            Haz click para crear una asignacion.
          </p><p>
            Las asignaciones son tareas con un responsable designado.
          </p>
        </field>
    </record>

   <menuitem action="open_module_tree_asignacion" id="imprex_act.menu_asignacion_tree" parent="imprex_act.menu_asignacion" sequence="5"/>

</data>

</openerp>

Good news.

Med Said BARA
on 3/18/14, 2:22 PM
1

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 3/14/14, 9:47 PM

Hi;

Can you post your openerp-server.log

A possible solution:

Open your file in an editor like "geany" (if you are under linux), or Note pad ++ (under Windows), And search for an option to show "Hidden caracters" (like Controll caracters, Trailing spaces ....), there you can find the "Error".

Attach the file (as it is) in your answer, i will check it.

Hi, Med Said BARA, thanks I did that but everything is OK with control characteres etc. The answer was a missing section in my tree view.

Roberto Novelo
on 3/18/14, 1:43 PM
0
Roberto Novelo
On 3/18/14, 1:51 PM

Missign section in tree view:

<record id="view_asignacion_tree" model="ir.ui.view">
            <field name="name">imprex.act.asignacion.tree</field>
            <field name="model">imprex.act.asignacion</field>
            <field name="arch" type="xml">
                **<tree string="Asignaciones">**
                    <field name="name"/>
                    <field name="referencia_id"/>
                    <field name="solicitante_id"/>
                    <field name="responsable_id"/>
                    <field name="dias_estimados"/>
                    <field name="fecha_compromiso"/>
                **</tree>**
            </field>
        </record>

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

0 follower(s)

Stats

Asked: 3/14/14, 6:53 PM
Seen: 3554 times
Last updated: 3/16/15, 8:10 AM