[MERGE]: Merge with lp:openobject-server

bzr revid: atp@tinyerp.com-20120316042909-gb2e5cmrilyyhsef
bzr revid: atp@tinyerp.com-20120320050251-bgk9xhsfmb1fws1p
This commit is contained in:
Atul Patel (OpenERP) 2012-03-20 10:32:51 +05:30
commit 258722cc1c
23 changed files with 15767 additions and 338 deletions

View File

@ -1,23 +1,18 @@
*.pyc
.*.swp
.bzrignore
.idea
.project
.pydevproject
.ropeproject
.settings
.DS_Store
openerp/addons/*
openerp/filestore*
.Python
include
lib
bin/activate
bin/activate_this.py
bin/easy_install
bin/easy_install-2.6
bin/pip
bin/python
bin/python2.6
*.pyc
*.pyo
bin/*
build/
bin/yolk
bin/pil*.py
.project
.pydevproject
.settings
include/
lib/
share/

View File

@ -165,11 +165,16 @@ def dumpstacks(sig, frame):
""" Signal handler: dump a stack trace for each existing thread."""
# code from http://stackoverflow.com/questions/132058/getting-stack-trace-from-a-running-python-application#answer-2569696
# modified for python 2.5 compatibility
thread_map = dict(threading._active, **threading._limbo)
id2name = dict([(threadId, thread.getName()) for threadId, thread in thread_map.items()])
threads_info = dict([(th.ident, {'name': th.name,
'uid': getattr(th,'uid','n/a')})
for th in threading.enumerate()])
code = []
for threadId, stack in sys._current_frames().items():
code.append("\n# Thread: %s(%d)" % (id2name[threadId], threadId))
thread_info = threads_info.get(threadId)
code.append("\n# Thread: %s (id:%s) (uid:%s)" % \
(thread_info and thread_info['name'] or 'n/a',
threadId,
thread_info and thread_info['uid'] or 'n/a'))
for filename, lineno, name, line in traceback.extract_stack(stack):
code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
if line:

View File

@ -199,7 +199,7 @@
<field name="code">cf</field>
</record>
<record id="cd" model="res.country">
<field name="name">Congo, The Democratic Republic of the</field>
<field name="name">Congo, Democratic Republic of the</field>
<field name="code">cd</field>
</record>
<record id="cg" model="res.country">

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:44+0000\n"
"PO-Revision-Date: 2012-01-08 15:06+0000\n"
"Last-Translator: kifcaliph <Unknown>\n"
"PO-Revision-Date: 2012-03-19 10:06+0000\n"
"Last-Translator: Abdulwhhab A. Al-Shehri <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-03-10 04:46+0000\n"
"X-Generator: Launchpad (build 14914)\n"
"X-Launchpad-Export-Date: 2012-03-20 04:55+0000\n"
"X-Generator: Launchpad (build 14969)\n"
#. module: base
#: model:res.country,name:base.sh
@ -367,7 +367,7 @@ msgstr "اسم المعالج"
#. module: base
#: model:res.groups,name:base.group_partner_manager
msgid "Partner Manager"
msgstr ""
msgstr "إدارة الشركاء"
#. module: base
#: model:ir.module.category,name:base.module_category_customer_relationship_management
@ -388,7 +388,7 @@ msgstr "تجميع غير ممكن"
#. module: base
#: field:ir.module.category,child_ids:0
msgid "Child Applications"
msgstr ""
msgstr "التطبيقات الفرعية"
#. module: base
#: field:res.partner,credit_limit:0
@ -408,7 +408,7 @@ msgstr "تاريخ التحديث"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_action_rule
msgid "Automated Action Rules"
msgstr ""
msgstr "قواعد الاحداث التلقائية"
#. module: base
#: view:ir.attachment:0
@ -473,11 +473,13 @@ msgid ""
"The user this filter is available to. When left empty the filter is usable "
"by the system only."
msgstr ""
"مرشحات المستخدم غير متوفرة. عندما يترك فارغا فان المرشح يستخدم بواسطة النظام "
"فقط."
#. module: base
#: help:res.partner,website:0
msgid "Website of Partner."
msgstr ""
msgstr "موقع إلكتروني للشريك."
#. module: base
#: help:ir.actions.act_window,views:0
@ -506,7 +508,7 @@ msgstr "تنسيق التاريخ"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_report_designer
msgid "OpenOffice Report Designer"
msgstr ""
msgstr "مصمم تقارير اوبن اوفيس"
#. module: base
#: field:res.bank,email:0
@ -566,7 +568,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_sale_layout
msgid "Sales Orders Print Layout"
msgstr ""
msgstr "تنسيق طباعة اوامر البيع"
#. module: base
#: selection:base.language.install,lang:0
@ -576,7 +578,7 @@ msgstr "الأسبانية"
#. module: base
#: model:ir.module.module,shortdesc:base.module_hr_timesheet_invoice
msgid "Invoice on Timesheets"
msgstr ""
msgstr "فاتورة على جداول زمنية"
#. module: base
#: view:base.module.upgrade:0
@ -700,7 +702,7 @@ msgstr "تمّت عملية التصدير"
#. module: base
#: model:ir.module.module,shortdesc:base.module_plugin_outlook
msgid "Outlook Plug-In"
msgstr ""
msgstr "إضافات الاوت لوك"
#. module: base
#: view:ir.model:0
@ -727,7 +729,7 @@ msgstr "الأردن"
#. module: base
#: help:ir.cron,nextcall:0
msgid "Next planned execution date for this job."
msgstr ""
msgstr "تاريخ الحدث المقرر لاحقا لهذه الوظيفة."
#. module: base
#: code:addons/base/ir/ir_model.py:139
@ -743,7 +745,7 @@ msgstr "إريتريا"
#. module: base
#: sql_constraint:res.company:0
msgid "The company name must be unique !"
msgstr ""
msgstr "اسم الشركة يجب أن يكون فريداً !"
#. module: base
#: view:res.config:0
@ -778,7 +780,7 @@ msgstr ""
#. module: base
#: view:ir.mail_server:0
msgid "Security and Authentication"
msgstr ""
msgstr "الحماية و التحقق من الصلاحيات"
#. module: base
#: view:base.language.export:0
@ -879,7 +881,7 @@ msgstr ""
#. module: base
#: view:res.users:0
msgid "Email Preferences"
msgstr ""
msgstr "تفضيلات البريد الالكتروني"
#. module: base
#: model:ir.module.module,description:base.module_audittrail
@ -971,7 +973,7 @@ msgstr "نييوي"
#. module: base
#: model:ir.module.module,shortdesc:base.module_membership
msgid "Membership Management"
msgstr ""
msgstr "إدارة الإشتراكات"
#. module: base
#: selection:ir.module.module,license:0
@ -998,7 +1000,7 @@ msgstr "أنواع مراجع الطلبات"
#. module: base
#: model:ir.module.module,shortdesc:base.module_google_base_account
msgid "Google Users"
msgstr ""
msgstr "مستخدمي جوجل"
#. module: base
#: help:ir.server.object.lines,value:0
@ -1035,6 +1037,7 @@ msgstr "ملف TGZ"
msgid ""
"Users added to this group are automatically added in the following groups."
msgstr ""
"الاشخاص المضافون الى هذه المجموعة أضيفوا تلقائيا الى المجموعات التالية."
#. module: base
#: view:res.lang:0
@ -1088,7 +1091,7 @@ msgstr "لا يمكن استخدام كلمات مرور فارغة لأسباب
#: code:addons/base/ir/ir_mail_server.py:192
#, python-format
msgid "Connection test failed!"
msgstr ""
msgstr "فشلت محاولة الاتصال!"
#. module: base
#: selection:ir.actions.server,state:0
@ -1209,7 +1212,7 @@ msgstr "الأسبانية / Español (GT)"
#. module: base
#: field:ir.mail_server,smtp_port:0
msgid "SMTP Port"
msgstr ""
msgstr "المنفذ SMTP"
#. module: base
#: model:ir.module.module,shortdesc:base.module_import_sugarcrm
@ -1231,7 +1234,7 @@ msgstr ""
#: code:addons/base/module/wizard/base_language_install.py:55
#, python-format
msgid "Language Pack"
msgstr ""
msgstr "حزمة لغة"
#. module: base
#: model:ir.module.module,shortdesc:base.module_web_tests
@ -1289,11 +1292,14 @@ msgid ""
"reference it\n"
"- creation/update: a mandatory field is not correctly set"
msgstr ""
"لا يمكن إكمال العملية، ربما بسبب أحد الاسباب التالية:\n"
"-الحذف: ربما تكون تحاول حذف سجل بينما هناك سجلات اخرى تشير اليه.\n"
"الانشاء/التحديث: حقل أساسي لم يتم ادخاله بشكل صحيح."
#. module: base
#: field:ir.module.category,parent_id:0
msgid "Parent Application"
msgstr ""
msgstr "التطبيق الرئيسي"
#. module: base
#: code:addons/base/res/res_users.py:222
@ -1310,12 +1316,12 @@ msgstr "لتصدير لغة جديدة، لا تختر أي لغة."
#: model:ir.module.module,shortdesc:base.module_document
#: model:ir.module.module,shortdesc:base.module_knowledge
msgid "Document Management System"
msgstr ""
msgstr "نظام ادارة الوثائق"
#. module: base
#: model:ir.module.module,shortdesc:base.module_crm_claim
msgid "Claims Management"
msgstr ""
msgstr "إدارة المطالبات"
#. module: base
#: model:ir.ui.menu,name:base.menu_purchase_root
@ -1340,6 +1346,9 @@ msgid ""
"use the accounting application of OpenERP, journals and accounts will be "
"created automatically based on these data."
msgstr ""
"قم بتكوين الحسابات البنكية لشركتك و اختر ما تريده ان يظهر في اسفل التقارير. "
"بإمكانك إعادة ترتيب الحسابات من قائمة العرض. إذا كنت تستخدم ملحق الحسابات, "
"سيتم انشاء اليوميات و الحسابات تلقائيا اعتمادا على هذه البيانات."
#. module: base
#: view:ir.module.module:0
@ -1359,6 +1368,14 @@ msgid ""
" * Commitment Date\n"
" * Effective Date\n"
msgstr ""
"\n"
"أضف تواريخ اضافية الى طلب البيع.\n"
"===============================\n"
"\n"
"يمكنك اضافة التواريخ التالية الى طلب البيع:\n"
"* التاريخ المطلوب\n"
"* التاريخ الملتزم به\n"
"* تاريخ السريان\n"
#. module: base
#: model:ir.module.module,shortdesc:base.module_account_sequence
@ -1804,7 +1821,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_hr_evaluation
msgid "Employee Appraisals"
msgstr ""
msgstr "تقييمات الموظف"
#. module: base
#: selection:ir.actions.server,state:0
@ -1853,7 +1870,7 @@ msgstr "نموذج ملحق"
#. module: base
#: field:res.partner.bank,footer:0
msgid "Display on Reports"
msgstr ""
msgstr "عرض على التقارير"
#. module: base
#: model:ir.module.module,description:base.module_l10n_cn
@ -2050,7 +2067,7 @@ msgstr "وضع العرض"
msgid ""
"Display this bank account on the footer of printed documents like invoices "
"and sales orders."
msgstr ""
msgstr "عرض هذا الحساب البنكي على أسفل المطبوعات مثل الفواتير وطلبات البيع."
#. module: base
#: view:base.language.import:0
@ -2159,7 +2176,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_subscription
msgid "Recurring Documents"
msgstr ""
msgstr "وثائق متكررة"
#. module: base
#: model:res.country,name:base.bs
@ -2244,7 +2261,7 @@ msgstr "المجموعات"
#. module: base
#: selection:base.language.install,lang:0
msgid "Spanish (CL) / Español (CL)"
msgstr ""
msgstr "الأسبانية / Español (CL)"
#. module: base
#: model:res.country,name:base.bz
@ -2517,7 +2534,7 @@ msgstr "استيراد / تصدير"
#. module: base
#: model:ir.actions.todo.category,name:base.category_tools_customization_config
msgid "Tools / Customization"
msgstr ""
msgstr "أدوات / تخصيصات"
#. module: base
#: field:ir.model.data,res_id:0
@ -2533,7 +2550,7 @@ msgstr "عنوان البريد الإلكتروني"
#. module: base
#: selection:base.language.install,lang:0
msgid "French (BE) / Français (BE)"
msgstr ""
msgstr "الفرنسية / Français (BE)"
#. module: base
#: view:ir.actions.server:0
@ -2768,7 +2785,7 @@ msgstr "جزيرة نورفولك"
#. module: base
#: selection:base.language.install,lang:0
msgid "Korean (KR) / 한국어 (KR)"
msgstr ""
msgstr "الكورية / 한국어 (KR)"
#. module: base
#: help:ir.model.fields,model:0
@ -3218,7 +3235,7 @@ msgstr ""
#. module: base
#: selection:base.language.install,lang:0
msgid "Finnish / Suomi"
msgstr ""
msgstr "الفنلندية / Suomi"
#. module: base
#: field:ir.rule,perm_write:0
@ -3233,7 +3250,7 @@ msgstr "اللقب"
#. module: base
#: selection:base.language.install,lang:0
msgid "German / Deutsch"
msgstr ""
msgstr "الألمانية / Deutsch"
#. module: base
#: view:ir.actions.server:0
@ -3581,7 +3598,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_point_of_sale
msgid "Point Of Sale"
msgstr ""
msgstr "نقطة بيع"
#. module: base
#: code:addons/base/module/module.py:302
@ -3611,6 +3628,8 @@ msgid ""
"Value Added Tax number. Check the box if the partner is subjected to the "
"VAT. Used by the VAT legal statement."
msgstr ""
"رقم ضريبة القيمة المضافة. ضع علامة في هذا المربع اذا كان الشريك خاضع لضريبة "
"القيمة المضافة. تستخدم بواسطة كشف ضريبة القيمة المضافة القانونية."
#. module: base
#: selection:ir.sequence,implementation:0
@ -3708,7 +3727,7 @@ msgstr "ضريبة القيمة المضافة"
#. module: base
#: field:res.users,new_password:0
msgid "Set password"
msgstr ""
msgstr "ضبط كلمة المرور"
#. module: base
#: view:res.lang:0
@ -3723,7 +3742,7 @@ msgstr "خطأ! لا يمكنك إنشاء فئات متداخلة."
#. module: base
#: view:res.lang:0
msgid "%x - Appropriate date representation."
msgstr ""
msgstr "%x - صيغة التاريخ المناسب"
#. module: base
#: model:ir.module.module,description:base.module_web_mobile
@ -3836,7 +3855,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_fetchmail
msgid "Email Gateway"
msgstr ""
msgstr "بوابة البريد الالكتروني"
#. module: base
#: code:addons/base/ir/ir_mail_server.py:439
@ -3957,7 +3976,7 @@ msgstr "البرتغال"
#. module: base
#: model:ir.module.module,shortdesc:base.module_share
msgid "Share any Document"
msgstr ""
msgstr "مشاركة اي مستند"
#. module: base
#: field:ir.module.module,certificate:0
@ -4235,6 +4254,8 @@ msgid ""
"When no specific mail server is requested for a mail, the highest priority "
"one is used. Default priority is 10 (smaller number = higher priority)"
msgstr ""
"حين إستداعاء البريد من الخادم، يتم اختيار الملف الملقم حسب الاولوية.\r\n"
"القيمة الافتراضية هي 10 (الارقام الاصغر= اولوية أعلى)"
#. module: base
#: model:ir.module.module,description:base.module_crm_partner_assign
@ -4291,7 +4312,7 @@ msgstr "\"كود\" لابد أن يكون فريداً"
#. module: base
#: model:ir.module.module,shortdesc:base.module_hr_expense
msgid "Expenses Management"
msgstr ""
msgstr "إدارة المصروفات و النفقات"
#. module: base
#: view:workflow.activity:0
@ -4438,7 +4459,7 @@ msgstr "غينيا الاستوائية"
#. module: base
#: model:ir.module.module,shortdesc:base.module_warning
msgid "Warning Messages and Alerts"
msgstr ""
msgstr "رسائل التحذير و الاشعارات"
#. module: base
#: view:base.module.import:0
@ -4613,7 +4634,7 @@ msgstr "ليسوتو"
#. module: base
#: model:ir.module.module,shortdesc:base.module_base_vat
msgid "VAT Number Validation"
msgstr ""
msgstr "التحقق من رقم ضريبة القيمة المضافة"
#. module: base
#: model:ir.module.module,shortdesc:base.module_crm_partner_assign
@ -4759,7 +4780,7 @@ msgstr "قيمة لاحقة من السجل للمسلسل"
#. module: base
#: help:ir.mail_server,smtp_user:0
msgid "Optional username for SMTP authentication"
msgstr ""
msgstr "اختياري: اسم المستخدم للتحقق من قبل ملقم البريد"
#. module: base
#: model:ir.model,name:base.model_ir_actions_actions
@ -4844,7 +4865,7 @@ msgstr ""
#. module: base
#: help:res.partner.bank,company_id:0
msgid "Only if this bank account belong to your company"
msgstr ""
msgstr "فقط إذا كان هذا الحساب مملوكا لشركتك"
#. module: base
#: model:res.country,name:base.za
@ -5171,7 +5192,7 @@ msgstr "حقل"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_long_term
msgid "Long Term Projects"
msgstr ""
msgstr "مشروعات المدى البعيد"
#. module: base
#: model:res.country,name:base.ve
@ -12982,7 +13003,7 @@ msgstr "الصحراء الغربية"
#. module: base
#: model:ir.module.category,name:base.module_category_account_voucher
msgid "Invoicing & Payments"
msgstr ""
msgstr "الفواتير و المدفوعات"
#. module: base
#: model:ir.actions.act_window,help:base.action_res_company_form
@ -13186,7 +13207,7 @@ msgstr ""
#. module: base
#: field:res.partner.bank,bank_name:0
msgid "Bank Name"
msgstr ""
msgstr "اسم البنك"
#. module: base
#: model:res.country,name:base.ki
@ -13232,6 +13253,8 @@ msgid ""
"are available. To add a new language, you can use the 'Load an Official "
"Translation' wizard available from the 'Administration' menu."
msgstr ""
"اللغة الافتراضية المستخدمة في الواجهات، عندما تكون هناك ترجمات متوفرة. "
"لإضافة لغة جديدة، يمكنك استخدام 'تحميل ترجمة رسمية' من قائمة \"إدارة\"."
#. module: base
#: model:ir.module.module,description:base.module_l10n_es
@ -13265,7 +13288,7 @@ msgstr "ملف CSV"
#: code:addons/base/res/res_company.py:154
#, python-format
msgid "Phone: "
msgstr ""
msgstr "هاتف "
#. module: base
#: field:res.company,account_no:0
@ -13304,7 +13327,7 @@ msgstr ""
#. module: base
#: field:res.company,vat:0
msgid "Tax ID"
msgstr ""
msgstr "رقم الضرائب"
#. module: base
#: field:ir.model.fields,field_description:0
@ -13426,7 +13449,7 @@ msgstr "الأنشطة"
#. module: base
#: model:ir.module.module,shortdesc:base.module_product
msgid "Products & Pricelists"
msgstr ""
msgstr "المنتجات و قوائم الاسعار"
#. module: base
#: field:ir.actions.act_window,auto_refresh:0
@ -13477,7 +13500,7 @@ msgstr ""
#. module: base
#: field:ir.model.data,name:0
msgid "External Identifier"
msgstr ""
msgstr "مُعرف خارجي"
#. module: base
#: model:ir.actions.act_window,name:base.grant_menu_access
@ -13542,7 +13565,7 @@ msgstr "تصدير"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_nl
msgid "Netherlands - Accounting"
msgstr ""
msgstr "هولندا - محاسبة"
#. module: base
#: field:res.bank,bic:0
@ -13651,7 +13674,7 @@ msgstr "الدليل التقني"
#. module: base
#: view:res.company:0
msgid "Address Information"
msgstr ""
msgstr "معلومات العنوان"
#. module: base
#: model:res.country,name:base.tz
@ -13676,7 +13699,7 @@ msgstr "جزيرة الكريسماس"
#. module: base
#: model:ir.module.module,shortdesc:base.module_web_livechat
msgid "Live Chat Support"
msgstr ""
msgstr "التحدث مع الدعم الفني"
#. module: base
#: view:ir.actions.server:0
@ -13876,7 +13899,7 @@ msgstr ""
#. module: base
#: help:ir.actions.act_window,usage:0
msgid "Used to filter menu and home actions from the user form."
msgstr ""
msgstr "تستخدم لتصفية القائمة و الإجراءات الرئيسية من النموذج المستخدم."
#. module: base
#: model:res.country,name:base.sa
@ -13886,7 +13909,7 @@ msgstr "المملكة العربية السعودية"
#. module: base
#: help:res.company,rml_header1:0
msgid "Appears by default on the top right corner of your printed documents."
msgstr ""
msgstr "يظهر إفتراضيا في أعلى الزاوية اليمنى من الوثائق المطبوعة."
#. module: base
#: model:ir.module.module,shortdesc:base.module_fetchmail_crm_claim
@ -13989,7 +14012,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,description:base.module_auth_openid
msgid "Allow users to login through OpenID."
msgstr ""
msgstr "السماح للمستخدمين بالدخول باستخدام أوبن أي دي(OpenID)."
#. module: base
#: model:ir.module.module,shortdesc:base.module_account_payment
@ -14036,7 +14059,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_report_designer
msgid "Report Designer"
msgstr ""
msgstr "مصمم التقارير"
#. module: base
#: model:ir.ui.menu,name:base.menu_address_book
@ -14075,7 +14098,7 @@ msgstr "الفرص والفرص المحتملة"
#. module: base
#: selection:base.language.install,lang:0
msgid "Romanian / română"
msgstr ""
msgstr "الرومانية / română"
#. module: base
#: view:res.log:0
@ -14129,7 +14152,7 @@ msgstr "تنفيذ للإنشاء"
#. module: base
#: model:res.country,name:base.vi
msgid "Virgin Islands (USA)"
msgstr ""
msgstr "جزيرة فيرجين - (الولايات المتحدة اﻻمريكية)"
#. module: base
#: model:res.country,name:base.tw
@ -14169,12 +14192,12 @@ msgstr ""
#. module: base
#: field:ir.ui.view,field_parent:0
msgid "Child Field"
msgstr ""
msgstr "حقل فرعي."
#. module: base
#: view:ir.rule:0
msgid "Detailed algorithm:"
msgstr ""
msgstr "تفاصيل الخوارزمية."
#. module: base
#: field:ir.actions.act_window,usage:0
@ -14195,7 +14218,7 @@ msgstr "workflow.workitem"
#. module: base
#: model:ir.module.module,shortdesc:base.module_profile_tools
msgid "Miscellaneous Tools"
msgstr ""
msgstr "أدوات متنوعة."
#. module: base
#: model:ir.module.category,description:base.module_category_tools
@ -14242,7 +14265,7 @@ msgstr "عرض:"
#. module: base
#: field:ir.model.fields,view_load:0
msgid "View Auto-Load"
msgstr ""
msgstr "عرض التحميل التلقائي"
#. module: base
#: code:addons/base/ir/ir_model.py:264
@ -14268,7 +14291,7 @@ msgstr ""
#. module: base
#: field:ir.ui.menu,web_icon:0
msgid "Web Icon File"
msgstr ""
msgstr "ملف ايقونة الويب"
#. module: base
#: view:base.module.upgrade:0
@ -14289,7 +14312,7 @@ msgstr "Persian / فارسي"
#. module: base
#: view:ir.actions.act_window:0
msgid "View Ordering"
msgstr ""
msgstr "عرض الطلبات"
#. module: base
#: code:addons/base/module/wizard/base_module_upgrade.py:95
@ -14375,7 +14398,7 @@ msgstr "جزيرة أروبا"
#: code:addons/base/module/wizard/base_module_import.py:60
#, python-format
msgid "File is not a zip file!"
msgstr ""
msgstr "الملف ليس ملف مضغوط(zip)!!"
#. module: base
#: model:res.country,name:base.ar
@ -14504,7 +14527,7 @@ msgstr "عقد ضمان الناشر"
#. module: base
#: selection:base.language.install,lang:0
msgid "Bulgarian / български език"
msgstr ""
msgstr "البلغارية / български език"
#. module: base
#: model:ir.ui.menu,name:base.menu_aftersale
@ -14514,7 +14537,7 @@ msgstr "خدمات بعد البيع"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_fr
msgid "France - Accounting"
msgstr ""
msgstr "فرنسا - محاسبة"
#. module: base
#: view:ir.actions.todo:0
@ -14651,7 +14674,7 @@ msgstr ""
#. module: base
#: selection:base.language.install,lang:0
msgid "Czech / Čeština"
msgstr ""
msgstr "التشيكية / Čeština"
#. module: base
#: model:ir.module.category,name:base.module_category_generic_modules
@ -14778,7 +14801,7 @@ msgstr ""
#. module: base
#: model:ir.module.module,shortdesc:base.module_plugin_thunderbird
msgid "Thunderbird Plug-In"
msgstr ""
msgstr "اضافات - ثندربيرد"
#. module: base
#: model:ir.model,name:base.model_res_country
@ -14796,7 +14819,7 @@ msgstr "الدولة"
#. module: base
#: model:ir.module.module,shortdesc:base.module_project_messages
msgid "In-Project Messaging System"
msgstr ""
msgstr "نظام المراسلة في المشاريع"
#. module: base
#: model:res.country,name:base.pn
@ -14827,7 +14850,7 @@ msgstr ""
#: view:res.partner:0
#: view:res.partner.address:0
msgid "Change Color"
msgstr ""
msgstr "تغيير اللون"
#. module: base
#: model:res.partner.category,name:base.res_partner_category_15
@ -14861,7 +14884,7 @@ msgstr ""
#. module: base
#: field:ir.module.module,auto_install:0
msgid "Automatic Installation"
msgstr ""
msgstr "تحميل تلقائي"
#. module: base
#: model:res.country,name:base.jp
@ -14930,7 +14953,7 @@ msgstr "ir.actions.server"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_ca
msgid "Canada - Accounting"
msgstr ""
msgstr "كندا - محاسبة"
#. module: base
#: model:ir.actions.act_window,name:base.act_ir_actions_todo_form

File diff suppressed because it is too large Load Diff

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:44+0000\n"
"PO-Revision-Date: 2012-03-09 06:40+0000\n"
"PO-Revision-Date: 2012-03-13 11:33+0000\n"
"Last-Translator: Serpent Consulting Services <Unknown>\n"
"Language-Team: Gujarati <gu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-03-10 04:48+0000\n"
"X-Generator: Launchpad (build 14914)\n"
"X-Launchpad-Export-Date: 2012-03-14 04:42+0000\n"
"X-Generator: Launchpad (build 14933)\n"
#. module: base
#: model:res.country,name:base.sh
@ -379,12 +379,12 @@ msgstr "વિઝાર્ડ નુ નામ"
#. module: base
#: model:res.groups,name:base.group_partner_manager
msgid "Partner Manager"
msgstr ""
msgstr "ભાગીદાર વ્યવસ્થાપક"
#. module: base
#: model:ir.module.category,name:base.module_category_customer_relationship_management
msgid "Customer Relationship Management"
msgstr ""
msgstr "ગ્રાહક સંબંધ વ્યવસ્થા(સી.આર.એમ.)"
#. module: base
#: view:ir.module.module:0

15313
openerp/addons/base/i18n/ka.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -54,11 +54,11 @@ class ir_attachment(osv.osv):
ima.check(cr, uid, model, mode)
self.pool.get(model).check_access_rule(cr, uid, mids, mode, context=context)
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
ids = super(ir_attachment, self).search(cr, uid, args, offset=offset,
limit=limit, order=order,
context=context, count=False)
def _search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None):
ids = super(ir_attachment, self)._search(cr, uid, args, offset=offset,
limit=limit, order=order,
context=context, count=count,
access_rights_uid=access_rights_uid)
if not ids:
if count:
return 0

View File

@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP S.A (<http://www.openerp.com>)
# Copyright (C) 2011-2012 OpenERP S.A (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -232,6 +232,11 @@ class ir_mail_server(osv.osv):
if user:
# Attempt authentication - will raise if AUTH service not supported
# The user/password must be converted to bytestrings in order to be usable for
# certain hashing schemes, like HMAC.
# See also bug #597143 and python issue #5285
user = tools.ustr(user).encode('utf-8')
password = tools.ustr(password).encode('utf-8')
connection.login(user, password)
return connection
@ -364,7 +369,6 @@ class ir_mail_server(osv.osv):
:param smtp_user: optional SMTP user, if mail_server_id is not passed
:param smtp_password: optional SMTP password to use, if mail_server_id is not passed
:param smtp_debug: optional SMTP debug flag, if mail_server_id is not passed
:param debug: whether to turn on the SMTP level debugging, output to DEBUG log level
:return: the Message-ID of the message that was just sent, if successfully sent, otherwise raises
MailDeliveryException and logs root cause.
"""

View File

@ -36,12 +36,14 @@ import pooler
_logger = logging.getLogger(__name__)
def _get_fields_type(self, cr, uid, context=None):
# Avoid too many nested `if`s below, as RedHat's Python 2.6
# break on it. See bug 939653.
return sorted([(k,k) for k,v in fields.__dict__.iteritems()
if type(v) == types.TypeType
if issubclass(v, fields._column)
if v != fields._column
if not v._deprecated
if not issubclass(v, fields.function)])
if type(v) == types.TypeType and \
issubclass(v, fields._column) and \
v != fields._column and \
not v._deprecated and \
not issubclass(v, fields.function)])
def _in_modules(self, cr, uid, ids, field_name, arg, context=None):
#pseudo-method used by fields.function in ir.model/ir.model.fields

View File

@ -75,7 +75,7 @@ class ir_rule(osv.osv):
_columns = {
'name': fields.char('Name', size=128, select=1),
'model_id': fields.many2one('ir.model', 'Object',select=1, required=True, ondelete='cascade'),
'model_id': fields.many2one('ir.model', 'Object',select=1, required=True, ondelete="cascade"),
'global': fields.function(_get_value, string='Global', type='boolean', store=True, help="If no group is specified the rule is global and applied to everyone"),
'groups': fields.many2many('res.groups', 'rule_group_rel', 'rule_group_id', 'group_id', 'Groups'),
'domain_force': fields.text('Domain'),

View File

@ -42,6 +42,9 @@ class base_module_upgrade(osv.osv_memory):
@return: New arch of view.
"""
res = super(base_module_upgrade, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if view_type != 'form':
return res
record_id = context and context.get('active_id', False) or False
active_model = context.get('active_model')
if (not record_id) or (not active_model):

View File

@ -21,6 +21,23 @@
from osv import fields, osv
def location_name_search(self, cr, user, name='', args=None, operator='ilike',
context=None, limit=100):
if not args:
args = []
ids = []
if len(name) == 2:
ids = self.search(cr, user, [('code', 'ilike', name)] + args,
limit=limit, context=context)
search_domain = [('name', operator, name)]
if ids: search_domain.append(('id', 'not in', ids))
ids.extend(self.search(cr, user, search_domain + args,
limit=limit, context=context))
locations = self.name_get(cr, user, ids, context)
return sorted(locations, key=lambda (id, name): ids.index(id))
class Country(osv.osv):
_name = 'res.country'
@ -48,23 +65,10 @@ addresses belonging to this country.\n\nYou can use the python-style string pate
_defaults = {
'address_format': "%(street)s\n%(street2)s\n%(city)s,%(state_code)s %(zip)s\n%(country_name)s",
}
def name_search(self, cr, user, name='', args=None, operator='ilike',
context=None, limit=100):
if not args:
args=[]
if not context:
context={}
ids = False
if len(name) == 2:
ids = self.search(cr, user, [('code', 'ilike', name)] + args,
limit=limit, context=context)
if not ids:
ids = self.search(cr, user, [('name', operator, name)] + args,
limit=limit, context=context)
return self.name_get(cr, user, ids, context)
_order='name'
name_search = location_name_search
def create(self, cursor, user, vals, context=None):
if 'code' in vals:
vals['code'] = vals['code'].upper()
@ -77,8 +81,6 @@ addresses belonging to this country.\n\nYou can use the python-style string pate
return super(Country, self).write(cursor, user, ids, vals,
context=context)
Country()
class CountryState(osv.osv):
_description="Country state"
@ -90,23 +92,9 @@ class CountryState(osv.osv):
'code': fields.char('State Code', size=3,
help='The state code in three chars.\n', required=True),
}
def name_search(self, cr, user, name='', args=None, operator='ilike',
context=None, limit=100):
if not args:
args = []
if not context:
context = {}
ids = self.search(cr, user, [('code', 'ilike', name)] + args, limit=limit,
context=context)
if not ids:
ids = self.search(cr, user, [('name', operator, name)] + args,
limit=limit, context=context)
return self.name_get(cr, user, ids, context)
_order = 'code'
CountryState()
name_search = location_name_search
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -121,17 +121,22 @@ def get_encodings(hint_encoding='utf-8'):
if prefenc:
yield prefenc
def ustr(value, hint_encoding='utf-8'):
"""This method is similar to the builtin `str` method, except
it will return unicode() string.
def ustr(value, hint_encoding='utf-8', errors='strict'):
"""This method is similar to the builtin `unicode`, except
that it may try multiple encodings to find one that works
for decoding `value`, and defaults to 'utf-8' first.
@param value: the value to convert
@param hint_encoding: an optional encoding that was detected
upstream and should be tried first to
decode ``value``.
@rtype: unicode
@return: unicode string
:param: value: the value to convert
:param: hint_encoding: an optional encoding that was detecte
upstream and should be tried first to decode ``value``.
:param str error: optional `errors` flag to pass to the unicode
built-in to indicate how illegal character values should be
treated when converting a string: 'strict', 'ignore' or 'replace'.
Passing anything other than 'strict' means that the first
encoding tried will be used, even if it's not the correct
one to use, so be careful! Ignore if value is not a string/unicode.
:rtype: unicode
:raise: UnicodeError if value cannot be coerced to unicode
"""
if isinstance(value, Exception):
return exception_to_unicode(value)
@ -147,7 +152,7 @@ def ustr(value, hint_encoding='utf-8'):
for ln in get_encodings(hint_encoding):
try:
return unicode(value, ln)
return unicode(value, ln, errors=errors)
except Exception:
pass
raise UnicodeError('unable to convert %r' % (value,))

View File

@ -151,7 +151,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
_logger.debug('loading %d packages...', len(graph))
# get db timestamp
cr.execute("select now()::timestamp")
cr.execute("select (now() at time zone 'UTC')::timestamp")
dt_before_load = cr.fetchone()[0]
# register, instantiate and initialize models for each modules

View File

@ -357,6 +357,8 @@ def dispatch_rpc(service_name, method, params):
if rpc_request and rpc_response_flag:
log(rpc_request,logging.DEBUG,'%s.%s'%(service_name,method), replace_request_password(params))
threading.current_thread().uid = None
threading.current_thread().dbname = None
result = ExportService.getService(service_name).dispatch(method, params)
if rpc_request_flag or rpc_response_flag:

View File

@ -364,7 +364,15 @@ class time(_column):
class binary(_column):
_type = 'binary'
_symbol_c = '%s'
_symbol_f = lambda symb: symb and Binary(symb) or None
# Binary values may be byte strings (python 2.6 byte array), but
# the legacy OpenERP convention is to transfer and store binaries
# as base64-encoded strings. The base64 string may be provided as a
# unicode in some circumstances, hence the str() cast in symbol_f.
# This str coercion will only work for pure ASCII unicode strings,
# on purpose - non base64 data must be passed as a 8bit byte strings.
_symbol_f = lambda symb: symb and Binary(str(symb)) or None
_symbol_set = (_symbol_c, _symbol_f)
_symbol_get = lambda self, x: x and str(x)

View File

@ -750,7 +750,7 @@ class BaseModel(object):
name_id = 'model_'+self._name.replace('.', '_')
cr.execute('select * from ir_model_data where name=%s and module=%s', (name_id, context['module']))
if not cr.rowcount:
cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module,model,res_id) VALUES (%s, now(), now(), %s, %s, %s)", \
cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module,model,res_id) VALUES (%s, (now() at time zone 'UTC'), (now() at time zone 'UTC'), %s, %s, %s)", \
(name_id, context['module'], 'ir.model', model_id)
)
@ -816,7 +816,7 @@ class BaseModel(object):
cr.execute("select name from ir_model_data where name=%s", (name1,))
if cr.fetchone():
name1 = name1 + "_" + str(id)
cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module,model,res_id) VALUES (%s, now(), now(), %s, %s, %s)", \
cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module,model,res_id) VALUES (%s, (now() at time zone 'UTC'), (now() at time zone 'UTC'), %s, %s, %s)", \
(name1, context['module'], 'ir.model.fields', id)
)
else:
@ -872,11 +872,11 @@ class BaseModel(object):
for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]):
parent_model = pool.get(parent_name)
if not getattr(cls, '_original_module', None) and name == parent_model._name:
cls._original_module = parent_model._original_module
if not parent_model:
raise TypeError('The model "%s" specifies an unexisting parent class "%s"\n'
'You may need to add a dependency on the parent class\' module.' % (name, parent_name))
if not getattr(cls, '_original_module', None) and name == parent_model._name:
cls._original_module = parent_model._original_module
parent_class = parent_model.__class__
nattr = {}
for s in attributes:
@ -2691,7 +2691,7 @@ class BaseModel(object):
elif val in dict(self._columns[field].selection(self, cr, uid, context=context)):
return
raise except_orm(_('ValidateError'),
_('The value "%s" for the field "%s.%s" is not in the selection') % (value, self._table, field))
_('The value "%s" for the field "%s.%s" is not in the selection') % (value, self._table, field))
def _check_removed_columns(self, cr, log=False):
# iterate on the database columns to drop the NOT NULL constraints
@ -2734,6 +2734,50 @@ class BaseModel(object):
_schema.debug("Table '%s': added foreign key '%s' with definition=REFERENCES \"%s\" ON DELETE %s",
source_table, source_field, dest_model._table, ondelete)
def _drop_constraint(self, cr, source_table, constraint_name):
cr.execute("ALTER TABLE %s DROP CONSTRAINT %s" % (source_table,constraint_name))
def _m2o_fix_foreign_key(self, cr, source_table, source_field, dest_model, ondelete):
# Find FK constraint(s) currently established for the m2o field,
# and see whether they are stale or not
cr.execute("""SELECT confdeltype as ondelete_rule, conname as constraint_name,
cl2.relname as foreign_table
FROM pg_constraint as con, pg_class as cl1, pg_class as cl2,
pg_attribute as att1, pg_attribute as att2
WHERE con.conrelid = cl1.oid
AND cl1.relname = %s
AND con.confrelid = cl2.oid
AND array_lower(con.conkey, 1) = 1
AND con.conkey[1] = att1.attnum
AND att1.attrelid = cl1.oid
AND att1.attname = %s
AND array_lower(con.confkey, 1) = 1
AND con.confkey[1] = att2.attnum
AND att2.attrelid = cl2.oid
AND att2.attname = %s
AND con.contype = 'f'""", (source_table, source_field, 'id'))
constraints = cr.dictfetchall()
if constraints:
if len(constraints) == 1:
# Is it the right constraint?
cons, = constraints
if cons['ondelete_rule'] != POSTGRES_CONFDELTYPES.get((ondelete or 'set null').upper(), 'a')\
or cons['foreign_table'] != dest_model._table:
_schema.debug("Table '%s': dropping obsolete FK constraint: '%s'",
source_table, cons['constraint_name'])
self._drop_constraint(cr, source_table, cons['constraint_name'])
self._m2o_add_foreign_key_checked(source_field, dest_model, ondelete)
# else it's all good, nothing to do!
else:
# Multiple FKs found for the same field, drop them all, and re-create
for cons in constraints:
_schema.debug("Table '%s': dropping duplicate FK constraints: '%s'",
source_table, cons['constraint_name'])
self._drop_constraint(cr, source_table, cons['constraint_name'])
self._m2o_add_foreign_key_checked(source_field, dest_model, ondelete)
def _auto_init(self, cr, context=None):
"""
@ -2932,31 +2976,8 @@ class BaseModel(object):
if isinstance(f, fields.many2one):
dest_model = self.pool.get(f._obj)
ref = dest_model._table
if ref != 'ir_actions':
cr.execute('SELECT confdeltype, conname FROM pg_constraint as con, pg_class as cl1, pg_class as cl2, '
'pg_attribute as att1, pg_attribute as att2 '
'WHERE con.conrelid = cl1.oid '
'AND cl1.relname = %s '
'AND con.confrelid = cl2.oid '
'AND cl2.relname = %s '
'AND array_lower(con.conkey, 1) = 1 '
'AND con.conkey[1] = att1.attnum '
'AND att1.attrelid = cl1.oid '
'AND att1.attname = %s '
'AND array_lower(con.confkey, 1) = 1 '
'AND con.confkey[1] = att2.attnum '
'AND att2.attrelid = cl2.oid '
'AND att2.attname = %s '
"AND con.contype = 'f'", (self._table, ref, k, 'id'))
res2 = cr.dictfetchall()
if res2:
if res2[0]['confdeltype'] != POSTGRES_CONFDELTYPES.get((f.ondelete or 'set null').upper(), 'a'):
cr.execute('ALTER TABLE "' + self._table + '" DROP CONSTRAINT "' + res2[0]['conname'] + '"')
self._m2o_add_foreign_key_checked(k, dest_model, f.ondelete)
cr.commit()
_schema.debug("Table '%s': column '%s': XXX",
self._table, k)
if dest_model._table != 'ir_actions':
self._m2o_fix_foreign_key(cr, self._table, k, dest_model, f.ondelete)
# The field doesn't exist in database. Create it if necessary.
else:
@ -3164,6 +3185,9 @@ class BaseModel(object):
_sql_constraints.
"""
def unify_cons_text(txt):
return txt.lower().replace(', ',',').replace(' (','(')
for (key, con, _) in self._sql_constraints:
conname = '%s_%s' % (self._table, key)
@ -3192,7 +3216,7 @@ class BaseModel(object):
# constraint does not exists:
sql_actions['add']['execute'] = True
sql_actions['add']['msg_err'] = sql_actions['add']['msg_err'] % (sql_actions['add']['query'], )
elif con.lower() not in [item['condef'].lower() for item in existing_constraints]:
elif unify_cons_text(con) not in [unify_cons_text(item['condef']) for item in existing_constraints]:
# constraint exists but its definition has changed:
sql_actions['drop']['execute'] = True
sql_actions['drop']['msg_ok'] = sql_actions['drop']['msg_ok'] % (existing_constraints[0]['condef'].lower(), )
@ -3208,10 +3232,8 @@ class BaseModel(object):
cr.commit()
_schema.debug(sql_action['msg_ok'])
name_id = 'constraint_'+ conname
cr.execute('select conname from pg_constraint where contype=%s and conname=%s',('u', conname),)
existing_const = cr.fetchall()
cr.execute('select * from ir_model_data where name=%s and module=%s', (name_id, module))
if not cr.rowcount and not existing_const:
if not cr.rowcount:
cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module, model) VALUES (%s, now(), now(), %s, %s)", \
(name_id, module, self._name)
)
@ -3435,8 +3457,8 @@ class BaseModel(object):
return "date_trunc('second', %s) as %s" % (f_qual, f)
if f == self.CONCURRENCY_CHECK_FIELD:
if self._log_access:
return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,)
return "now()::timestamp AS %s" % (f,)
return "COALESCE(%s.write_date, %s.create_date, (now() at time zone 'UTC'))::timestamp AS %s" % (self._table, self._table, f,)
return "(now() at time zone 'UTC')::timestamp AS %s" % (f,)
if isinstance(self._columns[f], fields.binary) and context.get('bin_size', False):
return 'length(%s) as "%s"' % (f_qual, f)
return f_qual
@ -3617,7 +3639,7 @@ class BaseModel(object):
return
if not (context.get(self.CONCURRENCY_CHECK_FIELD) and self._log_access):
return
check_clause = "(id = %s AND %s < COALESCE(write_date, create_date, now())::timestamp)"
check_clause = "(id = %s AND %s < COALESCE(write_date, create_date, (now() at time zone 'UTC'))::timestamp)"
for sub_ids in cr.split_for_in_conditions(ids):
ids_to_check = []
for id in sub_ids:
@ -3901,7 +3923,7 @@ class BaseModel(object):
if self._log_access:
upd0.append('write_uid=%s')
upd0.append('write_date=now()')
upd0.append("write_date=(now() at time zone 'UTC')")
upd1.append(user)
if len(upd0):
@ -4168,7 +4190,7 @@ class BaseModel(object):
self._check_selection_field_value(cr, user, field, vals[field], context=context)
if self._log_access:
upd0 += ',create_uid,create_date'
upd1 += ',%s,now()'
upd1 += ",%s,(now() at time zone 'UTC')"
upd2.append(user)
cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
self.check_access_rule(cr, user, [id_new], 'create', context=context)
@ -4401,13 +4423,11 @@ class BaseModel(object):
domain = domain[:]
# if the object has a field named 'active', filter out all inactive
# records unless they were explicitely asked for
if 'active' in self._columns and (active_test and context.get('active_test', True)):
if 'active' in self._all_columns and (active_test and context.get('active_test', True)):
if domain:
active_in_args = False
for a in domain:
if a[0] == 'active':
active_in_args = True
if not active_in_args:
# the item[0] trick below works for domain items and '&'/'|'/'!'
# operators too
if not any(item[0] == 'active' for item in domain):
domain.insert(0, ('active', '=', 1))
else:
domain = [('active', '=', 1)]
@ -4871,15 +4891,15 @@ class BaseModel(object):
def _transient_clean_rows_older_than(self, cr, seconds):
assert self._transient, "Model %s is not transient, it cannot be vacuumed!" % self._name
cr.execute("SELECT id FROM " + self._table + " WHERE"
" COALESCE(write_date, create_date, now())::timestamp <"
" (now() - interval %s)", ("%s seconds" % seconds,))
" COALESCE(write_date, create_date, (now() at time zone 'UTC'))::timestamp <"
" ((now() at time zone 'UTC') - interval %s)", ("%s seconds" % seconds,))
ids = [x[0] for x in cr.fetchall()]
self.unlink(cr, SUPERUSER_ID, ids)
def _transient_clean_old_rows(self, cr, count):
assert self._transient, "Model %s is not transient, it cannot be vacuumed!" % self._name
cr.execute(
"SELECT id, COALESCE(write_date, create_date, now())::timestamp"
"SELECT id, COALESCE(write_date, create_date, (now() at time zone 'UTC'))::timestamp"
" AS t FROM " + self._table +
" ORDER BY t LIMIT %s", (count,))
ids = [x[0] for x in cr.fetchall()]

View File

@ -30,7 +30,7 @@ RELEASE_LEVELS_DISPLAY = {ALPHA: ALPHA,
# properly comparable using normal operarors, for example:
# (6,1,0,'beta',0) < (6,1,0,'candidate',1) < (6,1,0,'candidate',2)
# (6,1,0,'candidate',2) < (6,1,0,'final',0) < (6,1,2,'final',0)
version_info = (6,1,0,FINAL,0)
version_info = (6,2,0,ALPHA,0)
version = '.'.join(map(str,version_info[:2])) + RELEASE_LEVELS_DISPLAY[version_info[3]] + str(version_info[4] or '')
major_version = '.'.join(map(str,version_info[:2]))

View File

@ -561,6 +561,7 @@ class objects_proxy(netsvc.ExportService):
def dispatch(self, method, params):
(db, uid, passwd ) = params[0:3]
threading.current_thread().uid = uid
params = params[3:]
if method == 'obj_list':
raise NameError("obj_list has been discontinued via RPC as of 6.0, please query ir.model directly!")
@ -594,6 +595,7 @@ class wizard(netsvc.ExportService):
def dispatch(self, method, params):
(db, uid, passwd ) = params[0:3]
threading.current_thread().uid = uid
params = params[3:]
if method not in ['execute','create']:
raise KeyError("Method not supported %s" % method)
@ -645,6 +647,7 @@ class report_spool(netsvc.ExportService):
def dispatch(self, method, params):
(db, uid, passwd ) = params[0:3]
threading.current_thread().uid = uid
params = params[3:]
if method not in ['report', 'report_get', 'render_report']:
raise KeyError("Method not supported %s" % method)

View File

@ -96,6 +96,7 @@ class test_ir_sequence_no_gap(unittest2.TestCase):
"""
cr0 = cursor()
cr1 = cursor()
cr1._default_log_exceptions = False # Prevent logging a traceback
msg_re = '^could not obtain lock on row in relation "ir_sequence"$'
with self.assertRaisesRegexp(psycopg2.OperationalError, msg_re):
n0 = registry('ir.sequence').get(cr0, ADMIN_USER_ID, 'test_sequence_type_2', {})

View File

@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -383,7 +383,7 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
res = mail_server_pool.send_email(cr, uid or 1, email_msg, mail_server_id=None,
smtp_server=smtp_server, smtp_port=smtp_port, smtp_user=smtp_user, smtp_password=smtp_password,
smtp_encryption=('ssl' if ssl else None), debug=debug)
smtp_encryption=('ssl' if ssl else None), smtp_debug=debug)
except Exception:
_logger.exception("tools.email_send failed to deliver email")
return False

View File

@ -20,9 +20,7 @@
##############################################################################
def drop_view_if_exists(cr, viewname):
cr.execute("select count(1) from pg_class where relkind=%s and relname=%s", ('v', viewname,))
if cr.fetchone()[0]:
cr.execute("DROP view %s" % (viewname,))
cr.commit()
cr.execute("DROP view IF EXISTS %s CASCADE" % (viewname,))
cr.commit()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: