تخطي للذهاب إلى المحتوى
أودو القائمة
  • تسجيل الدخول
  • جرب مجاناً
  • التطبيقات
    المالية
    • المحاسبة
    • فوترة
    • النفقات
    • جدول البيانات (BI)
    • المستندات
    • توقيع إلكتروني
    المبيعات
    • إدارة علاقات العملاء
    • المبيعات
    • نقطة البيع للمتاجر
    • نقطة البيع للمطاعم
    • الاشتراكات
    • تأجير
    المواقع الإلكترونية
    • أداة بناء المواقع الإلكترونية
    • متاجر إلكترونية
    • مدونة
    • المنتدى
    • دردشة مباشرة
    • التعليم الإلكتروني
    سلسلة التوريد
    • المستودعات
    • التصنيع
    • إدارة دورة حياة المنتج
    • المشتريات
    • الصيانة
    • الجودة
    الموارد البشرية
    • موظفون
    • التوظيف
    • إجازة عمل
    • التقييمات
    • الإحالات
    • تطبيق الأسطول
    التسويق
    • التسويق الإجتماعي
    • التسويق عبر البريد الإلكتروني
    • التسويق عبر الرسائل النصية
    • فعاليات
    • أتمتة التسويق
    • الاستطلاعات
    الخدمات
    • المشاريع
    • الجداول الزمنية
    • الخدمة الميدانية
    • مكتب المساعدة
    • التخطيط
    • مواعيد
    اﻹنتاجية
    • مناقشة
    • الموافقات
    • إنترنت الأشياء "IoT"
    • بروتوكول ربط المحادثات الصوتية عبر الإنترنت
    • المعرفة
    • WhatsApp
    التطبيقات الخارجية ستوديو أودو منصة أودو السحابية
  • قطاعات الأعمال
    البيع بالتجزئة
    • متجر كتب
    • متجر ملابس
    • متجر أثاث
    • متجر بقالة
    • متجر معدات
    • متجر ألعاب
    الطعام والضيافة
    • بار وحانة
    • المطعم
    • مطعم للوجبات السريعة
    • نزل للضيوف
    • موزّع مشروبات
    • فندق
    العقارات
    • وكالة عقارات
    • شركة هندسة معمارية
    • البناء
    • إدارة العقارات
    • العناية بالحدائق
    • اتحاد مُلاّك العقارات
    استشارة
    • مؤسسة محاسبية
    • شريك أودو
    • وكالة تسويقية
    • منشأة قانونية
    • استقطاب المواهب
    • التدقيق والتوثيق
    التصنيع
    • الأقمشة
    • معدني
    • الأثاث
    • الطعام
    • مصنع خمور
    • هدايا الشركات
    الصحة واللياقة البدنية
    • نادي رياضي
    • متجر نظارات
    • مركز لياقة بدنية
    • الممارسون الصحيون
    • صيدلية
    • صالون تصفيف الشعر
    التجارة
    • عامل صيانة
    • الأجهزة والمعدات التقنية ودعمها
    • أنظمة الطاقة الشمسية
    • صانع أحذية
    • خدمات التنظيف
    • خدمات التكييف (HVAC)
    غير ذلك
    • منظمة غير ربحية
    • وكالة بيئية
    • تأجير لوحات إعلانية
    • تصوير
    • تأجير دراجات
    • بائع وسيط للبرمجيات
    تصفح كافة قطاعات الأعمال
  • مجتمع أودو
    تعلم
    • دروس
    • التوثيق
    • شهادات
    • التدريب
    • مدونة
    • بودكاست
    قم بتعزيز التعليم
    • برنامج تعليم
    • Scale UP! لعبة الأعمال
    • قم بزيارة أودو
    احصل على البرنامج
    • تحميل
    • قارنْ الإصدارات
    • إطلاق
    تعاون
    • جيت هاب "Github"
    • المنتدى
    • فعاليات
    • الترجمات
    • كنْ شريكاً
    • خدمات الشركاء
    • سجل مكتب المحاسبة الخاص بك
    احصل على الخدمات
    • اعثر على شريك
    • اعثر على محاسب
    • قابل أحد مرشدي الأعمال
    • خدمات التنفيذ
    • مراجع العملاء
    • الدعم
    • الترقيات
    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
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
يجب أن تكون مسجلاً حتى تتفاعل مع المجتمع.
كافة المنشورات الأفراد الشارات
علامات التصنيف (عرض الكل)
odoo accounting v14 pos v15
حول هذا المنتدى
المساعدة

