[MERGE] from trunk

bzr revid: rco@openerp.com-20120905151011-wxieu4i888ua6d00
This commit is contained in:
Raphael Collet
2012-09-05 17:10:11 +02:00
97 changed files with 479 additions and 281 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:47+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:37+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:47+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:47+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
"X-Poedit-Language: Czech\n"
#. module: base
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -12,8 +12,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
"X-Poedit-SourceCharset: utf-8\n"
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
"Language: \n"
#. module: base
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -9,8 +9,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
"X-Poedit-Language: Persian\n"
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
"Language: hr\n"
#. module: base
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:49+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:40+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:50+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:41+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+67 -3
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:48+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:39+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
@@ -921,7 +921,7 @@ msgid ""
"The module adds google contact in partner address and add google calendar "
"events details in Meeting"
msgstr ""
"Deze module voegt Google contact[ersonen in relatie adressen en voegt Google "
"Deze module voegt Google contactersonen in relatie adressen en voegt Google "
"agenda items details in OpenERP agenda."
#. module: base
@@ -942,6 +942,15 @@ msgid ""
"delete on objects and can check logs.\n"
" "
msgstr ""
"\n"
"Met deze module heeft de administrator de mogelijkheid om iedere gebruikers "
"handeling op alle objecten in het systeem te volgen.\n"
"============================================================================="
"=======================\n"
"\n"
"De administrator kan regels voor lezen, schrijven en verwijderen definiëren "
"en logs hiervan bekijken\n"
" "
#. module: base
#: model:res.partner.category,name:base.res_partner_category_4
@@ -2482,6 +2491,18 @@ msgid ""
"and categorize your interventions with a channel and a priority level.\n"
" "
msgstr ""
"\n"
"Helpdesk management.\n"
"===================\n"
"\n"
"Net als administratie en verwerking van claims is de Helpdesk en "
"ondersteuning tool, een goed instrument\n"
"om uw acties vast te leggen. Dit menu is meer aangepast aan de mondelinge "
"communicatie,\n"
"die niet noodzakelijkerwijs verband houden met een claim. Selecteer een "
"klant, voeg notities toe\n"
"en deel uw acties in.\n"
" "
#. module: base
#: sql_constraint:ir.ui.view_sc:0
@@ -2542,6 +2563,11 @@ msgid ""
"\n"
"Configure servers and trigger synchronization with its database objects.\n"
msgstr ""
"\n"
"Synchronisatie van objecten.\n"
"=======================\n"
"Configureer servers and trigger database synchronisatie van de database "
"objecten.\n"
#. module: base
#: model:res.country,name:base.mg
@@ -7548,6 +7574,14 @@ msgid ""
"that exceeds minimum amount set by configuration wizard.\n"
" "
msgstr ""
"\n"
"Dubbele controle voor inkopen, welke een minimum bedrag overstijgen.\n"
"==========================================================\n"
"\n"
"Deze module past de inkoop workflow aan, zodat inkopen, welke een \n"
"minimum bedrag overstijgen moeten worden gecontroleerd. Dit kan worden\n"
"ingesteld in de configuratie wizard.\n"
" "
#. module: base
#: field:res.currency,rounding:0
@@ -10556,6 +10590,11 @@ msgid ""
"\n"
"Adds a Claim link to the delivery order.\n"
msgstr ""
"\n"
"Maak een claim van een uitgaande levering.\n"
"===================================\n"
"\n"
"Voegt claim link toe aan een uitgaande order.\n"
#. module: base
#: view:ir.model:0
@@ -11772,6 +11811,13 @@ msgid ""
"the invoicing wizard if the delivery is to be invoiced.\n"
" "
msgstr ""
"\n"
"Factuur wizard bij levering.\n"
"======================\n"
"\n"
"Deze module start de factuur wizard, direct na het verzamelen van een\n"
"inkomende of uitgaande levering en deze levering moet worden gefactureerd.\n"
" "
#. module: base
#: code:addons/orm.py:1388
@@ -13330,6 +13376,13 @@ msgid ""
"marketing_campaign.\n"
" "
msgstr ""
"\n"
"Demo data voor de module marketing_campaign.\n"
"========================================\n"
"\n"
"maakt demo data aan, zoals leads, campagnes en segmenten voor de module "
"marketing_campaign.\n"
" "
#. module: base
#: selection:ir.actions.act_window.view,view_mode:0
@@ -13962,6 +14015,17 @@ msgid ""
"\n"
"Used, for example, in food industries."
msgstr ""
"\n"
"Traceer verschillende datums van producten and productie partijen.\n"
"=======================================================\n"
"\n"
"de volgende datums kunnen worden getraceerd:\n"
" - THT datum\n"
" - Te gebruiken voor datum\n"
" - verwijder datum\n"
" - waarschuwing datum\n"
"\n"
"Wordt bijvoorbeeld gebruikt in de voedingsmiddelen industrie."
#. module: base
#: field:ir.exports.line,export_id:0
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:42+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:51+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:47+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:38+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:43+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:52+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:53+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:44+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+2 -2
View File
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 05:54+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-09-05 04:45+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base
#: model:res.country,name:base.sh
+18 -7
View File
@@ -599,8 +599,15 @@
<field name="xml_id"/>
</group>
</group>
<field name="arch"/>
</sheet>
<notebook>
<page string="Architecture">
<field name="arch"/>
</page>
<page string="Groups">
<field name="groups_id"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@@ -1173,6 +1180,7 @@
<filter icon="terp-gdu-smart-failing"
string="Untranslated"
domain="['|',('value', '=', False),('value','=','')]"/>
<field name="name" operator="="/>
<field name="lang"/>
<field name="src"/>
<field name="value"/>
@@ -1185,6 +1193,9 @@
<field name="model">ir.translation</field>
<field name="arch" type="xml">
<form string="Translations" version="7.0">
<header>
<field name="state" widget="statusbar" nolabel="1"/>
</header>
<sheet>
<group>
<group>
@@ -1210,12 +1221,12 @@
<field name="name">Translations</field>
<field name="model">ir.translation</field>
<field name="arch" type="xml">
<tree string="Translations">
<field name="src"/>
<tree string="Translations" editable="bottom">
<field name="src" readonly="True"/>
<field name="value"/>
<field name="name"/>
<field name="lang"/>
<field name="type"/>
<field name="name" readonly="True"/>
<field name="lang" readonly="True"/>
<field name="type" readonly="True"/>
</tree>
</field>
</record>
+2 -1
View File
@@ -35,6 +35,7 @@ from tools.config import config
from tools.safe_eval import safe_eval as eval
from tools.translate import _
from socket import gethostname
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@@ -271,7 +272,7 @@ class act_window(osv.osv):
:return: A read() view of the ir.actions.act_window
"""
dataobj = self.pool.get('ir.model.data')
data_id = dataobj._get_id (cr, 1, module, xml_id)
data_id = dataobj._get_id (cr, SUPERUSER_ID, module, xml_id)
res_id = dataobj.browse(cr, uid, data_id, context).res_id
return self.read(cr, uid, res_id, [], context)
@@ -26,6 +26,7 @@ from osv import osv,fields
import uuid
import datetime
from tools import misc, config
from openerp import SUPERUSER_ID
"""
A dictionary holding some configuration parameters to be initialized when the database is created.
@@ -55,9 +56,9 @@ class ir_config_parameter(osv.osv):
Initializes the parameters listed in _default_parameters.
"""
for key, func in _default_parameters.iteritems():
ids = self.search(cr, 1, [('key','=',key)])
ids = self.search(cr, SUPERUSER_ID, [('key','=',key)])
if not ids:
self.set_param(cr, 1, key, func())
self.set_param(cr, SUPERUSER_ID, key, func())
def get_param(self, cr, uid, key, default=False, context=None):
"""Retrieve the value for a given key.
+2 -2
View File
@@ -44,7 +44,7 @@ class ir_rule(osv.osv):
def _eval_context(self, cr, uid):
"""Returns a dictionary to use as evaluation context for
ir.rule domains."""
return {'user': self.pool.get('res.users').browse(cr, 1, uid),
return {'user': self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid),
'time':time}
def _domain_force_get(self, cr, uid, ids, field_name, arg, context=None):
@@ -152,7 +152,7 @@ class ir_rule(osv.osv):
# involve objects on which the real uid has no acces rights.
# This means also there is no implicit restriction (e.g. an object
# references another object the user can't see).
query = self.pool.get(model_name)._where_calc(cr, 1, dom, active_test=False)
query = self.pool.get(model_name)._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
return query.where_clause, query.where_clause_params, query.tables
return [], [], ['"'+self.pool.get(model_name)._table+'"']
+63 -7
View File
@@ -77,14 +77,14 @@ class ir_translation_import_cursor(object):
def push(self, ddict):
"""Feed a translation, as a dictionary, into the cursor
"""
state = "translated" if (ddict['value'] and ddict['value'] != "") else "to_translate"
self._cr.execute("INSERT INTO " + self._table_name \
+ """(name, lang, res_id, src, type,
imd_model, imd_module, imd_name, value)
VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s)""",
imd_model, imd_module, imd_name, value,state)
VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
(ddict['name'], ddict['lang'], ddict.get('res_id'), ddict['src'], ddict['type'],
ddict.get('imd_model'), ddict.get('imd_module'), ddict.get('imd_name'),
ddict['value']))
ddict['value'],state))
def finish(self):
""" Transfer the data from the temp table to ir.translation
@@ -125,15 +125,16 @@ class ir_translation_import_cursor(object):
# Step 2: update existing (matching) translations
if self._overwrite:
cr.execute("""UPDATE ONLY %s AS irt
SET value = ti.value
SET value = ti.value,
state = 'translated'
FROM %s AS ti
WHERE %s AND ti.value IS NOT NULL AND ti.value != ''
""" % (self._parent_table, self._table_name, find_expr))
# Step 3: insert new translations
cr.execute("""INSERT INTO %s(name, lang, res_id, src, type, value)
SELECT name, lang, res_id, src, type, value
cr.execute("""INSERT INTO %s(name, lang, res_id, src, type, value,state)
SELECT name, lang, res_id, src, type, value,state
FROM %s AS ti
WHERE NOT EXISTS(SELECT 1 FROM ONLY %s AS irt WHERE %s);
""" % (self._parent_table, self._table_name, self._parent_table, find_expr))
@@ -167,6 +168,11 @@ class ir_translation(osv.osv):
'type': fields.selection(TRANSLATION_TYPE, string='Type', size=16, select=True),
'src': fields.text('Source'),
'value': fields.text('Translation Value'),
'state':fields.selection([('to_translate','To Translate'),('inprogress','Translation in Progress'),('translated','Translated')])
}
_defaults = {
'state':'to_translate',
}
_sql_constraints = [ ('lang_fkey_res_lang', 'FOREIGN KEY(lang) REFERENCES res_lang(code)',
@@ -301,6 +307,10 @@ class ir_translation(osv.osv):
context = {}
if isinstance(ids, (int, long)):
ids = [ids]
if vals.get('src') or ('value' in vals and not(vals.get('value'))):
result = vals.update({'state':'to_translate'})
if vals.get('value'):
result = vals.update({'state':'translated'})
result = super(ir_translation, self).write(cursor, user, ids, vals, context=context)
for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context):
self._get_source.clear_cache(self, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], trans_obj['src'])
@@ -318,6 +328,52 @@ class ir_translation(osv.osv):
result = super(ir_translation, self).unlink(cursor, user, ids, context=context)
return result
def translate_fields(self, cr, uid, model, id, field=None, context=None):
trans_model = self.pool.get(model)
domain = ['&', ('res_id', '=', id), ('name', '=like', model + ',%')]
langs_ids = self.pool.get('res.lang').search(cr, uid, [('code', '!=', 'en_US')], context=context)
langs = [lg.code for lg in self.pool.get('res.lang').browse(cr, uid, langs_ids, context=context)]
main_lang = 'en_US'
translatable_fields = []
for f, info in trans_model._all_columns.items():
if info.column.translate:
if info.parent_model:
parent_id = trans_model.read(cr, uid, [id], [info.parent_column], context=context)[0][info.parent_column][0]
translatable_fields.append({ 'name': f, 'id': parent_id, 'model': info.parent_model })
domain.insert(0, '|')
domain.extend(['&', ('res_id', '=', parent_id), ('name', '=', "%s,%s" % (info.parent_model, f))])
else:
translatable_fields.append({ 'name': f, 'id': id, 'model': model })
if len(langs):
fields = [f.get('name') for f in translatable_fields]
record = trans_model.read(cr, uid, [id], fields, context={ 'lang': main_lang })[0]
for lg in langs:
for f in translatable_fields:
# Check if record exists, else create it (at once)
sql = """INSERT INTO ir_translation (lang, src, name, type, res_id, value)
SELECT %s, %s, %s, 'model', %s, %s WHERE NOT EXISTS
(SELECT 1 FROM ir_translation WHERE lang=%s AND name=%s AND res_id=%s AND type='model');
UPDATE ir_translation SET src = %s WHERE lang=%s AND name=%s AND res_id=%s AND type='model';
"""
src = record[f['name']] or None
name = "%s,%s" % (f['model'], f['name'])
cr.execute(sql, (lg, src , name, f['id'], src, lg, name, f['id'], src, lg, name, id))
action = {
'name': 'Translate',
'res_model': 'ir.translation',
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'tree,form',
'domain': domain,
}
if field:
info = trans_model._all_columns[field]
action['context'] = {
'search_default_name': "%s,%s" % (info.parent_model or model, field)
}
return action
def _get_import_cursor(self, cr, uid, context=None):
""" Return a cursor-like object for fast inserting translations
"""
+2 -1
View File
@@ -28,6 +28,7 @@ import tools
import openerp.modules
from osv import fields, osv
from tools.translate import _
from openerp import SUPERUSER_ID
def one_in(setA, setB):
"""Check the presence of an element of setA in setB
@@ -59,7 +60,7 @@ class ir_ui_menu(osv.osv):
"""
with self.cache_lock:
modelaccess = self.pool.get('ir.model.access')
user_groups = set(self.pool.get('res.users').read(cr, 1, uid, ['groups_id'])['groups_id'])
user_groups = set(self.pool.get('res.users').read(cr, SUPERUSER_ID, uid, ['groups_id'])['groups_id'])
result = []
for menu in self.browse(cr, uid, ids, context=context):
# this key works because user access rights are all based on user's groups (cfr ir_model_access.check)
+10 -3
View File
@@ -78,6 +78,8 @@ class view(osv.osv):
'field_parent': fields.char('Child Field',size=64),
'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="External ID",
help="ID of the view defined in xml file"),
'groups_id': fields.many2many('res.groups', 'ir_ui_view_group_rel', 'view_id', 'group_id',
string='Groups', help="If this field is empty, the view applies to all users. Otherwise, the view applies to the users of those groups only."),
}
_defaults = {
'arch': '<?xml version="1.0"?>\n<tree string="My view">\n\t<field name="name"/>\n</tree>',
@@ -167,20 +169,25 @@ class view(osv.osv):
:rtype: list of tuples
:return: [(view_arch,view_id), ...]
"""
user_groups = frozenset(self.pool.get('res.users').browse(cr, 1, uid, context).groups_id)
if self.pool._init:
# Module init currently in progress, only consider views from modules whose code was already loaded
query = """SELECT v.arch, v.id FROM ir_ui_view v LEFT JOIN ir_model_data md ON (md.model = 'ir.ui.view' AND md.res_id = v.id)
query = """SELECT v.id FROM ir_ui_view v LEFT JOIN ir_model_data md ON (md.model = 'ir.ui.view' AND md.res_id = v.id)
WHERE v.inherit_id=%s AND v.model=%s AND md.module in %s
ORDER BY priority"""
query_params = (view_id, model, tuple(self.pool._init_modules))
else:
# Modules fully loaded, consider all views
query = """SELECT v.arch, v.id FROM ir_ui_view v
query = """SELECT v.id FROM ir_ui_view v
WHERE v.inherit_id=%s AND v.model=%s
ORDER BY priority"""
query_params = (view_id, model)
cr.execute(query, query_params)
return cr.fetchall()
view_ids = [v[0] for v in cr.fetchall()]
# filter views based on user groups
return [(view.arch, view.id)
for view in self.browse(cr, 1, view_ids, context)
if not (view.groups_id and user_groups.isdisjoint(view.groups_id))]
def write(self, cr, uid, ids, vals, context=None):
if not isinstance(ids, (list, tuple)):
@@ -10,7 +10,9 @@
<field name="lang"/>
</group>
<footer>
<button name="act_cancel" special="cancel" string="Cancel" type="object"/>
<button name="act_update" string="Update" type="object" class="oe_highlight"/>
or
<button name="act_cancel" special="cancel" string="Cancel" type="object" class="oe_link"/>
</footer>
</form>
</field>
+22 -16
View File
@@ -225,12 +225,24 @@ class res_partner(osv.osv):
return [context['category_id']]
return False
def _get_default_image(self, cr, uid, is_company, context=None):
def _get_default_image(self, cr, uid, is_company, context=None, colorize=False):
if is_company:
image_path = openerp.modules.get_module_resource('base', 'static/src/img', 'company_image.png')
image = open(openerp.modules.get_module_resource('base', 'static/src/img', 'company_image.png')).read()
else:
image_path = openerp.modules.get_module_resource('base', 'static/src/img', 'partner_image.png')
return tools.image_resize_image_big(open(image_path, 'rb').read().encode('base64'))
from PIL import Image
from StringIO import StringIO
color = (255,255,255)
if colorize:
from random import random
color = (int(random() * 192 + 32), int(random() * 192 + 32), int(random() * 192 + 32))
face = Image.open(openerp.modules.get_module_resource('base', 'static/src/img', 'avatar.png'))
avatar = Image.new('RGB', face.size)
avatar.paste(color)
avatar.paste(face, mask=face)
buffer = StringIO()
avatar.save(buffer, 'PNG')
image = buffer.getvalue()
return image.encode('base64')
_defaults = {
'active': True,
@@ -243,9 +255,7 @@ class res_partner(osv.osv):
'is_company': False,
'type': 'default',
'use_parent_address': True,
'image': lambda self, cr, uid, context: self._get_default_image(cr, uid, False, context),
'image_small': lambda self, cr, uid, context: self._get_default_image(cr, uid, False, context),
'image_medium': lambda self, cr, uid, context: self._get_default_image(cr, uid, False, context),
'image': lambda self, cr, uid, context: self._get_default_image(cr, uid, context.get('default_is_company', False), context),
}
def copy(self, cr, uid, id, default=None, context=None):
@@ -323,9 +333,6 @@ class res_partner(osv.osv):
domain_siblings = [('parent_id', '=', vals['parent_id']), ('use_parent_address', '=', True)]
update_ids = [vals['parent_id']] + self.search(cr, uid, domain_siblings, context=context)
self.update_address(cr, uid, update_ids, vals, context)
if 'image' not in vals :
image_value = self._get_default_image(cr, uid, vals.get('is_company', False) or context.get('default_is_company'), context)
vals.update(tools.image_get_resized_images(image_value, return_big=True))
return super(res_partner,self).create(cr, uid, vals, context=context)
def update_address(self, cr, uid, ids, vals, context=None):
@@ -369,18 +376,17 @@ class res_partner(osv.osv):
email_regex = re.compile('([a-zA-Z0-9._%-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9._]{1,8})')
contact_regex_res = contact_regex.findall(name)
email_regex_res = email_regex.findall(name)
email = False
if contact_regex_res:
name = contact_regex_res[0][0].rstrip(' ') # remove extra spaces on the right
email = contact_regex_res[0][1]
rec_id = self.create(cr, uid, {self._rec_name: name, 'email': email}, context);
return self.name_get(cr, uid, [rec_id], context)[0]
elif email_regex_res:
email = '%s' % (email_regex_res[0])
rec_id = self.create(cr, uid, {self._rec_name: email, 'email': email}, context);
return self.name_get(cr, uid, [rec_id], context)[0]
else:
rec_id = super(res_partner, self).create(cr, uid, {self._rec_name: name}, context)
return self.name_get(cr, uid, [rec_id], context)[0]
pass
data = {self._rec_name: name, 'email': email}
rec_id = self.create(cr, uid, data, context);
return self.name_get(cr, uid, [rec_id], context)[0]
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if not args:
+4 -4
View File
@@ -95,7 +95,7 @@
<field name="arch" type="xml">
<form string="Partners" version="7.0">
<sheet>
<field name="image" widget='image' class="oe_left" options='{"preview_image": "image_medium", "size": [90, 90]}'/>
<field name="image" widget='image' class="oe_left oe_avatar" options='{"preview_image": "image_medium", "size": [90, 90]}'/>
<div class="oe_title">
<div class="oe_edit_only">
<label for="name"/> (
@@ -130,8 +130,8 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" class="oe_no_button" placeholder="State" style="width: 24%%" options='{"no_open": true}'/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
<field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": true}'/>
<field name="zip" placeholder="ZIP" style="width: 20%%"/>
</div>
<field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": true}'/>
</div>
@@ -301,7 +301,7 @@
<field name="category_id"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette">
<div class="oe_kanban_vignette oe_semantic_html_override">
<a type="open">
<img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)" class="oe_kanban_image"/>
</a>
+12 -16
View File
@@ -26,6 +26,7 @@ import logging
from lxml import etree
from lxml.builder import E
import netsvc
from openerp import SUPERUSER_ID
import openerp
import openerp.exceptions
from osv import fields,osv
@@ -188,7 +189,7 @@ class res_users(osv.osv):
result = super(res_users, self).read(cr, uid, ids, fields, context, load)
canwrite = self.pool.get('ir.model.access').check(cr, uid, 'res.users', 'write', False)
if not canwrite:
if isinstance(ids, (int, float)):
if isinstance(ids, (int, long)):
result = override_password(result)
else:
result = map(override_password, result)
@@ -206,11 +207,6 @@ class res_users(osv.osv):
('login_key', 'UNIQUE (login)', 'You can not have two users with the same login !')
]
def _get_default_image(self, cr, uid, context=None):
""" Override of res.partner: multicolor avatars ! """
image_path = openerp.modules.get_module_resource('base', 'static/src/img', 'avatar%d.png' % random.randint(0, 6))
return tools.image_resize_image_big(open(image_path, 'rb').read().encode('base64'))
def _get_company(self,cr, uid, context=None, uid2=False):
if not uid2:
uid2 = uid
@@ -238,9 +234,9 @@ class res_users(osv.osv):
dataobj = self.pool.get('ir.model.data')
result = []
try:
dummy,group_id = dataobj.get_object_reference(cr, 1, 'base', 'group_user')
dummy,group_id = dataobj.get_object_reference(cr, SUPERUSER_ID, 'base', 'group_user')
result.append(group_id)
dummy,group_id = dataobj.get_object_reference(cr, 1, 'base', 'group_partner_manager')
dummy,group_id = dataobj.get_object_reference(cr, SUPERUSER_ID, 'base', 'group_partner_manager')
result.append(group_id)
except ValueError:
# If these groups does not exists anymore
@@ -255,7 +251,7 @@ class res_users(osv.osv):
'company_id': _get_company,
'company_ids': _get_companies,
'groups_id': _get_group,
'image': lambda self, cr, uid, context: self._get_default_image(cr, uid, context),
'image': lambda self, cr, uid, context: self.pool.get('res.partner')._get_default_image(cr, uid, False, context, colorize=True),
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
@@ -280,7 +276,7 @@ class res_users(osv.osv):
break
else:
if 'company_id' in values:
if not (values['company_id'] in self.read(cr, 1, uid, ['company_ids'], context=context)['company_ids']):
if not (values['company_id'] in self.read(cr, SUPERUSER_ID, uid, ['company_ids'], context=context)['company_ids']):
del values['company_id']
uid = 1 # safe fields only, so we write as super-user to bypass access rights
@@ -332,7 +328,7 @@ class res_users(osv.osv):
return super(res_users, self).copy(cr, uid, id, copydef, context)
def context_get(self, cr, uid, context=None):
user = self.browse(cr, 1, uid, context)
user = self.browse(cr, SUPERUSER_ID, uid, context)
result = {}
for k in self._all_columns.keys():
if k.startswith('context_'):
@@ -350,7 +346,7 @@ class res_users(osv.osv):
def action_get(self, cr, uid, context=None):
dataobj = self.pool.get('ir.model.data')
data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my')
data_id = dataobj._get_id(cr, SUPERUSER_ID, 'base', 'action_res_users_my')
return dataobj.browse(cr, uid, data_id, context=context).res_id
def check_super(self, passwd):
@@ -361,7 +357,7 @@ class res_users(osv.osv):
def check_credentials(self, cr, uid, password):
""" Override this method to plug additional authentication methods"""
res = self.search(cr, 1, [('id','=',uid),('password','=',password)])
res = self.search(cr, SUPERUSER_ID, [('id','=',uid),('password','=',password)])
if not res:
raise openerp.exceptions.AccessDenied()
@@ -377,7 +373,7 @@ class res_users(osv.osv):
# of them rolled back due to a concurrent access.)
cr.autocommit(True)
# check if user exists
res = self.search(cr, 1, [('login','=',login)])
res = self.search(cr, SUPERUSER_ID, [('login','=',login)])
if res:
user_id = res[0]
# check credentials
@@ -542,7 +538,7 @@ class groups_implied(osv.osv):
return memo[g]
res = {}
for g in self.browse(cr, 1, ids, context):
for g in self.browse(cr, SUPERUSER_ID, ids, context):
res[g.id] = map(int, computed_set(g))
return res
@@ -687,7 +683,7 @@ class groups_view(osv.osv):
def get_user_groups_view(self, cr, uid, context=None):
try:
view = self.pool.get('ir.model.data').get_object(cr, 1, 'base', 'user_groups_view', context)
view = self.pool.get('ir.model.data').get_object(cr, SUPERUSER_ID, 'base', 'user_groups_view', context)
assert view and view._table_name == 'ir.ui.view'
except Exception:
view = False
+2 -4
View File
@@ -88,7 +88,7 @@
<form string="Users" version="7.0">
<field name="id" invisible="1"/>
<sheet>
<field name="image_medium" widget='image' class="oe_avatar oe_left"/>
<field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
@@ -195,9 +195,7 @@
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<form string="Users" version="7.0">
<div class="oe_right oe_avatar">
<field name="image_small" widget='image' class="oe_image_small"/>
</div>
<field name="image" widget='image' class="oe_right oe_avatar" options='{"preview_image": "image_small"}'/>
<h1>
<field name="name" readonly="1" class="oe_inline"/>
(<field name="login" readonly="1" class="oe_inline"/>)
+13 -1
View File
@@ -172,6 +172,9 @@
<rng:define name="form">
<rng:element name="form">
<rng:ref name="overload"/>
<rng:optional><rng:attribute name="create" /></rng:optional>
<rng:optional><rng:attribute name="delete" /></rng:optional>
<rng:optional><rng:attribute name="edit" /></rng:optional>
<rng:optional><rng:attribute name="string"/></rng:optional>
<rng:optional><rng:attribute name="type"/></rng:optional>
<rng:optional><rng:attribute name="link"/></rng:optional>
@@ -181,7 +184,8 @@
<rng:define name="diagram">
<rng:element name="diagram">
<rng:optional><rng:attribute name="string"/></rng:optional>
<rng:optional><rng:attribute name="create" /></rng:optional>
<rng:optional><rng:attribute name="string"/></rng:optional>
<rng:ref name="node"/>
<rng:ref name="arrow"/>
<rng:zeroOrMore>
@@ -223,6 +227,8 @@
<rng:attribute name="default_group_by" />
</rng:optional>
<rng:optional><rng:attribute name="create" /></rng:optional>
<rng:optional><rng:attribute name="delete" /></rng:optional>
<rng:optional><rng:attribute name="edit" /></rng:optional>
<rng:optional><rng:attribute name="quick_create" /></rng:optional>
<rng:zeroOrMore>
<rng:ref name="field"/>
@@ -238,6 +244,9 @@
<rng:define name="tree">
<rng:element name="tree">
<rng:ref name="overload"/>
<rng:optional><rng:attribute name="create" /></rng:optional>
<rng:optional><rng:attribute name="delete" /></rng:optional>
<rng:optional><rng:attribute name="edit" /></rng:optional>
<rng:optional><rng:attribute name="string"/></rng:optional>
<rng:optional><rng:attribute name="colors"/></rng:optional>
<rng:optional><rng:attribute name="fonts"/></rng:optional>
@@ -376,6 +385,9 @@
<rng:value>5years</rng:value>
</rng:choice></rng:attribute>
</rng:optional>
<rng:optional><rng:attribute name="create"/></rng:optional>
<rng:optional><rng:attribute name="delete"/></rng:optional>
<rng:optional><rng:attribute name="edit"/></rng:optional>
<rng:optional><rng:attribute name="color"/></rng:optional>
<rng:optional><rng:attribute name="date_delay"/></rng:optional>
<rng:optional><rng:attribute name="day_length"/></rng:optional>
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

+2 -1
View File
@@ -39,6 +39,7 @@ import openerp.pooler as pooler
import openerp.release as release
import openerp.tools as tools
import openerp.tools.assertion_report as assertion_report
from openerp import SUPERUSER_ID
from openerp import SUPERUSER_ID
from openerp.tools.translate import _
@@ -296,7 +297,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
modobj = pool.get('ir.module.module')
if ('base' in tools.config['init']) or ('base' in tools.config['update']):
_logger.info('updating modules list')
modobj.update_list(cr, 1)
modobj.update_list(cr, SUPERUSER_ID)
_check_module_names(cr, itertools.chain(tools.config['init'].keys(), tools.config['update'].keys()))
+15 -12
View File
@@ -162,7 +162,7 @@ def initialize_sys_path():
return
ad_paths = map(lambda m: os.path.abspath(tools.ustr(m.strip())), tools.config['addons_path'].split(','))
ad_paths.append(_ad) # for get_module_path
ad_paths.append(os.path.abspath(_ad)) # for get_module_path
sys.meta_path.append(AddonsImportHook())
def get_module_path(module, downloaded=False, display_warning=True):
@@ -283,25 +283,28 @@ def get_module_as_zip(modulename, b64enc=True, src=True):
def get_module_resource(module, *args):
"""Return the full path of a resource of the given module.
@param module: the module
@param args: the resource path components
:param module: module name
:param list(str) args: resource path components within module
@return: absolute path to the resource
:rtype: str
:return: absolute path to the resource
TODO name it get_resource_path
TODO make it available inside on osv object (self.get_resource_path)
"""
a = get_module_path(module)
if not a: return False
resource_path = opj(a, *args)
if zipfile.is_zipfile( a +'.zip') :
zip = zipfile.ZipFile( a + ".zip")
mod_path = get_module_path(module)
if not mod_path: return False
resource_path = opj(mod_path, *args)
if os.path.isdir(mod_path):
# the module is a directory - ignore zip behavior
if os.path.exists(resource_path):
return resource_path
elif zipfile.is_zipfile(mod_path + '.zip'):
zip = zipfile.ZipFile( mod_path + ".zip")
files = ['/'.join(f.split('/')[1:]) for f in zip.namelist()]
resource_path = '/'.join(args)
if resource_path in files:
return opj(a, resource_path)
elif os.path.exists(resource_path):
return resource_path
return opj(mod_path, resource_path)
return False
def get_module_icon(module):
+6 -5
View File
@@ -46,6 +46,7 @@ from openerp.tools.translate import _
from openerp.tools import float_round, float_repr
import simplejson
from openerp.tools.html_sanitize import html_sanitize
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@@ -444,7 +445,7 @@ class many2one(_column):
# build a dictionary of the form {'id_of_distant_resource': name_of_distant_resource}
# we use uid=1 because the visibility of a many2one field value (just id and name)
# must be the access right of the parent form and not the linked object itself.
records = dict(obj.name_get(cr, 1,
records = dict(obj.name_get(cr, SUPERUSER_ID,
list(set([x for x in res.values() if isinstance(x, (int,long))])),
context=context))
for id in res:
@@ -1200,7 +1201,7 @@ class related(function):
else:
res = {}.fromkeys(ids, False)
objlst = obj.browse(cr, 1, ids, context=context)
objlst = obj.browse(cr, SUPERUSER_ID, ids, context=context)
for data in objlst:
if not data:
continue
@@ -1230,7 +1231,7 @@ class related(function):
# name_get as root, as seeing the name of a related
# object depends on access right of source document,
# not target, so user may not have access.
ng = dict(obj.pool.get(self._obj).name_get(cr, 1, ids, context=context))
ng = dict(obj.pool.get(self._obj).name_get(cr, SUPERUSER_ID, ids, context=context))
for r in res:
if res[r]:
res[r] = (res[r], ng[res[r]])
@@ -1495,7 +1496,7 @@ class property(function):
# not target, so user may not have access) in order to avoid
# pointing on an unexisting record.
if property_destination_obj:
if res[id][prop_name] and obj.pool.get(property_destination_obj).exists(cr, 1, res[id][prop_name].id):
if res[id][prop_name] and obj.pool.get(property_destination_obj).exists(cr, SUPERUSER_ID, res[id][prop_name].id):
name_get_ids[id] = res[id][prop_name].id
else:
res[id][prop_name] = False
@@ -1503,7 +1504,7 @@ class property(function):
# name_get as root (as seeing the name of a related
# object depends on access right of source document,
# not target, so user may not have access.)
name_get_values = dict(obj.pool.get(property_destination_obj).name_get(cr, 1, name_get_ids.values(), context=context))
name_get_values = dict(obj.pool.get(property_destination_obj).name_get(cr, SUPERUSER_ID, name_get_ids.values(), context=context))
# the property field is a m2o, we need to return a tuple with (id, name)
for k, v in name_get_ids.iteritems():
if res[k][prop_name]:
+10 -1
View File
@@ -63,6 +63,7 @@ from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools.translate import _
from openerp import SUPERUSER_ID
from query import Query
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
_schema = logging.getLogger(__name__ + '.schema')
@@ -773,7 +774,7 @@ class BaseModel(object):
}
if getattr(f, 'serialization_field', None):
# resolve link to serialization_field if specified by name
serialization_field_id = ir_model_fields_obj.search(cr, 1, [('model','=',vals['model']), ('name', '=', f.serialization_field)])
serialization_field_id = ir_model_fields_obj.search(cr, SUPERUSER_ID, [('model','=',vals['model']), ('name', '=', f.serialization_field)])
if not serialization_field_id:
raise except_orm(_('Error'), _("Serialization field `%s` not found for sparse field `%s`!") % (f.serialization_field, k))
vals['serialization_field_id'] = serialization_field_id[0]
@@ -1824,6 +1825,10 @@ class BaseModel(object):
if node.getchildren()[0].tag == 'node':
node_fields = self.pool.get(node.getchildren()[0].get('object')).fields_get(cr, user, None, context)
fields.update(node_fields)
if not node.get("create"):
fn = getattr(self.pool.get(node.getchildren()[1].get('object')), 'check_create')
if not fn(cr, user, raise_exception=False):
node.set("create", 'false')
if node.getchildren()[1].tag == 'arrow':
arrow_fields = self.pool.get(node.getchildren()[1].get('object')).fields_get(cr, user, None, context)
fields.update(arrow_fields)
@@ -1831,6 +1836,10 @@ class BaseModel(object):
fields = self.fields_get(cr, user, None, context)
fields_def = self.__view_look_dom(cr, user, node, view_id, False, fields, context=context)
node = self._disable_workflow_buttons(cr, user, node)
if node.tag in ('kanban', 'tree', 'form', 'gantt'):
for action, fn in (('create', 'check_create'), ('delete', 'check_unlink'), ('edit', 'check_write')):
if not node.get(action) and not getattr(self, fn)(cr, user, raise_exception=False):
node.set(action, 'false')
arch = etree.tostring(node, encoding="utf-8").replace('\t', '')
for k in fields.keys():
if k not in fields_def:
+3 -2
View File
@@ -40,6 +40,7 @@ import openerp.tools as tools
import openerp.modules
import openerp.exceptions
from openerp.service import http_server
from openerp import SUPERUSER_ID
#.apidoc title: Exported Service methods
#.apidoc module-mods: member-order: bysource
@@ -72,8 +73,8 @@ def _initialize_db(serv, id, db_name, demo, lang, user_password):
if lang:
modobj = pool.get('ir.module.module')
mids = modobj.search(cr, 1, [('state', '=', 'installed')])
modobj.update_translations(cr, 1, mids, lang)
mids = modobj.search(cr, SUPERUSER_ID, [('state', '=', 'installed')])
modobj.update_translations(cr, SUPERUSER_ID, mids, lang)
cr.execute('UPDATE res_users SET password=%s, lang=%s, active=True WHERE login=%s', (
user_password, lang, 'admin'))
+2 -2
View File
@@ -186,7 +186,7 @@ class test_ir_sequence_generate(unittest2.TestCase):
cr = cursor()
f = lambda *a: registry('ir.sequence').next_by_code(cr, ADMIN_USER_ID, 'test_sequence_type_5', {})
assert all(str(x) == f() for x in xrange(1,1000))
assert all(str(x) == f() for x in xrange(1,10))
cr.commit()
cr.close()
@@ -204,7 +204,7 @@ class test_ir_sequence_generate(unittest2.TestCase):
cr = cursor()
f = lambda *a: registry('ir.sequence').next_by_code(cr, ADMIN_USER_ID, 'test_sequence_type_6', {})
assert all(str(x) == f() for x in xrange(1,1000))
assert all(str(x) == f() for x in xrange(1,10))
cr.commit()
cr.close()
+2 -2
View File
@@ -88,8 +88,8 @@ def amount_to_text(number, currency):
end_word = english_number(int(list[1]))
cents_number = int(list[1])
cents_name = (cents_number > 1) and 'Cents' or 'Cent'
final_result = start_word +' '+units_name+' and ' + end_word +' '+cents_name
return final_result
return ' '.join(filter(None, [start_word, units_name, (start_word or units_name) and (end_word or cents_name) and 'and', end_word, cents_name]))
#-------------------------------------------------------------
+52 -41
View File
@@ -134,7 +134,7 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
@param name name of the file
@param mode file open mode
@param subdir subdirectory
@param pathinfo if True returns tupple (fileobject, filepath)
@param pathinfo if True returns tuple (fileobject, filepath)
@return fileobject if pathinfo is False else (fileobject, filepath)
"""
@@ -142,44 +142,60 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
adps = addons.module.ad_paths
rtp = os.path.normcase(os.path.abspath(config['root_path']))
if name.replace(os.path.sep, '/').startswith('addons/'):
if os.path.isabs(name):
# It is an absolute path
# Is it below 'addons_path' or 'root_path'?
name = os.path.normcase(os.path.normpath(name))
for root in adps + [rtp]:
if name.startswith(root):
base = root.rstrip(os.sep)
name = name[len(base) + 1:]
break
else:
# It is outside the OpenERP root: skip zipfile lookup.
base, name = os.path.split(name)
return _fileopen(name, mode=mode, basedir=base, pathinfo=pathinfo)
if name.replace(os.sep, '/').startswith('addons/'):
subdir = 'addons'
name = name[7:]
name2 = name[7:]
elif subdir:
name = os.path.join(subdir, name)
if name.replace(os.sep, '/').startswith('addons/'):
subdir = 'addons'
name2 = name[7:]
else:
name2 = name
# First try to locate in addons_path
# First, try to locate in addons_path
if subdir:
subdir2 = subdir
if subdir2.replace(os.path.sep, '/').startswith('addons/'):
subdir2 = subdir2[7:]
subdir2 = (subdir2 != 'addons' or None) and subdir2
for adp in adps:
try:
if subdir2:
fn = os.path.join(adp, subdir2, name)
else:
fn = os.path.join(adp, name)
fn = os.path.normpath(fn)
fo = file_open(fn, mode=mode, subdir=None, pathinfo=pathinfo)
if pathinfo:
return fo, fn
return fo
return _fileopen(name2, mode=mode, basedir=adp,
pathinfo=pathinfo)
except IOError:
pass
if subdir:
name = os.path.join(rtp, subdir, name)
else:
name = os.path.join(rtp, name)
# Second, try to locate in root_path
return _fileopen(name, mode=mode, basedir=rtp, pathinfo=pathinfo)
name = os.path.normpath(name)
# Check for a zipfile in the path
head = name
def _fileopen(path, mode, basedir, pathinfo):
name = os.path.normpath(os.path.join(basedir, path))
# Give higher priority to module directories, which is
# a more common case than zipped modules.
if os.path.isfile(name):
fo = open(name, mode)
if pathinfo:
return (fo, name)
return fo
# Support for loading modules in zipped form.
# This will not work for zipped modules that are sitting
# outside of known addons paths.
head = os.path.normpath(path)
zipname = False
name2 = False
while True:
while os.sep in head:
head, tail = os.path.split(head)
if not tail:
break
@@ -187,9 +203,10 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
zipname = os.path.join(tail, zipname)
else:
zipname = tail
if zipfile.is_zipfile(head+'.zip'):
zpath = os.path.join(basedir, head + '.zip')
if zipfile.is_zipfile(zpath):
from cStringIO import StringIO
zfile = zipfile.ZipFile(head+'.zip')
zfile = zipfile.ZipFile(zpath)
try:
fo = StringIO()
fo.write(zfile.read(os.path.join(
@@ -197,20 +214,14 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
os.sep, '/')))
fo.seek(0)
if pathinfo:
return fo, name
return (fo, name)
return fo
except Exception:
name2 = os.path.normpath(os.path.join(head + '.zip', zipname))
pass
for i in (name2, name):
if i and os.path.isfile(i):
fo = file(i, mode)
if pathinfo:
return fo, i
return fo
if os.path.splitext(name)[1] == '.rml':
raise IOError, 'Report %s doesn\'t exist or deleted : ' %str(name)
raise IOError, 'File not found : %s' % name
# Not found
if name.endswith('.rml'):
raise IOError('Report %r doesn\'t exist or deleted' % name)
raise IOError('File not found: %s' % name)
#----------------------------------------------------------
+3 -2
View File
@@ -43,6 +43,7 @@ import misc
from misc import UpdateableStr
from misc import SKIPPED_ELEMENT_TYPES
import osutil
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@@ -214,7 +215,7 @@ class GettextAlias(object):
if cr:
# Try to use ir.translation to benefit from global cache if possible
pool = pooler.get_pool(cr.dbname)
res = pool.get('ir.translation')._get_source(cr, 1, None, ('code','sql_constraint'), lang, source)
res = pool.get('ir.translation')._get_source(cr, SUPERUSER_ID, None, ('code','sql_constraint'), lang, source)
else:
_logger.debug('no context cursor detected, skipping translation for "%r"', source)
else:
@@ -872,7 +873,7 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
if not ids:
# lets create the language with locale information
lang_obj.load_lang(cr, 1, lang=lang, lang_name=lang_name)
lang_obj.load_lang(cr, SUPERUSER_ID, lang=lang, lang_name=lang_name)
# now, the serious things: we read the language file
+20 -21
View File
@@ -13,6 +13,7 @@ import yaml_tag
import yaml
import re
from lxml import etree
from openerp import SUPERUSER_ID
# YAML import needs both safe and unsafe eval, but let's
# default to /safe/.
@@ -286,20 +287,20 @@ class YamlInterpreter(object):
view_id = record.view
if view_id and (view_id is not True):
view_id = self.pool.get('ir.model.data').get_object_reference(self.cr, 1, self.module, record.view)[1]
view_id = self.pool.get('ir.model.data').get_object_reference(self.cr, SUPERUSER_ID, self.module, record.view)[1]
if model.is_transient():
record_dict=self.create_osv_memory_record(record, fields)
else:
self.validate_xml_id(record.id)
try:
self.pool.get('ir.model.data')._get_id(self.cr, 1, self.module, record.id)
self.pool.get('ir.model.data')._get_id(self.cr, SUPERUSER_ID, self.module, record.id)
default = False
except ValueError:
default = True
if self.isnoupdate(record) and self.mode != 'init':
id = self.pool.get('ir.model.data')._update_dummy(self.cr, 1, record.model, self.module, record.id)
id = self.pool.get('ir.model.data')._update_dummy(self.cr, SUPERUSER_ID, record.model, self.module, record.id)
# check if the resource already existed at the last update
if id:
self.id_map[record] = int(id)
@@ -315,12 +316,12 @@ class YamlInterpreter(object):
if view_id:
varg = view_id
if view_id is True: varg = False
view = model.fields_view_get(self.cr, 1, varg, 'form', context)
view = model.fields_view_get(self.cr, SUPERUSER_ID, varg, 'form', context)
view_id = etree.fromstring(view['arch'].encode('utf-8'))
record_dict = self._create_record(model, fields, view_id, default=default)
_logger.debug("RECORD_DICT %s" % record_dict)
id = self.pool.get('ir.model.data')._update(self.cr, 1, record.model, \
id = self.pool.get('ir.model.data')._update(self.cr, SUPERUSER_ID, record.model, \
self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode, context=context)
self.id_map[record.id] = int(id)
if config.get('import_partial'):
@@ -328,8 +329,8 @@ class YamlInterpreter(object):
def _create_record(self, model, fields, view=False, parent={}, default=True):
if view is not False:
defaults = default and model._add_missing_default_values(self.cr, 1, {}, context=self.context) or {}
fg = model.fields_get(self.cr, 1, context=self.context)
defaults = default and model._add_missing_default_values(self.cr, SUPERUSER_ID, {}, context=self.context) or {}
fg = model.fields_get(self.cr, SUPERUSER_ID, context=self.context)
else:
defaults = {}
fg = {}
@@ -360,7 +361,7 @@ class YamlInterpreter(object):
if (view is not False) and (fg[field_name]['type']=='one2many'):
view2 = view.find("field[@name='%s']/form"%(field_name,))
if not view2:
view2 = self.pool.get(fg[field_name]['relation']).fields_view_get(self.cr, 1, False, 'form', self.context)
view2 = self.pool.get(fg[field_name]['relation']).fields_view_get(self.cr, SUPERUSER_ID, False, 'form', self.context)
view2 = etree.fromstring(view2['arch'].encode('utf-8'))
field_value = self._eval_field(model, field_name, fields[field_name], view2, parent=record_dict, default=default)
@@ -395,7 +396,7 @@ class YamlInterpreter(object):
# Evaluation args
args = map(lambda x: eval(x, ctx), match.group(2).split(','))
result = getattr(model, match.group(1))(self.cr, 1, [], *args)
result = getattr(model, match.group(1))(self.cr, SUPERUSER_ID, [], *args)
for key, val in (result or {}).get('value', {}).items():
if key not in fields:
assert key in fg, "The returning field '%s' from your on_change call '%s' does not exist on the object '%s'" % (key, match.group(1), model._name)
@@ -491,7 +492,7 @@ class YamlInterpreter(object):
python, statements = node.items()[0]
model = self.get_model(python.model)
statements = statements.replace("\r\n", "\n")
code_context = {'model': model, 'cr': self.cr, 'uid': self.uid, 'log': self._log, 'context': self.context}
code_context = { 'model': model, 'cr': self.cr, 'uid': self.uid, 'log': self._log, 'context': self.context }
code_context.update({'self': model}) # remove me when no !python block test uses 'self' anymore
try:
code_obj = compile(statements, self.filename, 'exec')
@@ -655,7 +656,7 @@ class YamlInterpreter(object):
self._set_group_values(node, values)
pid = self.pool.get('ir.model.data')._update(self.cr, 1, \
pid = self.pool.get('ir.model.data')._update(self.cr, SUPERUSER_ID, \
'ir.ui.menu', self.module, values, node.id, mode=self.mode, \
noupdate=self.isnoupdate(node), res_id=res and res[0] or False)
@@ -666,7 +667,7 @@ class YamlInterpreter(object):
action_type = node.type or 'act_window'
action_id = self.get_id(node.action)
action = "ir.actions.%s,%d" % (action_type, action_id)
self.pool.get('ir.model.data').ir_set(self.cr, 1, 'action', \
self.pool.get('ir.model.data').ir_set(self.cr, SUPERUSER_ID, 'action', \
'tree_but_open', 'Menuitem', [('ir.ui.menu', int(parent_id))], action, True, True, xml_id=node.id)
def process_act_window(self, node):
@@ -700,7 +701,7 @@ class YamlInterpreter(object):
if node.target:
values['target'] = node.target
id = self.pool.get('ir.model.data')._update(self.cr, 1, \
id = self.pool.get('ir.model.data')._update(self.cr, SUPERUSER_ID, \
'ir.actions.act_window', self.module, values, node.id, mode=self.mode)
self.id_map[node.id] = int(id)
@@ -708,7 +709,7 @@ class YamlInterpreter(object):
keyword = 'client_action_relate'
value = 'ir.actions.act_window,%s' % id
replace = node.replace or True
self.pool.get('ir.model.data').ir_set(self.cr, 1, 'action', keyword, \
self.pool.get('ir.model.data').ir_set(self.cr, SUPERUSER_ID, 'action', keyword, \
node.id, [node.src_model], value, replace=replace, noupdate=self.isnoupdate(node), isobject=True, xml_id=node.id)
# TODO add remove ir.model.data
@@ -729,7 +730,7 @@ class YamlInterpreter(object):
res = {'name': node.name, 'url': node.url, 'target': node.target}
id = self.pool.get('ir.model.data')._update(self.cr, 1, \
id = self.pool.get('ir.model.data')._update(self.cr, SUPERUSER_ID, \
"ir.actions.url", self.module, res, node.id, mode=self.mode)
self.id_map[node.id] = int(id)
# ir_set
@@ -737,7 +738,7 @@ class YamlInterpreter(object):
keyword = node.keyword or 'client_action_multi'
value = 'ir.actions.url,%s' % id
replace = node.replace or True
self.pool.get('ir.model.data').ir_set(self.cr, 1, 'action', \
self.pool.get('ir.model.data').ir_set(self.cr, SUPERUSER_ID, 'action', \
keyword, node.url, ["ir.actions.url"], value, replace=replace, \
noupdate=self.isnoupdate(node), isobject=True, xml_id=node.id)
@@ -752,7 +753,7 @@ class YamlInterpreter(object):
else:
value = expression
res[fieldname] = value
self.pool.get('ir.model.data').ir_set(self.cr, 1, res['key'], res['key2'], \
self.pool.get('ir.model.data').ir_set(self.cr, SUPERUSER_ID, res['key'], res['key2'], \
res['name'], res['models'], res['value'], replace=res.get('replace',True), \
isobject=res.get('isobject', False), meta=res.get('meta',None))
@@ -781,7 +782,7 @@ class YamlInterpreter(object):
self._set_group_values(node, values)
id = self.pool.get('ir.model.data')._update(self.cr, 1, "ir.actions.report.xml", \
id = self.pool.get('ir.model.data')._update(self.cr, SUPERUSER_ID, "ir.actions.report.xml", \
self.module, values, xml_id, noupdate=self.isnoupdate(node), mode=self.mode)
self.id_map[xml_id] = int(id)
@@ -789,7 +790,7 @@ class YamlInterpreter(object):
keyword = node.keyword or 'client_print_multi'
value = 'ir.actions.report.xml,%s' % id
replace = node.replace or True
self.pool.get('ir.model.data').ir_set(self.cr, 1, 'action', \
self.pool.get('ir.model.data').ir_set(self.cr, SUPERUSER_ID, 'action', \
keyword, values['name'], [values['model']], value, replace=replace, isobject=True, xml_id=xml_id)
def process_none(self):
@@ -810,8 +811,6 @@ class YamlInterpreter(object):
is_preceded_by_comment = self._log_node(node, is_preceded_by_comment)
try:
self._process_node(node)
except YamlImportException, e:
_logger.exception(e)
except Exception, e:
_logger.exception(e)
raise
+17
View File
@@ -0,0 +1,17 @@
DATABASE=trunk
dropdb ${DATABASE}
REPOSITORIES=../../addons/trunk
MODULES=`python -c "import os; print ','.join(list(set(os.listdir('${REPOSITORIES}')) - set(['document_ftp'])))"`
createdb ${DATABASE}
rm openerp-server.log
./openerp-server \
--log-level=debug \
--addons=${REPOSITORIES},../../web/trunk/addons \
-d ${DATABASE} \
-i ${MODULES} \
--stop-after-init \
--no-xmlrpc \
--no-xmlrpcs \
--no-netrpc \
--test-enable \
--logfile=openerp-server.log