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

constraint of unicity

By
oumaima
on 5/12/13, 1:06 PM 876 views

Hi, I want to add a unique constraint for a specific field but i have an error of ValidateError

Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View Architecture!

my file.py

enter code here_columns = {
    'sequence': fields.integer('Sequence', help="Used to order the note stages"),
    'cne':fields.char('Matricule', size=64,required=True),

}

enter code here

_sql_constraints = [('student_state_name_unique','unique(cne)', 'State name already exists')]

myfile.xml

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

<openerp> <data>
<record model="ir.ui.view" id="view_school_student_form"> <field name="name">student.form</field> <field name="model">student</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Information Eleve" version="7.0"> <sheet> <notebook colspan="6">
<page string="Informations "> <separator string="Informations administratives" colspan="6"/> <group col="6" colspan="6"> <field name="sequence" widget="handler" invisible="1"/>

0

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/12/13, 2:32 PM

if you work with v7 try to put it :

<form string="My Form" version="7.0">

Hi,i made my xml code between this tag but it doesn't work...Any idea please

oumaima
on 5/12/13, 3:28 PM

to we can help you please edit your question and post full record form.

Borni DHIFI
on 5/12/13, 3:33 PM

i update my question,and posted all the record form;any idea please

oumaima
on 5/13/13, 12:41 PM

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: 5/12/13, 1:06 PM
Seen: 876 times
Last updated: 3/16/15, 8:10 AM