[8.0] Severe issue: Constraint Error when creating Chart of Accounts from self-defined Account Templates

اشتراك

تسلم الإشعارات عندما يكون هناك نشاط في هذا المنشور

لقد تم الإبلاغ عن هذا السؤال
2 الردود
10359 أدوات العرض
الصورة الرمزية
Ermin Trevisan

Either I'm stupid, or I'm really the first, who sets up the accounting from scratch without using a localization module in odoo 8.

Because the Swiss localization with almost 2000 accounts is much too bloated for small companies and is also lacking of translations, I started to create a complete set of accounts and tax templates myself.

This is, what I did:

  1. Created a new database, without demo data, multi-company setup.
  2. Installed multi-language chart of accounts, but no localization module.
  3. Created a new empty company and a new empty chart of accounts template
  4. Created account templates for a complete chart of accounts, the templates are correct and the codes are unique.
  5. Created all tax templates, tax codes and fiscal positions.
  6. I have deleted all account and account templates data from the original "Your company", which were possibe to delete because of the constraints.

Then I tried to create the chart of accounts using my own, properly set-up accounts templates and I receive the Constraint Error "The code of the account must be unique per company !".

I have checked the chart of accounts, the accounts, everything is empty, no accounts are setup. I have checked the database where company-id and account-code build a combined key, but there are no account records, the accounts table is empty and therefore it is impossible that duplicate entries could create a cconstraint error. 

This are the logs:

First error:

