Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

aading a new menuitem in fleet module

Odebírat

Get notified when there's activity on this post

This question has been flagged
_inherits
2 Odpovědi
6160 Zobrazení
Avatar
oumaima

Hi everyone,i'm working with Openerp 7 and i wanna add a new menuitem in the inherit module fleet management and i have this error in the class transport_point _inherit='fleet.vehicle' ^ IndentationError: unexpected indent

myfile.py

class fleet_vehicle(osv.osv):

  _name = 'fleet.vehicle'
  _inherit='fleet.vehicle'
  _columns = {
        'type':fields.selection([('ci','C.I'), ('fourgon','Fourgon'),
             ('fourgonnette','Fourgonnette'),('minibus','Mini-bus'),
              ('pickup','Pick-up'),('poidslourds','Poids Lourds'),
            ('vfonction','V.fonction')],'Type'),
        'chauffeur': fields.many2one('hr.employee', 'Chauffeur',required=True),
        'name': fields.char('Nom du point', size=50, required=True),
        'amount': fields.float('Montant'),
    }   
fleet_vehicle()



class transport_point(osv.osv):
        _name = 'transport.point'
    _inherit='fleet.vehicle'
        _columns = {
              'name': fields.char('Nom du point', size=50, required=True),
              'amount': fields.float('Montant'),
             }
    _defaults={
        'amount': 0,
         }
0
Avatar
Zrušit
Borni DHIFI

add transport_point() at the end of class transport_point.

oumaima
Autor

HI I add transport_point() at the end of class transport_point and i still have the same error;any other idea please?

Avatar
Borni DHIFI
Nejlepší odpověď

Hi,

IndentationError: unexpected indent

it is error in syntaxe :we must respect the syntax of python

image description

use 4 space for each block :

image description

Thanks.

2
Avatar
Zrušit
Avatar
oumaima
Autor Nejlepší odpověď

hi it work's now,it did not work before because i copy and paste from another code...but now i have an error from an xml folder.I have this error:

ValueError: No such external ID currently defined in the system: testflt.menu_root

myfolder.xml

<menuitem name="Parametrage" id="param" parent="menu_root" />

<record model="ir.ui.view" id="view_transport_point_tree_1"> <field name="name">transport.point.tree</field> <field name="model">transport.point</field> <field name="type">tree</field> <field name="arch" type="xml"> <tree string="Transport Point Information"> <field name="name"/> <field name="amount"/> </tree> </field> </record>

   <!-- Transport Point Form View -->
   <record model="ir.ui.view" id="transport_point_form1">
        <field name="name">transport.point.form</field>
        <field name="model">transport.point</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Transport Point">
                <field name="name" />
                <field name="amount" />
            </form>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_transport_point">
        <field name="name">Point Information</field>
        <field name="res_model">transport.point</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,search</field>
    </record>

     <menuitem action="action_transport_point" id="menu_param_parent" parent="param" />
0
Avatar
Zrušit
Borni DHIFI

parent="fleet.menu_root"

oumaima
Autor

thank you it work's

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

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
unable to add column in res.users table Vyřešeno
_inherits
Avatar
Avatar
Avatar
Avatar
Avatar
17
pro 21
25727
how to change default digits of precision?
_inherits
Avatar
Avatar
1
pro 18
20388
Reg - _inherits OpenERP
_inherits
Avatar
Avatar
1
čvc 15
7796
inherited view from base_calendar view
_inherits
Avatar
Avatar
2
bře 15
11463
TypeError: The model "fleet.vehicle" specifies an unexisting parent class "fleet.vehicle"
_inherits
Avatar
Avatar
Avatar
2
bře 15
9637
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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