Odoo Help


add menuitem for fleet module

on 5/12/13, 12:18 PM 1,208 views

Hi everyone, I try to add a new menuitem in the fleet module but i have this error: Integrity Error

The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it - creation/update: a mandatory field is not correctly set

[object with reference: license_plate - license.plate]


enter code here

class fleet_vehicle_type(osv.osv): _name = 'fleet.vehicle.type' _inherit='fleet.vehicle' _order = 'sequence asc' _description = 'Type de vehicule' _columns = { 'name': fields.char('Type', size=64), 'sequence': fields.integer('Sequence', help="Used to order the note stages") } _sql_constraints = [('fleet_type_name_unique','unique(name)', 'Type name already exists')] fleet_vehicle_type()


enter code here<record model='ir.ui.view' id='fleet_vehicle_type_tree'>
        <field name="name">fleet.vehicle.type.tree</field>
        <field name="model">fleet.vehicle.type</field>
        <field name="arch" type="xml">
            <tree string="Types" version="7.0" editable="bottom">
              <field name="sequence" widget="handler" invisible="1"/>
                <field name="name" />

     <record model='ir.actions.act_window' id='fleet_vehicle_type_act'>
        <field name="name">Type de vehicule</field>
        <field name="res_model">fleet.vehicle.type</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="help" type="html">
          <p class="oe_view_nocontent_create">
            Click to create a new type.

      <menuitem action="fleet_vehicle_type_act" parent="fleet.fleet_configuration" id="fleet_vehicle_type_menu" groups="base.group_no_one"/>

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 5/12/13, 12:18 PM
Seen: 1208 times
Last updated: 3/16/15, 8:10 AM