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

IOError: File not found openerp

Subscriure's

Get notified when there's activity on this post

This question has been flagged
filenotfoundioerror
2 Respostes
10166 Vistes
Avatar
omprakash

Hi Friends ,

I have doubt , what is problem in my custom module . Getting error as IOError : File not found . Please help to solve this problem .

This is my code :

  • __init__.py

    import sample

  • __openerp__.py

    { "name": "sample", "version": "7.0", "depends": ["base"], "author": "Prakash", "category": "Others", "description": """ This module provide : This module provide basic idea about creating custom module

    """, "init_xml": ["sample_view.xml"], 'update_xml': [""], 'demo_xml': [""], 'installable': True, 'active': False, }

  • sample.py

from osv import fields,osv

class sample(osv.osv): def _calculate(self, cr, uid, ids, fields, arg, context): x={} for record in self.browse(cr, uid, ids): x[record.id]= record.field_a + record.field_b return x _name = 'sample' _columns = { 'field_a' : fields.integer('field_a') , 'field_b' : fields.integer('field_b'), 'result' : fields.function(_calculate, type='integer', obj='sample', method=True, store=False, string='result'), } sample()

  • sample_view.xml

<openerp> <data> <record model="ir.ui.view" id="sample_tree_view"> <field name="name">sample.tree</field> <field name="model">sample</field> <field name="type">tree</field> <field name="arch" type="xml"> <tree string="sample"> <field name="field_a"/> <field name="field_b"/> <field name="result"/> </tree> </field> </record>

    <record model="ir.ui.view" id="sample_form_view">
        <field name="name">sample.form</field>
        <field name="model">sample</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="sample">
                <field name="field_a"/>
                <field name="field_b"/>
                <field name="result"/>
            </form>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_sample_form">
        <field name="name">sample</field>
        <field name="res_model">sample</field>
    </record>

    <menuitem name="parent" icon="terp-project" id="parent_id"/>

<menuitem name="child" parent="parent_id" id="child_id" />

    <menuitem name="grandson" parent="child_id" id="grandson_id" action="action_sample_form"/>
</data>

</openerp>

When i try to install my module getting error in openerp-server.log:

2013-05-27 11:04:28,869 2372 INFO group openerp.modules.loading: module sample: loading objects 2013-05-27 11:04:28,903 2372 INFO group openerp.modules.module: module sample: creating or updating database tables 2013-05-27 11:04:29,482 2372 INFO group openerp.modules.loading: module sample: loading sample_view.xml 2013-05-27 11:04:29,651 2372 WARNING group openerp.addons.base.ir.ir_ui_view: Setting the type field is deprecated in the ir.ui.view model. 2013-05-27 11:04:29,736 2372 WARNING group openerp.addons.base.ir.ir_ui_view: Setting the type field is deprecated in the ir.ui.view model. 2013-05-27 11:04:29,923 2372 INFO group openerp.modules.loading: module sample: loading 2013-05-27 11:04:29,924 2372 ERROR group openerp.osv.osv: Uncaught exception Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\osv\osv.py", line 123, in wrapper File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\osv\osv.py", line 179, in execute File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\osv\osv.py", line 166, in execute_cr File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server\openerp\addons\base\module\module.py", line 425, in button_immediate_install File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server\openerp\addons\base\module\module.py", line 476, in _button_immediate_function File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\pooler.py", line 39, in restart_pool File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\modules\registry.py", line 214, in new File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\modules\loading.py", line 347, in load_modules File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\modules\loading.py", line 258, in load_marked_modules File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\modules\loading.py", line 189, in load_module_graph File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\modules\loading.py", line 73, in <lambda> File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\modules\loading.py", line 111, in _load_data File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\tools\misc.py", line 172, in file_open File "C:\Program Files (x86)\OpenERP 7.0-20130118-002240\Server\server.\openerp\tools\misc.py", line 219, in _fileopen IOError: File not found: sample\

1
Avatar
Descartar
Avatar
sridhar
Best Answer

Try this __openerp__.py code
{ "name": "sample", "version": "7.0", "depends": ["base"], "author": "Prakash", "category": "Others", "description": """ This module provide : This module provide basic idea about creating custom module

""",

'update_xml': ["sample_view.xml"], 
'demo_xml': [""], 
'installable': True, 
'active': False, 
}

https://accounts.openerp.com/forum/Help-1/question/17795#17839 see this link this is helpful for u ...

0
Avatar
Descartar
omprakash
Autor

Hi Sridhar , Thanks for your immediate reply

Avatar
Maniganda
Best Answer

Hi ,Prakash the problem might be with your xml file syntax can you give the xml here 'update_xml': ["sample_view.xml"]

0
Avatar
Descartar
omprakash
Autor

Hi Maniganda , Thanks for your immediate reply

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
in user form sales is not found in application,how can we solve it
sales not found is
Avatar
0
de març 15
4473
V6.1 Bazaar Package not Found
bazaar not found allow_none package
Avatar
0
de nov. 16
6568
Can files be downloaded by visitors to my website (built using web builder) ? Solved
file website
Avatar
Avatar
Avatar
2
d’oct. 24
4649
IN A SUBSCRIPTION OR IN A SUBSCRIPTION SALE PAYPAL DOES NOT APPEAR AS A PAYMENT METHOD
working not
Avatar
0
d’abr. 24
1378
Not visualization files attached in my tasks
tasks file
Avatar
0
de set. 23
1792
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