Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Install custom module for Odoo Online with Base Import Module

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
modulesbase_import
2 Besvarelser
24958 Visninger
Avatar
Michael Leff

I am using Odoo Online and trying to install a custom module that I have built. I installed the Base import module to allow for installing custom modules on an Odoo Online instance:

https://apps.openerp.com/apps/modules/online/base_import_module/

I then created a simple module consisting of the following:

    mymodule/

         __init__.py

        __manifeset__.py

        product.py

        views/

            product_product_tree.xml

Here is the content of the files:

__init__.py

    from . import product

__manifest__.py

    {  'name': "My Module", 'version': '1.0', 'depends': ['stock', 'sale', 'contacts', 'purchase'], 'description': """ Add custom functionality.

      """, # data files always loaded at installation 'data': [ 'views/product_product_tree.xml', ], }

product.py

    from odoo import models, fields, api class ProductProduct(models.Model):

      _inherit = 'product.product' x_reserved_qty = fields.Float(string='Reserved', readonly=True)

views/product_product_tree.xml

    <odoo> <data> <record model="ir.ui.view" id="mymodule.product_product_tree"> <field name="name">x_product.product.tree</field> <field name="model">product.product</field> <field name="priority" eval="16"/> <field name="inherit_id" ref="product.product_product_tree_view"/> <field name="arch" type="xml"> <xpath expr="//tree" position="inside"> <field name="x_reserved_qty"/> </xpath> </field> </record> </data> </odoo>

I then zip up the file and import it via the Base Import Module. Doing so results in an error and the module does not install. The error is occurring because the `x_reserved_qty` field does not exist on the model even though I have defined it in `product.py`. It seems that the python portion of the module is never getting executed.

I can confirm this by commenting out the `<field name="x_reserved_qty"/>` line, and reimporting the module. This time it imports successfully, but when I browse to `Settings > Technical > Database Structure > Fields`, I do not see my new field listed anywhere.

Does anybody know if python files are supported for custom modules imported via this Base Import Module method? The module description says:

> This module allows authorized users to import a custom data module> (.xml files and static assests) for customization purpose.

It specifically mentions .xml and static assets, but not python files. So, I'm just wondering if I'm doing something wrong in my python files that is causing this not to work, or if it's actually designed not to support python files in modules.

1
Avatar
Kassér
Faris Fathurrahman

hello, where can I get that "Base Import Module"? it seems that the link is not working anymore

Avatar
Mahmoud Abdelwahid
Bedste svar

This Module is not used for import Odoo Module, Is use for import Data from xml file such as Asset , Product , and Partner Data

5
Avatar
Kassér
Avatar
Haresh Kansara
Bedste svar

Hi Michael,

To import custom module using import, you need to install "Base Import Module" (technical name: base_import_module), which is odoo's base functionality.

For importing custom module, you can not import python related code. If you have added some python related code then it will reject. You can only import some frontend side features like static files, CSV files (access rights). 

If you want to import your custom module then i suggest you to import file as CSV for defined fields, views etc and import in ir.model.fields or ir.ui.view

If you have added some big changes in python code or override base code then it's not possible to import, because odoo online take case about security parts


I hope this will helpful for you.

Thanks

Haresh Kansara

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Nuevo menú en "CRM"
modules
Avatar
Avatar
Avatar
Avatar
3
jul. 25
2953
Allow Access to update module
modules
Avatar
Avatar
Avatar
Avatar
3
maj 25
4865
How to translate actual name of module listed in apps Løst
modules
Avatar
Avatar
Avatar
2
jun. 25
5369
Extend Odoo Quotes
modules
Avatar
0
jun. 21
3234
Can I deploy my own modules on Odoo Cloud Hosting?
modules
Avatar
Avatar
1
aug. 24
4604
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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