diff --git a/debian/po/sl.po b/debian/po/sl.po new file mode 100644 index 00000000000..b62aaea9555 --- /dev/null +++ b/debian/po/sl.po @@ -0,0 +1,41 @@ +# Slovenian translation for openobject-server +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-server package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-server\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2009-08-24 22:41+0300\n" +"PO-Revision-Date: 2011-10-10 06:08+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Slovenian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-10-11 05:29+0000\n" +"X-Generator: Launchpad (build 14123)\n" + +#. Type: string +#. Description +#: ../openerp-server.templates:1001 +msgid "Dedicated system account for the Open ERP server:" +msgstr "Namenski sistemski račun za ta OpenERP strežnik:" + +#. 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 "" +"OpenERP strežnik mora uporabljati namenski račun za njegovo delovanje, da " +"varnost strežnika ni ogrožena z zaganjanjem v privelegijih superuser." + +#. Type: string +#. Description +#: ../openerp-server.templates:1001 +msgid "Please choose that account's username." +msgstr "Prosim, izberite uporabniško ime računa." diff --git a/openerp/addons/base/base_data.xml b/openerp/addons/base/base_data.xml index 94a3780653f..9615506a7c6 100644 --- a/openerp/addons/base/base_data.xml +++ b/openerp/addons/base/base_data.xml @@ -1659,5 +1659,17 @@ + + HNL + L + 0.01 + 4 + + + + 25 + + + diff --git a/openerp/addons/base/i18n/et.po b/openerp/addons/base/i18n/et.po index fe5202aae51..6279b88a68f 100644 --- a/openerp/addons/base/i18n/et.po +++ b/openerp/addons/base/i18n/et.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-09-30 20:58+0000\n" -"Last-Translator: Antony Lesuisse (OpenERP) \n" +"PO-Revision-Date: 2011-10-10 18:58+0000\n" +"Last-Translator: Aare Vesi \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: 2011-10-01 05:02+0000\n" -"X-Generator: Launchpad (build 14071)\n" +"X-Launchpad-Export-Date: 2011-10-11 05:29+0000\n" +"X-Generator: Launchpad (build 14123)\n" #. module: base #: view:ir.filters:0 @@ -859,18 +859,18 @@ msgstr "" #. module: base #: field:ir.module.module,contributors:0 msgid "Contributors" -msgstr "" +msgstr "Kaasautorid" #. module: base #: selection:ir.property,type:0 msgid "Char" -msgstr "" +msgstr "Märk" #. module: base #: model:ir.actions.act_window,name:base.action_publisher_warranty_contract_form #: model:ir.ui.menu,name:base.menu_publisher_warranty_contract msgid "Contracts" -msgstr "" +msgstr "Lepingud" #. module: base #: selection:base.language.install,lang:0 @@ -944,7 +944,7 @@ msgstr "Toimingu URL" #. module: base #: field:base.module.import,module_name:0 msgid "Module Name" -msgstr "" +msgstr "Mooduli nimi" #. module: base #: model:res.country,name:base.mh @@ -1003,12 +1003,12 @@ msgstr "" #. module: base #: model:ir.ui.menu,name:base.menu_hr_dasboard msgid "Dashboard" -msgstr "" +msgstr "Töölaud" #. module: base #: model:ir.ui.menu,name:base.menu_purchase_root msgid "Purchases" -msgstr "" +msgstr "Ostud" #. module: base #: model:res.country,name:base.md @@ -1431,7 +1431,7 @@ msgstr "" #. module: base #: view:base.language.export:0 msgid "https://help.launchpad.net/Translations" -msgstr "" +msgstr "https://help.launchpad.net/Translations" #. module: base #: field:ir.actions.act_window,view_mode:0 @@ -1454,7 +1454,7 @@ msgstr "" #. module: base #: view:res.log:0 msgid "Logs" -msgstr "" +msgstr "Logid" #. module: base #: selection:base.language.install,lang:0 @@ -1658,7 +1658,7 @@ msgstr "Fääri saared" #: selection:res.config.view,view:0 #: selection:res.users,view:0 msgid "Simplified" -msgstr "" +msgstr "Lihtsustatud" #. module: base #: model:res.country,name:base.st @@ -1874,7 +1874,7 @@ msgstr "" #. module: base #: model:ir.ui.menu,name:base.menu_email_gateway_form msgid "Messages" -msgstr "" +msgstr "Teated" #. module: base #: code:addons/base/ir/ir_model.py:303 @@ -1886,7 +1886,7 @@ msgstr "" #: code:addons/base/module/wizard/base_update_translations.py:38 #, python-format msgid "Error!" -msgstr "" +msgstr "Viga!" #. module: base #: view:res.lang:0 @@ -1994,7 +1994,7 @@ msgstr "res.partner.event" #. module: base #: model:res.widget,title:base.facebook_widget msgid "Facebook" -msgstr "" +msgstr "Facebook" #. module: base #: model:res.country,name:base.am @@ -2005,12 +2005,12 @@ msgstr "Armeenia" #: model:ir.actions.act_window,name:base.ir_property_form #: model:ir.ui.menu,name:base.menu_ir_property_form_all msgid "Configuration Parameters" -msgstr "" +msgstr "Konfiguratsiooni parameetrid" #. module: base #: constraint:ir.cron:0 msgid "Invalid arguments" -msgstr "" +msgstr "Vigased argumendid" #. module: base #: model:res.country,name:base.se @@ -2060,7 +2060,7 @@ msgstr "Iteratsiooni toimingu seadistus" #. module: base #: selection:publisher_warranty.contract,state:0 msgid "Canceled" -msgstr "" +msgstr "Tühistatud" #. module: base #: model:res.country,name:base.at @@ -2072,7 +2072,7 @@ msgstr "Austria" #: selection:base.module.import,state:0 #: selection:base.module.update,state:0 msgid "done" -msgstr "" +msgstr "valmis" #. module: base #: selection:ir.actions.act_window.view,view_mode:0 @@ -2085,7 +2085,7 @@ msgstr "Kalender" #. module: base #: field:res.partner.address,partner_id:0 msgid "Partner Name" -msgstr "" +msgstr "Partneri nimi" #. module: base #: field:workflow.activity,signal_send:0 @@ -2095,7 +2095,7 @@ msgstr "Signaal (subflow.*)" #. module: base #: model:res.partner.category,name:base.res_partner_category_17 msgid "HR sector" -msgstr "" +msgstr "IR sektor" #. module: base #: code:addons/orm.py:3817 @@ -2121,7 +2121,7 @@ msgstr "Mustand" #: selection:res.config.view,view:0 #: selection:res.users,view:0 msgid "Extended" -msgstr "" +msgstr "Laiendatud" #. module: base #: model:ir.actions.act_window,help:base.action_partner_title_contact @@ -2326,7 +2326,7 @@ msgstr "" #. module: base #: view:base.language.import:0 msgid "_Import" -msgstr "" +msgstr "_Impordi" #. module: base #: view:res.partner.canal:0 @@ -2383,7 +2383,7 @@ msgstr "Paremalt vasakule" #: model:ir.model,name:base.model_ir_filters #: model:ir.ui.menu,name:base.menu_ir_filters msgid "Filters" -msgstr "" +msgstr "Filtrid" #. module: base #: code:addons/orm.py:758 @@ -2494,7 +2494,7 @@ msgstr "" #: model:ir.actions.act_window,name:base.action_view_partner_wizard_ean_check #: view:partner.wizard.ean.check:0 msgid "Ean check" -msgstr "" +msgstr "Ean kontroll" #. module: base #: field:res.partner,vat:0 @@ -2667,7 +2667,7 @@ msgstr "6. %d, %m ==> 05, 12" #: field:res.config.users,date:0 #: field:res.users,date:0 msgid "Last Connection" -msgstr "" +msgstr "Viimane ühendus" #. module: base #: field:ir.actions.act_window,help:0 @@ -2749,7 +2749,7 @@ msgstr "" #. module: base #: field:ir.actions.todo,restart:0 msgid "Restart" -msgstr "" +msgstr "Taaskäivita" #. module: base #: field:ir.actions.report.xml,report_sxw_content:0 @@ -2805,7 +2805,7 @@ msgstr "Kokkuvõte" #. module: base #: field:multi_company.default,expression:0 msgid "Expression" -msgstr "" +msgstr "Avaldis" #. module: base #: help:ir.actions.server,subject:0 @@ -2846,7 +2846,7 @@ msgstr "" #. module: base #: model:res.partner.category,name:base.res_partner_category_16 msgid "Telecom sector" -msgstr "" +msgstr "Telekommunikatsiooni sektor" #. module: base #: field:workflow.transition,trigger_model:0 @@ -2872,7 +2872,7 @@ msgstr "Suriname" #. module: base #: model:ir.ui.menu,name:base.marketing_menu msgid "Marketing" -msgstr "" +msgstr "Turundus" #. module: base #: view:res.partner.bank:0 @@ -2903,12 +2903,12 @@ msgstr "Litsents" #. module: base #: field:ir.attachment,url:0 msgid "Url" -msgstr "" +msgstr "URL" #. module: base #: selection:ir.actions.todo,restart:0 msgid "Always" -msgstr "" +msgstr "Alati" #. module: base #: selection:ir.translation,type:0 @@ -3056,7 +3056,7 @@ msgstr "" #. module: base #: model:ir.actions.act_window,name:base.action_config_user_form msgid "Create Users" -msgstr "" +msgstr "Loo kasutajad" #. module: base #: model:ir.model,name:base.model_res_partner_title @@ -3071,7 +3071,7 @@ msgstr "tree_but_action, client_print_multi" #. module: base #: model:res.partner.category,name:base.res_partner_category_retailers0 msgid "Retailers" -msgstr "" +msgstr "Jaemüüjad" #. module: base #: help:ir.cron,priority:0 @@ -3107,12 +3107,12 @@ msgstr "Keenia" #. module: base #: view:res.partner.event:0 msgid "Event" -msgstr "" +msgstr "Sündmus" #. module: base #: model:ir.ui.menu,name:base.menu_custom_reports msgid "Custom Reports" -msgstr "" +msgstr "Kohandatud aruanded" #. module: base #: selection:base.language.install,lang:0 @@ -3133,7 +3133,7 @@ msgstr "" #. module: base #: view:ir.property:0 msgid "Generic" -msgstr "" +msgstr "Üldine" #. module: base #: model:res.country,name:base.sm @@ -3680,7 +3680,7 @@ msgstr "" #. module: base #: view:ir.translation:0 msgid "Translation" -msgstr "" +msgstr "Tõlge" #. module: base #: selection:res.request,state:0 @@ -3705,7 +3705,7 @@ msgstr "Kirjuta Id" #. module: base #: model:ir.ui.menu,name:base.menu_product msgid "Products" -msgstr "" +msgstr "Tooted" #. module: base #: field:ir.actions.act_window,domain:0 @@ -3852,7 +3852,7 @@ msgstr "" #. module: base #: view:ir.attachment:0 msgid "Month" -msgstr "" +msgstr "Kuu" #. module: base #: model:res.country,name:base.my @@ -3863,7 +3863,7 @@ msgstr "Malaisia" #: view:base.language.install:0 #: model:ir.actions.act_window,name:base.action_view_base_language_install msgid "Load Official Translation" -msgstr "" +msgstr "Lae ametlik tõlge" #. module: base #: model:ir.model,name:base.model_res_request_history @@ -3920,7 +3920,7 @@ msgstr "ir.actions.url" #. module: base #: model:res.widget,title:base.currency_converter_widget msgid "Currency Converter" -msgstr "" +msgstr "Valuutakalkulaator" #. module: base #: code:addons/orm.py:156 @@ -3942,7 +3942,7 @@ msgstr "Lisatud moodulite arv" #. module: base #: view:res.currency:0 msgid "Price Accuracy" -msgstr "" +msgstr "Hinna täpsus" #. module: base #: selection:base.language.install,lang:0 @@ -4125,7 +4125,7 @@ msgstr "Pangad" #. module: base #: view:res.log:0 msgid "Unread" -msgstr "" +msgstr "Lugemata" #. module: base #: field:ir.cron,doall:0 @@ -4264,7 +4264,7 @@ msgstr "" #. module: base #: model:ir.ui.menu,name:base.menu_main_pm msgid "Project" -msgstr "" +msgstr "Projekt" #. module: base #: field:ir.ui.menu,web_icon_hover_data:0 @@ -4279,12 +4279,12 @@ msgstr "" #. module: base #: selection:ir.actions.todo,state:0 msgid "Cancelled" -msgstr "" +msgstr "Tühistatud" #. module: base #: view:res.config.users:0 msgid "Create User" -msgstr "" +msgstr "Loo kasutaja" #. module: base #: view:partner.clear.ids:0 @@ -4295,7 +4295,7 @@ msgstr "" #: field:publisher_warranty.contract,name:0 #: field:publisher_warranty.contract.wizard,name:0 msgid "Serial Key" -msgstr "" +msgstr "Seerianumber" #. module: base #: selection:res.request,priority:0 @@ -4305,7 +4305,7 @@ msgstr "Madal" #. module: base #: model:ir.ui.menu,name:base.menu_audit msgid "Audit" -msgstr "" +msgstr "Audit" #. module: base #: model:res.country,name:base.lc @@ -4325,7 +4325,7 @@ msgstr "Vali objekt mudelist millel töövoog käivitatakse" #. module: base #: field:res.partner,employee:0 msgid "Employee" -msgstr "" +msgstr "Töötaja" #. module: base #: field:ir.model.access,perm_create:0 @@ -4362,7 +4362,7 @@ msgstr "Briti India ookeani territoorium" #: field:res.config.view,view:0 #: field:res.users,view:0 msgid "Interface" -msgstr "" +msgstr "Kasutajaliides" #. module: base #: view:ir.actions.server:0 @@ -4423,7 +4423,7 @@ msgstr "Signatuur" #: code:addons/fields.py:664 #, python-format msgid "Not Implemented" -msgstr "" +msgstr "Teostamata" #. module: base #: model:ir.model,name:base.model_res_widget_user @@ -4438,7 +4438,7 @@ msgstr "Täielik nimi" #. module: base #: view:base.module.configuration:0 msgid "_Ok" -msgstr "" +msgstr "_Ok" #. module: base #: help:ir.filters,user_id:0 @@ -4478,7 +4478,7 @@ msgstr "Mitmel dokumendil" #: view:res.partner:0 #: field:res.partner,user_id:0 msgid "Salesman" -msgstr "" +msgstr "Müügimees" #. module: base #: field:res.partner,address:0 @@ -4496,7 +4496,7 @@ msgstr "" #. module: base #: view:res.widget.wizard:0 msgid "Add" -msgstr "" +msgstr "Lisa" #. module: base #: view:base.module.upgrade:0 @@ -4508,7 +4508,7 @@ msgstr "Paigalda valitud uuendused" #. module: base #: view:res.widget:0 msgid "Widgets" -msgstr "" +msgstr "Vidinad" #. module: base #: model:res.country,name:base.cz @@ -4545,7 +4545,7 @@ msgstr "" #. module: base #: selection:ir.property,type:0 msgid "Integer" -msgstr "" +msgstr "Täisarv" #. module: base #: help:ir.actions.report.xml,report_rml:0 @@ -4619,7 +4619,7 @@ msgstr "" #. module: base #: view:res.log:0 msgid "My Logs" -msgstr "" +msgstr "Minu logid" #. module: base #: model:res.country,name:base.bt @@ -4670,7 +4670,7 @@ msgstr "res.config.view" #: view:res.log:0 #: field:res.log,read:0 msgid "Read" -msgstr "" +msgstr "Loe" #. module: base #: sql_constraint:res.country:0 @@ -4715,7 +4715,7 @@ msgstr "Väljad" #. module: base #: model:ir.actions.act_window,name:base.action_partner_employee_form msgid "Employees" -msgstr "" +msgstr "Töötajad" #. module: base #: help:res.log,read:0 @@ -4756,7 +4756,7 @@ msgstr "acc_number" #: model:ir.actions.act_window,name:base.action_partner_address_form #: model:ir.ui.menu,name:base.menu_partner_address_form msgid "Addresses" -msgstr "" +msgstr "Aadressid" #. module: base #: model:res.country,name:base.mm @@ -4891,7 +4891,7 @@ msgstr "1cm 28cm 20cm 28cm" #. module: base #: field:ir.module.module,maintainer:0 msgid "Maintainer" -msgstr "" +msgstr "Haldaja" #. module: base #: field:ir.sequence,suffix:0 @@ -5131,7 +5131,7 @@ msgstr "2. %a ,%A ==> Re, Reede" #. module: base #: field:res.widget,content:0 msgid "Content" -msgstr "" +msgstr "Sisu" #. module: base #: help:ir.rule,global:0 @@ -5411,7 +5411,7 @@ msgstr "Araabia Ühendemiraadid" #. module: base #: model:ir.ui.menu,name:base.menu_crm_case_job_req_main msgid "Recruitment" -msgstr "" +msgstr "Värbamine" #. module: base #: model:res.country,name:base.re @@ -5456,7 +5456,7 @@ msgstr "Ligipääsuviga" #. module: base #: view:res.request:0 msgid "Waiting" -msgstr "" +msgstr "Ootamine" #. module: base #: code:addons/__init__.py:834 @@ -5494,7 +5494,7 @@ msgstr "Arvu täidistus" #. module: base #: view:ir.actions.report.xml:0 msgid "Report" -msgstr "" +msgstr "Aruanne" #. module: base #: model:res.country,name:base.ua @@ -5515,7 +5515,7 @@ msgstr "Mooduli kategooria" #. module: base #: view:partner.wizard.ean.check:0 msgid "Ignore" -msgstr "" +msgstr "Eira" #. module: base #: report:ir.module.reference.graph:0 @@ -5525,7 +5525,7 @@ msgstr "Viite juhend" #. module: base #: view:ir.ui.view:0 msgid "Architecture" -msgstr "" +msgstr "Arhitektuur" #. module: base #: model:res.country,name:base.ml @@ -5733,7 +5733,7 @@ msgstr "" #. module: base #: view:ir.model:0 msgid "Custom" -msgstr "" +msgstr "Kohandatud" #. module: base #: view:res.request:0 @@ -5780,7 +5780,7 @@ msgstr "" #. module: base #: selection:publisher_warranty.contract.wizard,state:0 msgid "Finished" -msgstr "" +msgstr "Valmis" #. module: base #: model:res.country,name:base.de @@ -5862,7 +5862,7 @@ msgstr "" #. module: base #: field:base.language.import,name:0 msgid "Language Name" -msgstr "" +msgstr "Keele nimi" #. module: base #: selection:ir.property,type:0 @@ -5888,7 +5888,7 @@ msgstr "Väljade kirjeldus" #: view:res.partner.address:0 #: view:workflow.activity:0 msgid "Group By..." -msgstr "" +msgstr "Grupeeri..." #. module: base #: view:ir.model.fields:0 @@ -6005,7 +6005,7 @@ msgstr "Kirjuta objekt" #. module: base #: model:ir.ui.menu,name:base.menu_fundrising msgid "Fund Raising" -msgstr "" +msgstr "Rahakogumine" #. module: base #: model:ir.actions.act_window,name:base.ir_sequence_type @@ -6142,7 +6142,7 @@ msgstr "" #. module: base #: view:ir.actions.todo:0 msgid "Todo" -msgstr "" +msgstr "Ülesanded" #. module: base #: field:ir.attachment,datas:0 @@ -6179,7 +6179,7 @@ msgstr "Gibraltar" #. module: base #: field:ir.actions.report.xml,report_name:0 msgid "Service Name" -msgstr "" +msgstr "Teenuse nimi" #. module: base #: model:res.country,name:base.pn @@ -6202,7 +6202,7 @@ msgstr "Kirje reeglid" #: field:res.config.users,name:0 #: field:res.users,name:0 msgid "User Name" -msgstr "" +msgstr "Kasutaja nimi" #. module: base #: view:ir.sequence:0 @@ -6256,7 +6256,7 @@ msgstr "Manused" #: model:ir.ui.menu,name:base.menu_sale_config_sales #: model:ir.ui.menu,name:base.menu_sales msgid "Sales" -msgstr "" +msgstr "Müügid" #. module: base #: field:ir.actions.server,child_ids:0 @@ -6320,7 +6320,7 @@ msgstr "Estonian / Eesti keel" #: field:res.partner,email:0 #: field:res.users,email:0 msgid "E-mail" -msgstr "" +msgstr "E-post" #. module: base #: selection:ir.module.module,license:0 @@ -6443,7 +6443,7 @@ msgstr "Vaikeväärtus" #. module: base #: model:ir.ui.menu,name:base.menu_tools msgid "Tools" -msgstr "" +msgstr "Tööriistad" #. module: base #: model:res.country,name:base.kn @@ -6648,7 +6648,7 @@ msgstr "" #: model:ir.ui.menu,name:base.next_id_73 #: model:ir.ui.menu,name:base.reporting_menu msgid "Reporting" -msgstr "" +msgstr "Aruandlus" #. module: base #: model:res.country,name:base.tg @@ -6901,7 +6901,7 @@ msgstr "Ümardusfaktor" #. module: base #: view:base.language.install:0 msgid "Load" -msgstr "" +msgstr "Lae" #. module: base #: help:res.config.users,name:0 @@ -7067,7 +7067,7 @@ msgstr "Tuneesia" #. module: base #: model:ir.ui.menu,name:base.menu_mrp_root msgid "Manufacturing" -msgstr "" +msgstr "Tootmine" #. module: base #: model:res.country,name:base.km @@ -7117,7 +7117,7 @@ msgstr "" #: 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 "Maakonnad" #. module: base #: view:ir.model:0 @@ -7182,7 +7182,7 @@ msgstr "Minut: %(min)s" #: model:ir.actions.act_window,name:base.action_wizard_update_translations #: model:ir.ui.menu,name:base.menu_wizard_update_translations msgid "Synchronize Translations" -msgstr "" +msgstr "Sünkroniseeri tõlkeid" #. module: base #: model:ir.ui.menu,name:base.next_id_10 @@ -7213,12 +7213,12 @@ msgstr "Kasutaja viide" #: code:addons/base/res/res_user.py:580 #, python-format msgid "Warning !" -msgstr "" +msgstr "Hoiatus!" #. module: base #: model:res.widget,title:base.google_maps_widget msgid "Google Maps" -msgstr "" +msgstr "Google Maps" #. module: base #: model:ir.ui.menu,name:base.menu_base_config @@ -7328,7 +7328,7 @@ msgstr "Lae ametlik tõlge" #. module: base #: view:res.currency:0 msgid "Miscelleanous" -msgstr "" +msgstr "Mitmesugune" #. module: base #: model:res.partner.category,name:base.res_partner_category_10 @@ -7364,7 +7364,7 @@ msgstr "" #. module: base #: view:ir.attachment:0 msgid "Created" -msgstr "" +msgstr "Loodud" #. module: base #: help:ir.actions.wizard,multi:0 @@ -7426,7 +7426,7 @@ msgstr "" #: model:ir.actions.act_window,name:base.action_view_base_import_language #: model:ir.ui.menu,name:base.menu_view_base_import_language msgid "Import Translation" -msgstr "" +msgstr "Impordi tõlge" #. module: base #: field:res.partner.bank.type,field_ids:0 @@ -7460,7 +7460,7 @@ msgstr "Costa Rica" #. module: base #: view:workflow.activity:0 msgid "Conditions" -msgstr "" +msgstr "Tingimused" #. module: base #: model:ir.actions.act_window,name:base.action_partner_other_form @@ -7552,7 +7552,7 @@ msgstr "Eesti" #. module: base #: model:ir.ui.menu,name:base.dashboard msgid "Dashboards" -msgstr "" +msgstr "Töölauad" #. module: base #: help:ir.attachment,type:0 @@ -7563,7 +7563,7 @@ msgstr "" #: field:res.config.users,new_password:0 #: field:res.users,new_password:0 msgid "Change password" -msgstr "" +msgstr "Vaheta salasõna" #. module: base #: model:res.country,name:base.nl @@ -7603,7 +7603,7 @@ msgstr "" #: model:ir.ui.menu,name:base.menu_emails #: model:ir.ui.menu,name:base.menu_mail_gateway msgid "Emails" -msgstr "" +msgstr "E-kirjad" #. module: base #: model:res.country,name:base.cd @@ -7701,7 +7701,7 @@ msgstr "Päästik" #. module: base #: model:ir.model,name:base.model_base_module_update msgid "Update Module" -msgstr "" +msgstr "Uuenda moodul" #. module: base #: view:ir.model.fields:0 @@ -7756,12 +7756,12 @@ msgstr "Partneri viide" #: model:ir.ui.menu,name:base.menu_procurement_management_supplier_name #: view:res.partner:0 msgid "Suppliers" -msgstr "" +msgstr "Tarnijad" #. module: base #: view:publisher_warranty.contract.wizard:0 msgid "Register" -msgstr "" +msgstr "Register" #. module: base #: field:res.request,ref_doc2:0 @@ -7839,12 +7839,12 @@ msgstr "Saatja" #. module: base #: view:res.users:0 msgid "Preferences" -msgstr "" +msgstr "Eelistused" #. module: base #: model:res.partner.category,name:base.res_partner_category_consumers0 msgid "Consumers" -msgstr "" +msgstr "Tarbijad" #. module: base #: view:res.config:0 @@ -7870,7 +7870,7 @@ msgstr "" #. module: base #: view:ir.actions.report.xml:0 msgid "Miscellaneous" -msgstr "" +msgstr "Mitmesugune" #. module: base #: model:res.country,name:base.cn diff --git a/openerp/addons/base/res/res_bank.py b/openerp/addons/base/res/res_bank.py index 82d3717aa8b..ce1cd1c6a24 100644 --- a/openerp/addons/base/res/res_bank.py +++ b/openerp/addons/base/res/res_bank.py @@ -100,17 +100,17 @@ class res_partner_bank(osv.osv): return result def _default_value(self, cursor, user, field, context=None): + if context is None: context = {} if field in ('country_id', 'state_id'): value = False else: value = '' - if not context.get('address', False): + if not context.get('address'): return value - for _, id, address in context['address']: - if not (id or address): continue - if not address: - address = self.pool['res.partner.address']\ - .read(cursor, user, [id], ['type', field], context=context)[0] + + for address in self.pool.get('res.partner').resolve_o2m_commands_to_record_dicts( + cursor, user, 'address', context['address'], ['type', field], context=context): + if address.get('type') == 'default': return address.get(field, value) elif not address.get('type'): diff --git a/openerp/import_xml.rng b/openerp/import_xml.rng index d301ae47ed3..97165f24203 100644 --- a/openerp/import_xml.rng +++ b/openerp/import_xml.rng @@ -114,6 +114,10 @@ + + diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 3a3155ed7f1..ce51ccc1d44 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -4762,6 +4762,67 @@ class BaseModel(object): return True + def resolve_o2m_commands_to_record_dicts(self, cr, uid, field_name, o2m_commands, fields=None, context=None): + """ Serializes o2m commands into record dictionaries (as if + all the o2m records came from the database via a read()), and + returns an iterable over these dictionaries. + + Because o2m commands might be creation commands, not all + record ids will contain an ``id`` field. Commands matching an + existing record (``UPDATE`` and ``LINK_TO``) will have an id. + + .. note:: ``CREATE``, ``UPDATE`` and ``LINK_TO`` stand for the + o2m command codes ``0``, ``1`` and ``4`` + respectively + + :param field_name: name of the o2m field matching the commands + :type field_name: str + :param o2m_commands: one2many commands to execute on ``field_name`` + :type o2m_commands: list((int|False, int|False, dict|False)) + :param fields: list of fields to read from the database, when applicable + :type fields: list(str) + :raises AssertionError: if a command is not ``CREATE``, ``UPDATE`` or ``LINK_TO`` + :returns: o2m records in a shape similar to that returned by + ``read()`` (except records may be missing the ``id`` + field if they don't exist in db) + :rtype: ``list(dict)`` + """ + o2m_model = self._all_columns[field_name].column._obj + + # convert single ids and pairs to tripled commands + commands = [] + for o2m_command in o2m_commands: + if not isinstance(o2m_command, (list, tuple)): + command = 4 + commands.append((command, o2m_command, False)) + elif len(o2m_command) == 1: + (command,) = o2m_command + commands.append((command, False, False)) + elif len(o2m_command) == 2: + command, id = o2m_command + commands.append((command, id, False)) + else: + command = o2m_command[0] + commands.append(o2m_command) + assert command in (0, 1, 4), \ + "Only CREATE, UPDATE and LINK_TO commands are supported in resolver" + + # extract records to read, by id, in a mapping dict + ids_to_read = [id for (command, id, _) in commands if command in (1, 4)] + records_by_id = dict( + (record['id'], record) + for record in self.pool.get(o2m_model).read( + cr, uid, ids_to_read, fields=fields, context=context)) + + record_dicts = [] + # merge record from db with record provided by command + for command, id, record in commands: + item = {} + if command in (1, 4): item.update(records_by_id[id]) + if command in (0, 1): item.update(record) + record_dicts.append(item) + return record_dicts + # keep this import here, at top it will cause dependency cycle errors import expression @@ -4782,7 +4843,7 @@ class Model(BaseModel): class TransientModel(BaseModel): """Model super-class for transient records, meant to be temporarily persisted, and regularly vaccuum-cleaned. - + A TransientModel has a simplified access rights management, all users can create new records, and may only access the records they created. The super-user has unrestricted access diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index e0b7cdeeb5f..7d6a982986b 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -314,7 +314,8 @@ form: module.record_id""" % (xml_id,) for dest,f in (('name','string'),('model','model'),('report_name','name')): res[dest] = rec.get(f,'').encode('utf8') assert res[dest], "Attribute %s of report is empty !" % (f,) - for field,dest in (('rml','report_rml'),('file','report_rml'),('xml','report_xml'),('xsl','report_xsl'),('attachment','attachment'),('attachment_use','attachment_use')): + for field,dest in (('rml','report_rml'),('file','report_rml'),('xml','report_xml'),('xsl','report_xsl'), + ('attachment','attachment'),('attachment_use','attachment_use'), ('usage','usage')): if rec.get(field): res[dest] = rec.get(field).encode('utf8') if rec.get('auto'): diff --git a/tests/test_orm.py b/tests/test_orm.py new file mode 100644 index 00000000000..61b574df5eb --- /dev/null +++ b/tests/test_orm.py @@ -0,0 +1,175 @@ +import os +import unittest2 +import openerp + +UID = 1 +DB = os.environ['OPENERP_DATABASE'] + +CREATE = lambda values: (0, False, values) +UPDATE = lambda id, values: (1, id, values) +DELETE = lambda id: (2, id, False) +FORGET = lambda id: (3, id, False) +LINK_TO = lambda id: (4, id, False) +DELETE_ALL = lambda: (5, False, False) +REPLACE_WITH = lambda ids: (6, False, ids) + +def setUpModule(): + openerp.tools.config['addons_path'] = os.environ['OPENERP_ADDONS_PATH'] + +class TestO2MSerialization(unittest2.TestCase): + def setUp(self): + self.cr = openerp.modules.registry.RegistryManager.get(DB).db.cursor() + self.partner = openerp.modules.registry.RegistryManager.get(DB)['res.partner'] + self.address = openerp.modules.registry.RegistryManager.get(DB)['res.partner.address'] + def tearDown(self): + self.cr.rollback() + self.cr.close() + + def test_no_command(self): + " empty list of commands yields an empty list of records " + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', []) + + self.assertEqual(results, []) + + def test_CREATE_commands(self): + " returns the VALUES dict as-is " + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', + map(CREATE, [{'foo': 'bar'}, {'foo': 'baz'}, {'foo': 'baq'}])) + self.assertEqual(results, [ + {'foo': 'bar'}, + {'foo': 'baz'}, + {'foo': 'baq'} + ]) + + def test_LINK_TO_command(self): + " reads the records from the database, records are returned with their ids. " + ids = [ + self.address.create(self.cr, UID, {'name': 'foo'}), + self.address.create(self.cr, UID, {'name': 'bar'}), + self.address.create(self.cr, UID, {'name': 'baz'}) + ] + commands = map(LINK_TO, ids) + + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', commands, ['name']) + + self.assertEqual(results, [ + {'id': ids[0], 'name': 'foo'}, + {'id': ids[1], 'name': 'bar'}, + {'id': ids[2], 'name': 'baz'} + ]) + + def test_bare_ids_command(self): + " same as the equivalent LINK_TO commands " + ids = [ + self.address.create(self.cr, UID, {'name': 'foo'}), + self.address.create(self.cr, UID, {'name': 'bar'}), + self.address.create(self.cr, UID, {'name': 'baz'}) + ] + + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', ids, ['name']) + + self.assertEqual(results, [ + {'id': ids[0], 'name': 'foo'}, + {'id': ids[1], 'name': 'bar'}, + {'id': ids[2], 'name': 'baz'} + ]) + + def test_UPDATE_command(self): + " take the in-db records and merge the provided information in " + id_foo = self.address.create(self.cr, UID, {'name': 'foo'}) + id_bar = self.address.create(self.cr, UID, {'name': 'bar'}) + id_baz = self.address.create(self.cr, UID, {'name': 'baz', 'city': 'tag'}) + + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [ + LINK_TO(id_foo), + UPDATE(id_bar, {'name': 'qux', 'city': 'tagtag'}), + UPDATE(id_baz, {'name': 'quux'}) + ], ['name', 'city']) + + self.assertEqual(results, [ + {'id': id_foo, 'name': 'foo', 'city': False}, + {'id': id_bar, 'name': 'qux', 'city': 'tagtag'}, + {'id': id_baz, 'name': 'quux', 'city': 'tag'} + ]) + + def test_mixed_commands(self): + ids = [ + self.address.create(self.cr, UID, {'name': name}) + for name in ['NObar', 'baz', 'qux', 'NOquux', 'NOcorge', 'garply'] + ] + + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [ + CREATE({'name': 'foo'}), + UPDATE(ids[0], {'name': 'bar'}), + LINK_TO(ids[1]), + LINK_TO(ids[2]), + UPDATE(ids[3], {'name': 'quux',}), + UPDATE(ids[4], {'name': 'corge'}), + CREATE({'name': 'grault'}), + LINK_TO(ids[5]) + ], ['name']) + + self.assertEqual(results, [ + {'name': 'foo'}, + {'id': ids[0], 'name': 'bar'}, + {'id': ids[1], 'name': 'baz'}, + {'id': ids[2], 'name': 'qux'}, + {'id': ids[3], 'name': 'quux'}, + {'id': ids[4], 'name': 'corge'}, + {'name': 'grault'}, + {'id': ids[5], 'name': 'garply'} + ]) + + def test_LINK_TO_pairs(self): + "LINK_TO commands can be written as pairs, instead of triplets" + ids = [ + self.address.create(self.cr, UID, {'name': 'foo'}), + self.address.create(self.cr, UID, {'name': 'bar'}), + self.address.create(self.cr, UID, {'name': 'baz'}) + ] + commands = map(lambda id: (4, id), ids) + + results = self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', commands, ['name']) + + self.assertEqual(results, [ + {'id': ids[0], 'name': 'foo'}, + {'id': ids[1], 'name': 'bar'}, + {'id': ids[2], 'name': 'baz'} + ]) + + def test_singleton_commands(self): + "DELETE_ALL can appear as a singleton" + + try: + self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [(5,)], ['name']) + except AssertionError: + # 5 should fail with an assert error, but not e.g. a ValueError + pass + + def test_invalid_commands(self): + "Commands with uncertain semantics in this context should be forbidden" + + with self.assertRaises(AssertionError): + self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [DELETE(42)], ['name']) + + with self.assertRaises(AssertionError): + self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [FORGET(42)], ['name']) + + with self.assertRaises(AssertionError): + self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [DELETE_ALL()], ['name']) + + with self.assertRaises(AssertionError): + self.partner.resolve_o2m_commands_to_record_dicts( + self.cr, UID, 'address', [REPLACE_WITH([42])], ['name']) +