Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Created module , new moduel

Subscriure's

Get notified when there's activity on this post

This question has been flagged
modulenew
5 Respostes
6508 Vistes
Avatar
sanaa tayb

hello everyone , i created a new module , i can install it , but the problem is that i cant see the entries on my tree .. Plz plz plz help me

medicalcase.py

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

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

    _columns={
                #info general


                'name' :  fields.char('Numero d`adhesion ', size=30),

                'category_sanguine' : fields.char('Categorie sanguine', size=30, ),

                # maladies
                'maladie_status' : fields.char('Status de la maladie', size=30),
                'date_diagnostique' : fields.date('date de Diagnostique'),
                'age_diagnostique' : fields.char('Age de diagnostique', size=30),
                'severite_maladie' : fields.char('Severite de la maladie', size=30),
                'remarque' : fields.text('Remarque'),
                'retablie' : fields.date('Date de retablissement'),
                'nom_medecin' : fields.char('Nom du medecin', size=30),             
                'alergies' : fields.selection([('Oui','oui'), ('Non','non')],'etes vous allergique?'),
                'allergy_type' : fields.char('Type d`alergie ', size=30),
                'pregnancy_warning' : fields.selection([('Oui','oui'), ('Non','non')],'etes vous enceinte?'),
                'pregnancy_week' : fields.char('Semaine de grossesse ', size=30),
                'on_terapie' : fields.selection([('Oui','oui'), ('Non','non')],'etes vous sous therapie?'),
                'start_terapie' : fields.date('date debut de terapie '),
                'end_terapie' : fields.date('date fin de terapie'),
                'description_terapie' : fields.text('description de la terapie'),
                'extra_info' : fields.text('Extra informations sur le patient'),
                # traitement
                'medicament' : fields.char('medicament', size=30),
                'active' : fields.boolean('active'),
                'debut_traitement' : fields.date('Date de debut de traitement'),
                'fin_traitement' : fields.date('Date de fin de traitement'),
                'medecin' : fields.char('medecin prescrivant le traitement', size=30),
                'indication' : fields.text('Des indications'),
                'tretement_continu' : fields.boolean('traitement continu ?'),
                'tretement_discontinu' : fields.boolean('traitement discontinu ?'),
                'reason_dis' : fields.text('raison de discontinuite ? '),
                'dose' : fields.char('Dosage', size=30),
                'unit_dosage' : fields.char('unite de dosage ', size=30),
                'voie_administration' : fields.char('voie d`administration ', size=30),
                'periode_traitement' : fields.char('periode de traitement ', size=30),
                'frequency' : fields.char('frequence ', size=30),
                'notes' : fields.text('Notes'),


    }

medicalcase()

medical_case.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Gestion medical" id="menu_patients_parent"/>
<menuitem name="Gestion medical" id="menu_patients_parent1" parent="menu_patients_parent"/>
<menuitem name="Divers" id="menu_patients_parent2" parent="menu_patients_parent"/>  

<record model="ir.ui.view" id="medical_tree_view">
    <field name="name">medical.tree</field>
    <field name="model">medical</field>
    <field name="type">tree</field>
    <field name="arch" type="xml">
        <tree string="medical" version="7.0">



                                         <field name="id"/> 
                                        <field name="name"/>


        </tree>
    </field>
</record>
<record model="ir.ui.view" id="medical_form_view">
        <field name="name">medical.form</field>
        <field name="model">medical</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="medical" version="7.0">

                <sheet>
                        <notebook>

                            <page string=" Maladies">

                                <group>
                                    <group string=" Information generale">
                                        <field name="name"/>
                                        <field name="maladie_status"/>
                                        <field name="date_diagnostique"/>
                                        <field name="age_diagnostique"/>
                                        <field name="severite_maladie"/>
                                        <field name="remarque"/>
                                        <field name="retablie"/>
                                        <field name="nom_medecin"/>
                                    </group>

                                    <group string="allergies">

                                        <field name="alergies"/>
                                        <field name="allergy_type"/>

                                    </group>

                                    <group string="Grossesses">

                                        <field name="pregnancy_warning"/>
                                        <field name="pregnancy_week"/>

                                    </group>

                                    <group string="Terapie">

                                        <field name="on_terapie"/>
                                        <field name="start_terapie"/>
                                        <field name="end_terapie"/>
                                        <field name="description_terapie"/>
                                    </group>

                                    <group string="Extra informations">

                                        <field name="extra_info"/>

                                    </group>

                                </group>
                            </page>
                            <page string=" Traitements">

                                    <group>
                                        <group string=" Medicament et traitement">
                                            <field name="medicament"/>
                                            <field name="active"/>
                                            <field name="debut_traitement"/>
                                            <field name="fin_traitement"/>
                                            <field name="medecin"/>
                                            <field name="indication"/>
                                            <field name="tretement_continu"/>
                                            <field name="tretement_discontinu"/>
                                            <field name="reason_dis"/>
                                        </group>
                                        <group string=" Dosage">

                                        <field name="dose"/>
                                            <field name="unit_dosage"/>
                                            <field name="voie_administration"/>
                                            <field name="periode_traitement"/>
                                            <field name="frequency"/>


                                        </group>
                                        <group string="Extra informations">

                                            <field name="notes"/>

                                        </group>
                                    </group>
                            </page>

                        </notebook>
            </sheet>    


            </form>
        </field>
</record>



<record model="ir.actions.act_window" id="tens_form">
    <field name="name">medical</field>
    <field name="res_model">medical</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,form</field>
</record>






<menuitem name="Dossier Medical" parent="menu_patients_parent1" id="notebook_menu" action="tens_form" sequence="1"/>
</data>
</openerp>

plzz help , i can't see the entries on the list view!!!

0
Avatar
Descartar
Avatar
Borni DHIFI
Best Answer

Hi,

your model name is medicalcase but in xml you use <field name="model">medical</field>

so replace _name='medicalcase' to _name='medical'

   class medicalcase(osv.osv):
        _name='medical'

the problem is with the field active.

field active is automatically created by openerp if active=true you can see the record else you can not see the record .

so if create a new patient chek the case active. or delete this field from your model.

2
Avatar
Descartar
sanaa tayb
Autor

i actually changed it , but the problem remain the same , whenever i add a new patient ( using the form) i'm not able to see it on the list when i'm supposed to see all my patients , Plz help :s

Borni DHIFI

I changed my answer.

sanaa tayb
Autor

Thank you Soooo muuch , that was the problem , now it's working fine ;)

Avatar
kadjiomartial
Best Answer

puis-je avoir ce module?


martialkadjio@yahoo.com

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Syntax error
module new
Avatar
Avatar
1
d’abr. 16
4675
ProgrammingError: ERREUR: erreur de syntaxe sur ou près de « analyse » LINE 1: COMMENT ON COLUMN analyse."name" IS 'pat'
module new
Avatar
Avatar
1
de març 15
9290
new module? Solved
module new practice
Avatar
Avatar
Avatar
Avatar
Avatar
10
de maig 20
5198
Problem with inherited module Solved
module _inherits new
Avatar
Avatar
Avatar
Avatar
6
de jul. 18
12567
Gather two modules in one ??
installation module new
Avatar
Avatar
Avatar
Avatar
3
d’abr. 17
10947
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now