Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Install custom module for Odoo Online with Base Import Module

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
modulesbase_import
2 Antwoorden
24936 Weergaven
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
Annuleer
Faris Fathurrahman

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

Avatar
Mahmoud Abdelwahid
Beste antwoord

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
Annuleer
Avatar
Haresh Kansara
Beste antwoord

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
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Nuevo menú en "CRM"
modules
Avatar
Avatar
Avatar
Avatar
3
jul. 25
2951
Allow Access to update module
modules
Avatar
Avatar
Avatar
Avatar
3
mei 25
4863
How to translate actual name of module listed in apps Opgelost
modules
Avatar
Avatar
Avatar
2
jun. 25
5368
Extend Odoo Quotes
modules
Avatar
0
jun. 21
3233
Can I deploy my own modules on Odoo Cloud Hosting?
modules
Avatar
Avatar
1
aug. 24
4600
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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