Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

I can´t install my Module (My Module crash Odoo)

Subscribe

Get notified when there's activity on this post

This question has been flagged
modulesodooodooV9
1 Reply
4212 Views
Avatar
Patrick

Hi i have a Problem :
I made a Modul for Odoo (Ver. 9 ) , this Modul Imports Products over Itscope API and XMLRPC.
When i want to install this Modul , Odoo is only loading a long time.
This is the Loading Screen :
 https://picload.org/image/rarigcra/modul.png
The folder structure is:
     - ->demo:
         -->demo.xml
    -->models:
       -->__init__.py
       -->models.py
      -->models.xml
   -->security:
       -->ir.model.access.csv
   -->__init__.py
  -->__openerp__.py
This are the Files:
models.py

# -*- encoding: utf-8 -*-
#Description: ITScope Modul für Odoo
#Dev: Patrick Mitteregger
from openerp import osv, fields, api
from openerp.tools.translate import _
from httplib import *
from base64 import b64encode
import libxml2import
xmlrpcliburl = 'XXXXXXXXXXX'
username = 'XXXXXX'
pwd = 'XXXXXXXXXX'
dbname = 'XXXXXXXXX'
sock_common = xmlrpclib.ServerProxy('{}/xmlrpc/common'.format(url))
login = sock_common.login(dbname,username,pwd)
sock = xmlrpclib.ServerProxy('{}/xmlrpc/object'.format(url))
product = 'product.template'
accountID = "XXXXXX"
apiKey = "XXXXXXXX"
ean = 0
class product_search(osv.osv):
########################################################################
#Auswahl des Nutzers (Über Formular) auslesen und in Variablen speichern#
#########################################################################
_name = 'itscope_modul.itscope_modul'
eanumber = fields.Float('EAN',required=True,string="Ean")
language = fields.Char('Language',default="de",string="lang")
@api.one def
search_prod():
#########################################################################
#Mit der ItScope API verbinden und die Infos vom Produkt holen #
 #########################################################################
try:
headers = {'Authorization' : 'Basic %s' % base64.b64encode(accountID+ ':'+ apiKey), 'Accept-Language' : language}
url = "https://api.itscope.com/2.0" Get = "/products/ean/" + eanumber + "/standard." + "xml"
req = urllib2.Request(url + Get,headers=headers)
response = urllib2.urlopen(req)
itscope = response.read()
xmlread = libxml2.parseDoc(itscope)
# Antwort-XML Feld auswahl
eancode = xmlread.xpathEval('/products/product/ean')
prodname = xmlread.xpathEval('/products/product/supplierItems/supplierItem/productName')
manuf = xmlread.xpathEval('/products/product/supplierItems/supplierItem/manufacturerName ')
description = xmlread.xpathEval('/products/product/longDescription')
pricelist = xmlread.xpathEval('/products/product/price')
except Exception,e:
print str(e)
#########################################################################
#Die Infos zum Produkt in die Datenbank eintragen #
#########################################################################
try:
product_colum={ 'barcode': eancode[0].content, 'name' : prodname[0].content, 'list_price' : pricelist[0].content, 'manufacture': manuf[0].content, 'description_sale' : description[0].content }
prodimport = sock.execute(dbname,login,pwd,product,'create',product_colum)
print "Produkt wurde erfolgreich eingetragen"
except Exception ,e :
print str(e)

models.xml:

<?xml version='1.0' encoding='utf-8'?>
<openerp>
<data>
<record id="itscope_modul_wizard" model="ir.ui.view">
<field name="name">itscope.modul.wizard.form</field>
<field name="model">itscope.modul.wizard</field>
<field name="arch" type="xml">
<form string="Import Itscope" version="0.1">
<group col="4" colspan="4" attrs="{'invisible':[('state','=','done')]}">
<label string="Willkommen beim Itscope Import" colspan="4"/>
<field name="Ean"/><newline/>
<field name="Language"/><newline/>
 </group>
<group col="2" colspan="4">
<field name="state" invisible="1"/>
<button string="Cancel" special="cancel" icon="gtk-cancel" states="first"/>
<button string="import" name="search_prod" type="object" icon="gtk-ok" states="first"/>
<button string="Close" special="cancel" icon="gtk-ok" states="done"/>
</group>
</form>
</field>
</record>
<act_window name="Import Itscope" res_model="itscope.modul.wizard" src_model="product.product" view_mode="form" target="new" key2="client_action_multi" id="itscope_modul_act"/>
</data>
</openerp>
0
Avatar
Discard
Avatar
Patrick
Author Best Answer

I solved the Problem. The Problem was the installed Odoo not my Module.

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

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

Sign up
Related Posts Replies Views Activity
Unmet Dependencies in odoo14
modules odoo
Avatar
Avatar
1
Jun 21
6599
comment je peux crée un module hérité d'autres modules ?
modules odooV9
Avatar
0
Jan 24
4566
Module not install in new database
odoo odooV9
Avatar
3
Feb 20
1300
Can I buy some of the Odoo v9 Enterprise modules to use on the Community Edition?
modules odooV9
Avatar
Avatar
2
Dec 15
6065
How to create multiple task in a existing project by code? Solved
community modules odoo
Avatar
Avatar
Avatar
3
Aug 21
4765
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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