2014-12-03 22:16:10,434 2691 ERROR P2Swiss openerp.sql_db: bad query: INSERT INTO "account_account" ("id", "currency_id", "code", "reconcile", "name", "level", "company_id", "user_type", "shortcut", "note", "parent_id", "currency_mode", "active", "type", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('account_account_id_seq'), NULL, '106000', false, 'Shortterm securities', 4, 1, 6, NULL, NULL, 113, 'current', true, 'liquidity', 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id

Traceback (most recent call last):

  File "/opt/bitnami/apps/odoo/lib/openerp-8.0_83bd9ee-py2.7.egg/openerp/sql_db.py", line 234, in execute

    res = self._obj.execute(query, params)

IntegrityError: duplicate key value violates unique constraint "account_account_code_company_uniq"

DETAIL:  Key (code, company_id)=(106000, 1) already exists.

Second error: 

2014-12-03 22:16:06,380 2513 WARNING P2Swiss openerp.models: Cannot execute name_search, no _rec_name defined on account.config.settings

2014-12-03 22:16:10,434 2691 ERROR P2Swiss openerp.sql_db: bad query: INSERT INTO "account_account" ("id", "currency_id", "code", "reconcile", "name", "level", "company_id", "user_type", "shortcut", "note", "parent_id", "currency_mode", "active", "type", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('account_account_id_seq'), NULL, '106000', false, 'Shortterm securities', 4, 1, 6, NULL, NULL, 113, 'current', true, 'liquidity', 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id

Traceback (most recent call last):

  File "/opt/bitnami/apps/odoo/lib/openerp-8.0_83bd9ee-py2.7.egg/openerp/sql_db.py", line 234, in execute

    res = self._obj.execute(query, params)

IntegrityError: duplicate key value violates unique constraint "account_account_code_company_uniq"

DETAIL:  Key (code, company_id)=(106000, 1) already exists.

As I said, the account table is empty, there is no account code 106000 (which is anyway an account from the "Your Company".

Please someone tells me that I'm not stupid, but only the first. Should I post this as an issue and what can I do to receive the appropriate attention as this would be a severe and major issue, especially for Switzerland, where no usable accounting localization for small companies is available (sorry, camp2camp, but I'm willing to contribute!).

And what can I do as a fast, but reusable workaround, I need to have setup a working chart of account by Monday next week the latest?

0
الصورة الرمزية
إهمال
Ermin Trevisan
الكاتب

It seems to be a bug, I have opened an issue in github: https://github.com/odoo/odoo/issues/4058

Luke Branch

@Ermin, Thanks, i'll keep an eye on that github issue for any response from Odoo. Have you managed to reproduce this on an instance outside of a Bitnami stack? The fact it is running inside Bitnami is likely to be completely unrelated to the issue you are facing, however it would be interesting to test this just installing from source. Could you provide me with details about how you installed your Odoo 8.0 instance, as well as PostgreSQL version, OS version, etc? I would like to try and setup a development environment that mirrors yours so that I can try to reproduce myself and confirm this as a bug.

Ermin Trevisan
الكاتب

@Luke: I launched a Bitnami 64bit HVM AWS image on a 64bit AWS Ubuntu 14.04 micro instance. Postgres is: "PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14), 64-bit"

Ermin Trevisan
الكاتب

I was so frustrated because I've lost about 25 hours setting up an accounting system in 4 languages, I've never tried it again. I, for myself, am not experienced enough to setup my own "native" installation.

الصورة الرمزية
Luke Branch
أفضل إجابة

@Ermin,

I'd recommend trying to install Odoo 8.0 by installing a fresh clean install of Ubuntu 14.04 from on either a local computer in your office, or on a virtual machine (eg. virtualbox - https://www.virtualbox.org/). Here's a step by step tutorial on how to setup Ubuntu 14.04 in virtualbox:

https://www.youtube.com/watch?v=QkJmahizwO4

Once you have a clean install of Ubuntu 14.04 in your virtualbox VPS (you can install virtualbox on any computer you use without affecting the OS install on that computer) you can just open a terminal and run the following commands:

cd tmp
sudo wget https://raw.githubusercontent.com/lukebranch/odoo-install-scripts/master/odoo-saas4/ubuntu-14-04/odoo_install.sh
sudo sh odoo_install.sh

this will run an install script that will take care of installing Odoo on your Virtualbox VPS for testing. Once the script has finished running you'll need to follow the instructions on screen and restart your Virtualbox VPS.

Once you have restarted you should have an Odoo instance running inside that virtual machine. You'll be able to access it within the VPS by going to a browser (if you installed Ubuntu 14.04 Desktop version) and visiting the following URL:

http://127.0.0.1:8072

if you would like to access the Odoo instance outside of your virtualbox VPS you will just need to open a terminal inside your VPS again and type in the following command:

ifconfig

This will give you your VPS's local IP address on your network. You can then just visit:

http://192.168.1.123:8072    (replace 192.168.1.123 with whatever your VPS's local IP address was from the output of ifconfig).

From my understanding Bitnami has it's own install script that has had some issues in the past. If you are able to reproduce the bug you have described outside of a bitnami instance (eg. the above method installs from the latest source code on github), then it definitely warrants further inspection from Odoo SA, and I will try to push for them to take a look at this issue on github.

Please feel free to comment back if you run into any issues.

1
الصورة الرمزية
إهمال
Ermin Trevisan
الكاتب

I have successfully installed a clear odoo instance and started testing. When I have created a new database using the backup, creating of chart of accounts failed again with the same error. When I created an empty database in single company mode with only the finance and accounting module installed, it worked. Now it needs further testing. Next I will create a new database and try the same again in multi-company mode. I'll keep you posted.

Luke Branch

@Ermin, Out of interest have you done an update of odoo from github and a corresponding command line update of all modules? Please make sure you have a safe copy of the original database before doing this, and do a command line update as follows: 1) sudo service odoo-server stop 2) cd /opt/odoo/odoo-server 3) sudo git pull 4) sudo su odoo 5) ./openerp-gevent --update=all -c /etc/odoo-server.conf 6) Step 4 will take a long time as it updates every module in your database. You should attempt to view your Odoo instance in a browser during this time. Once Odoo loads in the browser the update has finished and you can do a Ctrl + C or Control + C depending on your OS. 7) exit 8) sudo service odoo-server start Once you have updated all modules i'd recommend trying with the (newly) updated database again. If this does not work it may mean that the old database is somehow corrupted, in which case you'll need to export all data to import into a brand new database. I've run into similar issues before (between old backups and updates). Unfortunately sometimes there is no option but to save the data from the old database and migrate it to a brand new database. This has not happened to me often, however I have run into it once or twice with theme module development on older databases.

