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í
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • 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
    • Služby pro partnery
    • 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

Install custom module for Odoo Online with Base Import Module

Odebírat

Get notified when there's activity on this post

This question has been flagged
modulesbase_import
2 Odpovědi
24953 Zobrazení
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
Zrušit
Faris Fathurrahman

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

Avatar
Mahmoud Abdelwahid
Nejlepší odpověď

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
Zrušit
Avatar
Haresh Kansara
Nejlepší odpověď

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
Zrušit
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
Nuevo menú en "CRM"
modules
Avatar
Avatar
Avatar
Avatar
3
čvc 25
2953
Allow Access to update module
modules
Avatar
Avatar
Avatar
Avatar
3
kvě 25
4864
How to translate actual name of module listed in apps Vyřešeno
modules
Avatar
Avatar
Avatar
2
čvn 25
5369
Extend Odoo Quotes
modules
Avatar
0
čvn 21
3234
Can I deploy my own modules on Odoo Cloud Hosting?
modules
Avatar
Avatar
1
srp 24
4604
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