Bonjour
J'installe mon nouveau module : je recois l'erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 546, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 583, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 319, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 812, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 412, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
    action = self._call_kw(model, method, args, {})
  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 447, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 495, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 355, in load_modules
    loaded_modules, update_module)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 152, in load_module_graph
    models = registry.load(cr, package)
  File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 163, in load
    model = cls._build_model(self, cr)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 640, in _build_model
    '_original_module': original_module,
TypeError: type() argument 1 must be string, not tuple
J'ai cherché quel arguments est erronés
voici le fichier py de la base de donnees et les xml de menu et form
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- coding: utf-8 -*-
from openerp import models, fields, api

class bxcamion(models.Model):
    _name='bxcamion.bxcamion'
    _description='Gestion des camions'
    immatriculation = fields.Char(string="immatriculation",required=True)
    motorisation = fields.Char(string="motorisation")
    Date_mise_en_service = fields.Date(string="Date_mise_en_service",required=True)
    Type_de_vehicule = fields.Char(string="Type_de_vehicule",required=True)
    Date_d_achat = fields.Date(string="Date d achat",required=True)
    Nombre_de_chevaux = fields.Char(string="Nombre_de_chevaux")
    NSerie = fields.Char(string="N_Serie", required=True)
    der_Date_chronotachygraphe = fields.Date(string="der_Date_chronotachygraphe")
    der_Date_VGP = fields.Date(string="der_Date_VGP")
    der_Date_EXTINCTEUR = fields.Date(string="der_Date_EXTINCTEUR")
    derniere_Date_agres = fields.Date(string="derniere Date agres")
    pro_Date_chronotachygraphe = fields.Date(string="pro Date chronotachygraphe")
    Pro_Date_VGP = fields.Date(string="Pro Date VGP")
    Pro_Date_EXTINCTEUR = fields.Date(string="Pro Date EXTINCTEUR")
    Pro_Date_agres = fields.Date(string="Pro Date agres")
    PTAC = fields.Char(string="P.T.A.C", required=True)
    PaV = fields.Char(string="PaV", required=True)
    PTRA = fields.Char(string="P.T.R.A")
    Financement = fields.Char(string="Financement")
    A_Vendre = fields.Boolean("A_Vendre",default=False)
    A_detruire= fields.Boolean("A_detruire",default=False)
    Immobilisation= fields.Char(string="Immobilisation")
    co2=fields.Char(string="CO2")
    Marque=fields.Many2one("bx_type_camion","Type_Camion",required=True)
    
    
   

class bx_type_camion(models.Model):
    _name= 'Bx_type'
    
    Type_Camion=fields.Char(string="Type",required=True)
    
    
 
class bx_reparation(models.Model):
    _name = 'Bx_Reparation'
    
    Date_reparation=fields.Date(string="Date reparation", required=True)
    Description=fields.Char(string="Description")
    immatriculation=fields.Many2one("bxcamion","immatriculation",required=True) 
    Obligatoire=fields.Boolean(string="Obligatoire",default=False)
    Duree_reparation=fields.Float(string="Duree reparation")
    Facture=fields.Char(string="Facture")
module py
--
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        
       <record model="ir.actions.act_window" id="action_bxcamion">
         <field name="name">bxcamion.bxcamion</field>
         <field name="res_model">bxcamion</field>
         <field name="view_mode">tree,form</field>       
        
        </record>
         <record model="ir.ui.view" id="liste_bxcamion">
         <field name="name">bxcamion.bxcamion</field>
         <field name="model">bxcamion</field>
         <field name="arch" type="xml">
            <tree string="Liste des camions">
              <field name="immatriculation"/>
              <field name="PTAC"/>
              <field name="PaV"/>
              <field name="der_Date_chronotachygraphe"/>
              <field name="der_Date_VGP "/>
              <field name="der_Date_EXTINCTEUR "/>
              <field name="derniere_Date_agres "/>
              <field name="pro_Date_chronotachygraphe "/>
              <field name="Pro_Date_VGP "/>
              <field name="Pro_Date_EXTINCTEUR"/>
              <field name="Pro_Date_agres"/>  
          </field>       
        
        </record>
        <record model="ir.actions.act_window" id="action_bxtype">
         <field name="name">Bx_type</field>
         <field name="res_model">bx_type_camion</field>
         <field name="view_mode">tree,form</field>       
        
        </record>
         <record model="ir.actions.act_window" id="action_bxreparation">
         <field name="name">Bx_reparation</field>
         <field name="res_model">bx_reparation</field>
         <field name="view_mode">tree,form</field>       
        
        </record>
        <!--Top Menu-->
        <menuitem id="bxcamion_menu" name="Gestion PL"  sequence="2"/>
        <!--Menu du latéral camion-->
        <menuitem id="bxcamion_vehicules" name="véhicules" parent="bxcamion_menu" sequence="20" >
        <menuitem id="bxcamion_vehicule" name="Les véhicules" parent="bxcamion_vehicules" sequence="21" action="action_bxcamion"/>
        <menuitem id="bxcamion_vehicule" name="Les Types" parent="bxcamion_vehicules" sequence="22" action="action_bxtype"/>
        <menuitem id="bxcamion_vehicule" name="Le suivi des véhicules" parent="bxcamion_vehicules" sequence="23" action="action_bxreperation"/>
    </data>
</openerp>
menu xml de vue pour le menu
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<openerp>
 <data>
   <record id="ir.ui.view" name="vehicule">
     <field name="name">bxcamion.form</field>
     <field name="model">bxcamion.bxcamion</field>
     <field name="type">form</field>
     <form string="Fiche du véhicule">
      <field name="immatriculation"/>
      <field name="Marque"/>
       <group id="general" name="Général">
         <field name="motorisation"/>
         <field name="Date_mise_en_service"/>
         <field name=" Type_de_vehicule"/>
         <field name="Date_d_achat"/>
         <field name="Nombre_de_chevaux"/>
         <field name="NSerie"/>
         <field name="PTAC"/>
         <field name="PaV"/>
         <field name="PTRA"/>
         <field name="co2"/>
       </group>
       <group id="comptabilite" name="comptabilité">
         <field name="Financement"/>
         <field name="A_Vendre"/>
         <field name="A_detruire"/>
         <field name="Immobilisation"/>
        </group>
        <group id="suivi" name="suivi">
         <field name="der_Date_chronotachygraphe"/>
         <field name="der_Date_VGP "/>
         <field name="der_Date_EXTINCTEUR "/>
         <field name="derniere_Date_agres "/>
         <field name="pro_Date_chronotachygraphe "/>
         <field name="Pro_Date_VGP "/>
         <field name="Pro_Date_EXTINCTEUR"/>
         <field name="Pro_Date_agres"/>
        </group>
      </form>
   </record>
 </data>
</openerp>
le module form .

Une idée pour resoudre mon problème.
Merci d'avance à tous