Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
5826 Vizualizări

Hello every one , i'm a new in the Openerp Community i have a problem with a module i just created , every time i try to install it the error appears : ValidateError Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View Architecture! " .... Any ideas plzz ?

here is my code:

patient.py

from openerp import addons 
from osv import fields, osv
import time

class patient(osv.osv):
    _name='patient'
    _description='dossier administratif du patient'

    _columns={
                'name' : fields.char('numero d`adhesion', size=30, required=True),
                'cin_patient' : fields.char('CIN', size=30),
                'date_dinscription' : fields.date('Date d`inscription'),
                'num_dossier' : fields.char('numero de dossier', size=30, required=True),
                'nom' : fields.char('Nom', size=30, required=True),
                'prenom' : fields.char('Prenom', size=30, required=True),
                'date_de_naissance' : fields.date('Date de naissance'),
                'sexe' : fields.char('Sexe', size=30),
                'profession' : fields.char('profession', size=30, ),
                'niveau_scolaire' : fields.char('niveau scolaire', size=30),
                'status' : fields.selection([('Celibataire','celibataire'), ('Married','married')]),
                'nb_enfant' : fields.char('Nombre d enfants', size=30),
                'num_fix' : fields.char('Numero de Tel fix', size=30),
                'num_por' : fields.char('Numero de Tel Portable', size=30),
                'adresse' : fields.text('adresse'),
                'cin_assure' : fields.char('CIN de l assure', size=30),
                'non_assure' : fields.char('Nom de l assure', size=30),
                'prenon_assure' : fields.char('prenom de l assure', size=30),
                'type_relation' : fields.char(' ralation avec le patient', size=30),
                'num_assure' : fields.char('Numero d affiliation a une caisse d assurance ', size=30),
                'nom_mutuelle' : fields.char('le nom de la mutuelle', size=30),
                'date_fin' : fields.char('date de fin de la mutuelle ', size=30),
                'proprietaire' : fields.char('etes-vous proprietaire?', size=30),
                'nb_famille' : fields.char('nombre de famille sous le meme toit?', size=30),
                'nombre_chambre' : fields.char('nombre de chambre', size=30),
                'eau' : fields.char(' vous disposez deau?', size=30),
                'electricite' : fields.char('vous disposez delectricite? ', size=30),
                'television' : fields.char('vous disposez de television?', size=30),
                'refrig' : fields.char('vous disposez d un refrigerateur? ', size=30),


    }

patient()

xml file:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Patient" id="menu_patients_parent"/>
<menuitem name="Patients" id="menu_patients_parent1" parent="menu_patients_parent"/>



<record model="ir.ui.view" id="patient_form_view">
        <field name="name">patient.form</field>
        <field name="model">patient</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Patient" version="7.0">
                <sheet>

                        <notebook>
                            <page string="Public Information">
                                <group>
                                    <group string="Contact Information">
                                        <field name="name"/>
                                        <field name="cin_patient"/>
                                        <field name="date_dinscription"/>
                                        <field name="num_dossier"/>
                                        <field name="nom"/>
                                        <field name="prenom"/>
                                        <field name="date_de_naissance"/>
                                        <field name="sexe"/>
                                        <field name="profession"/>
                                        <field name="niveau_scolaire"/>
                                        <field name="status"/>
                                        <field name="nb_enfant"/>
                                        <field name="num_fix"/>
                                        <field name="num_por"/>
                                        <field name="adresse"/>
                                    </group>
                                </group>
                            </page>
                            <page string=" Information sur le logement">
                                <group>
                                    <group string=" Maison et logement">
                                        <field name="proprietaire"/>
                                        <field name="nb_famille"/>
                                        <field name="nombre_chambre"/>
                                        <field name="eau"/>
                                        <field name="electricite"/>
                                        <field name="television"/>
                                        <field name="refrig"/>

                                    </group>
                                </group>
                            </page>
                            <page string=" Assurence/prise en charge">
                                <group>
                                    <group string=" Information de l'assure">
                                        <field name="cin_assure"/>
                                        <field name="non_assure"/>
                                        <field name="prenon_assure"/>
                                        <field name="type_relation"/>
                                        <field name="num_assure"/>
                                        <field name="nom_mutuelle"/>
                                        <field name="date_fin"/>

                                    </group>
                                </group>
                            </page>
                        </notebook>
                </sheet>    
            </form>
        </field>
</record>

<record model="ir.actions.act_window" id="action_notebook_form">
    <field name="name">patient</field>
    <field name="res_model">patient</field>
</record>



<menuitem  parent="menu_patients_parent1" id="notebook_menu_mainform" action="action_notebook_form"/>
</data>
</openerp>
Imagine profil
Abandonează
Cel mai bun răspuns

look in the log file, it should specifically tell you want the problem is. depending on your installation method it could be /var/log/openerp/ - filename -

Also stop - start your server, then upgrade your module to make sure you are running the latest version you uploaded

Imagine profil
Abandonează
Autor

i installed the latest version of openerp (openerp 7) on my windows , could you plz tell me where i can find the log file ??

Thanks for your help and answer :)

server\openerp-server.log

Autor

File "C:\Program Files\OpenERP 7.0-20130422-232436\Server\server.\openerp\osv\orm.py", line 1937, in __view_look_dom_arch except_orm: ('View error', u"Can't find field 'code' in the following view parts composing the view of object model 'patient':\n * patient.tree\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model") 2013-05-10 16:34:24,046 1856 ERROR Avicennefr openerp.tools.convert: Parse error in file:///C:/Program%20Files/OpenERP%207.0-20130422-232436/Server/server/openerp/addons/Nouveau%20dossier%20%20d/patient

Autor

this is the error i found in the log file :s

Cel mai bun răspuns

Can't find field 'code' in the following view parts composing the view of object model 'patient':\n * patient.tree

So the problem is in the treeview definition, which you didn't share with us. Your patient model has no code field, but your treeview is using it.

Imagine profil
Abandonează

i agree with ray

Autor

Thanks for your response...

Autor Cel mai bun răspuns

i installed the latest version of openerp (openerp 7) on my windows , could you plz tell me where i can find the log file ??

Thanks for your help and answer :)

Imagine profil
Abandonează
Cel mai bun răspuns

I have tested your module it works without problem. restart your server and go Setting>>Modules>>Update Module List.

Imagine profil
Abandonează
Autor

i did all those steps and it didn't work :s

Related Posts Răspunsuri Vizualizări Activitate
1
mar. 15
2634
1
mar. 15
7522
1
mar. 15
2656
5
ian. 24
16055
1
mar. 15
4274