Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม Odoo
    รับซอฟต์แวร์
    • ดาวน์โหลด
    • เปรียบเทียบรุ่น
    • เผยแพร่
    ทำงานร่วมกัน
    • Github
    • ฟอรั่ม
    • ระบบการจัดงานอีเวนต์
    • การแปล
    • ร่วมเป็นพาร์ทเนอร์
    • Services for Partners
    • ลงทะเบียนเพื่อสร้างบัญชีบริษัทของคุณ
    รับบริการ
    • ค้นหาพาร์ทเนอร์
    • ค้นหานักบัญชี
    • พบกับที่ปรึกษา
    • บริการติดตั้งระบบเพื่อใช้งาน
    • ข้อมูลอ้างอิงลูกค้า
    • การสนับสนุน
    • อัปเกรด
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    รับการสาธิต
  • ราคา
  • ช่วยเหลือ

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

  • ลูกค้าสัมพันธ์
  • e-Commerce
  • ระบบบัญชี
  • สินค้าคงคลัง
  • PoS
  • โปรเจกต์
  • MRP
All apps
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

How to debug Odoo in Eclipse under Winows?

ติดตาม

รับการแจ้งเตือนเมื่อมีกิจกรรมในโพสต์นี้

คำถามนี้ถูกตั้งค่าสถานะ
debugopenerp7eclipsedebugging
10 ตอบกลับ
25673 มุมมอง
อวตาร
Ali Abdelmonem Mustafa Amer

Hi All

I'm New In OpenERP And I Want To Know The Best Way To Debug My Code Using Eclipse

I Tried Many Methods Before That I Found On The Internet But Didn't Work

Please Any One Can Help Me , Told Me In Details Thanks A lot

0
อวตาร
ละทิ้ง
Silviaa

Hello, Have you succeed debug the OpenERP Code . If please post the way

อวตาร
Mariusz Mizgier
คำตอบที่ดีที่สุด

As this question has been asked over and over on this forum, here is a complete guide to Odoo development under Windows 7 (although it is very similiar under Windows 8, so you should be fine using this guide under that operating system). What will you need:

  • A machine with Windows 7 installed on it
  • Internet connection
  • An hour of time to prepare your environment 

NOTE - This is a guide for Odoo v7 development under Windows, therefore it might, but not necessarily will work for v8 - there might be some dependencies problems.

To begin with, we need some software, to get our source code from. Since our software of choice to develop Odoo is Eclipse, we might take full advantage from this and integrate our GIT GUI there as well. 

Step 1 - Eclipse Configuration

First, you should download Eclipse - here you will be able to find version suitable for your system architecture - for the purpose of this guide, I will go with the x86 version. Once downloaded, you might try to run it - when you do this on a system, you have never tried to run Eclipse on, you might see a warning like on a screenshot below.

 

To fix that, click here to download Java SE Runtime Environment 7 version corresponding to your operating system version and install it as soon as it's downloaded. Installation should not be a problem, after that you should be able to start your Eclipse instance. Select your default workspace location and go to another step, which is Python installation and PyDev/EGit integration.

For Python download, click here and download Python 2.7.8 (it is the latest stable version of Python at the time this guide was made). Installation is easy, as you can leave all the default options unchanged. After setup is completed, it is time to get PyDev and EGit. Starting with PyDev, let's get back to Eclipse. From the top-bar, select Window -> Preferences -> Install/Update -> Available Software Sites. Click on Add and fill both fields like on a screenshot below.

After these operations, head to Help -> Install New Software..., from the Work with: list choose PyDev, wait for software to load, select PyDev and click on Next. Next window will show, that PyDev will be installed, so proceed with Next button. Accept the terms of the licence agreement and click Finish to install PyDev. Most likely, during installation you will have to trust PyDev certificates, don't hestiate and do that. After installation is completed, answer Yes to restart Eclipse. It's time for EGit (and Git) now.

Step 2 - Egit and PyDev Configuration

First, you have to get Git package for Windows - I got mine by going here. Installation is easy here as well, as nothing but defaults has been selected. As soon as you are done with installation, go to the well-known window of Available Software Sites tab in Eclipse preferences and add EGit site, which address is http://download.eclipse.org/egit/updates. After that, go back to Install New Software... window, select newly added EGit site and check Eclipse Git Team Provider. After this extension is installed restart your Eclipse. 

As our Eclipse configuration is ready for now, it's a good practice to start on sources download, as it might take some time. To do that, we have to create a new project, by clicking File -> New -> Other (or a shortcut Ctrl + N). When new window is open, go all the way down to PyDev and select PyDev Project. After clicking Next, you will be able to name your project as you wish (mine is Odoov7 - do not use spaces, as it might cause some troubles later on). As soon as you start typing name, the small white X in red circle with comment Project interpreter not specified will appear at the top. To fix that, click on Please configure an interpreter before proceeding and choose Quick Auto-Config. A short moment after, all will be set to go - click on Finish, then say Yes to the associated perspective.