الصورة الرمزية
Ermin Trevisan
الكاتب أفضل إجابة

I have no computer at hand where I could do a virtualbox install. I would set up an AWS micro instance with a clean Canonical Ubuntu 14.04 64bit image. Would that be comparable?

 

UPDATE:

Finally, I was able to set up a proper set of accounts. I was fiddling around and did mainly the following (can't remember exactly):

- I have set the account configuration wizards to "TODO"

- I have deleted, what I've ever could delete

- I have removed the sample chart of account using this module: https://apps.openerp.com/apps/modules/8.0/account_chart/

- I have installed the new Swiss Accounting Module, which provided a new set of account templates (but no accounts)

- I have updated the chart of accounts using the following new module: https://apps.openerp.com/apps/modules/8.0/account_chart_update/

- I launched the account config wizards again

... and finally it worked out somehow...

0
الصورة الرمزية
إهمال
Tommy Lo

Hi Ermin

I'm facing the same issue with Odoo10 - Fresh installation on Ubuntu and then install swiss accounting 'Kontenplan 2015 (with all the wrong translations etc). After that delete whole account chart and import my own one (Sterchi2015 for Switzerland). After this I get for each new chart setting ther error 'The code of the account must be unique per company !' -- My Account chart has only unique account ID's....everything is fine.

With this error you can not make any booking lines for journal 'Bank'. Untill now I did not find out why any new account chart can be imported.

Do you have news?

Ermin Trevisan
الكاتب

Hi Tom

As I wrote above I was able to solve the problem for 8.0. Meanwhile the accounting changed completely from version 9.0 on.

How did you import your accounts? Did you uninstall the Swiss localization module before?

هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!

أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!

تسجيل
المجتمع
  • دروس
  • التوثيق
  • المنتدى
مصدر مفتوح
  • تحميل
  • جيت هاب "Github"
  • المشغل الآلي رنبوت
  • الترجمات
خدماتنا
  • استضافة أودو إس إتش
  • الدعم
  • الترقية
  • التطويرات المخصصة
  • التعليم
  • اعثر على محاسب
  • اعثر على شريك
  • كنْ شريكاً
معلومات عنا
  • شركتنا
  • أصول العلامة التجارية
  • اتصلْ بنا
  • الوظائف
  • فعاليات
  • بودكاست
  • مدونة
  • عملاء
  • قانوني • الخصوصية
  • الحماية
الْعَرَبيّة 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

أودو هو عبارة عن مجموعة من تطبيقات الأعمال مفتوحة المصدر التي تغطي جميع احتياجات شركتك، مثل: إدارة علاقات العملاء والتجارة الإلكترونية والمحاسبة والمخزون ونقاط البيع وإدارة المشاريع وما إلى ذلك.

ما يجعل من أودو مميزاً هو هدفه بأن يكون سهل الاستخدام للغاية ومتكاملاً تمامًا في الوقت ذاته.

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