nch@tinyerp.com
2010-02-01 10:34:00 +05:30
18 changed files with 757 additions and 634 deletions
+4
View File
@@ -320,6 +320,7 @@ def upgrade_graph(graph, cr, module_list, force=None):
mod_path = get_module_path(module)
terp_file = get_module_resource(module, '__terp__.py')
if not mod_path or not terp_file:
global not_loaded
not_loaded.append(module)
logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: not installable' % (module))
raise osv.osv.except_osv('Error!',"Module '%s' was not found" % (module,))
@@ -710,8 +711,11 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
graph = create_graph(cr, ['base'], force)
has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
global not_loaded
if not_loaded:
#If some module is not loaded don't proceed further
not_loaded = []
return
if update_module:
modobj = pool.get('ir.module.module')
+3 -3
View File
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2010-01-02 05:37+0000\n"
"PO-Revision-Date: 2010-01-30 05:37+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\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: 2010-01-14 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-31 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
#: model:res.country,name:base.sh
msgid "Saint Helena"
msgstr "Света Елена"
msgstr "Св. Елена"
#. module: base
#: wizard_view:res.partner.sms_send,init:0
+4 -4
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2009-11-24 20:04+0000\n"
"Last-Translator: mra (Open ERP) <mra@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-30 05:38+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\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: 2010-01-14 04:46+0000\n"
"X-Launchpad-Export-Date: 2010-01-31 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -1493,7 +1493,7 @@ msgstr "Billentyűkombináció neve"
#. module: base
#: field:res.partner,credit_limit:0
msgid "Credit Limit"
msgstr ""
msgstr "Hitelkeret"
#. module: base
#: help:ir.actions.server,write_id:0
+70 -68
View File
@@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2009-11-27 18:52+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-31 06:40+0000\n"
"Last-Translator: Teru <Unknown>\n"
"Language-Team: Japanese <ja@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: 2010-01-14 04:46+0000\n"
"X-Launchpad-Export-Date: 2010-02-01 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
#: model:res.country,name:base.sh
msgid "Saint Helena"
msgstr ""
msgstr "セント・ヘレナ"
#. module: base
#: wizard_view:res.partner.sms_send,init:0
@@ -35,7 +35,7 @@ msgstr ""
#. module: base
#: field:ir.values,meta_unpickle:0
msgid "Metadata"
msgstr ""
msgstr "メタデータ"
#. module: base
#: field:ir.ui.view,arch:0
@@ -52,19 +52,19 @@ msgstr ""
#. module: base
#: wizard_field:module.lang.import,init,code:0
msgid "Code (eg:en__US)"
msgstr ""
msgstr "コード(例:en_US)"
#. module: base
#: view:workflow:0
#: field:workflow.activity,wkf_id:0
#: field:workflow.instance,wkf_id:0
msgid "Workflow"
msgstr ""
msgstr "ワークフロー"
#. module: base
#: view:wizard.module.lang.export:0
msgid "To browse official translations, you can visit this link: "
msgstr ""
msgstr "公式の翻訳は、次のリンクで見ることができます: "
#. module: base
#: selection:module.lang.install,init,lang:0
@@ -116,7 +116,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.kr
msgid "South Korea"
msgstr ""
msgstr "韓国"
#. module: base
#: model:ir.actions.act_window,name:base.action_workflow_transition_form
@@ -133,7 +133,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.sz
msgid "Swaziland"
msgstr ""
msgstr "スワジランド"
#. module: base
#: model:ir.model,name:base.model_ir_actions_report_custom
@@ -176,7 +176,7 @@ msgstr ""
#: code:addons/base/module/wizard/wizard_export_lang.py:0
#, python-format
msgid "new"
msgstr ""
msgstr "新規"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -237,7 +237,7 @@ msgstr ""
#. module: base
#: field:ir.actions.wizard,wiz_name:0
msgid "Wizard Name"
msgstr ""
msgstr "ウィザード名"
#. module: base
#: view:res.lang:0
@@ -252,7 +252,7 @@ msgstr ""
#. module: base
#: help:ir.rule.group,rules:0
msgid "The rule is satisfied if at least one test is True"
msgstr ""
msgstr "このルールは、少なくとも一つのテストが通ることで満たされます。"
#. module: base
#: selection:ir.report.custom.fields,operation:0
@@ -267,12 +267,12 @@ msgstr ""
#. module: base
#: field:ir.model.data,date_update:0
msgid "Update Date"
msgstr ""
msgstr "日を更新する"
#. module: base
#: field:ir.actions.act_window,src_model:0
msgid "Source Object"
msgstr ""
msgstr "ソース・オブジェクト"
#. module: base
#: model:ir.actions.act_window,name:base.act_ir_actions_todo_form
@@ -290,14 +290,14 @@ msgstr ""
#: field:ir.model.access,group_id:0
#: field:ir.rule,rule_group:0
msgid "Group"
msgstr ""
msgstr "グループ"
#. module: base
#: field:ir.exports.line,name:0
#: field:ir.translation,name:0
#: field:res.partner.bank.type.field,name:0
msgid "Field Name"
msgstr ""
msgstr "フィールド名"
#. module: base
#: model:ir.actions.act_window,name:base.open_module_tree_uninstall
@@ -308,7 +308,7 @@ msgstr ""
#. module: base
#: selection:ir.actions.report.xml,report_type:0
msgid "txt"
msgstr ""
msgstr "txt"
#. module: base
#: wizard_view:server.action.create,init:0
@@ -319,7 +319,7 @@ msgstr ""
#. module: base
#: selection:ir.actions.todo,type:0
msgid "Configure"
msgstr ""
msgstr "設定する"
#. module: base
#: model:res.country,name:base.tv
@@ -330,18 +330,18 @@ msgstr ""
#: selection:ir.model,state:0
#: selection:ir.model.grid,state:0
msgid "Custom Object"
msgstr ""
msgstr "カスタム・オブジェクト"
#. module: base
#: field:res.lang,date_format:0
msgid "Date Format"
msgstr ""
msgstr "日付の書式"
#. module: base
#: field:res.bank,email:0
#: field:res.partner.address,email:0
msgid "E-Mail"
msgstr ""
msgstr "eメール"
#. module: base
#: model:res.country,name:base.an
@@ -381,7 +381,7 @@ msgstr ""
#. module: base
#: help:res.lang,iso_code:0
msgid "This ISO code is the name of po files to use for translations"
msgstr ""
msgstr "このISOコードが、翻訳に使うpoファイルの名前になります。"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -391,7 +391,7 @@ msgstr ""
#. module: base
#: field:ir.actions.todo,note:0
msgid "Text"
msgstr ""
msgstr "テキスト"
#. module: base
#: field:res.country,name:0
@@ -401,12 +401,12 @@ msgstr "国名"
#. module: base
#: model:res.country,name:base.coreturn
msgid "Colombia"
msgstr ""
msgstr "コロンビア"
#. module: base
#: view:ir.module.module:0
msgid "Schedule Upgrade"
msgstr ""
msgstr "スケジュール更新"
#. module: base
#: field:ir.actions.report.custom,report_id:0
@@ -424,7 +424,7 @@ msgstr ""
#: selection:workflow.activity,join_mode:0
#: selection:workflow.activity,split_mode:0
msgid "Xor"
msgstr ""
msgstr "Xor"
#. module: base
#: view:res.partner:0
@@ -435,7 +435,7 @@ msgstr ""
#: view:ir.actions.wizard:0
#: field:wizard.ir.model.menu.create.line,wizard_id:0
msgid "Wizard"
msgstr ""
msgstr "ウィザード"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -447,18 +447,18 @@ msgstr ""
#: view:ir.actions.wizard:0
#: model:ir.ui.menu,name:base.menu_ir_action_wizard
msgid "Wizards"
msgstr ""
msgstr "ウィザード"
#. module: base
#: selection:res.config.view,view:0
msgid "Extended Interface"
msgstr ""
msgstr "拡張インターフェース"
#. module: base
#: code:addons/base/ir/ir_model.py:0
#, python-format
msgid "Custom fields must have a name that starts with 'x_' !"
msgstr ""
msgstr "カスタム・フィールドは、x_で始まる名前を持っていなければなりません。"
#. module: base
#: help:ir.actions.server,action_id:0
@@ -468,12 +468,12 @@ msgstr ""
#. module: base
#: view:wizard.module.lang.export:0
msgid "Export done"
msgstr ""
msgstr "エクスポート完了"
#. module: base
#: view:ir.model:0
msgid "Model Description"
msgstr ""
msgstr "モデルの説明"
#. module: base
#: field:workflow.transition,trigger_expr_id:0
@@ -483,13 +483,13 @@ msgstr ""
#. module: base
#: model:res.country,name:base.jo
msgid "Jordan"
msgstr ""
msgstr "ヨルダン"
#. module: base
#: code:addons/base/ir/ir_model.py:0
#, python-format
msgid "You can not remove the model '%s' !"
msgstr ""
msgstr "あなたは、モデル %s を削除することができません。"
#. module: base
#: model:res.country,name:base.er
@@ -520,7 +520,7 @@ msgstr ""
#. module: base
#: selection:ir.report.custom,type:0
msgid "Bar Chart"
msgstr ""
msgstr "棒グラフ"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -535,7 +535,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.rs
msgid "Serbia"
msgstr ""
msgstr "セルビア"
#. module: base
#: selection:ir.translation,type:0
@@ -563,7 +563,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.pg
msgid "Papua New Guinea"
msgstr ""
msgstr "パプア・ニューギニア"
#. module: base
#: model:res.partner.category,name:base.res_partner_category_4
@@ -583,13 +583,13 @@ msgstr ""
#. module: base
#: model:res.country,name:base.es
msgid "Spain"
msgstr ""
msgstr "スペイン"
#. module: base
#: wizard_view:module.upgrade,end:0
#: wizard_view:module.upgrade,start:0
msgid "You may have to reinstall some language pack."
msgstr ""
msgstr "あなたは、いくつかの言語パックを再インストールしなければならないかもしれません。"
#. module: base
#: field:res.partner.address,mobile:0
@@ -599,7 +599,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.om
msgid "Oman"
msgstr ""
msgstr "オマーン"
#. module: base
#: model:ir.actions.act_window,name:base.action_payterm_form
@@ -626,12 +626,12 @@ msgstr ""
#: model:ir.actions.act_window,name:base.act_menu_create
#: view:wizard.ir.model.menu.create:0
msgid "Create Menu"
msgstr ""
msgstr "メニューを作成する"
#. module: base
#: model:res.country,name:base.in
msgid "India"
msgstr ""
msgstr "インド"
#. module: base
#: model:ir.model,name:base.model_maintenance_contract_module
@@ -652,7 +652,7 @@ msgstr ""
#: field:ir.module.category,child_ids:0
#: field:res.partner.category,child_ids:0
msgid "Child Categories"
msgstr ""
msgstr "子カテゴリ"
#. module: base
#: selection:wizard.module.lang.export,format:0
@@ -667,7 +667,7 @@ msgstr ""
#. module: base
#: view:res.lang:0
msgid "%B - Full month name."
msgstr ""
msgstr "%B - 月名"
#. module: base
#: field:ir.actions.report.xml,report_type:0
@@ -677,7 +677,7 @@ msgstr ""
#: field:ir.values,key:0
#: view:res.partner:0
msgid "Type"
msgstr ""
msgstr "タイプ"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -723,7 +723,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.ir
msgid "Iran"
msgstr ""
msgstr "イラン"
#. module: base
#: model:ir.actions.act_window,name:base.res_request-act
@@ -740,7 +740,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.td
msgid "Chad"
msgstr ""
msgstr "チャド"
#. module: base
#: selection:module.lang.install,init,lang:0
@@ -750,7 +750,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.ug
msgid "Uganda"
msgstr ""
msgstr "ウガンダ"
#. module: base
#: model:res.country,name:base.ne
@@ -760,7 +760,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.ba
msgid "Bosnia-Herzegovina"
msgstr ""
msgstr "ボスニア・ヘルツェゴビナ"
#. module: base
#: field:ir.report.custom.fields,alignment:0
@@ -770,7 +770,7 @@ msgstr ""
#. module: base
#: selection:ir.rule,operator:0
msgid ">="
msgstr ""
msgstr ">="
#. module: base
#: view:res.lang:0
@@ -794,17 +794,17 @@ msgstr ""
#: field:ir.module.module,website:0
#: field:res.partner,website:0
msgid "Website"
msgstr ""
msgstr "ウェブサイト"
#. module: base
#: field:ir.rule.group,rules:0
msgid "Tests"
msgstr ""
msgstr "テスト"
#. module: base
#: view:ir.module.repository:0
msgid "Repository"
msgstr ""
msgstr "リポジトリ"
#. module: base
#: model:res.country,name:base.gs
@@ -824,12 +824,12 @@ msgstr ""
#. module: base
#: model:res.country,name:base.mh
msgid "Marshall Islands"
msgstr ""
msgstr "マーシャル諸島"
#. module: base
#: model:res.country,name:base.ht
msgid "Haiti"
msgstr ""
msgstr "ハイチ"
#. module: base
#: selection:ir.translation,type:0
@@ -839,7 +839,7 @@ msgstr ""
#. module: base
#: selection:ir.ui.view,type:0
msgid "Search"
msgstr ""
msgstr "検索"
#. module: base
#: code:addons/base/ir/ir_report_custom.py:0
@@ -860,7 +860,7 @@ msgstr ""
#. module: base
#: view:ir.module.module:0
msgid "Features"
msgstr ""
msgstr "特徴"
#. module: base
#: field:ir.report.custom,frequency:0
@@ -938,12 +938,12 @@ msgstr ""
#: view:res.bank:0
#: field:res.partner.bank,bank:0
msgid "Bank"
msgstr ""
msgstr "銀行"
#. module: base
#: view:res.lang:0
msgid "Examples"
msgstr ""
msgstr "使用例"
#. module: base
#: field:ir.module.module,reports_by_module:0
@@ -963,13 +963,13 @@ msgstr ""
#. module: base
#: field:ir.default,value:0
msgid "Default Value"
msgstr ""
msgstr "既定値"
#. module: base
#: wizard_field:res.partner.sms_send,init,user:0
#: field:res.users,login:0
msgid "Login"
msgstr ""
msgstr "ログイン"
#. module: base
#: view:maintenance.contract:0
@@ -986,7 +986,7 @@ msgstr ""
#: code:addons/base/ir/ir_model.py:0
#, python-format
msgid "Model %s Does not Exist !"
msgstr ""
msgstr "モデル %s がありません!"
#. module: base
#: code:addons/base/module/module.py:0
@@ -995,6 +995,8 @@ msgid ""
"You try to install the module '%s' that depends on the module:'%s'.\n"
"But this module is not available in your system."
msgstr ""
"あなたは、モジュール %s をインストールしようとしていて、そのモジュールは、モジュール %s に依存しています。\n"
"しかし、このモジュールは、あなたのシステムでは利用可能ではありません。"
#. module: base
#: model:ir.model,name:base.model_res_request_link
@@ -1021,7 +1023,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.tp
msgid "East Timor"
msgstr ""
msgstr "東ティモール"
#. module: base
#: view:ir.rule:0
@@ -1031,7 +1033,7 @@ msgstr ""
#. module: base
#: field:res.currency,accuracy:0
msgid "Computational Accuracy"
msgstr ""
msgstr "計算の精度"
#. module: base
#: model:res.country,name:base.kg
@@ -1052,7 +1054,7 @@ msgstr ""
#: code:addons/base/ir/ir_model.py:0
#, python-format
msgid "You can not read this document! (%s)"
msgstr ""
msgstr "あなたはこの文書を読むことができません!(%s)"
#. module: base
#: selection:ir.ui.menu,icon:0
@@ -1062,7 +1064,7 @@ msgstr ""
#. module: base
#: model:res.country,name:base.mv
msgid "Maldives"
msgstr ""
msgstr "モルディブ"
#. module: base
#: help:ir.values,res_id:0
@@ -1082,7 +1084,7 @@ msgstr ""
#. module: base
#: field:ir.report.custom.fields,width:0
msgid "Fixed Width"
msgstr ""
msgstr "固定幅"
#. module: base
#: model:res.company,overdue_msg:base.main_company
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-27 04:44+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:34+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+445 -378
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
"PO-Revision-Date: 2010-01-26 06:10+0000\n"
"PO-Revision-Date: 2010-01-27 05:47+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\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: 2010-01-27 04:44+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:34+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
+46 -47
View File
@@ -115,8 +115,7 @@
<field name="padding"/>
<field name="number_increment"/>
<field name="number_next"/>
<field name="weight" />
<field name="condition" colspan="4" />
<field name="weight" />
<separator colspan="4" string="Legend (for prefix, suffix)"/>
<group col="8" colspan="4">
<group>
@@ -151,11 +150,11 @@
<field name="name"/>
<field name="code"/>
<field name="company_id"/>
<field name="number_next"/>
<field name="number_increment"/>
<field name="prefix"/>
<field name="padding"/>
<field name="active"/>
<field name="number_next"/>
<field name="number_increment"/>
<field name="prefix"/>
<field name="padding"/>
<field name="active"/>
</tree>
</field>
</record>
@@ -341,36 +340,36 @@
<field name="usage"/>
<field name="view_type"/>
<notebook colspan="4">
<page string="General Settings">
<field colspan="4" name="view_ids">
<form string="Views">
<field colspan="4" name="sequence"/>
<field name="view_mode"/>
<field domain="[('type', '=', view_mode)]" name="view_id"/>
</form>
<tree string="Views">
<field name="sequence"/>
<field name="view_mode"/>
<field name="view_id"/>
</tree>
</field>
<field colspan="4" name="default_user_ids"/>
<field colspan="4" name="menus"/>
<field colspan="4" name="domain"/>
<field colspan="4" name="context"/>
<field name="limit"/>
<field name="auto_refresh"/>
<newline/>
<field name="view_mode"/>
<field name="filter"/>
<field name="view_id"/>
<field name="search_view_id"/>
</page>
<page string="Security">
<separator colspan="4" string="Select Groups" />
<field name="groups_id" nolabel="1" colspan="4" />
</page>
</notebook>
<page string="General Settings">
<field colspan="4" name="view_ids">
<form string="Views">
<field colspan="4" name="sequence"/>
<field name="view_mode"/>
<field domain="[('type', '=', view_mode)]" name="view_id"/>
</form>
<tree string="Views">
<field name="sequence"/>
<field name="view_mode"/>
<field name="view_id"/>
</tree>
</field>
<field colspan="4" name="default_user_ids"/>
<field colspan="4" name="menus"/>
<field colspan="4" name="domain"/>
<field colspan="4" name="context"/>
<field name="limit"/>
<field name="auto_refresh"/>
<newline/>
<field name="view_mode"/>
<field name="filter"/>
<field name="view_id"/>
<field name="search_view_id"/>
</page>
<page string="Security">
<separator colspan="4" string="Select Groups" />
<field name="groups_id" nolabel="1" colspan="4" />
</page>
</notebook>
</form>
</field>
</record>
@@ -996,7 +995,8 @@
<field name="type">tree</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<tree string="Menu">
<tree string="Menu" editable="top">
<field name="sequence"/>
<field icon="icon" name="complete_name"/>
</tree>
</field>
@@ -1216,13 +1216,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Server Action">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="model_id" select="1"/>
<field name="state" select="1"/>
<field name="sequence" select="2"/>
<field name="condition"/>
</group>
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="model_id" select="1"/>
<field name="state" select="1"/>
<field name="sequence" select="2"/>
</group>
<notebook colspan="4">
<page string="Python Code" attrs="{'invisible':[('state','!=','code')]}">
<separator colspan="4" string="Python Code"/>
@@ -1235,7 +1234,7 @@
<field name="trigger_name" select="2" attrs="{'required':[('state','=','trigger')]}"/>
</page>
<page string="Action to Launch" attrs="{'invisible':[('state','!=','client_action')]}">
<separator colspan="4" string="Client Action Configuration"/>
<separator colspan="4" string="Client Action Configuration"/>
<field name="action_id" select="2" attrs="{'required':[('state','=','client_action')]}"/>
</page>
<page string="Email Configuration" attrs="{'invisible':[('state','!=','email')]}">
@@ -1255,7 +1254,7 @@
</page>
<page string="Create / Write" attrs="{'invisible':[('state','!=','object_create'),('state','!=','object_write')]}">
<separator colspan="4" string="Fields Mapping"/>
<field name="srcmodel_id" select="2" attrs="{'required':[('state','!=','dummy'), ('state','!=','sms'), ('state','!=','code'), ('state','!=','loop'),('state','!=','trigger'), ('state','!=','client_action'), ('state','!=','email'), ('state','!=','sms'), ('state','!=','other')]}"/>
<field name="srcmodel_id" select="2" attrs="{'required':[('state','!=','dummy'), ('state','!=','sms'), ('state','!=','code'), ('state','!=','loop'),('state','!=','trigger'), ('state','!=','client_action'), ('state','!=','email'), ('state','!=','sms'), ('state','!=','other')]}"/>
<field name="fields_lines" nolabel="1" select="2" colspan="4">
<tree string="Field Mappings" editable="top">
<field name="col1" domain="[('model_id','=',parent.srcmodel_id or parent.model_id)]"/>
+18 -41
View File
@@ -1,27 +1,27 @@
# -*- coding: utf-8 -*-
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import fields,osv
from tools.safe_eval import safe_eval
import pooler
class ir_sequence_type(osv.osv):
@@ -47,17 +47,12 @@ class ir_sequence(osv.osv):
'number_next': fields.integer('Next Number', required=True),
'number_increment': fields.integer('Increment Number', required=True),
'padding' : fields.integer('Number padding', required=True),
'condition': fields.char('Condition', size=250, help="If set, sequence will only be used in case this python expression matches, and will precede other sequences."),
'weight': fields.integer('Weight',required=True, help="If two sequences match, the highest weight will be used."),
'company_id' : fields.many2one('res.company', 'Company'),
}
_defaults = {
'active': lambda *a: True,
'number_increment': lambda *a: 1,
'number_next': lambda *a: 1,
'padding' : lambda *a : 0,
'weight' : lambda *a: 10,
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'ir.sequence', context=c)
}
def _process(self, s):
@@ -75,30 +70,12 @@ class ir_sequence(osv.osv):
'sec': time.strftime('%S'),
}
def get_id(self, cr, uid, sequence_id, test='id=%s', context=None):
if not context:
context = {}
def get_id(self, cr, uid, sequence_id, test='id', context=None):
try:
cr.execute('SELECT id, number_next, prefix, suffix, padding, condition \
FROM ir_sequence \
WHERE '+test+' AND active=%s ORDER BY weight DESC, length(COALESCE(condition,\'\')) DESC \
FOR UPDATE', (sequence_id, True))
for res in cr.dictfetchall():
if res['condition']:
print "ir_seq: %s has condition:" %res['id'], res['condition'],
try:
bo = safe_eval(res['condition'],context)
if not bo:
print "not matched"
continue
except Exception,e:
# it would be normal to have exceptions, because
# the domain may contain errors
print "Exception.\ne:",e
print "Context:", context
continue
print "Matched!"
assert test in ('code','id')
cr.execute('SELECT id, number_next, prefix, suffix, padding FROM ir_sequence WHERE '+test+'=%s AND active=%s FOR UPDATE', (sequence_id, True))
res = cr.dictfetchone()
if res:
cr.execute('UPDATE ir_sequence SET number_next=number_next+number_increment WHERE id=%s AND active=%s', (res['id'], True))
if res['number_next']:
return self._process(res['prefix']) + '%%0%sd' % res['padding'] % res['number_next'] + self._process(res['suffix'])
@@ -108,8 +85,8 @@ class ir_sequence(osv.osv):
cr.commit()
return False
def get(self, cr, uid, code, context = None):
return self.get_id(cr, uid, code, test='code=%s',context=context)
def get(self, cr, uid, code):
return self.get_id(cr, uid, code, test='code')
ir_sequence()
+53
View File
@@ -23,7 +23,9 @@ from osv import fields,osv
from osv.orm import except_orm
import tools
import pytz
import pooler
from tools.translate import _
from service import security
class groups(osv.osv):
_name = "res.groups"
@@ -119,6 +121,7 @@ def _companies_get(self,cr, uid, context={}):
class users(osv.osv):
__admin_ids = {}
_uid_cache = {}
_name = "res.users"
def get_current_company(self, cr, uid):
@@ -260,6 +263,56 @@ class users(osv.osv):
data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my')
return dataobj.browse(cr, uid, data_id, context).res_id
def login(self, db, login, password):
if not password:
return False
cr = pooler.get_db(db).cursor()
cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password)))
res = cr.fetchone()
cr.close()
if res:
return res[0]
else:
return False
def check_super(self, passwd):
if passwd == tools.config['admin_passwd']:
return True
else:
raise security.ExceptionNoTb('AccessDenied')
def check(self, db, uid, passwd):
if not passwd:
return False
cached_pass = self._uid_cache.get(db, {}).get(uid)
if (cached_pass is not None) and cached_pass == passwd:
return True
cr = pooler.get_db(db).cursor()
cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, True))
res = cr.fetchone()[0]
cr.close()
if not bool(res):
raise security.ExceptionNoTb('AccessDenied')
if res:
if self._uid_cache.has_key(db):
ulist = self._uid_cache[db]
ulist[uid] = passwd
else:
self._uid_cache[db] = {uid:passwd}
return bool(res)
def access(self, db, uid, passwd, sec_level, ids):
if not passwd:
return False
cr = pooler.get_db(db).cursor()
cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd))
res = cr.fetchone()
cr.close()
if not res:
raise security.ExceptionNoTb('Bad username or password')
return res[0]
_constraints = [
(_check_company, 'This user can not connect using this company !', ['company_id']),
]
+10 -4
View File
@@ -38,8 +38,8 @@ import xmlrpclib
import release
class Service(object):
""" Base class for *Local* services
""" Base class for *Local* services
Functionality here is trusted, no authentication.
"""
_services = {}
@@ -52,8 +52,14 @@ class Service(object):
raise Exception("No group for local services")
#GROUPS.setdefault(name, {})[self.__name] = self
def service_exist(self,name):
return Service._services.has_key(name)
@classmethod
def exists(cls, name):
return name in cls._services
@classmethod
def remove(cls, name):
if cls.exists(name):
cls._services.pop(name)
def exportMethod(self, method):
if callable(method):
+1 -1
View File
@@ -304,6 +304,7 @@ class many2one(_column):
for id in ids:
res.setdefault(id, '')
obj = obj.pool.get(self._obj)
# build a dictionary of the form {'id_of_distant_resource': name_of_distant_resource}
from orm import except_orm
try:
@@ -313,7 +314,6 @@ class many2one(_column):
iids = filter(None, res.values())
for iiid in iids:
names[iiid] = '// Access Denied //'
for r in res.keys():
if res[r] and res[r] in names:
res[r] = (res[r], names[res[r]])
+37 -36
View File
@@ -38,39 +38,28 @@
#
#
import time
import datetime
import calendar
import types
import string
import netsvc
import re
import copy
import datetime
import pickle
import random
import re
import string
import sys
import time
import traceback
import types
from lxml import etree
import fields
import netsvc
import tools
from tools.translate import _
import copy
import sys
import copy
try:
from lxml import etree
except ImportError:
sys.stderr.write("ERROR: Import lxml module\n")
sys.stderr.write("ERROR: Try to install the python-lxml package\n")
sys.exit(2)
from tools.config import config
from tools.translate import _
regex_order = re.compile('^([a-z0-9_]+( *desc| *asc)?( *, *|))+$', re.I)
def last_day_of_current_month():
import datetime
import calendar
today = datetime.date.today()
last_day = str(calendar.monthrange(today.year, today.month)[1])
return time.strftime('%Y-%m-' + last_day)
@@ -126,6 +115,8 @@ class browse_record_list(list):
class browse_record(object):
logger = netsvc.Logger()
def __init__(self, cr, uid, id, table, cache, context=None, list_class = None, fields_process={}):
'''
table : the object (inherited from orm)
@@ -172,9 +163,11 @@ class browse_record(object):
else:
return getattr(self._table, name)
else:
logger = netsvc.Logger()
logger.notifyChannel('orm', netsvc.LOG_ERROR, "Programming error: field '%s' does not exist in object '%s' !" % (name, self._table._name))
return None
self.logger.notifyChannel("browse_record", netsvc.LOG_WARNING,
"Field '%s' does not exist in object '%s': \n%s" % (
name, self, ''.join(traceback.format_trace())))
raise KeyError("Field '%s' does not exist in object '%s'" % (
name, self))
# if the field is a classic one or a many2one, we'll fetch all classic and many2one fields
if col._prefetch:
@@ -207,8 +200,11 @@ class browse_record(object):
if not datas:
# Where did those ids come from? Perhaps old entries in ir_model_data?
raise except_orm('NoDataError', 'Field %s in %s%s'%(name,self._table_name,str(ids)))
# Where did those ids come from? Perhaps old entries in ir_model_dat?
self.logger.notifyChannel("browse_record", netsvc.LOG_WARNING,
"No datas found for ids %s in %s \n%s" % (
ids, self, ''.join(traceback.format_trace())))
raise KeyError('Field %s not found in %s'%(name,self))
# create browse records for 'remote' objects
for data in datas:
if len(str(data['id']).split('-')) > 1:
@@ -233,15 +229,18 @@ class browse_record(object):
self._data[data['id']].update(data)
if not name in self._data[self._id]:
#how did this happen?
logger = netsvc.Logger()
logger.notifyChannel("browse_record", netsvc.LOG_ERROR,"Ffields: %s, datas: %s"%(str(fffields),str(datas)))
logger.notifyChannel("browse_record", netsvc.LOG_ERROR,"Data: %s, Table: %s"%(str(self._data[self._id]),str(self._table)))
raise AttributeError(_('Unknown attribute %s in %s ') % (str(name),self._table_name))
self.logger.notifyChannel("browse_record", netsvc.LOG_ERROR,
"Ffields: %s, datas: %s"%(fffields, datas))
self.logger.notifyChannel("browse_record", netsvc.LOG_ERROR,
"Data: %s, Table: %s"%(self._data[self._id], self._table))
raise KeyError(_('Unknown attribute %s in %s ') % (name, self))
return self._data[self._id][name]
def __getattr__(self, name):
# raise an AttributeError exception.
return self[name]
try:
return self[name]
except KeyError, e:
raise AttributeError(e)
def __contains__(self, name):
return (name in self._table._columns) or (name in self._table._inherit_fields) or hasattr(self._table, name)
@@ -2287,7 +2286,6 @@ class orm(orm_template):
elif field['ttype'] == 'one2many':
self._columns[field['name']] = getattr(fields, field['ttype'])(field['relation'], field['relation_field'], **attrs)
elif field['ttype'] == 'many2many':
import random
_rel1 = field['relation'].replace('.', '_')
_rel2 = field['model'].replace('.', '_')
_rel_name = 'x_%s_%s_%s_rel' %(_rel1, _rel2, field['name'])
@@ -3243,9 +3241,12 @@ class orm(orm_template):
qu1 = ''
order_by = self._order
if order:
self._check_qorder(order)
order_by = order or self._order
o = order.split(' ')[0]
if (o in self._columns) and getattr(self._columns[o], '_classic_write'):
order_by = order
limit_str = limit and ' limit %d' % limit or ''
offset_str = offset and ' offset %d' % offset or ''
+1 -1
View File
@@ -46,7 +46,7 @@ def toxml(val):
class report_int(netsvc.Service):
def __init__(self, name, audience='*'):
assert not self.service_exist(name), 'The report "%s" already exist!' % name
assert not self.exists(name), 'The report "%s" already exists!' % name
super(report_int, self).__init__(name, audience)
if name[0:7]<>'report.':
raise Exception, 'ConceptionError, bad report name, should start with "report."'
+6 -45
View File
@@ -22,8 +22,6 @@
import pooler
import tools
_uid_cache = {}
# When rejecting a password, we need to give as little info as possible
class ExceptionNoTb(Exception):
def __init__(self, msg ):
@@ -32,16 +30,9 @@ class ExceptionNoTb(Exception):
self.args = (msg, '')
def login(db, login, password):
if not password:
return False
cr = pooler.get_db(db).cursor()
cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password)))
res = cr.fetchone()
cr.close()
if res:
return res[0]
else:
return False
pool = pooler.get_pool(db)
user_obj = pool.get('res.users')
return user_obj.login(db, login, password)
def check_super(passwd):
if passwd == tools.config['admin_passwd']:
@@ -50,36 +41,6 @@ def check_super(passwd):
raise ExceptionNoTb('AccessDenied')
def check(db, uid, passwd):
if not passwd:
return False
cached_pass = _uid_cache.get(db, {}).get(uid)
if (cached_pass is not None) and cached_pass == passwd:
return True
cr = pooler.get_db(db).cursor()
cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, True))
res = cr.fetchone()[0]
cr.close()
if not bool(res):
raise ExceptionNoTb('AccessDenied')
if res:
if _uid_cache.has_key(db):
ulist = _uid_cache[db]
ulist[uid] = passwd
else:
_uid_cache[db] = {uid:passwd}
return bool(res)
def access(db, uid, passwd, sec_level, ids):
if not passwd:
return False
cr = pooler.get_db(db).cursor()
cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd))
res = cr.fetchone()
cr.close()
if not res:
raise ExceptionNoTb('Bad username or password')
return res[0]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
pool = pooler.get_pool(db)
user_obj = pool.get('res.users')
return user_obj.check(db, uid, passwd)
+12
View File
@@ -347,6 +347,18 @@ class configmanager(object):
res = os.path.abspath(os.path.expanduser(value))
if not os.path.exists(res):
raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, value))
contains_addons = False
for f in os.listdir(res):
modpath = os.path.join(res, f)
if os.path.isdir(modpath) and os.path.exists(os.path.join(modpath, '__init__.py')) and \
os.path.exists(os.path.join(modpath, '__terp__.py')):
contains_addons = True
break
if not contains_addons:
raise optparse.OptionValueError("option %s: The addons-path %r does not seem to a be a valid Addons Directory!" % (opt, value))
setattr(parser.values, option.dest, res)
def load(self):
+3 -3
View File
@@ -41,13 +41,13 @@ class except_wizard(Exception):
class interface(netsvc.Service):
states = {}
def __init__(self, name):
assert not self.service_exist('wizard.'+name), 'The wizard "%s" already exists!'%name
assert not self.exists('wizard.'+name), 'The wizard "%s" already exists!' % (name,)
super(interface, self).__init__('wizard.'+name)
self.exportMethod(self.execute)
self.wiz_name = name
def translate_view(self, cr, node, state, lang):
if node.get('string'):
trans = translate(cr, self.wiz_name+','+state, 'wizard_view', lang, node.get('string').encode('utf8'))
+41
View File
@@ -0,0 +1,41 @@
# Turkish translation for openobject-server
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-server package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
"PO-Revision-Date: 2010-01-29 05:27+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: Turkish <tr@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: 2010-01-30 04:39+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Dedicated system account for the Open ERP server:"
msgstr "Open ERP sunucusu için ayrılmış sistem hesabı:"
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid ""
"The Open ERP server must use a dedicated account for its operation so that "
"the system's security is not compromised by running it with superuser "
"privileges."
msgstr ""
"Sistem güvenliğinin sağlanabilmesi için Open ERP sunucusu bu iş için "
"ayrılmış bir hesap kullanmalıdır."
#. Type: string
#. Description
#: ../openerp-server.templates:1001
msgid "Please choose that account's username."
msgstr "Lütfen bu hesabın kullanıcı adını seçiniz."