콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5164 화면

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"/>

아바타
취소
베스트 답변

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

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

작성자

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

관련 게시물 답글 화면 활동
2
9월 18
7383
9
3월 16
61510
2
3월 15
4892
1
3월 15
5853
0
11월 24
7