diff options
| author | vra <vra@tinyerp.com> | 2010-06-24 14:16:50 +0530 |
|---|---|---|
| committer | vra <vra@tinyerp.com> | 2010-06-24 14:16:50 +0530 |
| commit | 7ed648ce889dfeaa9045602fad7dca555095e9d4 (patch) | |
| tree | 9dc3dffd579a27ace5529179b203c41227d3e19e /bin | |
| parent | b311f12e2a697bfaad7582aff9ac6502129e9a61 (diff) | |
| parent | 5696ed3785c80671b38fd196584786482d293dea (diff) | |
[MERGE] merge the changes from main trunk branch.
bzr revid: vra@tinyerp.com-20100624084539-ne1e1tscqn1z3jw5
bzr revid: vra@tinyerp.com-20100624084650-svala4jb0dnf7aal
Diffstat (limited to 'bin')
69 files changed, 204 insertions, 159 deletions
diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index a7557448ad2..a538e928cad 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -665,7 +665,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): process_sql_file(cr, fp) elif ext == '.csv': noupdate = (kind == 'init') - tools.convert_csv_import(cr, module_name, file, id_map, mode, noupdate) + tools.convert_csv_import(cr, module_name, pathname, file.read(), id_map, mode, noupdate) elif ext == '.yml': tools.convert_yaml_import(cr, module_name, file, id_map, mode, noupdate) else: diff --git a/bin/addons/base/__openerp__.py b/bin/addons/base/__openerp__.py index e595436d63f..82b092d973c 100644 --- a/bin/addons/base/__openerp__.py +++ b/bin/addons/base/__openerp__.py @@ -51,7 +51,6 @@ 'res/res_request_view.xml', 'res/res_lang_view.xml', 'res/res_log_view.xml', - 'res/res_company_view.xml', 'res/partner/partner_report.xml', 'res/partner/partner_view.xml', 'res/partner/partner_wizard.xml', diff --git a/bin/addons/base/base_menu.xml b/bin/addons/base/base_menu.xml index 4cb56873756..3989ca3641a 100644 --- a/bin/addons/base/base_menu.xml +++ b/bin/addons/base/base_menu.xml @@ -5,12 +5,11 @@ <menuitem id="next_id_4" name="Low Level Objects" parent="base.menu_administration" sequence="3" groups="base.group_extended"/> - <menuitem id="menu_low_workflow" name="Workflow Items" parent="base.next_id_4"/> <menuitem id="menu_custom" name="Customization" parent="base.menu_administration" sequence="2" groups="base.group_extended"/> - <menuitem id="menu_custom_action" name="Actions" parent="base.menu_custom" sequence="20"/> + <menuitem id="menu_custom_action" name="Actions" parent="base.menu_custom" groups="base.group_extended" sequence="20"/> <menuitem id="menu_config" name="Configuration" parent="base.menu_administration" sequence="1"/> <menuitem id="menu_translation" name="Translations" parent="base.menu_administration" sequence="4"/> <menuitem id="menu_translation_app" name="Application Terms" parent="base.menu_translation" sequence="4"/> diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index 7823aca8f18..157f7e12d5c 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -6,7 +6,7 @@ Languages ====================== --> - <menuitem id="next_id_2" name="User Interface" parent="base.menu_custom"/> + <menuitem id="next_id_2" name="User Interface" parent="base.menu_custom" groups="base.group_extended"/> <!-- ====================== diff --git a/bin/addons/base/i18n/am.po b/bin/addons/base/i18n/am.po index a582e6526ba..80403f15e77 100644 --- a/bin/addons/base/i18n/am.po +++ b/bin/addons/base/i18n/am.po @@ -14,7 +14,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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/ar.po b/bin/addons/base/i18n/ar.po index 5606cb1b8c8..c5d3e3fcb9d 100644 --- a/bin/addons/base/i18n/ar.po +++ b/bin/addons/base/i18n/ar.po @@ -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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/bg.po b/bin/addons/base/i18n/bg.po index 3fe3225e206..3a4c2e8e95e 100644 --- a/bin/addons/base/i18n/bg.po +++ b/bin/addons/base/i18n/bg.po @@ -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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/bs.po b/bin/addons/base/i18n/bs.po index c5297c48f55..7e315e7fa30 100644 --- a/bin/addons/base/i18n/bs.po +++ b/bin/addons/base/i18n/bs.po @@ -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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/ca.po b/bin/addons/base/i18n/ca.po index 014c69182eb..d90d0220fbe 100644 --- a/bin/addons/base/i18n/ca.po +++ b/bin/addons/base/i18n/ca.po @@ -14,7 +14,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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/cs.po b/bin/addons/base/i18n/cs.po index 60cb03a8b7d..0d0d392a398 100644 --- a/bin/addons/base/i18n/cs.po +++ b/bin/addons/base/i18n/cs.po @@ -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-06-07 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/da.po b/bin/addons/base/i18n/da.po index 73d2ab0335e..e137e2ca2dd 100644 --- a/bin/addons/base/i18n/da.po +++ b/bin/addons/base/i18n/da.po @@ -14,7 +14,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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/de.po b/bin/addons/base/i18n/de.po index 7738b9f8ef3..be7d1695ccc 100644 --- a/bin/addons/base/i18n/de.po +++ b/bin/addons/base/i18n/de.po @@ -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-06-01 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/el.po b/bin/addons/base/i18n/el.po index d811aeebb79..d0a085103c9 100644 --- a/bin/addons/base/i18n/el.po +++ b/bin/addons/base/i18n/el.po @@ -12,7 +12,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-06-01 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Poedit-Country: GREECE\n" "X-Poedit-Language: Greek\n" diff --git a/bin/addons/base/i18n/en_GB.po b/bin/addons/base/i18n/en_GB.po index 5a634c62c29..ac9ea0dbd51 100644 --- a/bin/addons/base/i18n/en_GB.po +++ b/bin/addons/base/i18n/en_GB.po @@ -14,7 +14,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-06-08 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/es.po b/bin/addons/base/i18n/es.po index cfcfb68d89e..7ef56cd9aeb 100644 --- a/bin/addons/base/i18n/es.po +++ b/bin/addons/base/i18n/es.po @@ -14,7 +14,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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/es_EC.po b/bin/addons/base/i18n/es_EC.po index 1d354147aa7..ad9d4fd88a0 100644 --- a/bin/addons/base/i18n/es_EC.po +++ b/bin/addons/base/i18n/es_EC.po @@ -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-06-01 03:44+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:52+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/et.po b/bin/addons/base/i18n/et.po index 5354c94aeff..039f220729f 100644 --- a/bin/addons/base/i18n/et.po +++ b/bin/addons/base/i18n/et.po @@ -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-06-01 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/eu.po b/bin/addons/base/i18n/eu.po index 06da2bb596b..6a4e39fb665 100644 --- a/bin/addons/base/i18n/eu.po +++ b/bin/addons/base/i18n/eu.po @@ -14,7 +14,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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/fa.po b/bin/addons/base/i18n/fa.po index 10c25bb2650..d446193c811 100644 --- a/bin/addons/base/i18n/fa.po +++ b/bin/addons/base/i18n/fa.po @@ -9,7 +9,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-06-01 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" "X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n" "X-Poedit-Language: Persian\n" diff --git a/bin/addons/base/i18n/fi.po b/bin/addons/base/i18n/fi.po index 1573f729ae8..fd371b9d73c 100644 --- a/bin/addons/base/i18n/fi.po +++ b/bin/addons/base/i18n/fi.po @@ -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-06-01 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/fr.po b/bin/addons/base/i18n/fr.po index 05e3def81ad..684dbda65dc 100644 --- a/bin/addons/base/i18n/fr.po +++ b/bin/addons/base/i18n/fr.po @@ -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-06-01 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/gl.po b/bin/addons/base/i18n/gl.po index fdd3b2a7707..1f8998b53fe 100644 --- a/bin/addons/base/i18n/gl.po +++ b/bin/addons/base/i18n/gl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-06-20 14:33+0000\n" +"PO-Revision-Date: 2010-06-21 04:04+0000\n" "Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n" "Language-Team: Galician <gl@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-06-21 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/he.po b/bin/addons/base/i18n/he.po index 0b23d95101d..22b4de8a704 100644 --- a/bin/addons/base/i18n/he.po +++ b/bin/addons/base/i18n/he.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/hr.po b/bin/addons/base/i18n/hr.po index 057659d69d4..58051891d3b 100644 --- a/bin/addons/base/i18n/hr.po +++ b/bin/addons/base/i18n/hr.po @@ -7,13 +7,13 @@ 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-06-20 03:58+0000\n" +"PO-Revision-Date: 2010-06-23 04:21+0000\n" "Last-Translator: Goran Kliska <gkliska@gmail.com>\n" "Language-Team: openerp-translators\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-06-21 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n" "X-Generator: Launchpad (build Unknown)\n" "Language: hr\n" diff --git a/bin/addons/base/i18n/hu.po b/bin/addons/base/i18n/hu.po index b5cf07527a9..614854afa77 100644 --- a/bin/addons/base/i18n/hu.po +++ b/bin/addons/base/i18n/hu.po @@ -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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/id.po b/bin/addons/base/i18n/id.po index 9b11df7d7f3..1a8c4b8d5c0 100644 --- a/bin/addons/base/i18n/id.po +++ b/bin/addons/base/i18n/id.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/is.po b/bin/addons/base/i18n/is.po index 8d65060c83c..548c4b9af29 100644 --- a/bin/addons/base/i18n/is.po +++ b/bin/addons/base/i18n/is.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/it.po b/bin/addons/base/i18n/it.po index 5b9f8046f9b..8282063e075 100644 --- a/bin/addons/base/i18n/it.po +++ b/bin/addons/base/i18n/it.po @@ -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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/ja.po b/bin/addons/base/i18n/ja.po index 30704728d7f..1734aa0f31c 100644 --- a/bin/addons/base/i18n/ja.po +++ b/bin/addons/base/i18n/ja.po @@ -8,13 +8,13 @@ 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: 2010-06-20 03:57+0000\n" +"PO-Revision-Date: 2010-06-23 04:19+0000\n" "Last-Translator: Harry (Open ERP) <hmo@tinyerp.com>\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-06-21 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-24 03:45+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/ko.po b/bin/addons/base/i18n/ko.po index 224b438791e..579ba2219db 100644 --- a/bin/addons/base/i18n/ko.po +++ b/bin/addons/base/i18n/ko.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/lt.po b/bin/addons/base/i18n/lt.po index 1a770706c50..b285065581b 100644 --- a/bin/addons/base/i18n/lt.po +++ b/bin/addons/base/i18n/lt.po @@ -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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/lv.po b/bin/addons/base/i18n/lv.po index b84f4476356..fecde0225ac 100644 --- a/bin/addons/base/i18n/lv.po +++ b/bin/addons/base/i18n/lv.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/mn.po b/bin/addons/base/i18n/mn.po index b34a6dfa912..e57da0f77af 100644 --- a/bin/addons/base/i18n/mn.po +++ b/bin/addons/base/i18n/mn.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/nb.po b/bin/addons/base/i18n/nb.po index 400f1503ff1..ec3e02ac951 100644 --- a/bin/addons/base/i18n/nb.po +++ b/bin/addons/base/i18n/nb.po @@ -14,7 +14,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-06-01 03:41+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:49+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/nl.po b/bin/addons/base/i18n/nl.po index 3af90ca7653..881fe88d239 100644 --- a/bin/addons/base/i18n/nl.po +++ b/bin/addons/base/i18n/nl.po @@ -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-06-01 03:40+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/pl.po b/bin/addons/base/i18n/pl.po index 73c0b684140..a0ec098e7f3 100644 --- a/bin/addons/base/i18n/pl.po +++ b/bin/addons/base/i18n/pl.po @@ -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-06-02 03:32+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/pt.po b/bin/addons/base/i18n/pt.po index b581099473b..712502d8487 100644 --- a/bin/addons/base/i18n/pt.po +++ b/bin/addons/base/i18n/pt.po @@ -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-06-01 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/pt_BR.po b/bin/addons/base/i18n/pt_BR.po index 97d6e5347f3..3f146be093b 100644 --- a/bin/addons/base/i18n/pt_BR.po +++ b/bin/addons/base/i18n/pt_BR.po @@ -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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/ro.po b/bin/addons/base/i18n/ro.po index f16c510867d..0666b9250d6 100644 --- a/bin/addons/base/i18n/ro.po +++ b/bin/addons/base/i18n/ro.po @@ -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-06-08 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/ru.po b/bin/addons/base/i18n/ru.po index 016fd93893c..50ddbee24b6 100644 --- a/bin/addons/base/i18n/ru.po +++ b/bin/addons/base/i18n/ru.po @@ -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-06-01 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/sk.po b/bin/addons/base/i18n/sk.po index fb4f7576006..d58bd10902b 100644 --- a/bin/addons/base/i18n/sk.po +++ b/bin/addons/base/i18n/sk.po @@ -14,7 +14,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-06-01 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/sl.po b/bin/addons/base/i18n/sl.po index 8bed28cc7eb..d9ed59003cf 100644 --- a/bin/addons/base/i18n/sl.po +++ b/bin/addons/base/i18n/sl.po @@ -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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/sq.po b/bin/addons/base/i18n/sq.po index 008da916777..65aec50bb26 100644 --- a/bin/addons/base/i18n/sq.po +++ b/bin/addons/base/i18n/sq.po @@ -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-06-01 03:39+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:47+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/sr.po b/bin/addons/base/i18n/sr.po index 3a8a5a15753..eddd3cb7855 100644 --- a/bin/addons/base/i18n/sr.po +++ b/bin/addons/base/i18n/sr.po @@ -14,7 +14,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-06-01 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:50+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/sv.po b/bin/addons/base/i18n/sv.po index 1999c0d2b4e..a7a9f80856d 100644 --- a/bin/addons/base/i18n/sv.po +++ b/bin/addons/base/i18n/sv.po @@ -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-06-20 03:54+0000\n" +"PO-Revision-Date: 2010-06-23 04:18+0000\n" "Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\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-06-21 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/th.po b/bin/addons/base/i18n/th.po index 3b99c1b2e98..5aa5dd12150 100644 --- a/bin/addons/base/i18n/th.po +++ b/bin/addons/base/i18n/th.po @@ -14,7 +14,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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/tlh.po b/bin/addons/base/i18n/tlh.po index 89dfe938b2c..5392b5525b5 100644 --- a/bin/addons/base/i18n/tlh.po +++ b/bin/addons/base/i18n/tlh.po @@ -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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/tr.po b/bin/addons/base/i18n/tr.po index 400c1dc9381..fa46b0f91e3 100644 --- a/bin/addons/base/i18n/tr.po +++ b/bin/addons/base/i18n/tr.po @@ -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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/uk.po b/bin/addons/base/i18n/uk.po index 130d226850c..59e1a67d5c5 100644 --- a/bin/addons/base/i18n/uk.po +++ b/bin/addons/base/i18n/uk.po @@ -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-06-20 03:59+0000\n" +"PO-Revision-Date: 2010-06-23 04:22+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-06-21 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/vi.po b/bin/addons/base/i18n/vi.po index 48ce9e50ac4..025278b3db1 100644 --- a/bin/addons/base/i18n/vi.po +++ b/bin/addons/base/i18n/vi.po @@ -14,7 +14,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-06-01 03:43+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/zh_CN.po b/bin/addons/base/i18n/zh_CN.po index 03987aec694..e580212a6f1 100644 --- a/bin/addons/base/i18n/zh_CN.po +++ b/bin/addons/base/i18n/zh_CN.po @@ -7,13 +7,13 @@ 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-06-20 03:56+0000\n" +"PO-Revision-Date: 2010-06-23 04:19+0000\n" "Last-Translator: Eleanor Chen <chenyueg@gmail.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-06-21 03:42+0000\n" +"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/i18n/zh_TW.po b/bin/addons/base/i18n/zh_TW.po index 7b9fae38745..940918e2398 100644 --- a/bin/addons/base/i18n/zh_TW.po +++ b/bin/addons/base/i18n/zh_TW.po @@ -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-06-01 03:44+0000\n" +"X-Launchpad-Export-Date: 2010-06-23 03:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index 57bf70c8631..d5be9539a0a 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -989,7 +989,7 @@ <field name="context">{'manual':True}</field> <field name="view_id" ref="view_model_tree"/> </record> - <menuitem id="next_id_9" name="Database Structure" parent="base.menu_custom"/> + <menuitem id="next_id_9" name="Database Structure" parent="base.menu_custom" groups="base.group_extended"/> <menuitem action="action_model_model" id="ir_model_model_menu" parent="next_id_9"/> <record id="action_model_fields" model="ir.actions.act_window"> @@ -1477,8 +1477,8 @@ </record> <menuitem id="next_id_11" name="Configuration Wizards" parent="base.menu_config" sequence="1"/> - <menuitem action="act_ir_actions_todo_form" id="menu_ir_actions_todo_form" parent="next_id_11" - groups="base.group_extended"/> + <menuitem action="act_ir_actions_todo_form" id="menu_ir_actions_todo_form" + parent="base.next_id_4" groups="base.group_extended" sequence="20"/> <record id="action_start_configurator" model="ir.actions.server"> <field name="name">Launch Configuration Wizards</field> diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index cdf917692e8..7692c81f4af 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -256,7 +256,8 @@ class act_window(osv.osv): 'auto_search':fields.boolean('Auto Search'), 'default_user_ids': fields.many2many('res.users', 'ir_act_window_user_rel', 'act_id', 'uid', 'Users'), 'search_view' : fields.function(_search_view, type='text', method=True, string='Search View'), - 'menus': fields.char('Menus', size=4096) + 'menus': fields.char('Menus', size=4096), + 'help': fields.text('Action description') } _defaults = { 'type': lambda *a: 'ir.actions.act_window', diff --git a/bin/addons/base/ir/ir_ui_menu.py b/bin/addons/base/ir/ir_ui_menu.py index 3a83badd97e..d7d08fb2c69 100644 --- a/bin/addons/base/ir/ir_ui_menu.py +++ b/bin/addons/base/ir/ir_ui_menu.py @@ -68,17 +68,10 @@ class ir_ui_menu(osv.osv): self._cache = {} def search(self, cr, uid, args, offset=0, limit=None, order=None, - context=None, count=False): + context=None, count=False): - super_offset = cond(uid == 1, offset, 0) - super_limit = cond(uid == 1, limit, None) - super_count = cond(uid == 1, count, False) - - ids = super(ir_ui_menu, self).search(cr, uid, args, super_offset, - super_limit, order, context=context, count=super_count) - - if uid == 1: - return ids + ids = super(ir_ui_menu, self).search(cr, uid, args, offset=0, + limit=None, order=order, context=context, count=False) if not ids: if count: diff --git a/bin/addons/base/ir/workflow/print_instance.py b/bin/addons/base/ir/workflow/print_instance.py index 16a560b2457..259fe51d41a 100644 --- a/bin/addons/base/ir/workflow/print_instance.py +++ b/bin/addons/base/ir/workflow/print_instance.py @@ -25,9 +25,9 @@ import netsvc import report,pooler,tools from operator import itemgetter -def graph_get(cr, graph, wkf_id, nested=False, workitem={}): +def graph_get(cr, graph, wkf_ids, nested=False, workitem={}): import pydot - cr.execute('select * from wkf_activity where wkf_id=%s', (wkf_id,)) + cr.execute('select * from wkf_activity where wkf_id in ('+','.join(['%s']*len(wkf_ids))+')', wkf_ids) nodes = cr.dictfetchall() activities = {} actfrom = {} @@ -60,6 +60,8 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}): cr.execute('select * from wkf_transition where act_from IN %s', (node_ids,)) transitions = cr.dictfetchall() for t in transitions: + if not t['act_to'] in activities: + continue args = {} args['label'] = str(t['condition']).replace(' or ', '\\nor ').replace(' and ', '\\nand ') if t['signal']: @@ -78,9 +80,9 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}): activity_to = actto[t['act_to']][1].get(t['signal'], actto[t['act_to']][0]) graph.add_edge(pydot.Edge( str(activity_from) ,str(activity_to), fontsize='10', **args)) nodes = cr.dictfetchall() - cr.execute('select id from wkf_activity where flow_start=True and wkf_id=%s limit 1', (wkf_id,)) + cr.execute('select * from wkf_activity where flow_start=True and wkf_id in ('+','.join(['%s']*len(wkf_ids))+')', wkf_ids) start = cr.fetchone()[0] - cr.execute("select 'subflow.'||name,id from wkf_activity where flow_stop=True and wkf_id=%s", (wkf_id,)) + cr.execute("select 'subflow.'||name,id from wkf_activity where flow_stop=True and wkf_id in ("+','.join(['%s']*len(wkf_ids))+')', wkf_ids) stop = cr.fetchall() if (stop): stop = (stop[0][1], dict(stop)) @@ -91,8 +93,8 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}): def graph_instance_get(cr, graph, inst_id, nested=False): workitems = {} - cr.execute('select * from wkf_instance where id=%s', (inst_id,)) - inst = cr.dictfetchone() + cr.execute('select wkf_id from wkf_instance where id=%s', (inst_id,)) + inst = cr.fetchall() def workitem_get(instance): cr.execute('select act_id,count(*) from wkf_workitem where inst_id=%s group by act_id', (instance,)) @@ -102,7 +104,7 @@ def graph_instance_get(cr, graph, inst_id, nested=False): for (subflow_id,) in cr.fetchall(): workitems.update(workitem_get(subflow_id)) return workitems - graph_get(cr, graph, inst['wkf_id'], nested, workitem_get(inst_id)) + graph_get(cr, graph, [x[0] for x in inst], nested, workitem_get(inst_id)) # # TODO: pas clean: concurrent !!! @@ -132,12 +134,9 @@ class report_graph_instance(object): (No workflow defined) show showpage''' else: - cr.execute('SELECT id FROM wkf_instance \ - WHERE res_id=%s AND wkf_id=%s \ - ORDER BY state LIMIT 1', - (data['id'], wkfinfo['id'])) - inst_id = cr.fetchone() - if not inst_id: + cr.execute('select i.id from wkf_instance i left join wkf w on (i.wkf_id=w.id) where res_id=%s and osv=%s',(data['id'],data['model'])) + inst_ids = cr.fetchall() + if not inst_ids: ps_string = '''%PS-Adobe-3.0 /inch {72 mul} def /Times-Roman findfont 50 scalefont setfont @@ -145,11 +144,14 @@ showpage''' (No workflow instance defined) show showpage''' else: - inst_id = inst_id[0] - graph = pydot.Dot(fontsize='16', label="""\\\n\\nWorkflow: %s\\n OSV: %s""" % (wkfinfo['name'],wkfinfo['osv']), - size='7.3, 10.1', center='1', ratio='auto', rotate='0', rankdir='TB', - ) - graph_instance_get(cr, graph, inst_id, data.get('nested', False)) + graph = pydot.Dot( + fontsize='16', + label="""\\\n\\nWorkflow: %s\\n OSV: %s""" % (wkfinfo['name'],wkfinfo['osv']), + size='7.3, 10.1', center='1', ratio='auto', rotate='0', rankdir='TB', + ) + for inst_id in inst_ids: + inst_id = inst_id[0] + graph_instance_get(cr, graph, inst_id, data.get('nested', False)) ps_string = graph.create(prog='dot', format='ps') except Exception, e: import traceback, sys diff --git a/bin/addons/base/ir/workflow/workflow_view.xml b/bin/addons/base/ir/workflow/workflow_view.xml index f6bfc0096f1..8713bb50698 100644 --- a/bin/addons/base/ir/workflow/workflow_view.xml +++ b/bin/addons/base/ir/workflow/workflow_view.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - <menuitem id="menu_workflow_root" name="Workflow Definitions" parent="menu_custom"/> + <menuitem id="menu_workflow_root" name="Workflow Definitions" parent="base.menu_custom" groups="base.group_extended"/> <!-- ================================ diff --git a/bin/addons/base/maintenance/maintenance_view.xml b/bin/addons/base/maintenance/maintenance_view.xml index 9d3100c528e..ca5cd459da4 100644 --- a/bin/addons/base/maintenance/maintenance_view.xml +++ b/bin/addons/base/maintenance/maintenance_view.xml @@ -49,7 +49,7 @@ <menuitem name="Maintenance" id="maintenance" - parent="base.menu_administration"/> + parent="base.menu_administration" groups="base.group_extended"/> <menuitem action="action_maintenance_contract_form" diff --git a/bin/addons/base/module/module_view.xml b/bin/addons/base/module/module_view.xml index 37a519fa2d5..bc73800401f 100644 --- a/bin/addons/base/module/module_view.xml +++ b/bin/addons/base/module/module_view.xml @@ -104,12 +104,12 @@ <newline/> <field name="state" readonly="1" select="1"/> <group col="6" colspan="2"> - <button name="button_install" states="uninstalled" string="Schedule for Installation" type="object"/> - <button name="button_install_cancel" states="to install" string="Cancel Install" type="object"/> - <button name="button_uninstall" states="installed" string="Uninstall (beta)" type="object"/> - <button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" type="object"/> - <button name="button_upgrade" states="installed" string="Schedule Upgrade" type="object"/> - <button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" type="object"/> + <button name="button_install" states="uninstalled" string="Schedule for Installation" icon="terp-gtk-jump-to-ltr" type="object"/> + <button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/> + <button name="button_uninstall" states="installed" string="Uninstall (beta)" icon="terp-dialog-close" type="object"/> + <button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/> + <button name="button_upgrade" states="installed" string="Schedule Upgrade" icon="terp-gtk-go-back-rtl" type="object"/> + <button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/> </group> </page> <page string="Dependencies"> @@ -141,12 +141,11 @@ <field name="name"/> <field name="shortdesc"/> <field name="author"/> - <field name='maintainer'/> - <field name='contributors'/> <field name="installed_version"/> <field name="latest_version"/> - <field name="published_version"/> <field name="state"/> + <button name="button_install" states="uninstalled" string="Schedule for Installation" icon="terp-gtk-jump-to-ltr" type="object" help="Schedule for Installation"/> + <button name="button_upgrade" states="installed" string="Schedule Upgrade" icon="terp-gtk-go-back-rtl" type="object" help="Schedule Upgrade"/> </tree> </field> </record> diff --git a/bin/addons/base/res/ir_property.py b/bin/addons/base/res/ir_property.py index 462cb433998..8dcd01c4897 100644 --- a/bin/addons/base/res/ir_property.py +++ b/bin/addons/base/res/ir_property.py @@ -165,7 +165,7 @@ class ir_property(osv.osv): return False - def get(self, cr, uid, name, model, res_id=False, context=None): + def get(self, cr, uid, name, model, res_id=False, context={}): domain = self._get_domain(cr, uid, name, model, context=context) if domain is not None: domain = [('res_id', '=', res_id)] + domain @@ -180,6 +180,7 @@ class ir_property(osv.osv): return ['&', ('res_id', '=', False)] + domain def _get_domain(self, cr, uid, prop_name, model, context=None): + context = context or {} cr.execute('select id from ir_model_fields where name=%s and model=%s', (prop_name, model)) res = cr.fetchone() if not res: @@ -189,8 +190,7 @@ class ir_property(osv.osv): cid = context['force_company'] else: company = self.pool.get('res.company') - cid = company._company_default_get(cr, uid, model, res[0], - context=context) + cid = company._company_default_get(cr, uid, model, res[0], context=context) domain = ['&', ('fields_id', '=', res[0]), '|', ('company_id', '=', cid), ('company_id', '=', False)] diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml index 6cad8d1aa81..4c40ae4991a 100644 --- a/bin/addons/base/res/partner/partner_view.xml +++ b/bin/addons/base/res/partner/partner_view.xml @@ -317,10 +317,6 @@ <page string="Notes"> <field colspan="4" name="comment" nolabel="1"/> </page> -<!-- <page string="History">--> -<!-- <field colspan="4" name="events" nolabel="1" widget="one2many_list" string="Event Logs"/>--> -<!-- </page>--> - </notebook> </form> </field> @@ -393,8 +389,8 @@ <field name="type">ir.actions.act_window</field> <field name="res_model">res.partner</field> <field name="view_type">form</field> - <field name="domain">[('supplier','=',1)]</field> - <field name="context">{'default_customer':0, 'default_supplier':1}</field> + <field name="domain">[]</field> + <field name="context">{'default_customer':0, 'search_default_supplier': 1, 'default_supplier':1}</field> <field name="filter" eval="True"/> </record> diff --git a/bin/addons/base/res/res_company_view.xml b/bin/addons/base/res/res_company_view.xml index 34e58b75b6c..31cb145caa8 100644 --- a/bin/addons/base/res/res_company_view.xml +++ b/bin/addons/base/res/res_company_view.xml @@ -66,7 +66,7 @@ </record> <menuitem id="menu_custom_multicompany" - name="Multi company" + name="Multi-Companies" parent="base.menu_custom" sequence="50"/> diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 3a45bf855b6..e365949b2f9 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -3175,14 +3175,15 @@ class orm(orm_template): # The parent_left/right computation may take up to # 5 seconds. No need to recompute the values if the # parent is the same. Get the current value of the parent - base_query = 'SELECT id FROM %s WHERE id IN %%s AND %s' % \ - (self._table, self._parent_name) - params = (tuple(ids),) parent_val = vals[self._parent_name] if parent_val: - cr.execute(base_query + " != %s", params + (parent_val,)) + query = "SELECT id FROM %s WHERE id IN %%s AND (%s != %%s OR %s IS NULL)" % \ + (self._table, self._parent_name, self._parent_name) + cr.execute(query, (tuple(ids), parent_val)) else: - cr.execute(base_query + " IS NULL", params) + query = "SELECT id FROM %s WHERE id IN %%s AND (%s IS NOT NULL)" % \ + (self._table, self._parent_name) + cr.execute(query, (tuple(ids),)) parents_changed = map(operator.itemgetter(0), cr.fetchall()) upd0 = [] @@ -3864,7 +3865,6 @@ class orm(orm_template): data = self.read(cr, uid, [id], context=context_wo_lang)[0] fields = self.fields_get(cr, uid, context=context) - trans_data=[] for f in fields: ftype = fields[f]['type'] @@ -3883,40 +3883,68 @@ class orm(orm_template): elif ftype in ('one2many', 'one2one'): res = [] rel = self.pool.get(fields[f]['relation']) - if data[f] != False: + if data[f]: + # duplicate following the order of the ids + # because we'll rely on it later for copying + # translations in copy_translation()! + data[f].sort() for rel_id in data[f]: # the lines are first duplicated using the wrong (old) # parent but then are reassigned to the correct one thanks - # to the (4, ...) - d,t = rel.copy_data(cr, uid, rel_id, context=context) + # to the (0, 0, ...) + d = rel.copy_data(cr, uid, rel_id, context=context) res.append((0, 0, d)) - trans_data += t data[f] = res elif ftype == 'many2many': data[f] = [(6, 0, data[f])] - trans_obj = self.pool.get('ir.translation') - #TODO: optimize translations - for f in fields: - trans_name = '' - if f in self._columns and self._columns[f].translate: - trans_name = self._name+","+f - elif f in self._inherit_fields and self._inherit_fields[f][2].translate: - trans_name = self._inherit_fields[f][0] + "," + f - - if trans_name: - trans_ids = trans_obj.search(cr, uid, [ - ('name', '=', trans_name), - ('res_id','=',data['id']) - ]) - - trans_data.extend(trans_obj.read(cr,uid,trans_ids,context=context)) - del data['id'] + # make sure we don't break the current parent_store structure and + # force a clean recompute! + for parent_column in ['parent_left', 'parent_right']: + data.pop(parent_column, None) + for v in self._inherits: del data[self._inherits[v]] - return data, trans_data + return data + + def copy_translations(self, cr, uid, old_id, new_id, context=None): + trans_obj = self.pool.get('ir.translation') + fields = self.fields_get(cr, uid, context=context) + + translation_records = [] + for field_name, field_def in fields.items(): + # we must recursively copy the translations for o2o and o2m + if field_def['type'] in ('one2one', 'one2many'): + target_obj = self.pool.get(field_def['relation']) + old_record, new_record = self.read(cr, uid, [old_id, new_id], [field_name], context=context) + # here we rely on the order of the ids to match the translations + # as foreseen in copy_data() + old_childs = sorted(old_record[field_name]) + new_childs = sorted(new_record[field_name]) + for (old_child, new_child) in zip(old_childs, new_childs): + # recursive copy of translations here + target_obj.copy_translations(cr, uid, old_child, new_child, context=context) + # and for translatable fields we keep them for copy + elif field_def.get('translate'): + trans_name = '' + if field_name in self._columns: + trans_name = self._name + "," + field_name + elif field_name in self._inherit_fields: + trans_name = self._inherit_fields[field_name][0] + "," + field_name + if trans_name: + trans_ids = trans_obj.search(cr, uid, [ + ('name', '=', trans_name), + ('res_id','=', old_id) + ]) + translation_records.extend(trans_obj.read(cr,uid,trans_ids,context=context)) + + for record in translation_records: + del record['id'] + record['res_id'] = new_id + trans_obj.create(cr, uid, record, context=context) + def copy(self, cr, uid, id, default=None, context=None): """ @@ -3931,13 +3959,9 @@ class orm(orm_template): :return: True """ - trans_obj = self.pool.get('ir.translation') - data, trans_data = self.copy_data(cr, uid, id, default, context) + data = self.copy_data(cr, uid, id, default, context) new_id = self.create(cr, uid, data, context) - for record in trans_data: - del record['id'] - record['res_id'] = new_id - trans_obj.create(cr, uid, record, context) + self.copy_translations(cr, uid, id, new_id, context) return new_id def exists(self, cr, uid, ids, context=None): diff --git a/bin/report/render/rml2pdf/trml2pdf.py b/bin/report/render/rml2pdf/trml2pdf.py index 6628817ff9d..771a59fa28f 100644 --- a/bin/report/render/rml2pdf/trml2pdf.py +++ b/bin/report/render/rml2pdf/trml2pdf.py @@ -380,7 +380,7 @@ class _rml_canvas(object): try: u = urllib.urlopen(str(node.get('file'))) s = cStringIO.StringIO(u.read()) - except: + except Exception: u = file(os.path.join(self.path,str(node.get('file'))), 'rb') s = cStringIO.StringIO(u.read()) img = ImageReader(s) @@ -788,7 +788,7 @@ class _rml_template(object): try : gr = pt.findall('pageGraphics')\ or pt[1].findall('pageGraphics') - except : + except Exception: # FIXME: be even more specific, perhaps? gr='' if len(gr): drw = _rml_draw(self.localcontext,gr[0], self.doc, images=images, path=self.path, title=self.title) @@ -818,7 +818,7 @@ def parseNode(rml, localcontext = {},fout=None, images={}, path='.',title=None): try: from customfonts import SetCustomFonts SetCustomFonts(r) - except: + except Exception: pass fp = cStringIO.StringIO() r.render(fp) @@ -832,7 +832,7 @@ def parseString(rml, localcontext = {},fout=None, images={}, path='.',title=None try: from customfonts import SetCustomFonts SetCustomFonts(r) - except: + except Exception: pass if fout: diff --git a/bin/report/render/rml2pdf/utils.py b/bin/report/render/rml2pdf/utils.py index be8695e7eb3..5e42278036f 100644 --- a/bin/report/render/rml2pdf/utils.py +++ b/bin/report/render/rml2pdf/utils.py @@ -63,7 +63,10 @@ def _child_get(node, self=None, tagname=None): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.localcontext) - except: + except GeneratorExit: + continue + except Exception: + logging.getLogger('report').exception() continue if n.get('rml_tag'): try: @@ -72,7 +75,10 @@ def _child_get(node, self=None, tagname=None): n2.tag = tag n2.attrib.update(attr) yield n2 - except: + except GeneratorExit: + yield n + except Exception: + logging.getLogger('report').exception() yield n else: yield n @@ -81,7 +87,10 @@ def _child_get(node, self=None, tagname=None): if self and self.localcontext and n.get('rml_except'): try: eval(n.get('rml_except'), {}, self.localcontext) - except: + except GeneratorExit: + continue + except Exception: + logging.getLogger('report').exception() continue if self and self.localcontext and n.get('rml_tag'): try: @@ -91,7 +100,10 @@ def _child_get(node, self=None, tagname=None): n2.attrib.update(attr or {}) yield n2 tagname = '' - except: + except GeneratorExit: + pass + except Exception: + logging.getLogger('report').exception() pass if (tagname is None) or (n.tag==tagname): yield n @@ -138,7 +150,7 @@ def unit_get(size): decimal_point = '.' try: decimal_point = locale.nl_langinfo(locale.RADIXCHAR) - except: + except Exception: decimal_point = locale.localeconv()['decimal_point'] size = size.replace(decimal_point, '.') diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 9d2fb97362c..32857044cdd 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -192,7 +192,7 @@ class rml_parse(object): return text.strip() def removeParentNode(self, tag=None): - raise Exception('Skip') + raise GeneratorExit('Skip') def set_html_image(self,id,model=None,field=None,context=None): if not id : diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 9b246e5bb5f..5f69a5bdcea 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -1160,6 +1160,11 @@ def extract_zip_file(zip_file, outdirectory): zf.close() def detect_ip_addr(): + """Try a very crude method to figure out a valid external + IP or hostname for the current machine. Don't rely on this + for binding to an interface, but it could be used as basis + for constructing a remote URL to the server. + """ def _detect_ip_addr(): from array import array import socket diff --git a/bin/tools/safe_eval.py b/bin/tools/safe_eval.py index ef26fbc4cbe..0a2a99ce07d 100644 --- a/bin/tools/safe_eval.py +++ b/bin/tools/safe_eval.py @@ -34,6 +34,7 @@ condition/math builtins. from opcode import HAVE_ARGUMENT, opmap, opname from types import CodeType +import logging __all__ = ['test_expr', 'literal_eval', 'safe_eval', 'const_eval', 'ext_eval' ] @@ -56,6 +57,7 @@ _SAFE_OPCODES = _EXPR_OPCODES.union(set(opmap[x] for x in [ 'DELETE_NAME', 'JUMP_IF_TRUE', 'JUMP_IF_FALSE','MAKE_FUNCTION', ] if x in opmap)) +_logger = logging.getLogger('safe_eval') def _get_opcodes(codeobj): """_get_opcodes(codeobj) -> [opcodes] @@ -83,11 +85,19 @@ def test_expr(expr, allowed_codes, mode="eval"): Test that the expression contains only the allowed opcodes. If the expression is valid and contains only allowed codes, - return the compiled code object. Otherwise raise a ValueError. + return the compiled code object. + Otherwise raise a ValueError, a Syntax Error or TypeError accordingly. """ try: + if mode == 'eval': + # eval() does not like leading/trailing whitespace + expr = expr.strip() code_obj = compile(expr, "", mode) - except: + except (SyntaxError, TypeError): + _logger.debug('Invalid eval expression', exc_info=True) + raise + except Exception: + _logger.debug('Disallowed or invalid eval expression', exc_info=True) raise ValueError("%s is not a valid expression" % expr) for code in _get_opcodes(code_obj): if code not in allowed_codes: @@ -206,6 +216,8 @@ def safe_eval(expr, globals_dict=None, locals_dict=None, mode="eval", nocopy=Fal This can be used to e.g. evaluate an OpenERP domain expression from an untrusted source. + Throws TypeError, SyntaxError or ValueError (not allowed) accordingly. + >>> safe_eval("__import__('sys').modules") Traceback (most recent call last): ... diff --git a/bin/tools/translate.py b/bin/tools/translate.py index d85ee20422f..7648470edb6 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -585,7 +585,10 @@ def trans_generate(lang, modules, dbname=None): for constraint in pool.get(model)._constraints: msg = constraint[1] - push_translation(module, 'constraint', model, 0, encode(msg)) + # Check presence of __call__ directly instead of using + # callable() because it will be deprecated as of Python 3.0 + if not hasattr(msg, '__call__'): + push_translation(module, 'constraint', model, 0, encode(msg)) for field_name,field_def in pool.get(model)._columns.items(): if field_def.translate: |
