[MERGE]
bzr revid: nch@tinyerp.com-20100211051256-ftb0n5kbz3ngv3o5 bzr revid: nch@tinyerp.com-20100211055245-z4wv7gmjd487eirn bzr revid: nch@tinyerp.com-20100216044824-r2jb3ecpu3mk1fgr bzr revid: nch@tinyerp.com-20100224044009-rtzm4lxn02c2sjra
This commit is contained in:
@@ -44,6 +44,7 @@ CREATE TABLE ir_model_fields (
|
||||
state varchar(64) default 'base',
|
||||
view_load boolean,
|
||||
relate boolean default False,
|
||||
relation_field varchar(128),
|
||||
primary key(id)
|
||||
);
|
||||
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
<field name="type">default</field>
|
||||
<field model="res.country" name="country_id" ref="be"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Currencies -->
|
||||
<record id="EUR" model="res.currency">
|
||||
<field name="name">EUR</field>
|
||||
@@ -1026,11 +1026,34 @@
|
||||
<field eval="time.strftime('%Y-01-01')" name="name"/>
|
||||
</record>
|
||||
|
||||
<!-- Basic Company -->
|
||||
<record id="main_company" model="res.company">
|
||||
<field name="name">Tiny sprl</field>
|
||||
<field name="partner_id" ref="main_partner"/>
|
||||
<field name="rml_header1">Free Business Solutions</field>
|
||||
<field name="rml_footer1">Web: http://tiny.be - Tel: (+32).81.81.37.00 - Bank: CPH 126-2013269-07</field>
|
||||
<field name="rml_footer2">IBAN: BE74 1262 0132 6907 - SWIFT: GKCCBEBB - VAT: BE0477.472.701</field>
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
</record>
|
||||
|
||||
<assert id="main_company" model="res.company">
|
||||
<test expr="currency_id.code == 'eur'.upper()"/>
|
||||
<test expr="name">Tiny sprl</test>
|
||||
</assert>
|
||||
<record id="user_admin" model="res.users">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="EUR" model="res.currency">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<!-- Currencies -->
|
||||
<record id="USD" model="res.currency">
|
||||
<field name="name">USD</field>
|
||||
<field name="code">USD</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateUSD" model="res.currency.rate">
|
||||
<field name="rate">1.3785</field>
|
||||
@@ -1043,6 +1066,7 @@
|
||||
<field name="code">VEB</field>
|
||||
<field name="rounding">2.95</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateVEB" model="res.currency.rate">
|
||||
<field name="rate">3132.9</field>
|
||||
@@ -1055,6 +1079,7 @@
|
||||
<field name="code">CAD</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateCAD" model="res.currency.rate">
|
||||
<field name="rate">1.451</field>
|
||||
@@ -1068,6 +1093,7 @@
|
||||
<field name="code">CHF</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateCHF" model="res.currency.rate">
|
||||
<field name="rate">1.644</field>
|
||||
@@ -1080,6 +1106,7 @@
|
||||
<field name="code">BRL</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateBRL" model="res.currency.rate">
|
||||
<field name="rate">2.588</field>
|
||||
@@ -1092,6 +1119,7 @@
|
||||
<field name="code">CNY</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateCNY" model="res.currency.rate">
|
||||
<field name="rate">10.4311</field>
|
||||
@@ -1105,6 +1133,7 @@
|
||||
<field name="code">COP</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="CZK" model="res.currency">
|
||||
@@ -1112,6 +1141,7 @@
|
||||
<field name="code">CZK</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="DKK" model="res.currency">
|
||||
@@ -1119,6 +1149,7 @@
|
||||
<field name="code">DKK</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateDKK" model="res.currency.rate">
|
||||
<field name="rate">7.4416</field>
|
||||
@@ -1132,6 +1163,7 @@
|
||||
<field name="code">HUF</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="IDR" model="res.currency">
|
||||
@@ -1139,6 +1171,7 @@
|
||||
<field name="code">IDR</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="LVL" model="res.currency">
|
||||
@@ -1146,6 +1179,7 @@
|
||||
<field name="code">LVL</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateLVL" model="res.currency.rate">
|
||||
<field name="rate">0.71</field>
|
||||
@@ -1159,6 +1193,7 @@
|
||||
<field name="code">NOK</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateNOK" model="res.currency.rate">
|
||||
<field name="rate">7.93</field>
|
||||
@@ -1172,6 +1207,7 @@
|
||||
<field name="code">PAB</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="ratePAB" model="res.currency.rate">
|
||||
<field name="rate">1.3813</field>
|
||||
@@ -1185,6 +1221,7 @@
|
||||
<field name="code">PLN</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="SEK" model="res.currency">
|
||||
@@ -1192,6 +1229,7 @@
|
||||
<field name="code">SEK</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="GBP" model="res.currency">
|
||||
@@ -1199,6 +1237,7 @@
|
||||
<field name="code">GBP</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateGBP" model="res.currency.rate">
|
||||
<field name="rate">0.675</field>
|
||||
@@ -1211,6 +1250,7 @@
|
||||
<field name="code">ARS</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
<record id="rateARS" model="res.currency.rate">
|
||||
@@ -1224,30 +1264,13 @@
|
||||
<field name="code">Rs</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="rateINR" model="res.currency.rate">
|
||||
<field name="rate">0.634</field>
|
||||
<field name="currency_id" ref="INR"/>
|
||||
<field eval="time.strftime('%Y-01-01')" name="name"/>
|
||||
</record>
|
||||
|
||||
<!-- Basic Company -->
|
||||
<record id="main_company" model="res.company">
|
||||
<field name="name">Tiny sprl</field>
|
||||
<field name="partner_id" ref="main_partner"/>
|
||||
<field name="rml_header1">Free Business Solutions</field>
|
||||
<field name="rml_footer1">Web: http://tiny.be - Tel: (+32).81.81.37.00 - Bank: CPH 126-2013269-07</field>
|
||||
<field name="rml_footer2">IBAN: BE74 1262 0132 6907 - SWIFT: GKCCBEBB - VAT: BE0477.472.701</field>
|
||||
<field name="currency_id" ref="EUR"/>
|
||||
</record>
|
||||
|
||||
<assert id="main_company" model="res.company">
|
||||
<test expr="currency_id.code == 'eur'.upper()"/>
|
||||
<test expr="name">Tiny sprl</test>
|
||||
</assert>
|
||||
<record id="user_admin" model="res.users">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<form string="Users">
|
||||
<notebook colspan="4">
|
||||
<page string="Current Activity">
|
||||
<field name="company_id" widget="selection" readonly="0"/>
|
||||
<field name="company_id" widget="selection" readonly="0" context="{'user_prefence':True}"/>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Preferences"/>
|
||||
</page>
|
||||
|
||||
+616
-542
File diff suppressed because it is too large
Load Diff
+523
-486
File diff suppressed because it is too large
Load Diff
+115
-84
@@ -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-01-10 09:01+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-02-15 05:46+0000\n"
|
||||
"Last-Translator: Luigi Grilli <luigi.grilli@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-01-14 04:46+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-17 04:54+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
@@ -1012,7 +1012,7 @@ msgstr "STOCK_COPY"
|
||||
#: code:addons/base/ir/ir_model.py:0
|
||||
#, python-format
|
||||
msgid "Model %s Does not Exist !"
|
||||
msgstr ""
|
||||
msgstr "Il modello %s non esiste!"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/module/module.py:0
|
||||
@@ -1021,6 +1021,8 @@ msgid ""
|
||||
"You try to install the module '%s' that depends on the module:'%s'.\n"
|
||||
"But this module is not available in your system."
|
||||
msgstr ""
|
||||
"Hai provato ad installare il modulo '%s' che dipende dal modulo '%s'.\n"
|
||||
"Tuttavia quest'ultimo non è presente nel sistema."
|
||||
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_res_request_link
|
||||
@@ -1140,7 +1142,7 @@ msgstr "Report Personalizzato"
|
||||
#: code:addons/base/res/res_user.py:0
|
||||
#, python-format
|
||||
msgid " (copy)"
|
||||
msgstr ""
|
||||
msgstr " (copia)"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.sequence:0
|
||||
@@ -1155,7 +1157,7 @@ msgstr "7. %H:%M:%S ==> 18:25:20"
|
||||
#. module: base
|
||||
#: help:res.users,company_id:0
|
||||
msgid "The company this user is currently working on."
|
||||
msgstr ""
|
||||
msgstr "L'azienda per la quale lavora attualmente l'utente."
|
||||
|
||||
#. module: base
|
||||
#: help:ir.actions.server,message:0
|
||||
@@ -1163,6 +1165,8 @@ msgid ""
|
||||
"Specify the message. You can use the fields from the object. e.g. `Dear [[ "
|
||||
"object.partner_id.name ]]`"
|
||||
msgstr ""
|
||||
"Inserisci il messaggo. Puoi usare i campi oggetto. i.e.'Caro [[ "
|
||||
"object.partner_id.name ]]'"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.server,trigger_name:0
|
||||
@@ -1201,7 +1205,7 @@ msgstr "Formula"
|
||||
#: code:addons/base/res/res_user.py:0
|
||||
#, python-format
|
||||
msgid "Can not remove root user!"
|
||||
msgstr ""
|
||||
msgstr "Non posso rimuovere l'utente root"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -1211,7 +1215,7 @@ msgstr "STOCK_JUSTIFY_LEFT"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.mw
|
||||
msgid "Malawi"
|
||||
msgstr ""
|
||||
msgstr "Malawi"
|
||||
|
||||
#. module: base
|
||||
#: field:res.partner.address,type:0
|
||||
@@ -1256,6 +1260,8 @@ msgid ""
|
||||
"If set, sequence will only be used in case this python expression matches, "
|
||||
"and will precede other sequences."
|
||||
msgstr ""
|
||||
"Se impostata, la sequenza verrà utilizzata solo nel caso in cui questa "
|
||||
"espressione python si verifica, e precederà le altre sequenze."
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.actions.act_window,view_type:0
|
||||
@@ -1306,7 +1312,7 @@ msgstr "STOCK_PROPERTIES"
|
||||
#. module: base
|
||||
#: view:res.partner.address:0
|
||||
msgid "Search Contact"
|
||||
msgstr ""
|
||||
msgstr "Ricerca Contatto"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.module.module:0
|
||||
@@ -1322,7 +1328,7 @@ msgstr "Nuova Finestra"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bs
|
||||
msgid "Bahamas"
|
||||
msgstr ""
|
||||
msgstr "Bahamas"
|
||||
|
||||
#. module: base
|
||||
#: selection:res.partner.event,partner_type:0
|
||||
@@ -1335,6 +1341,8 @@ msgstr "Potenziale Cliente Commerciale"
|
||||
msgid ""
|
||||
"Couldn't generate the next id because some partners have an alphabetic id !"
|
||||
msgstr ""
|
||||
"Impossibile generare il prossimo ID poichè alcuni partner hanno un ID "
|
||||
"alfabetico"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.attachment:0
|
||||
@@ -1344,7 +1352,7 @@ msgstr "Allegato"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.ie
|
||||
msgid "Ireland"
|
||||
msgstr ""
|
||||
msgstr "Irlanda"
|
||||
|
||||
#. module: base
|
||||
#: wizard_field:module.module.update,update,update:0
|
||||
@@ -1370,7 +1378,7 @@ msgstr "Gruppi"
|
||||
#. module: base
|
||||
#: constraint:res.users:0
|
||||
msgid "This user can not connect using this company !"
|
||||
msgstr ""
|
||||
msgstr "Questo utente non può connettersi a questa azienda!"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bz
|
||||
@@ -1380,12 +1388,12 @@ msgstr "Belize"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.ge
|
||||
msgid "Georgia"
|
||||
msgstr ""
|
||||
msgstr "Georgia"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.pl
|
||||
msgid "Poland"
|
||||
msgstr ""
|
||||
msgstr "Polonia"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.module.module,state:0
|
||||
@@ -1414,6 +1422,9 @@ msgid ""
|
||||
"order in Object, and you can have loop on the sales order line. Expression = "
|
||||
"`object.order_line`."
|
||||
msgstr ""
|
||||
"Inserire il campo/espressione che ritornerà la lista. Per esempio, "
|
||||
"selezionare l'ordine di vendita fra gli oggetti, è possibile evere un loop "
|
||||
"nelle righe dellìordine di vendita. Expression = `object.order_line`."
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.translation,type:0
|
||||
@@ -1448,12 +1459,12 @@ msgstr "STOCK_REDO"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bb
|
||||
msgid "Barbados"
|
||||
msgstr ""
|
||||
msgstr "Barbados"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.mg
|
||||
msgid "Madagascar"
|
||||
msgstr ""
|
||||
msgstr "Madagascar"
|
||||
|
||||
#. module: base
|
||||
#: constraint:ir.model:0
|
||||
@@ -1467,6 +1478,7 @@ msgstr ""
|
||||
#: help:ir.rule.group,global:0
|
||||
msgid "Make the rule global, otherwise it needs to be put on a group"
|
||||
msgstr ""
|
||||
"Rende la regola globale, altrimenti deve essere inserita in un gruppo"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_menu_admin
|
||||
@@ -1479,12 +1491,12 @@ msgstr "Menu"
|
||||
#. module: base
|
||||
#: field:res.currency,rate:0
|
||||
msgid "Current Rate"
|
||||
msgstr ""
|
||||
msgstr "Tasso corrente"
|
||||
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "Greek / Ελληνικά"
|
||||
msgstr ""
|
||||
msgstr "Greco / Ελληνικά"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.values:0
|
||||
@@ -1508,18 +1520,18 @@ msgstr "Obiettivo Azione"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.ai
|
||||
msgid "Anguilla"
|
||||
msgstr ""
|
||||
msgstr "Anguilla"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.model.config,password_check:0
|
||||
msgid "Confirmation"
|
||||
msgstr ""
|
||||
msgstr "Conferma"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/ir/ir_report_custom.py:0
|
||||
#, python-format
|
||||
msgid "Enter at least one field !"
|
||||
msgstr ""
|
||||
msgstr "Inserisci almeno un campo !"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.ui.view_sc,name:0
|
||||
@@ -1537,11 +1549,13 @@ msgid ""
|
||||
"Provide the field name that the record id refers to for the write operation. "
|
||||
"If it is empty it will refer to the active id of the object."
|
||||
msgstr ""
|
||||
"Fornire il nome del campo a cui il record si riferisce per le operazioni di "
|
||||
"scrittura. Se fosse vuoto, si riferirà all'ID attivo dell'oggetto"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.zw
|
||||
msgid "Zimbabwe"
|
||||
msgstr ""
|
||||
msgstr "Zimbabwe"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.ui.menu,name:base.menu_translation_export
|
||||
@@ -1562,13 +1576,13 @@ msgstr "Indirizzo di posta elettronica"
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "French (BE) / Français (BE)"
|
||||
msgstr ""
|
||||
msgstr "Francese (BE) / Français (BE)"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/ir/ir_model.py:0
|
||||
#, python-format
|
||||
msgid "You can not write in this document! (%s)"
|
||||
msgstr ""
|
||||
msgstr "Non puoi scrivere in questo documento! (%s)"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.actions.server:0
|
||||
@@ -1579,12 +1593,12 @@ msgstr "Azione Server"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.tt
|
||||
msgid "Trinidad and Tobago"
|
||||
msgstr ""
|
||||
msgstr "Trinidad e Tobago"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.lv
|
||||
msgid "Latvia"
|
||||
msgstr ""
|
||||
msgstr "Lettonia"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.values:0
|
||||
@@ -1600,7 +1614,7 @@ msgstr "Mappatura Campi"
|
||||
#: model:ir.actions.act_window,name:base.res_request-closed
|
||||
#: model:ir.ui.menu,name:base.next_id_12_close
|
||||
msgid "My Closed Requests"
|
||||
msgstr ""
|
||||
msgstr "Mie richieste chiuse"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.ui.menu,name:base.menu_custom
|
||||
@@ -1610,7 +1624,7 @@ msgstr "Personalizzazione"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.py
|
||||
msgid "Paraguay"
|
||||
msgstr ""
|
||||
msgstr "Paraguay"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.report.custom.fields,alignment:0
|
||||
@@ -1630,7 +1644,7 @@ msgstr "Destinazione"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.lt
|
||||
msgid "Lithuania"
|
||||
msgstr ""
|
||||
msgstr "Lituania"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -1640,7 +1654,7 @@ msgstr "STOCK_PRINT_PREVIEW"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.si
|
||||
msgid "Slovenia"
|
||||
msgstr ""
|
||||
msgstr "Slovenia"
|
||||
|
||||
#. module: base
|
||||
#: view:res.partner.canal:0
|
||||
@@ -1666,7 +1680,7 @@ msgstr "Data Fine"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.nz
|
||||
msgid "New Zealand"
|
||||
msgstr ""
|
||||
msgstr "Nuova Zelanda"
|
||||
|
||||
#. module: base
|
||||
#: model:res.partner.category,name:base.res_partner_category_7
|
||||
@@ -1691,7 +1705,7 @@ msgstr "Operatore"
|
||||
#. module: base
|
||||
#: wizard_view:module.lang.install,start:0
|
||||
msgid "Installation Done"
|
||||
msgstr ""
|
||||
msgstr "Installazione Completata"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -1712,7 +1726,7 @@ msgstr "destra"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bd
|
||||
msgid "Bangladesh"
|
||||
msgstr ""
|
||||
msgstr "Bangladesh"
|
||||
|
||||
#. module: base
|
||||
#: constraint:res.company:0
|
||||
@@ -1728,7 +1742,7 @@ msgstr "Valido"
|
||||
#: code:addons/base/ir/ir_model.py:0
|
||||
#, python-format
|
||||
msgid "You can not delete this document! (%s)"
|
||||
msgstr ""
|
||||
msgstr "Non puoi cancellare questo documento (%s)"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.translation,type:0
|
||||
@@ -1739,12 +1753,12 @@ msgstr "XSL"
|
||||
#: code:addons/base/module/module.py:0
|
||||
#, python-format
|
||||
msgid "Can not upgrade module '%s'. It is not installed."
|
||||
msgstr ""
|
||||
msgstr "Impossibile aggiornare il modulo '%s'. Non è installato.,"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.cu
|
||||
msgid "Cuba"
|
||||
msgstr ""
|
||||
msgstr "Cuba"
|
||||
|
||||
#. module: base
|
||||
#: view:res.lang:0
|
||||
@@ -1769,7 +1783,7 @@ msgstr "Quotidiano"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.se
|
||||
msgid "Sweden"
|
||||
msgstr ""
|
||||
msgstr "Svezia"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.actions.act_window.view,view_mode:0
|
||||
@@ -1802,7 +1816,7 @@ msgstr "Configurazione iterazione di azione"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.at
|
||||
msgid "Austria"
|
||||
msgstr ""
|
||||
msgstr "Austria"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.actions.act_window.view,view_mode:0
|
||||
@@ -1883,7 +1897,7 @@ msgstr "Data di Nascita"
|
||||
#: model:ir.actions.act_window,name:base.action_partner_title_contact
|
||||
#: model:ir.ui.menu,name:base.menu_partner_title_contact
|
||||
msgid "Contact Titles"
|
||||
msgstr ""
|
||||
msgstr "Qualifiche Contatti"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_res_partner_som
|
||||
@@ -1903,7 +1917,7 @@ msgstr "Cercabile"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.uy
|
||||
msgid "Uruguay"
|
||||
msgstr ""
|
||||
msgstr "Uruguay"
|
||||
|
||||
#. module: base
|
||||
#: view:res.partner.event:0
|
||||
@@ -1933,7 +1947,7 @@ msgstr "German / Deutsch"
|
||||
#. module: base
|
||||
#: help:ir.actions.server,trigger_name:0
|
||||
msgid "Select the Signal name that is to be used as the trigger."
|
||||
msgstr ""
|
||||
msgstr "Seleziona il nome del segnale che deve essere usato come trigger."
|
||||
|
||||
#. module: base
|
||||
#: view:ir.actions.server:0
|
||||
@@ -1963,12 +1977,12 @@ msgstr "French / Français"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.mt
|
||||
msgid "Malta"
|
||||
msgstr ""
|
||||
msgstr "Malta"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.server,fields_lines:0
|
||||
msgid "Field Mappings."
|
||||
msgstr ""
|
||||
msgstr "Mappatura dei campi"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_ir_module_module
|
||||
@@ -1983,7 +1997,7 @@ msgstr "Modulo"
|
||||
#: model:ir.actions.act_window,name:base.action_res_bank_form
|
||||
#: model:ir.ui.menu,name:base.menu_action_res_bank_form
|
||||
msgid "Bank List"
|
||||
msgstr ""
|
||||
msgstr "Lista Banche"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.attachment,description:0
|
||||
@@ -2052,13 +2066,13 @@ msgstr "Possibile importare anche .po files"
|
||||
#: code:addons/base/maintenance/maintenance.py:0
|
||||
#, python-format
|
||||
msgid "Unable to find a valid contract"
|
||||
msgstr ""
|
||||
msgstr "Impossibile trovare un contratto valido"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/ir/ir_actions.py:0
|
||||
#, python-format
|
||||
msgid "Please specify an action to launch !"
|
||||
msgstr ""
|
||||
msgstr "Per favore specificare una azione da lanciare !"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -2079,7 +2093,7 @@ msgstr "Moduli da installare, aggiornare o rimuovere"
|
||||
#. module: base
|
||||
#: view:res.payterm:0
|
||||
msgid "Payment Term"
|
||||
msgstr ""
|
||||
msgstr "Termini di pagamento"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.report.custom,footer:0
|
||||
@@ -2124,7 +2138,7 @@ msgstr "terp-account"
|
||||
#: code:addons/base/module/module.py:0
|
||||
#, python-format
|
||||
msgid "Recursion error in modules dependencies !"
|
||||
msgstr ""
|
||||
msgstr "Errore di ricorsione delle dipendenze dei moduli !"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.model:0
|
||||
@@ -2150,7 +2164,7 @@ msgstr "Categorie di Moduli"
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "Ukrainian / украї́нська мо́ва"
|
||||
msgstr ""
|
||||
msgstr "Ucraino / украї́нська мо́ва"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.actions.todo,state:0
|
||||
@@ -2160,7 +2174,7 @@ msgstr "Non Avviato"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.ru
|
||||
msgid "Russian Federation"
|
||||
msgstr ""
|
||||
msgstr "Federazione Russa"
|
||||
|
||||
#. module: base
|
||||
#: field:res.company,name:0
|
||||
@@ -2215,6 +2229,10 @@ msgid ""
|
||||
"- The second parenthesis must match the whole version number.\n"
|
||||
"- The last parenthesis must match the extension of the module."
|
||||
msgstr ""
|
||||
"Espressioni regolari per cercare un modulo nella pagina web del repository\n"
|
||||
"-La prima parentesi deve combaciare con il nome del modulo\n"
|
||||
"-La seconda parentesi deve combaciare con l'intero numero di versione\n"
|
||||
"-L'ultima parentesi deve combaciare con l'estensione del modulo"
|
||||
|
||||
#. module: base
|
||||
#: view:res.lang:0
|
||||
@@ -2224,7 +2242,7 @@ msgstr "%M - Minuto come numero decimale [00,59]."
|
||||
#. module: base
|
||||
#: model:res.country,name:base.tj
|
||||
msgid "Tajikistan"
|
||||
msgstr ""
|
||||
msgstr "Tagikistan"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.act_values_form_action
|
||||
@@ -2269,7 +2287,7 @@ msgstr "Modulo"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.me
|
||||
msgid "Montenegro"
|
||||
msgstr ""
|
||||
msgstr "Montenegro"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -2279,7 +2297,7 @@ msgstr "STOCK_QUIT"
|
||||
#. module: base
|
||||
#: view:ir.cron:0
|
||||
msgid "Technical Data"
|
||||
msgstr ""
|
||||
msgstr "Informazioni Tecniche"
|
||||
|
||||
#. module: base
|
||||
#: view:res.partner:0
|
||||
@@ -2302,7 +2320,7 @@ msgstr "Da aggiornare"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.ly
|
||||
msgid "Libya"
|
||||
msgstr ""
|
||||
msgstr "Libia"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -2337,7 +2355,7 @@ msgstr "EAN13"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.pt
|
||||
msgid "Portugal"
|
||||
msgstr ""
|
||||
msgstr "Portogallo"
|
||||
|
||||
#. module: base
|
||||
#: selection:maintenance.contract,state:0
|
||||
@@ -2347,7 +2365,7 @@ msgstr "Non valido"
|
||||
#. module: base
|
||||
#: field:ir.module.module,certificate:0
|
||||
msgid "Quality Certificate"
|
||||
msgstr ""
|
||||
msgstr "Certificato di qualità"
|
||||
|
||||
#. module: base
|
||||
#: view:res.lang:0
|
||||
@@ -2385,17 +2403,20 @@ msgid ""
|
||||
"spreadsheet software. The file encoding is UTF-8. You have to translate the "
|
||||
"latest column before reimporting it."
|
||||
msgstr ""
|
||||
"Salva questo documento con formato .CSV ed aprilo con il tuo foglio di "
|
||||
"calcolo preferito. La codifica del file è UTF-8. Devi tradurre l'ultima "
|
||||
"colonna prima di reimportarlo."
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_partner_customer_form
|
||||
#: view:res.partner:0
|
||||
msgid "Customers"
|
||||
msgstr ""
|
||||
msgstr "Clienti"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.au
|
||||
msgid "Australia"
|
||||
msgstr ""
|
||||
msgstr "Australia"
|
||||
|
||||
#. module: base
|
||||
#: help:res.partner,lang:0
|
||||
@@ -2472,6 +2493,8 @@ msgid ""
|
||||
"Specify the subject. You can use fields from the object, e.g. `Hello [[ "
|
||||
"object.partner_id.name ]]`"
|
||||
msgstr ""
|
||||
"Specificare l'oggetto. E' possibile utilizzare campi dell'oggetto, per "
|
||||
"esempio `Ciao [[ object.partner_id.name ]]`"
|
||||
|
||||
#. module: base
|
||||
#: view:res.company:0
|
||||
@@ -2491,7 +2514,7 @@ msgstr "Nome lingua"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.va
|
||||
msgid "Holy See (Vatican City State)"
|
||||
msgstr ""
|
||||
msgstr "Stato del Vaticano"
|
||||
|
||||
#. module: base
|
||||
#: help:ir.actions.server,condition:0
|
||||
@@ -2499,6 +2522,8 @@ msgid ""
|
||||
"Condition that is to be tested before action is executed, e.g. "
|
||||
"object.list_price > object.cost_price"
|
||||
msgstr ""
|
||||
"Condizione da verificare prima che l'azione sia eseguita, per esempio "
|
||||
"object.list_price > object.cost_price"
|
||||
|
||||
#. module: base
|
||||
#: wizard_field:base.module.import,init,module_file:0
|
||||
@@ -2508,12 +2533,12 @@ msgstr "File .ZIP del modulo"
|
||||
#. module: base
|
||||
#: field:res.roles,child_id:0
|
||||
msgid "Children"
|
||||
msgstr ""
|
||||
msgstr "Bambini"
|
||||
|
||||
#. module: base
|
||||
#: field:workflow.transition,trigger_model:0
|
||||
msgid "Trigger Object"
|
||||
msgstr ""
|
||||
msgstr "Oggetto di innesco"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.report.custom,state:0
|
||||
@@ -2529,7 +2554,7 @@ msgstr "Aggiornamento Sistema"
|
||||
#. module: base
|
||||
#: field:workflow.activity,in_transitions:0
|
||||
msgid "Incoming Transitions"
|
||||
msgstr ""
|
||||
msgstr "Transizioni in Ingresso"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.sr
|
||||
@@ -2561,6 +2586,8 @@ msgid ""
|
||||
"You try to upgrade a module that depends on the module: %s.\n"
|
||||
"But this module is not available in your system."
|
||||
msgstr ""
|
||||
"Si è tentato di fare l'upgrade di un modulo che dipenda dal modulo: %s.\n"
|
||||
"Ma questo modulo non è disponibile nel sistema."
|
||||
|
||||
#. module: base
|
||||
#: view:res.partner.address:0
|
||||
@@ -2576,7 +2603,7 @@ msgstr "Licenza"
|
||||
#: code:addons/base/ir/ir_report_custom.py:0
|
||||
#, python-format
|
||||
msgid "Invalid operation"
|
||||
msgstr ""
|
||||
msgstr "Operazione non valida"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -2614,13 +2641,13 @@ msgstr "Guinea Equatoriale"
|
||||
#. module: base
|
||||
#: wizard_view:base.module.import,init:0
|
||||
msgid "Module Import"
|
||||
msgstr ""
|
||||
msgstr "Importazione Modulo"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/ir/ir_model.py:0
|
||||
#, python-format
|
||||
msgid "You can not remove the field '%s' !"
|
||||
msgstr ""
|
||||
msgstr "Non puoi rimuovere il campo '%s' !"
|
||||
|
||||
#. module: base
|
||||
#: field:res.bank,zip:0
|
||||
@@ -2637,7 +2664,7 @@ msgstr "Autore"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.mk
|
||||
msgid "FYROM"
|
||||
msgstr ""
|
||||
msgstr "FYROM"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -2652,12 +2679,12 @@ msgstr "%c - Rappresentazione appropriata della data e dell'ora."
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "Finland / Suomi"
|
||||
msgstr ""
|
||||
msgstr "Finlandese / Suomi"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bo
|
||||
msgid "Bolivia"
|
||||
msgstr ""
|
||||
msgstr "Bolivia"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.gh
|
||||
@@ -2699,6 +2726,7 @@ msgstr "Regole"
|
||||
#, python-format
|
||||
msgid "You try to remove a module that is installed or will be installed"
|
||||
msgstr ""
|
||||
"Stai provando a rimuovere un modulo che è installato o che verrà installato."
|
||||
|
||||
#. module: base
|
||||
#: help:ir.values,key2:0
|
||||
@@ -2714,7 +2742,7 @@ msgstr "STOCK_PASTE"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.gt
|
||||
msgid "Guatemala"
|
||||
msgstr ""
|
||||
msgstr "Guatemala"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.action_workflow_form
|
||||
@@ -2761,7 +2789,7 @@ msgstr "Lesotho"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.ke
|
||||
msgid "Kenya"
|
||||
msgstr ""
|
||||
msgstr "Kenia"
|
||||
|
||||
#. module: base
|
||||
#: view:res.config.view:0
|
||||
@@ -2778,7 +2806,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: model:res.country,name:base.sm
|
||||
msgid "San Marino"
|
||||
msgstr ""
|
||||
msgstr "San Marino"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bm
|
||||
@@ -2788,7 +2816,7 @@ msgstr "Bermuda"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.pe
|
||||
msgid "Peru"
|
||||
msgstr ""
|
||||
msgstr "Perù"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.model.fields,on_delete:0
|
||||
@@ -2831,7 +2859,7 @@ msgstr "Chiave"
|
||||
#. module: base
|
||||
#: field:ir.cron,nextcall:0
|
||||
msgid "Next Call Date"
|
||||
msgstr ""
|
||||
msgstr "Data della prossima chiamata"
|
||||
|
||||
#. module: base
|
||||
#: field:res.company,rml_header:0
|
||||
@@ -2869,6 +2897,7 @@ msgstr "Sicurezza"
|
||||
#, python-format
|
||||
msgid "Using a relation field which uses an unknown object"
|
||||
msgstr ""
|
||||
"Utilizzo di un campo di relazione, che si avvale di un oggetto sconosciuto"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.za
|
||||
@@ -2920,7 +2949,7 @@ msgstr "Tassi"
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "Albanian / Shqipëri"
|
||||
msgstr ""
|
||||
msgstr "Albania / Shqipëri"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.sy
|
||||
@@ -2935,22 +2964,22 @@ msgstr "======================================================"
|
||||
#. module: base
|
||||
#: field:ir.report.custom.fields,field_child2:0
|
||||
msgid "Field child2"
|
||||
msgstr ""
|
||||
msgstr "Campo figlio2"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.report.custom.fields,field_child3:0
|
||||
msgid "Field child3"
|
||||
msgstr ""
|
||||
msgstr "Campo figlio3"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.report.custom.fields,field_child0:0
|
||||
msgid "Field child0"
|
||||
msgstr ""
|
||||
msgstr "Campo figlio0"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.report.custom.fields,field_child1:0
|
||||
msgid "Field child1"
|
||||
msgstr ""
|
||||
msgstr "Campo figlio1"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.model.fields,selection:0
|
||||
@@ -3003,11 +3032,13 @@ msgid ""
|
||||
"If set to true, the action will not be displayed on the right toolbar of a "
|
||||
"form view."
|
||||
msgstr ""
|
||||
"Se impostato a vero, l'azione non comparirà nella barra degli strumenti di "
|
||||
"destra di un form"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.ui.menu,name:base.menu_custom_multicompany
|
||||
msgid "Multi company"
|
||||
msgstr ""
|
||||
msgstr "Multi azienda"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.attachment:0
|
||||
@@ -3044,7 +3075,7 @@ msgstr "Swedish / svenska"
|
||||
#. module: base
|
||||
#: field:res.company,child_ids:0
|
||||
msgid "Child Companies"
|
||||
msgstr ""
|
||||
msgstr "Aziende Figlie"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_res_users
|
||||
@@ -3110,7 +3141,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: field:res.partner,parent_id:0
|
||||
msgid "Parent Partner"
|
||||
msgstr ""
|
||||
msgstr "Partner Padre"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.module.module:0
|
||||
@@ -3178,7 +3209,7 @@ msgstr "Dati Dimostrativi"
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "English (UK)"
|
||||
msgstr ""
|
||||
msgstr "Inglese (Regno Unito)"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.aq
|
||||
@@ -3203,7 +3234,7 @@ msgstr "Web"
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
msgid "English (CA)"
|
||||
msgstr ""
|
||||
msgstr "Inglese (Canada)"
|
||||
|
||||
#. module: base
|
||||
#: field:res.partner.event,planned_revenue:0
|
||||
@@ -3237,7 +3268,7 @@ msgstr "Ruolo"
|
||||
#. module: base
|
||||
#: help:res.country.state,code:0
|
||||
msgid "The state code in three chars.\n"
|
||||
msgstr ""
|
||||
msgstr "Il codice dello stato in 3 caratteri\n"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.sj
|
||||
|
||||
@@ -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-02-07 05:11+0000\n"
|
||||
"PO-Revision-Date: 2010-02-22 05:38+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@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-02-08 04:44+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-23 05:04+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
+16
-13
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2009-12-24 06:52+0000\n"
|
||||
"Last-Translator: mra (Open ERP) <mra@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-02-19 05:34+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-14 04:45+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-20 04:42+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
@@ -749,7 +749,7 @@ msgstr "Iran"
|
||||
#: model:ir.actions.act_window,name:base.res_request-act
|
||||
#: model:ir.ui.menu,name:base.menu_res_request_act
|
||||
msgid "My Requests"
|
||||
msgstr ""
|
||||
msgstr "Mijn verzoeken"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.sequence,name:0
|
||||
@@ -1119,6 +1119,9 @@ msgid ""
|
||||
"consider the present one as void. Do not hesitate to contact our accounting "
|
||||
"department at (+32).81.81.37.00."
|
||||
msgstr ""
|
||||
"Mocht uw betaling dit bericht gekruisd hebben, dan verzoeken wij u dit "
|
||||
"bericht als niet verzonden te beschouwen. Aarzel niet om contact op te nemen "
|
||||
"met onze financiële administratie op (telefoonnummer)."
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -1157,7 +1160,7 @@ msgstr "7. %H:%M:%S ==> 18:25:20"
|
||||
#. module: base
|
||||
#: help:res.users,company_id:0
|
||||
msgid "The company this user is currently working on."
|
||||
msgstr ""
|
||||
msgstr "Het bedrijf waarvoor deze gebruiker op dit moment werkt."
|
||||
|
||||
#. module: base
|
||||
#: help:ir.actions.server,message:0
|
||||
@@ -1377,7 +1380,7 @@ msgstr "Groepen"
|
||||
#. module: base
|
||||
#: constraint:res.users:0
|
||||
msgid "This user can not connect using this company !"
|
||||
msgstr ""
|
||||
msgstr "Deze gebruiker kan geen verbinding maken voor dit bedrijf !"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bz
|
||||
@@ -1612,7 +1615,7 @@ msgstr "Veldverwijzingen"
|
||||
#: model:ir.actions.act_window,name:base.res_request-closed
|
||||
#: model:ir.ui.menu,name:base.next_id_12_close
|
||||
msgid "My Closed Requests"
|
||||
msgstr ""
|
||||
msgstr "Mijn afgesloten verzoeken"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.ui.menu,name:base.menu_custom
|
||||
@@ -1995,7 +1998,7 @@ msgstr "Module"
|
||||
#: model:ir.actions.act_window,name:base.action_res_bank_form
|
||||
#: model:ir.ui.menu,name:base.menu_action_res_bank_form
|
||||
msgid "Bank List"
|
||||
msgstr ""
|
||||
msgstr "Lijst van banken"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.attachment,description:0
|
||||
@@ -4487,7 +4490,7 @@ msgstr "res.partner.event"
|
||||
#. module: base
|
||||
#: field:res.company,user_ids:0
|
||||
msgid "Accepted Users"
|
||||
msgstr ""
|
||||
msgstr "Geaccepteerde gebruikers"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -5428,7 +5431,7 @@ msgstr "Actieve gebeurtenissen relatie"
|
||||
#: model:ir.ui.menu,name:base.menu_partner_function_form
|
||||
#: view:res.partner.function:0
|
||||
msgid "Contact Functions"
|
||||
msgstr ""
|
||||
msgstr "Functies contactpersoon"
|
||||
|
||||
#. module: base
|
||||
#: view:multi_company.default:0
|
||||
@@ -6081,7 +6084,7 @@ msgstr "Uur 00->24: %(h24)s"
|
||||
#. module: base
|
||||
#: help:multi_company.default,field_id:0
|
||||
msgid "Select field property"
|
||||
msgstr ""
|
||||
msgstr "Kies eigenschap veld"
|
||||
|
||||
#. module: base
|
||||
#: field:res.request.history,date_sent:0
|
||||
@@ -6172,7 +6175,7 @@ msgstr "Bovenliggend"
|
||||
#. module: base
|
||||
#: view:multi_company.default:0
|
||||
msgid "Returning"
|
||||
msgstr ""
|
||||
msgstr "Terugkerend"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.act_window,res_model:0
|
||||
@@ -7444,7 +7447,7 @@ msgstr "Toestemming verwijderen"
|
||||
#. module: base
|
||||
#: model:ir.model,name:base.model_multi_company_default
|
||||
msgid "multi_company.default"
|
||||
msgstr ""
|
||||
msgstr "multi_company.default"
|
||||
|
||||
#. module: base
|
||||
#: selection:workflow.activity,join_mode:0
|
||||
|
||||
+34
-27
@@ -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: 2009-12-12 06:10+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-02-21 06:01+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-01-14 04:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-22 04:41+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
@@ -559,7 +559,7 @@ msgstr "Widok kreatora"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.kh
|
||||
msgid "Cambodia, Kingdom of"
|
||||
msgstr ""
|
||||
msgstr "Kambodża, Królestwo Kambodży"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.actions.act_window,name:base.ir_sequence_form
|
||||
@@ -744,7 +744,7 @@ msgstr "Iran"
|
||||
#: model:ir.actions.act_window,name:base.res_request-act
|
||||
#: model:ir.ui.menu,name:base.menu_res_request_act
|
||||
msgid "My Requests"
|
||||
msgstr ""
|
||||
msgstr "Moje zgłoszenia"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.sequence,name:0
|
||||
@@ -1007,7 +1007,7 @@ msgstr ""
|
||||
#: code:addons/base/ir/ir_model.py:0
|
||||
#, python-format
|
||||
msgid "Model %s Does not Exist !"
|
||||
msgstr ""
|
||||
msgstr "Model %s nie istnieje !"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/module/module.py:0
|
||||
@@ -1114,6 +1114,9 @@ msgid ""
|
||||
"consider the present one as void. Do not hesitate to contact our accounting "
|
||||
"department at (+32).81.81.37.00."
|
||||
msgstr ""
|
||||
"Jeśli dokonali już państwo płatności przed wysłaniem tej wiadomości, to "
|
||||
"proszę niniejszą wiadomość zignorować. Do dyspozycji jest kontakt z naszą "
|
||||
"księgowością pod numerem telefonu ....."
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -1152,7 +1155,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: help:res.users,company_id:0
|
||||
msgid "The company this user is currently working on."
|
||||
msgstr ""
|
||||
msgstr "Firma, w której pracuje ten użytkownik."
|
||||
|
||||
#. module: base
|
||||
#: help:ir.actions.server,message:0
|
||||
@@ -1254,6 +1257,8 @@ msgid ""
|
||||
"If set, sequence will only be used in case this python expression matches, "
|
||||
"and will precede other sequences."
|
||||
msgstr ""
|
||||
"Jeśli ustawione, to numeracja zostanie zastosowana tylko w przypadku kiedy "
|
||||
"wyrażenia python jest spełnione. Zastąpi ono inne numeracje."
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.actions.act_window,view_type:0
|
||||
@@ -1371,7 +1376,7 @@ msgstr "Grupy"
|
||||
#. module: base
|
||||
#: constraint:res.users:0
|
||||
msgid "This user can not connect using this company !"
|
||||
msgstr ""
|
||||
msgstr "Ten użytkownik nie może zostać zalogowany w tej firmie !"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bz
|
||||
@@ -1504,7 +1509,7 @@ msgstr "Akcja do uruchomienia"
|
||||
#: selection:ir.report.custom.fields,fc3_op:0
|
||||
#: selection:ir.rule,operator:0
|
||||
msgid "in"
|
||||
msgstr ""
|
||||
msgstr "w"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.url,target:0
|
||||
@@ -1608,7 +1613,7 @@ msgstr "Mapowanie pól"
|
||||
#: model:ir.actions.act_window,name:base.res_request-closed
|
||||
#: model:ir.ui.menu,name:base.next_id_12_close
|
||||
msgid "My Closed Requests"
|
||||
msgstr ""
|
||||
msgstr "Moje zamknięte zgłoszenia"
|
||||
|
||||
#. module: base
|
||||
#: model:ir.ui.menu,name:base.menu_custom
|
||||
@@ -1991,7 +1996,7 @@ msgstr "Moduł"
|
||||
#: model:ir.actions.act_window,name:base.action_res_bank_form
|
||||
#: model:ir.ui.menu,name:base.menu_action_res_bank_form
|
||||
msgid "Bank List"
|
||||
msgstr ""
|
||||
msgstr "Lista banków"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.attachment,description:0
|
||||
@@ -2333,7 +2338,7 @@ msgstr "Republika Środkowej Afryki"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.li
|
||||
msgid "Liechtenstein"
|
||||
msgstr ""
|
||||
msgstr "Liechtenstein"
|
||||
|
||||
#. module: base
|
||||
#: model:res.partner.title,name:base.res_partner_title_ltd
|
||||
@@ -3874,7 +3879,7 @@ msgstr "Prawo tworzenia"
|
||||
#. module: base
|
||||
#: field:res.partner.address,state_id:0
|
||||
msgid "Fed. State"
|
||||
msgstr ""
|
||||
msgstr "woj."
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.io
|
||||
@@ -4060,7 +4065,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bi
|
||||
msgid "Burundi"
|
||||
msgstr ""
|
||||
msgstr "Burundi"
|
||||
|
||||
#. module: base
|
||||
#: wizard_button:base.module.import,import,open_window:0
|
||||
@@ -4075,7 +4080,7 @@ msgstr "Zamknij"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.bt
|
||||
msgid "Bhutan"
|
||||
msgstr ""
|
||||
msgstr "Butan"
|
||||
|
||||
#. module: base
|
||||
#: model:res.partner.category,name:base.res_partner_category_11
|
||||
@@ -4472,7 +4477,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: field:res.company,user_ids:0
|
||||
msgid "Accepted Users"
|
||||
msgstr ""
|
||||
msgstr "Akceptowani użytkownicy"
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.ui.menu,icon:0
|
||||
@@ -4497,7 +4502,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: model:res.country,name:base.hk
|
||||
msgid "Hong Kong"
|
||||
msgstr ""
|
||||
msgstr "Hongkong"
|
||||
|
||||
#. module: base
|
||||
#: help:ir.actions.server,name:0
|
||||
@@ -6067,7 +6072,7 @@ msgstr "Godzina 00->24: %(h24)s"
|
||||
#. module: base
|
||||
#: help:multi_company.default,field_id:0
|
||||
msgid "Select field property"
|
||||
msgstr ""
|
||||
msgstr "Wybierz właściwość pola"
|
||||
|
||||
#. module: base
|
||||
#: field:res.request.history,date_sent:0
|
||||
@@ -6137,7 +6142,7 @@ msgstr "Stan emocji"
|
||||
#: model:ir.actions.act_window,name:base.action_country_state
|
||||
#: model:ir.ui.menu,name:base.menu_country_state_partner
|
||||
msgid "Fed. States"
|
||||
msgstr ""
|
||||
msgstr "Województwa"
|
||||
|
||||
#. module: base
|
||||
#: view:ir.model:0
|
||||
@@ -6219,7 +6224,7 @@ msgstr "Odn. użytkownika"
|
||||
#: model:ir.ui.menu,name:base.menu_config
|
||||
#: view:res.company:0
|
||||
msgid "Configuration"
|
||||
msgstr "Ustawienia"
|
||||
msgstr "Konfiguracja"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.server,expression:0
|
||||
@@ -6432,7 +6437,7 @@ msgstr "SMS"
|
||||
#. module: base
|
||||
#: model:res.country,name:base.cr
|
||||
msgid "Costa Rica"
|
||||
msgstr ""
|
||||
msgstr "Kostaryka"
|
||||
|
||||
#. module: base
|
||||
#: code:addons/base/maintenance/maintenance.py:0
|
||||
@@ -6533,7 +6538,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: model:res.country,name:base.cd
|
||||
msgid "Congo, The Democratic Republic of the"
|
||||
msgstr ""
|
||||
msgstr "Kongo, Demokratyczna Republika Konga"
|
||||
|
||||
#. module: base
|
||||
#: view:res.request:0
|
||||
@@ -7173,7 +7178,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: help:ir.actions.report.xml,header:0
|
||||
msgid "Add or not the coporate RML header"
|
||||
msgstr ""
|
||||
msgstr "Możesz dodać nagłówek RML firmy"
|
||||
|
||||
#. module: base
|
||||
#: field:res.partner.event,document:0
|
||||
@@ -7652,7 +7657,7 @@ msgstr "Azerbejdżan"
|
||||
#: code:addons/base/res/partner/partner.py:0
|
||||
#, python-format
|
||||
msgid "Warning"
|
||||
msgstr ""
|
||||
msgstr "Ostrzeżenie"
|
||||
|
||||
#. module: base
|
||||
#: selection:module.lang.install,init,lang:0
|
||||
@@ -7662,7 +7667,7 @@ msgstr ""
|
||||
#. module: base
|
||||
#: model:res.country,name:base.gi
|
||||
msgid "Gibraltar"
|
||||
msgstr ""
|
||||
msgstr "Gibraltar"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.vg
|
||||
@@ -7693,6 +7698,8 @@ msgstr ""
|
||||
#: constraint:res.partner:0
|
||||
msgid "The VAT doesn't seem to be correct."
|
||||
msgstr ""
|
||||
"Numer NIP wygląda na niepoprawny. Wpisuj numer z PL na początku. Bez kresek "
|
||||
"i spacji."
|
||||
|
||||
#. module: base
|
||||
#: selection:ir.report.custom.fields,operation:0
|
||||
@@ -7855,7 +7862,7 @@ msgstr "Reguły rekordu"
|
||||
#. module: base
|
||||
#: view:ir.actions.report.custom:0
|
||||
msgid "Report custom"
|
||||
msgstr ""
|
||||
msgstr "Własny raport"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.actions.configuration.wizard,progress:0
|
||||
@@ -8017,7 +8024,7 @@ msgstr "Podgląd obrazka"
|
||||
#. module: base
|
||||
#: model:res.partner.title,name:base.res_partner_title_pvt_ltd
|
||||
msgid "Corp."
|
||||
msgstr ""
|
||||
msgstr "SA"
|
||||
|
||||
#. module: base
|
||||
#: model:res.country,name:base.gw
|
||||
|
||||
@@ -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-02-07 23:15+0000\n"
|
||||
"Last-Translator: Paulino <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-02-08 05:18+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-02-08 04:44+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-09 05:10+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
|
||||
+371
-340
File diff suppressed because it is too large
Load Diff
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||
"PO-Revision-Date: 2009-11-24 12:56+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-02-15 05:47+0000\n"
|
||||
"Last-Translator: Walter Cheuk <wwycheuk@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-01-14 04:48+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-02-17 04:54+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base
|
||||
@@ -4728,7 +4728,7 @@ msgstr ""
|
||||
#: view:ir.translation:0
|
||||
#: model:ir.ui.menu,name:base.menu_translation
|
||||
msgid "Translations"
|
||||
msgstr "翻译"
|
||||
msgstr "翻譯"
|
||||
|
||||
#. module: base
|
||||
#: field:ir.sequence,padding:0
|
||||
|
||||
@@ -360,7 +360,8 @@
|
||||
<field name="auto_refresh"/>
|
||||
<newline/>
|
||||
<field name="view_mode"/>
|
||||
<field name="filter"/>
|
||||
<field name="filter"/>
|
||||
<field name="auto_search"/>
|
||||
<field name="view_id"/>
|
||||
<field name="search_view_id"/>
|
||||
</page>
|
||||
@@ -996,7 +997,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Menu" editable="top">
|
||||
<field name="sequence"/>
|
||||
<field icon="icon" name="complete_name"/>
|
||||
<field icon="icon" name="complete_name" string="Menu"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -1007,8 +1008,8 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Menu">
|
||||
<field name="complete_name"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="complete_name" string="Menu"/>
|
||||
<field name="name" select="1" string="Root Menu"/>
|
||||
<field name="sequence"/>
|
||||
<field colspan="4" name="parent_id" select="1"/>
|
||||
<field name="action"/>
|
||||
|
||||
@@ -245,6 +245,7 @@ class act_window(osv.osv):
|
||||
'act_id', 'gid', 'Groups'),
|
||||
'search_view_id': fields.many2one('ir.ui.view', 'Search View Ref.'),
|
||||
'filter': fields.boolean('Filter'),
|
||||
'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)
|
||||
@@ -257,6 +258,7 @@ class act_window(osv.osv):
|
||||
'limit': lambda *a: 80,
|
||||
'target': lambda *a: 'current',
|
||||
'auto_refresh': lambda *a: 0,
|
||||
'auto_search':lambda *a: True
|
||||
}
|
||||
act_window()
|
||||
|
||||
@@ -427,7 +429,6 @@ class actions_server(osv.osv):
|
||||
'sequence': lambda *a: 5,
|
||||
'code': lambda *a: """# You can use the following variables
|
||||
# - object
|
||||
# - object2
|
||||
# - time
|
||||
# - cr
|
||||
# - uid
|
||||
@@ -488,7 +489,7 @@ class actions_server(osv.osv):
|
||||
result = eval(exp, {'object':obj, 'context': context,'time':time})
|
||||
if result in (None, False):
|
||||
return str("--------")
|
||||
return str(result)
|
||||
return tools.ustr(result)
|
||||
|
||||
com = re.compile('(\[\[.+?\]\])')
|
||||
message = com.sub(merge, keystr)
|
||||
@@ -534,7 +535,7 @@ class actions_server(osv.osv):
|
||||
'ids': ids,
|
||||
'cr': cr,
|
||||
'uid': uid,
|
||||
'obj':obj
|
||||
'object':obj
|
||||
}
|
||||
exec action.code in localdict
|
||||
if 'action' in localdict:
|
||||
@@ -553,10 +554,10 @@ class actions_server(osv.osv):
|
||||
continue
|
||||
if not user:
|
||||
raise osv.except_osv(_('Error'), _("Please specify server option --smtp-from !"))
|
||||
|
||||
subject = self.merge_message(cr, uid, str(action.subject), action, context)
|
||||
body = self.merge_message(cr, uid, str(action.message), action, context)
|
||||
|
||||
|
||||
subject = self.merge_message(cr, uid, action.subject, action, context)
|
||||
body = self.merge_message(cr, uid, action.message, action, context)
|
||||
|
||||
if tools.email_send(user, [address], subject, body, debug=False, subtype='html') == True:
|
||||
logger.notifyChannel('email', netsvc.LOG_INFO, 'Email successfully send to : %s' % (address))
|
||||
else:
|
||||
@@ -573,14 +574,8 @@ class actions_server(osv.osv):
|
||||
if action.state == 'sms':
|
||||
#TODO: set the user and password from the system
|
||||
# for the sms gateway user / password
|
||||
api_id = ''
|
||||
text = action.sms
|
||||
to = self.get_mobile(cr, uid, action, context)
|
||||
#TODO: Apply message mearge with the field
|
||||
if tools.sms_send(user, password, api_id, text, to) == True:
|
||||
logger.notifyChannel('sms', netsvc.LOG_INFO, 'SMS successfully send to : %s' % (action.address))
|
||||
else:
|
||||
logger.notifyChannel('sms', netsvc.LOG_ERROR, 'Failed to send SMS to : %s' % (action.address))
|
||||
# USE smsclient module from extra-addons
|
||||
logger.notifyChannel('sms', netsvc.LOG_ERROR, 'SMS Facility has not been implemented yet. Use smsclient module!')
|
||||
|
||||
if action.state == 'other':
|
||||
res = []
|
||||
|
||||
@@ -79,7 +79,7 @@ class ir_model(osv.osv):
|
||||
if context:
|
||||
context.pop('__last_update', None)
|
||||
return super(ir_model,self).write(cr, user, ids, vals, context)
|
||||
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
if context and context.get('manual',False):
|
||||
vals['state']='manual'
|
||||
@@ -87,7 +87,9 @@ class ir_model(osv.osv):
|
||||
if vals.get('state','base')=='manual':
|
||||
self.instanciate(cr, user, vals['model'], context)
|
||||
self.pool.get(vals['model']).__init__(self.pool, cr)
|
||||
self.pool.get(vals['model'])._auto_init(cr,{'field_name':vals['name'],'field_state':'manual','select':vals.get('select_level','0')})
|
||||
ctx = context.copy()
|
||||
ctx.update({'field_name':vals['name'],'field_state':'manual','select':vals.get('select_level','0')})
|
||||
self.pool.get(vals['model'])._auto_init(cr, ctx)
|
||||
#pooler.restart_pool(cr.dbname)
|
||||
return res
|
||||
|
||||
@@ -241,10 +243,12 @@ class ir_model_fields(osv.osv):
|
||||
def unlink(self, cr, user, ids, context=None):
|
||||
for field in self.browse(cr, user, ids, context):
|
||||
if field.state <> 'manual':
|
||||
raise except_orm(_('Error'), _("You can not remove the field '%s' !") %(field.name,))
|
||||
raise except_orm(_('Error'), _("You cannot remove the field '%s' !") %(field.name,))
|
||||
#
|
||||
# MAY BE ADD A ALTER TABLE DROP ?
|
||||
#
|
||||
#Removing _columns entry for that table
|
||||
self.pool.get(field.model)._columns.pop(field.name,None)
|
||||
return super(ir_model_fields, self).unlink(cr, user, ids, context)
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
@@ -264,9 +268,12 @@ class ir_model_fields(osv.osv):
|
||||
if self.pool.get(vals['model']):
|
||||
self.pool.get(vals['model']).__init__(self.pool, cr)
|
||||
#Added context to _auto_init for special treatment to custom field for select_level
|
||||
self.pool.get(vals['model'])._auto_init(cr, {'field_name':vals['name'],'field_state':'manual','select':vals.get('select_level','0')})
|
||||
ctx = context.copy()
|
||||
ctx.update({'field_name':vals['name'],'field_state':'manual','select':vals.get('select_level','0'),'update_custom_fields':True})
|
||||
self.pool.get(vals['model'])._auto_init(cr, ctx)
|
||||
|
||||
return res
|
||||
|
||||
ir_model_fields()
|
||||
|
||||
class ir_model_access(osv.osv):
|
||||
|
||||
@@ -42,24 +42,6 @@ class ir_rule_group(osv.osv):
|
||||
'global': lambda *a: True,
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
res = super(ir_rule_group, self).unlink(cr, uid, ids, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
res = super(ir_rule_group, self).create(cr, user, vals, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
res = super(ir_rule_group, self).write(cr, uid, ids, vals, context=context)
|
||||
# Restart the cache on the domain_get method of ir.rule
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return res
|
||||
|
||||
ir_rule_group()
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -35,7 +35,7 @@ TRANSLATION_TYPE = [
|
||||
('help', 'Help'),
|
||||
('code', 'Code'),
|
||||
('constraint', 'Constraint'),
|
||||
('sql_constraint', 'SQL Constraint')
|
||||
('sql_constraint', 'SQL Constraint')
|
||||
]
|
||||
|
||||
class ir_translation(osv.osv):
|
||||
@@ -123,6 +123,8 @@ class ir_translation(osv.osv):
|
||||
|
||||
@tools.cache(skiparg=3)
|
||||
def _get_source(self, cr, uid, name, tt, lang, source=None):
|
||||
if not lang:
|
||||
return ''
|
||||
if source:
|
||||
#if isinstance(source, unicode):
|
||||
# source = source.encode('utf8')
|
||||
@@ -143,7 +145,7 @@ class ir_translation(osv.osv):
|
||||
res = cr.fetchone()
|
||||
trad = res and res[0] or ''
|
||||
return trad
|
||||
|
||||
|
||||
def create(self, cursor, user, vals, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
@@ -151,7 +153,7 @@ class ir_translation(osv.osv):
|
||||
for trans_obj in self.read(cursor, user, [ids], ['name','type','res_id'], context=context):
|
||||
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US'))
|
||||
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']])
|
||||
return ids
|
||||
return ids
|
||||
|
||||
def write(self, cursor, user, ids, vals, context=None):
|
||||
if not context:
|
||||
@@ -169,7 +171,7 @@ class ir_translation(osv.osv):
|
||||
self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US'))
|
||||
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']])
|
||||
result = super(ir_translation, self).unlink(cursor, user, ids, context=context)
|
||||
return result
|
||||
return result
|
||||
|
||||
ir_translation()
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from osv.orm import browse_null, browse_record
|
||||
import re
|
||||
import tools
|
||||
|
||||
@@ -169,8 +168,8 @@ class ir_ui_menu(osv.osv):
|
||||
('res_id', '=', id),
|
||||
])
|
||||
for iv in ir_values_obj.browse(cr, uid, ids):
|
||||
new_id = ir_values_obj.copy(cr, uid, iv.id,
|
||||
default={'res_id': res}, context=context)
|
||||
ir_values_obj.copy(cr, uid, iv.id, default={'res_id': res},
|
||||
context=context)
|
||||
return res
|
||||
|
||||
def _action(self, cursor, user, ids, name, arg, context=None):
|
||||
@@ -243,6 +242,7 @@ class ir_ui_menu(osv.osv):
|
||||
('ir.actions.act_window', 'ir.actions.act_window'),
|
||||
('ir.actions.wizard', 'ir.actions.wizard'),
|
||||
('ir.actions.url', 'ir.actions.url'),
|
||||
('ir.actions.server', 'ir.actions.server'),
|
||||
]),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -38,6 +38,27 @@
|
||||
<menuitem action="action_module_category_tree" id="menu_action_module_category_tree" parent="base.menu_management"/>
|
||||
|
||||
<!-- Click on a category -->
|
||||
|
||||
<record id="view_module_filter" model="ir.ui.view">
|
||||
<field name="name">ir.module.module.list.select</field>
|
||||
<field name="model">ir.module.module</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search modules">
|
||||
<group col='10' colspan='4'>
|
||||
<filter icon="terp-sale" string="Installed" domain="[('state', 'in', ['installed', 'to upgrade', 'to remove'])]"/>
|
||||
<filter icon="terp-sale" string="Uninstalled" domain="[('state', 'in', ['uninstalled', 'uninstallable'])]"/>
|
||||
<filter icon="terp-sale" string="To be upgraded" domain="[('state','in', ['to upgrade', 'to remove', 'to install'])]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="state" readonly="1" select="1"/>
|
||||
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_module_open_categ" model="ir.actions.act_window">
|
||||
<field name="name">Modules</field>
|
||||
@@ -45,6 +66,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('category_id','=',active_id)]</field>
|
||||
|
||||
</record>
|
||||
<record id="ir_action_module_category" model="ir.values">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
@@ -130,34 +152,10 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain"/>
|
||||
<field name="search_view_id" ref="view_module_filter"/>
|
||||
</record>
|
||||
<menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/>
|
||||
|
||||
<record id="open_module_tree_install" model="ir.actions.act_window">
|
||||
<field name="name">Installed modules</field>
|
||||
<field name="res_model">ir.module.module</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state', 'in', ['installed', 'to upgrade', 'to remove'])]</field>
|
||||
</record>
|
||||
<menuitem action="open_module_tree_install" id="menu_module_tree_install" parent="base.menu_module_tree"/>
|
||||
<record id="open_module_tree_uninstall" model="ir.actions.act_window">
|
||||
<field name="name">Uninstalled modules</field>
|
||||
<field name="res_model">ir.module.module</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state', 'in', ['uninstalled', 'uninstallable'])]</field>
|
||||
</record>
|
||||
<menuitem action="open_module_tree_uninstall" id="menu_module_tree_uninstall" parent="base.menu_module_tree"/>
|
||||
<record id="open_module_tree_upgrade" model="ir.actions.act_window">
|
||||
<field name="name">Modules to be installed, upgraded or removed</field>
|
||||
<field name="res_model">ir.module.module</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('state','in', ['to upgrade', 'to remove', 'to install'])]</field>
|
||||
</record>
|
||||
<menuitem action="open_module_tree_upgrade" id="menu_module_tree_upgrade" parent="base.menu_module_tree"/>
|
||||
|
||||
<record id="repository_form" model="ir.ui.view">
|
||||
<field name="name">ir.module.repository.form</field>
|
||||
<field name="model">ir.module.repository</field>
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
import tools
|
||||
import base64
|
||||
import cStringIO
|
||||
import csv
|
||||
import pooler
|
||||
from osv import fields,osv
|
||||
from tools.translate import _
|
||||
from tools.misc import get_iso_codes
|
||||
|
||||
class wizard_export_lang(osv.osv_memory):
|
||||
|
||||
@@ -35,7 +34,6 @@ class wizard_export_lang(osv.osv_memory):
|
||||
ids=lang_obj.search(cr, uid, ['&', ('active', '=', True), ('translatable', '=', True),])
|
||||
langs=lang_obj.browse(cr, uid, ids)
|
||||
return [(lang.code, lang.name) for lang in langs]
|
||||
|
||||
|
||||
def act_cancel(self, cr, uid, ids, context=None):
|
||||
#self.unlink(cr, uid, ids, context)
|
||||
@@ -62,7 +60,9 @@ class wizard_export_lang(osv.osv_memory):
|
||||
filename = _('new')
|
||||
if not this.lang and len(mods) == 1:
|
||||
filename = mods[0]
|
||||
this.name = "%s.%s" % (this.lang or filename, this.format)
|
||||
if this.lang:
|
||||
filename = get_iso_codes(this.lang)
|
||||
this.name = "%s.%s" % (filename, this.format)
|
||||
out=base64.encodestring(buf.getvalue())
|
||||
buf.close()
|
||||
return self.write(cr, uid, ids, {'state':'get', 'data':out, 'advice':this.advice, 'name':this.name}, context=context)
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
|
||||
<xsl:template name="stylesheet">
|
||||
<paraStyle name="title" fontName="Helvetica-Bold" fontSize="22" alignment="center"/>
|
||||
|
||||
<paraStyle name="test" alignment="left" leftIndent="10.0"/>
|
||||
<paraStyle name="float_right" alignment="right"/>
|
||||
<paraStyle name="tbl_heading" alignment="left"/>
|
||||
<blockTableStyle id="products">
|
||||
<!--<blockBackground colorName="grey" start="0,0" stop="-1,0"/> -->
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
@@ -56,7 +57,7 @@
|
||||
<tr>
|
||||
<xsl:for-each select="field">
|
||||
<td>
|
||||
<para><font fontName="Helvetica-Bold" fontSize="9">
|
||||
<para style="tbl_heading"><font fontName="Helvetica-Bold" fontSize="9">
|
||||
<xsl:value-of select="."/></font>
|
||||
</para>
|
||||
</td>
|
||||
@@ -80,7 +81,7 @@
|
||||
<xsl:when test="@para='yes'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@tree='yes'">
|
||||
<para>
|
||||
<para style="test">
|
||||
<xsl:attribute name="leftIndent"><xsl:value-of select="@space"/></xsl:attribute>
|
||||
<font fontName="Helvetica" fontSize="9">
|
||||
<xsl:value-of select="."/>
|
||||
@@ -92,9 +93,9 @@
|
||||
<xsl:value-of select="."/>
|
||||
</font></para>
|
||||
</xsl:when>
|
||||
|
||||
|
||||
<xsl:otherwise>
|
||||
<para>
|
||||
<para style="test">
|
||||
<font fontName="Helvetica" fontSize="9">
|
||||
<xsl:value-of select="."/>
|
||||
</font>
|
||||
@@ -102,6 +103,32 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="@para='group'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@tree='yes'">
|
||||
<para>
|
||||
<xsl:attribute name="leftIndent"><xsl:value-of select="@space"/></xsl:attribute>
|
||||
<font fontName="Helvetica-bold" fontSize="9">
|
||||
<xsl:value-of select="."/>
|
||||
</font>
|
||||
</para>
|
||||
</xsl:when>
|
||||
<xsl:when test="@tree='float'">
|
||||
<para style="float_right"><font fontName="Helvetica-bold" fontSize="9">
|
||||
<xsl:value-of select="."/>
|
||||
</font></para>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<para>
|
||||
<font fontName="Helvetica-bold" fontSize="9">
|
||||
<xsl:value-of select="."/>
|
||||
</font>
|
||||
</para>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xpre>
|
||||
<xsl:value-of select="."/>
|
||||
|
||||
@@ -47,7 +47,7 @@ class Country(osv.osv):
|
||||
context={}
|
||||
ids = False
|
||||
if len(name) == 2:
|
||||
ids = self.search(cr, user, [('code', '=', name)] + args,
|
||||
ids = self.search(cr, user, [('code', 'ilike', name)] + args,
|
||||
limit=limit, context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name', operator, name)] + args,
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
<tree string="Partner Addresses">
|
||||
<field name="partner_id"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="street"/>
|
||||
<field name="zip"/>
|
||||
<field name="city"/>
|
||||
<field name="country_id"/>
|
||||
@@ -92,14 +94,16 @@
|
||||
<field eval="8" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Address">
|
||||
<field colspan="4" name="partner_id" select="1"/>
|
||||
<field name="partner_id" select="1" colspan="2"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="name" select="1"/>
|
||||
<field domain="[('domain', '=', 'contact')]" name="title" />
|
||||
<field name="function"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<newline/>
|
||||
<group string="Postal Address" colspan="2" col="2">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="2"/>
|
||||
<field domain="[('domain', '=', 'contact')]" name="title"/>
|
||||
<field name="function"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Postal Address" colspan="4" col="4"/>
|
||||
<field name="street" select="2"/>
|
||||
<field name="street2"/>
|
||||
<field name="zip" select="2"/>
|
||||
@@ -107,7 +111,8 @@
|
||||
<field name="country_id" select="2" completion="1"/>
|
||||
<field name="state_id" select="2"/>
|
||||
</group>
|
||||
<group string="Communication" colspan="2" col="2">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Communication" colspan="4" col="4"/>
|
||||
<field name="type" select="2" />
|
||||
<field name="phone"/>
|
||||
<field name="fax"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -86,7 +86,17 @@ class res_company(osv.osv):
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
|
||||
'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'),
|
||||
'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users')
|
||||
}
|
||||
}
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None,
|
||||
context=None, count=False):
|
||||
if context and context.has_key('user_prefence') and context['user_prefence']:
|
||||
cmp_ids = []
|
||||
data_user = self.pool.get('res.users').browse(cr, user, [user], context=context)
|
||||
map(lambda x: cmp_ids.append(x.id), data_user[0].company_ids)
|
||||
return [data_user[0].company_id.id] + cmp_ids
|
||||
return super(res_company, self).search(cr, user, args, offset=offset, limit=limit, order=order,
|
||||
context=context, count=count)
|
||||
|
||||
def _company_default_get(self, cr, uid, object=False, field=False, context=None):
|
||||
"""
|
||||
@@ -151,7 +161,6 @@ class res_company(osv.osv):
|
||||
def write(self, cr, *args, **argv):
|
||||
self.cache_restart(cr)
|
||||
# Restart the cache on the company_get method
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
return super(res_company, self).write(cr, *args, **argv)
|
||||
|
||||
def _get_euro(self, cr, uid, context={}):
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
from osv.orm import except_orm
|
||||
from osv.orm import except_orm, browse_record
|
||||
import tools
|
||||
import pytz
|
||||
import pooler
|
||||
@@ -42,11 +42,12 @@ class groups(osv.osv):
|
||||
_sql_constraints = [
|
||||
('name_uniq', 'unique (name)', 'The name of the group must be unique !')
|
||||
]
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context={}):
|
||||
group_name = self.read(cr, uid, [id], ['name'])[0]['name']
|
||||
default.update({'name': group_name +' (copy)'})
|
||||
return super(groups, self).copy(cr, uid, id, default, context)
|
||||
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if 'name' in vals:
|
||||
if vals['name'].startswith('-'):
|
||||
@@ -54,7 +55,6 @@ class groups(osv.osv):
|
||||
_('The name of the group can not start with "-"'))
|
||||
res = super(groups, self).write(cr, uid, ids, vals, context=context)
|
||||
# Restart the cache on the company_get method
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
self.pool.get('ir.model.access').call_cache_clearing_methods(cr)
|
||||
return res
|
||||
|
||||
@@ -229,8 +229,9 @@ class users(osv.osv):
|
||||
def _get_company(self,cr, uid, context={}, uid2=False):
|
||||
if not uid2:
|
||||
uid2 = uid
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid2, context)
|
||||
return user.company_id.id
|
||||
user = self.pool.get('res.users').read(cr, uid, uid2, ['company_id'], context)
|
||||
company_id = user.get('company_id', False)
|
||||
return company_id and company_id[0] or False
|
||||
|
||||
def _get_menu(self,cr, uid, context={}):
|
||||
ids = self.pool.get('ir.actions.act_window').search(cr, uid, [('usage','=','menu')])
|
||||
@@ -265,7 +266,6 @@ class users(osv.osv):
|
||||
res = super(users, self).write(cr, uid, ids, values, *args, **argv)
|
||||
self.company_get.clear_cache(cr.dbname)
|
||||
# Restart the cache on the company_get method
|
||||
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
|
||||
self.pool.get('ir.model.access').call_cache_clearing_methods(cr)
|
||||
return res
|
||||
|
||||
@@ -296,10 +296,12 @@ class users(osv.osv):
|
||||
result = {}
|
||||
for k in self._columns.keys():
|
||||
if k.startswith('context_'):
|
||||
result[k[8:]] = getattr(user,k)
|
||||
res = getattr(user,k) or False
|
||||
if isinstance(res, browse_record):
|
||||
res = res.id
|
||||
result[k[8:]] = res or False
|
||||
return result
|
||||
|
||||
|
||||
def action_get(self, cr, uid, context={}):
|
||||
dataobj = self.pool.get('ir.model.data')
|
||||
data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my')
|
||||
@@ -309,7 +311,7 @@ class users(osv.osv):
|
||||
def login(self, db, login, password):
|
||||
if not password:
|
||||
return False
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password)))
|
||||
res = cr.fetchone()
|
||||
cr.close()
|
||||
@@ -330,8 +332,8 @@ class users(osv.osv):
|
||||
cached_pass = self._uid_cache.get(db, {}).get(uid)
|
||||
if (cached_pass is not None) and cached_pass == passwd:
|
||||
return True
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, True))
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, True))
|
||||
res = cr.fetchone()[0]
|
||||
cr.close()
|
||||
if not bool(res):
|
||||
@@ -347,14 +349,14 @@ class users(osv.osv):
|
||||
def access(self, db, uid, passwd, sec_level, ids):
|
||||
if not passwd:
|
||||
return False
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr = pooler.get_db(db).cursor()
|
||||
cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd))
|
||||
res = cr.fetchone()
|
||||
cr.close()
|
||||
if not res:
|
||||
raise security.ExceptionNoTb('Bad username or password')
|
||||
return res[0]
|
||||
|
||||
|
||||
users()
|
||||
|
||||
class config_users(osv.osv_memory):
|
||||
|
||||
+20
-9
@@ -148,7 +148,7 @@ class expression(object):
|
||||
self.__exp[i] = ('id', 'in', right1)
|
||||
continue
|
||||
|
||||
if field._properties and not field.store:
|
||||
if field._properties and ((not field.store) or field._fnct_search):
|
||||
# this is a function field
|
||||
if not field._fnct_search:
|
||||
# the function field doesn't provide a search function and doesn't store
|
||||
@@ -164,7 +164,6 @@ class expression(object):
|
||||
self.__exp.insert(i + 2 + j, se)
|
||||
# else, the value of the field is store in the database, so we search on it
|
||||
|
||||
|
||||
elif field._type == 'one2many':
|
||||
# Applying recursivity on field(one2many)
|
||||
if operator == 'child_of':
|
||||
@@ -184,15 +183,21 @@ class expression(object):
|
||||
if right:
|
||||
if isinstance(right, basestring):
|
||||
ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, context=context, limit=None)]
|
||||
operator = 'in'
|
||||
if ids2:
|
||||
operator = 'in'
|
||||
else:
|
||||
if not isinstance(right,list):
|
||||
ids2 = [right]
|
||||
else:
|
||||
ids2 = right
|
||||
if not ids2:
|
||||
call_null = True
|
||||
operator = 'in' # operator changed because ids are directly related to main object
|
||||
if operator in ['like','ilike','in','=']:
|
||||
#no result found with given search criteria
|
||||
call_null = False
|
||||
self.__exp[i] = ('id','=',0)
|
||||
else:
|
||||
call_null = True
|
||||
operator = 'in' # operator changed because ids are directly related to main object
|
||||
else:
|
||||
call_null = False
|
||||
o2m_op = 'in'
|
||||
@@ -227,15 +232,21 @@ class expression(object):
|
||||
if right:
|
||||
if isinstance(right, basestring):
|
||||
res_ids = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, context=context)]
|
||||
operator = 'in'
|
||||
if res_ids:
|
||||
opeartor = 'in'
|
||||
else:
|
||||
if not isinstance(right, list):
|
||||
res_ids = [right]
|
||||
else:
|
||||
res_ids = right
|
||||
if not res_ids:
|
||||
call_null_m2m = True
|
||||
operator = 'in' # operator changed because ids are directly related to main object
|
||||
if operator in ['like','ilike','in','=']:
|
||||
#no result found with given search criteria
|
||||
call_null_m2m = False
|
||||
self.__exp[i] = ('id','=',0)
|
||||
else:
|
||||
call_null_m2m = True
|
||||
operator = 'in' # operator changed because ids are directly related to main object
|
||||
else:
|
||||
call_null_m2m = False
|
||||
m2m_op = 'in'
|
||||
@@ -248,7 +259,7 @@ class expression(object):
|
||||
if operator in ['not like','not ilike','not in','<>','!=']:
|
||||
m2m_op = 'in'
|
||||
self.__exp[i] = ('id', m2m_op, self.__execute_recursive_in(cr, field._id1, field._rel, field._id2, [], operator, field._type) or [0])
|
||||
|
||||
|
||||
elif field._type == 'many2one':
|
||||
if operator == 'child_of':
|
||||
if isinstance(right, basestring):
|
||||
|
||||
+14
-9
@@ -307,13 +307,15 @@ class many2one(_column):
|
||||
|
||||
# build a dictionary of the form {'id_of_distant_resource': name_of_distant_resource}
|
||||
from orm import except_orm
|
||||
try:
|
||||
names = dict(obj.name_get(cr, user, filter(None, res.values()), context))
|
||||
except except_orm:
|
||||
names = {}
|
||||
iids = filter(None, res.values())
|
||||
for iiid in iids:
|
||||
names[iiid] = '// Access Denied //'
|
||||
names = {}
|
||||
for record in list(set(filter(None, res.values()))):
|
||||
try:
|
||||
record_name = dict(obj.name_get(cr, user, [record], context))
|
||||
except except_orm:
|
||||
record_name = {}
|
||||
record_name[record] = '// Access Denied //'
|
||||
names.update(record_name)
|
||||
|
||||
for r in res.keys():
|
||||
if res[r] and res[r] in names:
|
||||
res[r] = (res[r], names[res[r]])
|
||||
@@ -731,15 +733,18 @@ class related(function):
|
||||
field_detail = self._relations[i]
|
||||
relation = field_detail['object']
|
||||
if not t_data[self.arg[i]]:
|
||||
if self._type not in ('one2many', 'many2many'):
|
||||
t_id = t_data['id']
|
||||
t_data = False
|
||||
break
|
||||
if field_detail['type'] in ('one2many', 'many2many'):
|
||||
if self._type != "many2one":
|
||||
t_id=t_data.id
|
||||
t_id = t_data.id
|
||||
t_data = t_data[self.arg[i]][0]
|
||||
else:
|
||||
t_id=t_data['id']
|
||||
t_id = t_data['id']
|
||||
t_data = t_data[self.arg[i]]
|
||||
|
||||
if t_id:
|
||||
obj.pool.get(field_detail['object']).write(cr,uid,[t_id],{args[-1]:values}, context=context)
|
||||
|
||||
|
||||
+55
-19
@@ -49,15 +49,24 @@ import sys
|
||||
import time
|
||||
import traceback
|
||||
import types
|
||||
from lxml import etree
|
||||
|
||||
import fields
|
||||
import netsvc
|
||||
import tools
|
||||
from tools.config import config
|
||||
from tools.translate import _
|
||||
|
||||
regex_order = re.compile('^([a-z0-9_]+( *desc| *asc)?( *, *|))+$', re.I)
|
||||
import copy
|
||||
import sys
|
||||
|
||||
try:
|
||||
from lxml import etree
|
||||
except ImportError:
|
||||
sys.stderr.write("ERROR: Import lxml module\n")
|
||||
sys.stderr.write("ERROR: Try to install the python-lxml package\n")
|
||||
|
||||
from tools.config import config
|
||||
|
||||
regex_order = re.compile('^(([a-z0-9_]+|"[a-z0-9_]+")( *desc| *asc)?( *, *|))+$', re.I)
|
||||
|
||||
def last_day_of_current_month():
|
||||
today = datetime.date.today()
|
||||
@@ -209,6 +218,7 @@ class browse_record(object):
|
||||
for data in datas:
|
||||
if len(str(data['id']).split('-')) > 1:
|
||||
data['id'] = int(str(data['id']).split('-')[0])
|
||||
new_data = {}
|
||||
for n, f in ffields:
|
||||
if f._type in ('many2one', 'one2one'):
|
||||
if data[n]:
|
||||
@@ -219,14 +229,25 @@ class browse_record(object):
|
||||
else:
|
||||
ids2 = data[n]
|
||||
if ids2:
|
||||
data[n] = browse_record(self._cr, self._uid, ids2, obj, self._cache, context=self._context, list_class=self._list_class, fields_process=self._fields_process)
|
||||
# FIXME: this happen when a _inherits object
|
||||
# overwrite a field of it parent. Need
|
||||
# testing to be sure we got the right
|
||||
# object and not the parent one.
|
||||
if not isinstance(ids2, browse_record):
|
||||
new_data[n] = browse_record(self._cr,
|
||||
self._uid, ids2, obj, self._cache,
|
||||
context=self._context,
|
||||
list_class=self._list_class,
|
||||
fields_process=self._fields_process)
|
||||
else:
|
||||
data[n] = browse_null()
|
||||
new_data[n] = browse_null()
|
||||
else:
|
||||
data[n] = browse_null()
|
||||
new_data[n] = browse_null()
|
||||
elif f._type in ('one2many', 'many2many') and len(data[n]):
|
||||
data[n] = self._list_class([browse_record(self._cr, self._uid, id, self._table.pool.get(f._obj), self._cache, context=self._context, list_class=self._list_class, fields_process=self._fields_process) for id in data[n]], self._context)
|
||||
self._data[data['id']].update(data)
|
||||
new_data[n] = self._list_class([browse_record(self._cr, self._uid, id, self._table.pool.get(f._obj), self._cache, context=self._context, list_class=self._list_class, fields_process=self._fields_process) for id in data[n]], self._context)
|
||||
else:
|
||||
new_data[n] = data[n]
|
||||
self._data[data['id']].update(new_data)
|
||||
if not name in self._data[self._id]:
|
||||
#how did this happen?
|
||||
self.logger.notifyChannel("browse_record", netsvc.LOG_ERROR,
|
||||
@@ -386,6 +407,7 @@ class orm_template(object):
|
||||
'readonly':(f.readonly and 1) or 0,
|
||||
'required':(f.required and 1) or 0,
|
||||
'selectable' : (f.selectable and 1) or 0,
|
||||
'relation_field': (f._type=='one2many' and isinstance(f,fields.one2many)) and f._fields_id or '',
|
||||
}
|
||||
# When its a custom field,it does not contain f.select
|
||||
if context.get('field_state','base') == 'manual':
|
||||
@@ -401,13 +423,13 @@ class orm_template(object):
|
||||
vals['id'] = id
|
||||
cr.execute("""INSERT INTO ir_model_fields (
|
||||
id, model_id, model, name, field_description, ttype,
|
||||
relation,view_load,state,select_level
|
||||
relation,view_load,state,select_level,relation_field
|
||||
) VALUES (
|
||||
%s,%s,%s,%s,%s,%s,%s,%s,%s,%s
|
||||
%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s
|
||||
)""", (
|
||||
id, vals['model_id'], vals['model'], vals['name'], vals['field_description'], vals['ttype'],
|
||||
vals['relation'], bool(vals['view_load']), 'base',
|
||||
vals['select_level']
|
||||
vals['select_level'],vals['relation_field']
|
||||
))
|
||||
if 'module' in context:
|
||||
name1 = 'field_' + self._table + '_' + k
|
||||
@@ -424,12 +446,12 @@ class orm_template(object):
|
||||
cr.commit()
|
||||
cr.execute("""UPDATE ir_model_fields SET
|
||||
model_id=%s, field_description=%s, ttype=%s, relation=%s,
|
||||
view_load=%s, select_level=%s, readonly=%s ,required=%s, selectable=%s
|
||||
view_load=%s, select_level=%s, readonly=%s ,required=%s, selectable=%s, relation_field=%s
|
||||
WHERE
|
||||
model=%s AND name=%s""", (
|
||||
vals['model_id'], vals['field_description'], vals['ttype'],
|
||||
vals['relation'], bool(vals['view_load']),
|
||||
vals['select_level'], bool(vals['readonly']),bool(vals['required']),bool(vals['selectable']),vals['model'], vals['name']
|
||||
vals['select_level'], bool(vals['readonly']),bool(vals['required']),bool(vals['selectable']),vals['relation_field'],vals['model'], vals['name']
|
||||
))
|
||||
continue
|
||||
cr.commit()
|
||||
@@ -883,6 +905,8 @@ class orm_template(object):
|
||||
if isinstance(e, osv.orm.except_orm ):
|
||||
msg = _('Insertion Failed! ' + e[1])
|
||||
return (-1, res, 'Line ' + str(counter) +' : ' + msg, '' )
|
||||
#Raising Uncaught exception
|
||||
raise
|
||||
for lang in translate:
|
||||
context2 = context.copy()
|
||||
context2['lang'] = lang
|
||||
@@ -1076,6 +1100,7 @@ class orm_template(object):
|
||||
if column._domain and not isinstance(column._domain, (str, unicode)):
|
||||
dom = column._domain
|
||||
dom += eval(node.get('domain','[]'), {'uid':user, 'time':time})
|
||||
context.update(eval(node.get('context','{}')))
|
||||
attrs['selection'] = self.pool.get(relation).name_search(cr, user, '', dom, context=context)
|
||||
if (node.get('required') and not int(node.get('required'))) or not column.required:
|
||||
attrs['selection'].append((False,''))
|
||||
@@ -1461,7 +1486,6 @@ class orm_template(object):
|
||||
'client_action_relate', [(self._name, False)], False,
|
||||
context)
|
||||
resprint = map(clean, resprint)
|
||||
print "resprintresprint",resprint
|
||||
resaction = map(clean, resaction)
|
||||
resaction = filter(lambda x: not x.get('multi', False), resaction)
|
||||
resprint = filter(lambda x: not x.get('multi', False), resprint)
|
||||
@@ -1831,8 +1855,8 @@ class orm(orm_template):
|
||||
float_int_fields = filter(lambda x: fget[x]['type'] in ('float','integer'), fields)
|
||||
sum = {}
|
||||
|
||||
group_by = groupby
|
||||
if fget[groupby]['type'] in ('date','datetime'):
|
||||
group_by = groupby
|
||||
if fget.get(groupby,False) and fget[groupby]['type'] in ('date','datetime'):
|
||||
flist = "to_char(%s,'yyyy-mm') as %s "%(groupby,groupby)
|
||||
groupby = "to_char(%s,'yyyy-mm')"%(groupby)
|
||||
else:
|
||||
@@ -1996,14 +2020,24 @@ class orm(orm_template):
|
||||
|
||||
# iterate on the "object columns"
|
||||
todo_update_store = []
|
||||
update_custom_fields = context.get('update_custom_fields', False)
|
||||
for k in self._columns:
|
||||
if k in ('id', 'write_uid', 'write_date', 'create_uid', 'create_date'):
|
||||
continue
|
||||
#raise _('Can not define a column %s. Reserved keyword !') % (k,)
|
||||
#Not Updating Custom fields
|
||||
if k.startswith('x_') and not update_custom_fields:
|
||||
continue
|
||||
f = self._columns[k]
|
||||
|
||||
if isinstance(f, fields.one2many):
|
||||
cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname=%s", (f._obj,))
|
||||
|
||||
if self.pool.get(f._obj):
|
||||
if f._fields_id not in self.pool.get(f._obj)._columns.keys():
|
||||
if not self.pool.get(f._obj)._inherits or (f._fields_id not in self.pool.get(f._obj)._inherit_fields.keys()):
|
||||
raise except_orm('Programming Error', ("There is no reference field '%s' found for '%s'") % (f._fields_id,f._obj,))
|
||||
|
||||
if cr.fetchone():
|
||||
cr.execute("SELECT count(1) as c FROM pg_class c,pg_attribute a WHERE c.relname=%s AND a.attname=%s AND c.oid=a.attrelid", (f._obj, f._fields_id))
|
||||
res = cr.fetchone()[0]
|
||||
@@ -2097,7 +2131,7 @@ class orm(orm_template):
|
||||
if isinstance(f, fields.function) and not f.store and\
|
||||
not getattr(f, 'nodrop', False):
|
||||
logger.notifyChannel('orm', netsvc.LOG_INFO, 'column %s (%s) in table %s removed: converted to a function !\n' % (k, f.string, self._table))
|
||||
cr.execute('ALTER TABLE "%s" DROP COLUMN "%s"'% (self._table, k))
|
||||
cr.execute('ALTER TABLE "%s" DROP COLUMN "%s" CASCADE'% (self._table, k))
|
||||
cr.commit()
|
||||
f_obj_type = None
|
||||
else:
|
||||
@@ -2366,7 +2400,7 @@ class orm(orm_template):
|
||||
fld_def = (field in self._columns) and self._columns[field] or self._inherit_fields[field][2]
|
||||
if fld_def._type in ('many2one', 'one2one'):
|
||||
obj = self.pool.get(fld_def._obj)
|
||||
if not obj.search(cr, uid, [('id', '=', field_value)]):
|
||||
if not obj.search(cr, uid, [('id', '=', field_value or False)]):
|
||||
continue
|
||||
if fld_def._type in ('many2many'):
|
||||
obj = self.pool.get(fld_def._obj)
|
||||
@@ -2393,7 +2427,7 @@ class orm(orm_template):
|
||||
field_value = field_value2
|
||||
value[field] = field_value
|
||||
for key in context or {}:
|
||||
if key.startswith('default_'):
|
||||
if key.startswith('default_') and (key[8:] in fields_list):
|
||||
value[key[8:]] = context[key]
|
||||
return value
|
||||
|
||||
@@ -2528,6 +2562,8 @@ class orm(orm_template):
|
||||
del r['id']
|
||||
|
||||
for record in res:
|
||||
if not record[col]:# if the record is deleted from _inherits table?
|
||||
continue
|
||||
record.update(res3[record[col]])
|
||||
if col not in fields_to_read:
|
||||
del record[col]
|
||||
|
||||
+8
-9
@@ -28,18 +28,16 @@ import netsvc
|
||||
import pooler
|
||||
import copy
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from psycopg2 import IntegrityError
|
||||
from netsvc import Logger, LOG_ERROR
|
||||
from tools.misc import UpdateableDict
|
||||
from tools.func import wraps
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
module_list = []
|
||||
module_class_list = {}
|
||||
class_pool = {}
|
||||
|
||||
|
||||
class except_osv(Exception):
|
||||
def __init__(self, name, value, exc_type='warning'):
|
||||
self.name = name
|
||||
@@ -48,7 +46,6 @@ class except_osv(Exception):
|
||||
self.args = (exc_type, name)
|
||||
|
||||
|
||||
from tools.func import wraps
|
||||
class osv_pool(netsvc.Service):
|
||||
|
||||
def check(f):
|
||||
@@ -59,19 +56,20 @@ class osv_pool(netsvc.Service):
|
||||
raise except_osv('Database not ready', 'Currently, this database is not fully loaded and can not be used.')
|
||||
return f(self, dbname, *args, **kwargs)
|
||||
except orm.except_orm, inst:
|
||||
if inst.name == 'AccessError':
|
||||
tb_s = "AccessError\n" + "".join(traceback.format_exception(*sys.exc_info()))
|
||||
self.logger.notifyChannel('web-services', netsvc.LOG_DEBUG, tb_s)
|
||||
self.abortResponse(1, inst.name, 'warning', inst.value)
|
||||
except except_osv, inst:
|
||||
self.abortResponse(1, inst.name, inst.exc_type, inst.value)
|
||||
except IntegrityError, inst:
|
||||
for key in self._sql_error.keys():
|
||||
if key in inst[0]:
|
||||
self.abortResponse(1, _('Constraint Error'), 'warning', _(self._sql_error[key]))
|
||||
self.abortResponse(1, 'Constraint Error', 'warning', self._sql_error[key])
|
||||
self.abortResponse(1, 'Integrity Error', 'warning', inst[0])
|
||||
except Exception, e:
|
||||
import traceback, sys
|
||||
tb_s = "".join(traceback.format_exception(*sys.exc_info()))
|
||||
logger = Logger()
|
||||
logger.notifyChannel('web-services', LOG_ERROR, tb_s)
|
||||
self.logger.notifyChannel('web-services', netsvc.LOG_ERROR, tb_s)
|
||||
raise
|
||||
|
||||
return wrapper
|
||||
@@ -86,6 +84,7 @@ class osv_pool(netsvc.Service):
|
||||
self._store_function = {}
|
||||
self._init = True
|
||||
self._init_parent = {}
|
||||
self.logger = netsvc.Logger()
|
||||
netsvc.Service.__init__(self, 'object_proxy', audience='')
|
||||
self.exportMethod(self.obj_list)
|
||||
self.exportMethod(self.exec_workflow)
|
||||
|
||||
@@ -71,14 +71,28 @@ class report_printscreen_list(report_int):
|
||||
fields_order = self._parse_string(result['arch'])
|
||||
rows = model.read(cr, uid, datas['ids'], result['fields'].keys(), context)
|
||||
ids2 = [x['id'] for x in rows] # getting the ids from read result
|
||||
|
||||
if datas['ids'] != ids2: # sorted ids were not taken into consideration for print screen
|
||||
rows_new = []
|
||||
for id in datas['ids']:
|
||||
element = [elem for elem in rows if elem['id']==id]
|
||||
rows_new.append(element[0])
|
||||
rows = rows_new
|
||||
|
||||
if context.get('group_by',False):
|
||||
if context['group_by'] in fields_order:
|
||||
fields_order.remove(context['group_by'])
|
||||
fields_order.insert(0, context['group_by'])
|
||||
re = model.read_group(cr, uid, [('id','in',ids)], fields_order, context.get('group_by',False),0,None,context)
|
||||
rows=[]
|
||||
for r in re:
|
||||
for f in fields_order:
|
||||
if f not in r:
|
||||
r.update({f:False})
|
||||
r['__group']=True
|
||||
rows.append(r)
|
||||
_ids = model.search(cr, uid, r['__domain'])
|
||||
res=model.read(cr, uid, _ids, result['fields'].keys(), context)
|
||||
for r in res:
|
||||
rows.append(r)
|
||||
res = self._create_table(uid, datas['ids'], result['fields'], fields_order, rows, context, model_desc)
|
||||
return (self.obj.get(), 'pdf')
|
||||
|
||||
@@ -139,26 +153,24 @@ class report_printscreen_list(report_int):
|
||||
count = len(fields_order)
|
||||
for i in range(0,count):
|
||||
tsum.append(0)
|
||||
|
||||
for line in results:
|
||||
node_line = etree.SubElement(lines, 'row')
|
||||
count = -1
|
||||
for f in fields_order:
|
||||
float_flag = 0
|
||||
count += 1
|
||||
|
||||
if fields[f]['type']=='many2one' and line[f]:
|
||||
line[f]= line[f][1]
|
||||
|
||||
if not line.get('__group'):
|
||||
line[f]= line[f][1]
|
||||
else:
|
||||
line[f]= line[f]
|
||||
if fields[f]['type']=='selection' and line[f]:
|
||||
for key, value in fields[f]['selection']:
|
||||
if key == line[f]:
|
||||
line[f] = value
|
||||
break
|
||||
|
||||
if fields[f]['type'] in ('one2many','many2many') and line[f]:
|
||||
line[f] = '( '+tools.ustr(len(line[f])) + ' )'
|
||||
|
||||
if fields[f]['type'] == 'float' and line[f]:
|
||||
precision=(('digits' in fields[f]) and fields[f]['digits'][1]) or 2
|
||||
prec ='%.' + str(precision) +'f'
|
||||
@@ -166,36 +178,44 @@ class report_printscreen_list(report_int):
|
||||
float_flag = 1
|
||||
|
||||
if fields[f]['type'] == 'date' and line[f]:
|
||||
format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))
|
||||
d1 = datetime.strptime(line[f],'%Y-%m-%d')
|
||||
new_d1 = d1.strftime(format)
|
||||
new_d1 = line[f]
|
||||
if not line.get('__group'):
|
||||
format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))
|
||||
d1 = datetime.strptime(line[f],'%Y-%m-%d')
|
||||
new_d1 = d1.strftime(format)
|
||||
line[f] = new_d1
|
||||
|
||||
if fields[f]['type'] == 'time' and line[f]:
|
||||
format = str(locale.nl_langinfo(locale.T_FMT))
|
||||
d1 = datetime.strptime(line[f], '%H:%M:%S')
|
||||
new_d1 = d1.strftime(format)
|
||||
new_d1 = line[f]
|
||||
if not line.get('__group'):
|
||||
format = str(locale.nl_langinfo(locale.T_FMT))
|
||||
d1 = datetime.strptime(line[f], '%H:%M:%S')
|
||||
new_d1 = d1.strftime(format)
|
||||
line[f] = new_d1
|
||||
|
||||
if fields[f]['type'] == 'datetime' and line[f]:
|
||||
format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))+' '+str(locale.nl_langinfo(locale.T_FMT))
|
||||
d1 = datetime.strptime(line[f], '%Y-%m-%d %H:%M:%S')
|
||||
new_d1 = d1.strftime(format)
|
||||
new_d1 = line[f]
|
||||
if not line.get('__group'):
|
||||
format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))+' '+str(locale.nl_langinfo(locale.T_FMT))
|
||||
d1 = datetime.strptime(line[f], '%Y-%m-%d %H:%M:%S')
|
||||
new_d1 = d1.strftime(format)
|
||||
line[f] = new_d1
|
||||
|
||||
col = etree.SubElement(node_line, 'col', para='yes', tree='no')
|
||||
if line.get('__group'):
|
||||
col = etree.SubElement(node_line, 'col', para='group', tree='no')
|
||||
else:
|
||||
col = etree.SubElement(node_line, 'col', para='yes', tree='no')
|
||||
if line[f] != None:
|
||||
col.text = tools.ustr(line[f] or '')
|
||||
if float_flag:
|
||||
col.set('tree','float')
|
||||
if f != 'id' and temp[count] == 1:
|
||||
if not line.get('__group') and f != 'id' and temp[count] == 1:
|
||||
tsum[count] = float(tsum[count]) + float(line[f]);
|
||||
else:
|
||||
col.text = '/'
|
||||
|
||||
node_line = etree.SubElement(lines, 'row')
|
||||
for f in range(0,count+1):
|
||||
col = etree.SubElement(node_line, 'col', para='yes', tree='no')
|
||||
col = etree.SubElement(node_line, 'col', para='group', tree='no')
|
||||
if tsum[f] != None:
|
||||
if tsum[f] >= 0.01 :
|
||||
prec = '%.' + str(tools.config['price_accuracy']) + 'f'
|
||||
@@ -215,7 +235,6 @@ class report_printscreen_list(report_int):
|
||||
etree.parse(os.path.join(tools.config['root_path'],
|
||||
'addons/base/report/custom_new.xsl')))
|
||||
rml = etree.tostring(transform(new_doc))
|
||||
|
||||
self.obj = render.rml(rml, title=self.title)
|
||||
self.obj.render()
|
||||
return True
|
||||
|
||||
@@ -106,11 +106,13 @@ def _process_text(self, txt):
|
||||
sps = _regex.split(txt)
|
||||
while sps:
|
||||
# This is a simple text to translate
|
||||
result += self.localcontext.get('translate', lambda x:x)(sps.pop(0))
|
||||
result += tools.ustr(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
|
||||
if sps:
|
||||
try:
|
||||
expr = sps.pop(0)
|
||||
txt = eval(expr,self.localcontext)
|
||||
if txt and (isinstance(txt, unicode) or isinstance(txt, str)):
|
||||
txt = tools.ustr(self.localcontext.get('translate', lambda x:x)(txt))
|
||||
except Exception,e:
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR,'report :\n%s\n%s\nexpr: %s' % (tb_s, str(e),expr.encode('utf-8')))
|
||||
@@ -118,7 +120,7 @@ def _process_text(self, txt):
|
||||
txt2 = str2xml(txt)
|
||||
result += tools.ustr(txt2)
|
||||
elif (txt is not None) and (txt is not False):
|
||||
result += str(txt)
|
||||
result += tools.ustr(txt)
|
||||
return result
|
||||
|
||||
def text_get(node):
|
||||
|
||||
@@ -119,10 +119,10 @@ class _dttime_format(str, _format):
|
||||
self.val = value and str(value) or ''
|
||||
|
||||
def __str__(self):
|
||||
if self.val:
|
||||
if getattr(self,'name', None):
|
||||
datetime = datetime.strptime(self.name, DHM_FORMAT)
|
||||
return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format)
|
||||
if self.val and getattr(self,'name', None):
|
||||
return datetime.strptime(self.name, DHM_FORMAT)\
|
||||
.strftime("%s %s"%(self.lang_obj.date_format,
|
||||
self.lang_obj.time_format))
|
||||
return self.val
|
||||
|
||||
|
||||
@@ -168,7 +168,8 @@ class rml_parse(object):
|
||||
'logo' : user.company_id.logo,
|
||||
'lang' : user.company_id.partner_id.lang,
|
||||
'translate' : self._translate,
|
||||
'setHtmlImage' : self.set_html_image
|
||||
'setHtmlImage' : self.set_html_image,
|
||||
'time' : time
|
||||
}
|
||||
self.localcontext.update(context)
|
||||
self.rml_header = user.company_id.rml_header
|
||||
|
||||
@@ -30,9 +30,12 @@ class ExceptionNoTb(Exception):
|
||||
self.args = (msg, '')
|
||||
|
||||
def login(db, login, password):
|
||||
print 'login'
|
||||
pool = pooler.get_pool(db)
|
||||
user_obj = pool.get('res.users')
|
||||
return user_obj.login(db, login, password)
|
||||
res = user_obj.login(db, login, password)
|
||||
print 'login end'
|
||||
return res
|
||||
|
||||
def check_super(passwd):
|
||||
if passwd == tools.config['admin_passwd']:
|
||||
|
||||
+59
-83
@@ -23,7 +23,6 @@ import base64
|
||||
import logging
|
||||
import os
|
||||
import security
|
||||
import string
|
||||
import thread
|
||||
import threading
|
||||
import time
|
||||
@@ -38,6 +37,8 @@ import release
|
||||
import sql_db
|
||||
import tools
|
||||
import locale
|
||||
from cStringIO import StringIO
|
||||
|
||||
logging.basicConfig()
|
||||
|
||||
class db(netsvc.ExportService):
|
||||
@@ -68,6 +69,14 @@ class db(netsvc.ExportService):
|
||||
|
||||
def new_dispatch(self,method,auth,params):
|
||||
pass
|
||||
def _create_empty_database(self, name):
|
||||
db = sql_db.db_connect('template1')
|
||||
cr = db.cursor()
|
||||
try:
|
||||
cr.autocommit(True) # avoid transaction block
|
||||
cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "template0" """ % name)
|
||||
finally:
|
||||
cr.close()
|
||||
|
||||
def exp_create(self, db_name, demo, lang, user_password='admin'):
|
||||
self.id_protect.acquire()
|
||||
@@ -77,24 +86,13 @@ class db(netsvc.ExportService):
|
||||
|
||||
self.actions[id] = {'clean': False}
|
||||
|
||||
db = sql_db.db_connect('template1')
|
||||
db.lock()
|
||||
try:
|
||||
cr = db.cursor()
|
||||
try:
|
||||
cr.autocommit(True) # avoid transaction block
|
||||
cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\'' % db_name)
|
||||
finally:
|
||||
cr.close()
|
||||
finally:
|
||||
db.release()
|
||||
self._create_empty_database(db_name)
|
||||
|
||||
class DBInitialize(object):
|
||||
def __call__(self, serv, id, db_name, demo, lang, user_password='admin'):
|
||||
cr = None
|
||||
try:
|
||||
serv.actions[id]['progress'] = 0
|
||||
clean = False
|
||||
cr = sql_db.db_connect(db_name).cursor()
|
||||
tools.init_db(cr)
|
||||
cr.commit()
|
||||
@@ -122,7 +120,6 @@ class db(netsvc.ExportService):
|
||||
except Exception, e:
|
||||
serv.actions[id]['clean'] = False
|
||||
serv.actions[id]['exception'] = e
|
||||
from cStringIO import StringIO
|
||||
import traceback
|
||||
e_str = StringIO()
|
||||
traceback.print_exc(file=e_str)
|
||||
@@ -149,11 +146,11 @@ class db(netsvc.ExportService):
|
||||
clean = self.actions[id]['clean']
|
||||
if clean:
|
||||
users = self.actions[id]['users']
|
||||
del self.actions[id]
|
||||
self.actions.pop(id)
|
||||
return (1.0, users)
|
||||
else:
|
||||
e = self.actions[id]['exception']
|
||||
del self.actions[id]
|
||||
self.actions.pop(id)
|
||||
raise Exception, e
|
||||
|
||||
def exp_drop(self, db_name):
|
||||
@@ -161,24 +158,20 @@ class db(netsvc.ExportService):
|
||||
logger = netsvc.Logger()
|
||||
|
||||
db = sql_db.db_connect('template1')
|
||||
db.lock()
|
||||
cr = db.cursor()
|
||||
cr.autocommit(True) # avoid transaction block
|
||||
try:
|
||||
cr = db.cursor()
|
||||
cr.autocommit(True) # avoid transaction block
|
||||
try:
|
||||
try:
|
||||
cr.execute('DROP DATABASE "%s"' % db_name)
|
||||
except Exception, e:
|
||||
logger.notifyChannel("web-services", netsvc.LOG_ERROR,
|
||||
'DROP DB: %s failed:\n%s' % (db_name, e))
|
||||
raise Exception("Couldn't drop database %s: %s" % (db_name, e))
|
||||
else:
|
||||
logger.notifyChannel("web-services", netsvc.LOG_INFO,
|
||||
'DROP DB: %s' % (db_name))
|
||||
finally:
|
||||
cr.close()
|
||||
cr.execute('DROP DATABASE "%s"' % db_name)
|
||||
except Exception, e:
|
||||
logger.notifyChannel("web-services", netsvc.LOG_ERROR,
|
||||
'DROP DB: %s failed:\n%s' % (db_name, e))
|
||||
raise Exception("Couldn't drop database %s: %s" % (db_name, e))
|
||||
else:
|
||||
logger.notifyChannel("web-services", netsvc.LOG_INFO,
|
||||
'DROP DB: %s' % (db_name))
|
||||
finally:
|
||||
db.release()
|
||||
cr.close()
|
||||
return True
|
||||
|
||||
def _set_pg_psw_env_var(self):
|
||||
@@ -229,17 +222,7 @@ class db(netsvc.ExportService):
|
||||
'RESTORE DB: %s already exists' % (db_name,))
|
||||
raise Exception, "Database already exists"
|
||||
|
||||
db = sql_db.db_connect('template1')
|
||||
db.lock()
|
||||
try:
|
||||
cr = db.cursor()
|
||||
cr.autocommit(True) # avoid transaction block
|
||||
try:
|
||||
cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "template0" """ % db_name)
|
||||
finally:
|
||||
cr.close()
|
||||
finally:
|
||||
db.release()
|
||||
self._create_empty_database(db_name)
|
||||
|
||||
cmd = ['pg_restore', '--no-owner']
|
||||
if tools.config['db_user']:
|
||||
@@ -277,27 +260,23 @@ class db(netsvc.ExportService):
|
||||
logger = netsvc.Logger()
|
||||
|
||||
db = sql_db.db_connect('template1')
|
||||
db.lock()
|
||||
cr = db.cursor()
|
||||
try:
|
||||
cr = db.cursor()
|
||||
try:
|
||||
try:
|
||||
cr.execute('ALTER DATABASE "%s" RENAME TO "%s"' % (old_name, new_name))
|
||||
except Exception, e:
|
||||
logger.notifyChannel("web-services", netsvc.LOG_ERROR,
|
||||
'RENAME DB: %s -> %s failed:\n%s' % (old_name, new_name, e))
|
||||
raise Exception("Couldn't rename database %s to %s: %s" % (old_name, new_name, e))
|
||||
else:
|
||||
fs = os.path.join(tools.config['root_path'], 'filestore')
|
||||
if os.path.exists(os.path.join(fs, old_name)):
|
||||
os.rename(os.path.join(fs, old_name), os.path.join(fs, new_name))
|
||||
cr.execute('ALTER DATABASE "%s" RENAME TO "%s"' % (old_name, new_name))
|
||||
except Exception, e:
|
||||
logger.notifyChannel("web-services", netsvc.LOG_ERROR,
|
||||
'RENAME DB: %s -> %s failed:\n%s' % (old_name, new_name, e))
|
||||
raise Exception("Couldn't rename database %s to %s: %s" % (old_name, new_name, e))
|
||||
else:
|
||||
fs = os.path.join(tools.config['root_path'], 'filestore')
|
||||
if os.path.exists(os.path.join(fs, old_name)):
|
||||
os.rename(os.path.join(fs, old_name), os.path.join(fs, new_name))
|
||||
|
||||
logger.notifyChannel("web-services", netsvc.LOG_INFO,
|
||||
'RENAME DB: %s -> %s' % (old_name, new_name))
|
||||
finally:
|
||||
cr.close()
|
||||
logger.notifyChannel("web-services", netsvc.LOG_INFO,
|
||||
'RENAME DB: %s -> %s' % (old_name, new_name))
|
||||
finally:
|
||||
db.release()
|
||||
cr.close()
|
||||
return True
|
||||
|
||||
def exp_db_exist(self, db_name):
|
||||
@@ -309,30 +288,26 @@ class db(netsvc.ExportService):
|
||||
raise Exception('AccessDenied')
|
||||
|
||||
db = sql_db.db_connect('template1')
|
||||
db.lock()
|
||||
cr = db.cursor()
|
||||
try:
|
||||
cr = db.cursor()
|
||||
try:
|
||||
try:
|
||||
db_user = tools.config["db_user"]
|
||||
if not db_user and os.name == 'posix':
|
||||
import pwd
|
||||
db_user = pwd.getpwuid(os.getuid())[0]
|
||||
if not db_user:
|
||||
cr.execute("select decode(usename, 'escape') from pg_user where usesysid=(select datdba from pg_database where datname=%s)", (tools.config["db_name"],))
|
||||
res = cr.fetchone()
|
||||
db_user = res and str(res[0])
|
||||
if db_user:
|
||||
cr.execute("select decode(datname, 'escape') from pg_database where datdba=(select usesysid from pg_user where usename=%s) and datname not in ('template0', 'template1', 'postgres') order by datname", (db_user,))
|
||||
else:
|
||||
cr.execute("select decode(datname, 'escape') from pg_database where datname not in('template0', 'template1','postgres') order by datname")
|
||||
res = [str(name) for (name,) in cr.fetchall()]
|
||||
except:
|
||||
res = []
|
||||
finally:
|
||||
cr.close()
|
||||
db_user = tools.config["db_user"]
|
||||
if not db_user and os.name == 'posix':
|
||||
import pwd
|
||||
db_user = pwd.getpwuid(os.getuid())[0]
|
||||
if not db_user:
|
||||
cr.execute("select decode(usename, 'escape') from pg_user where usesysid=(select datdba from pg_database where datname=%s)", (tools.config["db_name"],))
|
||||
res = cr.fetchone()
|
||||
db_user = res and str(res[0])
|
||||
if db_user:
|
||||
cr.execute("select decode(datname, 'escape') from pg_database where datdba=(select usesysid from pg_user where usename=%s) and datname not in ('template0', 'template1', 'postgres') order by datname", (db_user,))
|
||||
else:
|
||||
cr.execute("select decode(datname, 'escape') from pg_database where datname not in('template0', 'template1','postgres') order by datname")
|
||||
res = [str(name) for (name,) in cr.fetchall()]
|
||||
except:
|
||||
res = []
|
||||
finally:
|
||||
db.release()
|
||||
cr.close()
|
||||
res.sort()
|
||||
return res
|
||||
|
||||
@@ -365,7 +340,7 @@ class db(netsvc.ExportService):
|
||||
self.abortResponse(1, inst.name, 'warning', inst.value)
|
||||
except except_osv, inst:
|
||||
self.abortResponse(1, inst.name, inst.exc_type, inst.value)
|
||||
except Exception, e:
|
||||
except Exception:
|
||||
import traceback
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception( sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
l.notifyChannel('web-services', netsvc.LOG_ERROR, tb_s)
|
||||
@@ -523,7 +498,7 @@ GNU Public Licence.
|
||||
l.notifyChannel('migration', netsvc.LOG_ERROR, 'unable to read the module %s' % (module,))
|
||||
raise
|
||||
|
||||
zip_contents = cStringIO.StringIO(base64_decoded)
|
||||
zip_contents = StringIO(base64_decoded)
|
||||
zip_contents.seek(0)
|
||||
try:
|
||||
try:
|
||||
@@ -575,7 +550,6 @@ GNU Public Licence.
|
||||
%(platform.release(), platform.version(), platform.architecture()[0],
|
||||
os_lang, platform.python_version(),release.version)
|
||||
return environment
|
||||
|
||||
|
||||
def exp_login_message(self):
|
||||
return tools.config.get('login_message', False)
|
||||
@@ -590,6 +564,8 @@ GNU Public Licence.
|
||||
res = "OpenERP server: %d threads\n" % threading.active_count()
|
||||
res += netsvc.Server.allStats()
|
||||
return res
|
||||
def check_connectivity(self):
|
||||
return bool(sql_db.db_connect('template1'))
|
||||
|
||||
common()
|
||||
|
||||
|
||||
+27
-48
@@ -54,6 +54,7 @@ from tools.func import wraps
|
||||
from datetime import datetime as mdt
|
||||
from datetime import timedelta
|
||||
import threading
|
||||
from inspect import stack
|
||||
|
||||
import re
|
||||
re_from = re.compile('.* from "?([a-zA-Z_0-9]+)"? .*$');
|
||||
@@ -91,10 +92,7 @@ class Cursor(object):
|
||||
self._obj = self._cnx.cursor(cursor_factory=psycopg1cursor)
|
||||
self.__closed = False # real initialisation value
|
||||
self.autocommit(False)
|
||||
|
||||
if tools.config['log_level'] in (netsvc.LOG_DEBUG, netsvc.LOG_DEBUG_RPC):
|
||||
from inspect import stack
|
||||
self.__caller = tuple(stack()[2][1:3])
|
||||
self.__caller = tuple(stack()[2][1:3])
|
||||
|
||||
def __del__(self):
|
||||
if not self.__closed:
|
||||
@@ -103,10 +101,9 @@ class Cursor(object):
|
||||
# but the database connection is not put back into the connection
|
||||
# pool, preventing some operation on the database like dropping it.
|
||||
# This can also lead to a server overload.
|
||||
if tools.config['log_level'] in (netsvc.LOG_DEBUG, netsvc.LOG_DEBUG_RPC):
|
||||
msg = "Cursor not closed explicitly\n" \
|
||||
"Cursor was created at %s:%s" % self.__caller
|
||||
log(msg, netsvc.LOG_WARNING)
|
||||
msg = "Cursor not closed explicitly\n" \
|
||||
"Cursor was created at %s:%s" % self.__caller
|
||||
log(msg, netsvc.LOG_WARNING)
|
||||
self.close()
|
||||
|
||||
@check
|
||||
@@ -119,7 +116,7 @@ class Cursor(object):
|
||||
|
||||
if self.sql_log:
|
||||
now = mdt.now()
|
||||
|
||||
|
||||
try:
|
||||
params = params or None
|
||||
res = self._obj.execute(query, params)
|
||||
@@ -200,11 +197,11 @@ class Cursor(object):
|
||||
def autocommit(self, on):
|
||||
offlevel = [ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE][bool(self._serialized)]
|
||||
self._cnx.set_isolation_level([offlevel, ISOLATION_LEVEL_AUTOCOMMIT][bool(on)])
|
||||
|
||||
|
||||
@check
|
||||
def commit(self):
|
||||
return self._cnx.commit()
|
||||
|
||||
|
||||
@check
|
||||
def rollback(self):
|
||||
return self._cnx.rollback()
|
||||
@@ -233,16 +230,18 @@ class ConnectionPool(object):
|
||||
self._lock = threading.Lock()
|
||||
self._logger = netsvc.Logger()
|
||||
|
||||
def _log(self, msg):
|
||||
#self._logger.notifyChannel('ConnectionPool', netsvc.LOG_INFO, msg)
|
||||
pass
|
||||
def __repr__(self):
|
||||
used = len([1 for c, u in self._connections[:] if u])
|
||||
count = len(self._connections)
|
||||
return "ConnectionPool(used=%d/count=%d/max=%d)" % (used, count, self._maxconn)
|
||||
|
||||
def _debug(self, msg):
|
||||
#self._logger.notifyChannel('ConnectionPool', netsvc.LOG_DEBUG, msg)
|
||||
pass
|
||||
self._logger.notifyChannel('ConnectionPool', netsvc.LOG_DEBUG, repr(self))
|
||||
self._logger.notifyChannel('ConnectionPool', netsvc.LOG_DEBUG, msg)
|
||||
|
||||
@locked
|
||||
def borrow(self, dsn):
|
||||
self._log('Borrow connection to %s' % (dsn,))
|
||||
self._debug('Borrow connection to %s' % (dsn,))
|
||||
|
||||
result = None
|
||||
for i, (cnx, used) in enumerate(self._connections):
|
||||
@@ -258,7 +257,7 @@ class ConnectionPool(object):
|
||||
return result
|
||||
|
||||
if len(self._connections) >= self._maxconn:
|
||||
# try to remove the older connection not used
|
||||
# try to remove the oldest connection not used
|
||||
for i, (cnx, used) in enumerate(self._connections):
|
||||
if not used:
|
||||
self._debug('Removing old connection at index %d: %s' % (i, cnx.dsn))
|
||||
@@ -266,7 +265,7 @@ class ConnectionPool(object):
|
||||
break
|
||||
else:
|
||||
# note: this code is called only if the for loop has completed (no break)
|
||||
raise PoolError('Connection Pool Full')
|
||||
raise PoolError('The Connection Pool Is Full')
|
||||
|
||||
self._debug('Create new connection')
|
||||
result = psycopg2.connect(dsn=dsn)
|
||||
@@ -275,7 +274,7 @@ class ConnectionPool(object):
|
||||
|
||||
@locked
|
||||
def give_back(self, connection):
|
||||
self._log('Give back connection to %s' % (connection.dsn,))
|
||||
self._debug('Give back connection to %s' % (connection.dsn,))
|
||||
for i, (cnx, used) in enumerate(self._connections):
|
||||
if cnx is connection:
|
||||
self._connections.pop(i)
|
||||
@@ -286,6 +285,7 @@ class ConnectionPool(object):
|
||||
|
||||
@locked
|
||||
def close_all(self, dsn):
|
||||
self._debug('Close all connections to %s' % (dsn,))
|
||||
for i, (cnx, used) in tools.reverse_enumerate(self._connections):
|
||||
if dsn_are_equals(cnx.dsn, dsn):
|
||||
cnx.close()
|
||||
@@ -293,37 +293,17 @@ class ConnectionPool(object):
|
||||
|
||||
|
||||
class Connection(object):
|
||||
__LOCKS = {}
|
||||
def _debug(self, msg):
|
||||
self._logger.notifyChannel('Connection', netsvc.LOG_DEBUG, msg)
|
||||
|
||||
def __init__(self, pool, dbname, unique=False):
|
||||
def __init__(self, pool, dbname):
|
||||
self.dbname = dbname
|
||||
self._pool = pool
|
||||
self._unique = unique
|
||||
|
||||
def __enter__(self):
|
||||
if self._unique:
|
||||
self.lock()
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
if self._unique:
|
||||
self.release()
|
||||
|
||||
def lock(self):
|
||||
if self.dbname not in self.__LOCKS:
|
||||
self.__LOCKS[self.dbname] = threading.Lock()
|
||||
self.__LOCKS[self.dbname].acquire()
|
||||
|
||||
def release(self):
|
||||
close_db(self.dbname)
|
||||
self.__LOCKS[self.dbname].release()
|
||||
self._logger = netsvc.Logger()
|
||||
|
||||
def cursor(self, serialized=False):
|
||||
if self._unique:
|
||||
lock = self.__LOCKS.get(self.dbname, None)
|
||||
if not (lock and lock.locked()):
|
||||
netsvc.Logger().notifyChannel('Connection', netsvc.LOG_WARNING, 'Unprotected connection to %s' % (self.dbname,))
|
||||
|
||||
cursor_type = serialized and 'serialized ' or ''
|
||||
self._debug('create %scursor to "%s"' % (cursor_type, self.dbname,))
|
||||
return Cursor(self._pool, self.dbname, serialized=serialized)
|
||||
|
||||
def serialized_cursor(self):
|
||||
@@ -359,8 +339,7 @@ def dsn_are_equals(first, second):
|
||||
_Pool = ConnectionPool(int(tools.config['db_maxconn']))
|
||||
|
||||
def db_connect(db_name):
|
||||
unique = db_name in ['template1', 'template0']
|
||||
return Connection(_Pool, db_name, unique)
|
||||
return Connection(_Pool, db_name)
|
||||
|
||||
def close_db(db_name):
|
||||
_Pool.close_all(dsn(db_name))
|
||||
|
||||
@@ -74,6 +74,7 @@ def french_number(val):
|
||||
return ret
|
||||
|
||||
def amount_to_text_fr(number, currency):
|
||||
number = '%.2f' % number
|
||||
units_name = currency
|
||||
list = str(number).split('.')
|
||||
start_word = french_number(abs(int(list[0])))
|
||||
@@ -137,6 +138,7 @@ def dutch_number(val):
|
||||
return ret
|
||||
|
||||
def amount_to_text_nl(number, currency):
|
||||
number = '%.2f' % number
|
||||
units_name = currency
|
||||
list = str(number).split('.')
|
||||
start_word = dutch_number(int(list[0]))
|
||||
|
||||
@@ -74,6 +74,7 @@ def english_number(val):
|
||||
return ret
|
||||
|
||||
def amount_to_text(number, currency):
|
||||
number = '%.2f' % number
|
||||
units_name = currency
|
||||
list = str(number).split('.')
|
||||
start_word = english_number(int(list[0]))
|
||||
|
||||
@@ -352,7 +352,6 @@ class configmanager(object):
|
||||
res = os.path.abspath(os.path.expanduser(value))
|
||||
if not os.path.exists(res):
|
||||
raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, value))
|
||||
|
||||
contains_addons = False
|
||||
for f in os.listdir(res):
|
||||
modpath = os.path.join(res, f)
|
||||
|
||||
+10
-6
@@ -763,16 +763,20 @@ if __name__=='__main__':
|
||||
import ImageDraw
|
||||
img = Image.new("RGB", (800, 600), "#ffffff")
|
||||
draw = ImageDraw.Draw(img)
|
||||
|
||||
for name,node in g.result.items():
|
||||
|
||||
result = g.result_get()
|
||||
node_res = {}
|
||||
for node in nodes:
|
||||
node_res[node] = result[node]
|
||||
|
||||
for name,node in node_res.items():
|
||||
|
||||
draw.arc( (int(node['y']-radius), int(node['x']-radius),int(node['y']+radius), int(node['x']+radius) ), 0, 360, (128,128,128))
|
||||
draw.text( (int(node['y']), int(node['x'])), name, (128,128,128))
|
||||
|
||||
|
||||
for nodefrom in g.transitions:
|
||||
for nodeto in g.transitions[nodefrom]:
|
||||
draw.line( (int(g.result[nodefrom]['y']), int(g.result[nodefrom]['x']),int(g.result[nodeto]['y']),int(g.result[nodeto]['x'])),(128,128,128) )
|
||||
|
||||
for t in transitions:
|
||||
draw.line( (int(node_res[t[0]]['y']), int(node_res[t[0]]['x']),int(node_res[t[1]]['y']),int(node_res[t[1]]['x'])),(128,128,128) )
|
||||
img.save("graph.png", "PNG")
|
||||
|
||||
|
||||
|
||||
+11
-8
@@ -439,7 +439,10 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
|
||||
except (UnicodeEncodeError, UnicodeDecodeError):
|
||||
email_body = body
|
||||
|
||||
email_text = MIMEText(email_body, _subtype=subtype, _charset='utf-8')
|
||||
try:
|
||||
email_text = MIMEText(email_body.encode('utf8') or '',_subtype=subtype,_charset='utf-8')
|
||||
except:
|
||||
email_text = MIMEText(email_body or '',_subtype=subtype,_charset='utf-8')
|
||||
|
||||
if attach: msg = MIMEMultipart()
|
||||
else: msg = email_text
|
||||
@@ -747,14 +750,14 @@ class cache(object):
|
||||
if *args and **kwargs are both empty, clear all the keys related to this database
|
||||
"""
|
||||
if not args and not kwargs:
|
||||
keys_to_del = [key for key in self.cache if key[0][1] == dbname]
|
||||
keys_to_del = [key for key in self.cache.keys() if key[0][1] == dbname]
|
||||
else:
|
||||
kwargs2 = self._unify_args(*args, **kwargs)
|
||||
keys_to_del = [key for key, _ in self._generate_keys(dbname, kwargs2) if key in self.cache]
|
||||
|
||||
keys_to_del = [key for key, _ in self._generate_keys(dbname, kwargs2) if key in self.cache.keys()]
|
||||
|
||||
for key in keys_to_del:
|
||||
del self.cache[key]
|
||||
|
||||
self.cache.pop(key)
|
||||
|
||||
@classmethod
|
||||
def clean_caches_for_db(cls, dbname):
|
||||
for c in cls.__caches:
|
||||
@@ -775,9 +778,9 @@ class cache(object):
|
||||
if time.time()-int(self.timeout) > self.lasttime:
|
||||
self.lasttime = time.time()
|
||||
t = time.time()-int(self.timeout)
|
||||
old_keys = [key for key in self.cache if self.cache[key][1] < t]
|
||||
old_keys = [key for key in self.cache.keys() if self.cache[key][1] < t]
|
||||
for key in old_keys:
|
||||
del self.cache[key]
|
||||
self.cache.pop(key)
|
||||
|
||||
kwargs2 = self._unify_args(*args, **kwargs)
|
||||
|
||||
|
||||
@@ -148,6 +148,10 @@ class interface(netsvc.Service):
|
||||
res['arch'] = arch
|
||||
res['state'] = button_list
|
||||
|
||||
elif result_def['type'] == 'choice':
|
||||
next_state = result_def['next_state'](self, cr, uid, data, context)
|
||||
return self.execute_cr(cr, uid, data, next_state, context)
|
||||
|
||||
except Exception, e:
|
||||
if isinstance(e, except_wizard) \
|
||||
or isinstance(e, except_osv) \
|
||||
@@ -162,9 +166,6 @@ class interface(netsvc.Service):
|
||||
'Exception in call: ' + tb_s)
|
||||
raise
|
||||
|
||||
if result_def['type'] == 'choice':
|
||||
next_state = result_def['next_state'](self, cr, uid, data, context)
|
||||
return self.execute_cr(cr, uid, data, next_state, context)
|
||||
return res
|
||||
|
||||
def execute(self, db, uid, data, state='init', context=None):
|
||||
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
# Korean translation for openobject-server
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-server package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-server\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-24 22:41+0300\n"
|
||||
"PO-Revision-Date: 2010-02-16 05:47+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Korean <ko@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-02-17 04:54+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid "Dedicated system account for the Open ERP server:"
|
||||
msgstr ""
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid ""
|
||||
"The Open ERP server must use a dedicated account for its operation so that "
|
||||
"the system's security is not compromised by running it with superuser "
|
||||
"privileges."
|
||||
msgstr ""
|
||||
|
||||
#. Type: string
|
||||
#. Description
|
||||
#: ../openerp-server.templates:1001
|
||||
msgid "Please choose that account's username."
|
||||
msgstr ""
|
||||
Reference in New Issue
Block a user