Now it's time to get the source code - to do that, open Window -> Show Perspective -> Other and choose Git -> Git Repositories this time. A new tab will appear - this time with Git integration. Select Clone Git Repository and fill fields like on the screenshot below - you might consider identifying yourself as well

.

In the next window you will be able to select branches you are interested in (as stated in the beginning, this is v7 guide, so I've chosen that). Next window should look like this.

After you have finished this step, it will take some time for sources to download. We will use this time to install PostgreSQL and install some prerequisites for Odoo.

Step 3 - PostgreSQL Configuration

To get PostgreSQL, click here to get the latest version of your database software. When installing, you have to provide postgres user password (type what you wish), default port (I left default value 5432), select locale - United States and install it - after the installation you should be able to run pgAdmin III and open connection to your database cluster with the password provided earlier. When you are here, you should create a new role for the Odoo to work correct - right click on Login Roles, New Login Role... and create a new role called odoo, with a password and Superuser/Can create databases checked on the Role Privileges tab. That's all we need to do in PostgreSQL configuration for now, time for Python libraries.

Step 4 - Python Configuration

First what we need, is easy_install. Installing it under Windows is easy, you need to click here and on the very bottom of the page you can download setuptools-5.7.zip. After extracting it (for example in C:\Python27\Lib), you have to run command line as an Administrator (Start -> Accessories -> right-click on Command Prompt and Run as administrator) and type: C:\Python27\python.exe C:\Python27\Lib\setuptools-5.7\setup.py install . Next step is to install pip, which will run from where you've downloaded it, still in Command Prompt - like C:\Python27\python.exe C:\Downloads\get-pip.py . That way you have both pip and easy_install on your Windows installed.

Now for the other libraries:

  • psycopg2 - click here to download and install
  • babel - type c:\Python27\Scripts\pip.exe install babel in Command Prompt
  • simplejson - type c:\Python27\Scripts\pip.exe install simplejson in Command Prompt
  • lxml - click here to download and install
  • pywin32 - click here to download and install
  • Pillow - click here to download and install (install Pillow for Python 2.7 package)
  • PyYAML - click here to download and install
  • ReportLab - click here to download and install
  • Mako - click here to download and install
  • Pychart - click here, download, extract, go to the directory you extracted it in (that is very important with this library, otherwise intallation will fail!), then install, ie.
    • cd c:\Downloads\PyChart-1.39 [Enter]
    • c:\Python27\python.exe c:\Downloads\PyChart-1.39\setup.py install [Enter]
  • Werkzeug - type c:\Python27\Scripts\pip.exe install werkzeug
  • Dateutil - click here to download and install
  • Six - type c:\Python27\Scripts\pip.exe install six
  • Unittest2 - type c:\Python27\Scripts\pip.exe install unittest2
  • Mock - type c:\Python27\Scripts\pip.exe install mock
  • Openid - type c:\Python27\Scripts\easy_install.exe python-openid
  • Docutils - type c:\Python27\Scripts\easy_install.exe docutils

When your source code is downloaded, you have to add your folder to your project. To do that, you need to right-click on the project name, then New -> Folder. In the next window, select Advanced, Link to alternate location and you have to select the folder you have alredy downloaded. Let's edit configuration files and create a startup configuration, so that we will be able to run your development instance of Odoo.

Step 5 - Final Eclipse Configuration

Configuration file can be found in your Odoo directory in install folder, and it is called openerp-server.conf. When editing that, you have to provide several data:

  • admin_passwd - your admin password for database creation/dropping (can be different than PostgreSQL user!)
  • db_host - localhost
  • db_port - port you have provided during installation, default 5432
  • db_user - user role you have created in previous step, I've suggested odoo
  • db_password - password for that role you have provided when creating it in pgAdmin III
  • addons_path - you have to manually add this line, mine looks like addons_path=C:\Workspace\Odoov7\odoo\addons - it is a path to your addons folder (I use full path in Windows)

As config file is ready, two more steps to go. One is to go to the main directory, where sources are downloaded, find file called openerp-server and rename it to openerp-server.py. That way Eclipse will find it and you will be able to select it as a startup script without a problem. When all of these steps are done, go back to Eclipse and select Run -> Debug Configurations. Select Python Run and in top-left corner click on New launch configuration. Select your project, your main module (which is openerp-server.py) - it should look similiar to what is shown on the screen below.

Go to the Arguments tab, select Variables under Program arguments tab and click on Edit variables, then on Add. Name of the variable can be anything, value is --config=C:\Workspace\Odoov7\odoo\install\openerp-server.conf (your config file localization). Description is also your choice. Save that by clicking Ok, then Ok again and in window Select Variable highlight your variable and click Ok. You should see a view like on a screen below (my variable is called -c).

After all these steps, you are ready to go. Click on the down arrow next to the bug sign, click on your newly created configuration and wait for Odoo to start. As soon as you see in console info, that OpenERP server is running, waiting for connections.... you can type http://localhost:8069 in your web browser and you will be able to create your new database. Of course, all functions in PyDev are working as usual, you can set breakpoints, check variables live and so on. Screenshot attached below.

NOTE2: This guide was prepared on a sandbox Windows 7 installation - no other applications has been installed there. When following strictly to this guide, you should be able to run it without any other operations.

5
อวตาร
ละทิ้ง
Nemanja Dragovic

That is very useful, thank you! And I must ask you for an advice with openERP developing. I am curious to find detailed informations about syntheses of python code and views. From source code I didn't find easy to understand how it works. I know the basics, but there is not documentation that covers this part. In technical memento all of these stuff are written very superficially, and was useful for basic understanding, and not for real problems implementation. Thanks in advance

Mariusz Mizgier

Did you check out https://www.odoo.com/forum/help-1/question/where-is-openerp-v7-documentation-6817 ? That will give you an idea how to look for the answers, although for the most part problems you face will be your way to getting to know how to deal with all the problems ;)

Ben Bernard

Nice, thanks for sharing

อวตาร
Serpent Consulting Services Pvt. Ltd.
คำตอบที่ดีที่สุด

This might help for ubuntu: Debug OpenERP Code.

Its advisable that you should use linux for the dev purpose.

Thanks.

1
อวตาร
ละทิ้ง
อวตาร
said
คำตอบที่ดีที่สุด

try this video :

https://www.youtube.com/watch?v=cKIoE-k3jrA

0
อวตาร
ละทิ้ง
อวตาร
Ettienne Du Plessis
คำตอบที่ดีที่สุด

Hi Thanks for the installation Guide. I followed it exactly and can still not debug the error that i get see below it cannot find a module named CLI in the openerp module. I could also not install unittest2 . I got the sources as described from github

my configuration is as follows

windows 7 32 bit

Eclipse Luna

Python 3.4

ANy help will be greatly appreciated. I have been struggling with his for a while now.

 

pydev debugger: starting (pid: 2160)
Finding files... done.
Traceback (most recent call last):
  File "C:\eclipse\plugins\org.python.pydev_3.7.1.201409021729\pysrc\pydev_runfiles.py", line 470, in __get_module_from_str
    mod = __import__(modname)
  File "C:/Development/Workspace/Odoov7/Odoo\openerp_server.py", line 2, in <module>
    import openerp
  File "C:/Development/Workspace/Odoov7/Odoo\openerp\__init__.py", line 40, in <module>
    import cli
ImportError: No module named 'cli'
ERROR: Module: openerp_server could not be imported (file: C:\Development\Workspace\Odoov7\Odoo\openerp_server.py).

 

 

0
อวตาร
ละทิ้ง
Michael Watchorn

You say you are using python 3.4, but the instructions say to use 2.7 and AFAIK it has not been ported to 3.X yet.

OdooBot
Thanks I have it working under python 2.7
Sent from my BlackBerry® wireless device

From: Michael Watchorn <m_watchorn@mail.odoo.com>
Date: Thu, 16 Oct 2014 14:10:56 -0000
To: Ettienne Du Plessis<ettienne@programmic.co.za>
ReplyTo: "Odoo Inc." <catchall@mail.odoo.com>
Subject: Re: False

You say you are using python 3.4, but the instructions say to use 2.7 and AFAIK it has not been ported to 3.X yet.

--
Michael Watchorn
Sent by Odoo Inc. using Odoo about Forum Post False
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
Different developer modes in odoo
debug developermode debugging
อวตาร
0
ก.ย. 21
7
Debug remote Odoo instance on Ubuntu (installed with package installer)
debug ubuntu debugging
อวตาร
0
ก.ย. 20
4507
ImportError: No module named psycopg2 แก้ไขแล้ว
windows debug eclipse
อวตาร
อวตาร
อวตาร
อวตาร
5
ก.ค. 20
95414
Detailed steps to debug openerp v7.0 on Eclipse
debug openerp eclipse
อวตาร
0
มิ.ย. 15
5761
Can I log to terminal from inside a code field?
debug logging debugging
อวตาร
0
มี.ค. 15
4735
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • Github
  • Runbot
  • การแปล
บริการ
  • โฮสติ้ง odoo.sh เซิร์ฟเวอร์
  • การสนับสนุน
  • อัปเกรด
  • การพัฒนาที่กำหนดเอง
  • การศึกษา
  • ค้นหานักบัญชี
  • ค้นหาพาร์ทเนอร์
  • ร่วมเป็นพาร์ทเนอร์
เกี่ยวกับเรา
  • บริษัทของเรา
  • ทรัพย์สินในรูปของเครื่องหมายการค้า
  • ติดต่อเรา
  • งาน
  • ระบบการจัดงานอีเวนต์
  • พอดแคสต์
  • บล็อก
  • ลูกค้า
  • กฎหมาย • ความเป็นส่วนตัว
  • ความปลอดภัย
الْعَرَبيّة 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 เป็นชุดแอปธุรกิจแบบเปิดที่ครอบคลุมทุกความต้องการของบริษัทของคุณ อาธิ CRM eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ Odoo คือการใช้งานที่ง่ายดายและผสานการทำงานอย่างสมบูรณ์แบบในเวลาเดียวกัน

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