diff --git a/addons/account_asset/i18n/hu.po b/addons/account_asset/i18n/hu.po new file mode 100644 index 00000000000..19f50232515 --- /dev/null +++ b/addons/account_asset/i18n/hu.po @@ -0,0 +1,741 @@ +# Hungarian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:04+0000\n" +"PO-Revision-Date: 2013-08-22 11:04+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Hungarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-23 05:01+0000\n" +"X-Generator: Launchpad (build 16737)\n" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Assets in draft and open states" +msgstr "" + +#. module: account_asset +#: field:account.asset.category,method_end:0 +#: field:account.asset.history,method_end:0 +#: field:asset.modify,method_end:0 +msgid "Ending date" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,value_residual:0 +msgid "Residual Value" +msgstr "" + +#. module: account_asset +#: field:account.asset.category,account_expense_depreciation_id:0 +msgid "Depr. Expense Account" +msgstr "" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Group By..." +msgstr "Csoportosítás" + +#. module: account_asset +#: field:asset.asset.report,gross_value:0 +msgid "Gross Amount" +msgstr "Bruttó összeg" + +#. module: account_asset +#: view:account.asset.asset:0 +#: field:account.asset.depreciation.line,asset_id:0 +#: field:account.asset.history,asset_id:0 +#: field:account.move.line,asset_id:0 +#: view:asset.asset.report:0 +#: field:asset.asset.report,asset_id:0 +#: model:ir.model,name:account_asset.model_account_asset_asset +msgid "Asset" +msgstr "Eszköz" + +#. module: account_asset +#: help:account.asset.asset,prorata:0 +#: help:account.asset.category,prorata:0 +msgid "" +"Indicates that the first depreciation entry for this asset have to be done " +"from the purchase date instead of the first January" +msgstr "" + +#. module: account_asset +#: selection:account.asset.asset,method:0 +#: selection:account.asset.category,method:0 +msgid "Linear" +msgstr "Lineáris" + +#. module: account_asset +#: field:account.asset.asset,company_id:0 +#: field:account.asset.category,company_id:0 +#: view:asset.asset.report:0 +#: field:asset.asset.report,company_id:0 +msgid "Company" +msgstr "Vállalat" + +#. module: account_asset +#: view:asset.modify:0 +msgid "Modify" +msgstr "Módosítás" + +#. module: account_asset +#: selection:account.asset.asset,state:0 +#: view:asset.asset.report:0 +#: selection:asset.asset.report,state:0 +msgid "Running" +msgstr "Folyamatban lévő" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Set to Draft" +msgstr "Beállítás tervezetnek" + +#. module: account_asset +#: view:asset.asset.report:0 +#: model:ir.actions.act_window,name:account_asset.action_asset_asset_report +#: model:ir.model,name:account_asset.model_asset_asset_report +#: model:ir.ui.menu,name:account_asset.menu_action_asset_asset_report +msgid "Assets Analysis" +msgstr "Eszközök elemzése" + +#. module: account_asset +#: field:asset.modify,name:0 +msgid "Reason" +msgstr "Indoklás" + +#. module: account_asset +#: field:account.asset.asset,method_progress_factor:0 +#: field:account.asset.category,method_progress_factor:0 +msgid "Degressive Factor" +msgstr "" + +#. module: account_asset +#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal +#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_normal +msgid "Asset Categories" +msgstr "Eszköz kategóriák" + +#. module: account_asset +#: view:account.asset.asset:0 +#: field:account.asset.asset,account_move_line_ids:0 +#: field:account.move.line,entry_ids:0 +#: model:ir.actions.act_window,name:account_asset.act_entries_open +msgid "Entries" +msgstr "Tételek" + +#. module: account_asset +#: view:account.asset.asset:0 +#: field:account.asset.asset,depreciation_line_ids:0 +msgid "Depreciation Lines" +msgstr "Értékcsökkénés sorai" + +#. module: account_asset +#: help:account.asset.asset,salvage_value:0 +msgid "It is the amount you plan to have that you cannot depreciate." +msgstr "" + +#. module: account_asset +#: help:account.asset.asset,method_period:0 +msgid "The amount of time between two depreciations, in months" +msgstr "" + +#. module: account_asset +#: field:account.asset.depreciation.line,depreciation_date:0 +#: view:asset.asset.report:0 +#: field:asset.asset.report,depreciation_date:0 +msgid "Depreciation Date" +msgstr "Értékcsökkenés dátuma" + +#. module: account_asset +#: constraint:account.asset.asset:0 +msgid "Error ! You cannot create recursive assets." +msgstr "" + +#. module: account_asset +#: field:asset.asset.report,posted_value:0 +msgid "Posted Amount" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +#: view:asset.asset.report:0 +#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form +#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_form +#: model:ir.ui.menu,name:account_asset.menu_finance_assets +#: model:ir.ui.menu,name:account_asset.menu_finance_config_assets +msgid "Assets" +msgstr "Eszközök" + +#. module: account_asset +#: field:account.asset.category,account_depreciation_id:0 +msgid "Depreciation Account" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +#: view:account.asset.category:0 +#: view:account.asset.history:0 +#: view:asset.modify:0 +#: field:asset.modify,note:0 +msgid "Notes" +msgstr "Megjegyzések" + +#. module: account_asset +#: field:account.asset.depreciation.line,move_id:0 +msgid "Depreciation Entry" +msgstr "" + +#. module: account_asset +#: view:asset.asset.report:0 +#: field:asset.asset.report,nbr:0 +msgid "# of Depreciation Lines" +msgstr "# értékcsökkenési sorok száma" + +#. module: account_asset +#: field:account.asset.asset,method_period:0 +msgid "Number of Months in a Period" +msgstr "Hónapok száma az időszakban" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Assets in draft state" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,method_end:0 +#: selection:account.asset.asset,method_time:0 +#: selection:account.asset.category,method_time:0 +#: selection:account.asset.history,method_time:0 +msgid "Ending Date" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,code:0 +msgid "Reference" +msgstr "Hivatkozás" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Account Asset" +msgstr "" + +#. module: account_asset +#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard +#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard +msgid "Compute Assets" +msgstr "" + +#. module: account_asset +#: field:account.asset.category,method_period:0 +#: field:account.asset.history,method_period:0 +#: field:asset.modify,method_period:0 +msgid "Period Length" +msgstr "Időszak hossza" + +#. module: account_asset +#: selection:account.asset.asset,state:0 +#: view:asset.asset.report:0 +#: selection:asset.asset.report,state:0 +msgid "Draft" +msgstr "Tervezet" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Date of asset purchase" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Change Duration" +msgstr "" + +#. module: account_asset +#: help:account.asset.asset,method_number:0 +#: help:account.asset.category,method_number:0 +#: help:account.asset.history,method_number:0 +msgid "The number of depreciations needed to depreciate your asset" +msgstr "" + +#. module: account_asset +#: view:account.asset.category:0 +msgid "Analytic Information" +msgstr "" + +#. module: account_asset +#: field:account.asset.category,account_analytic_id:0 +msgid "Analytic account" +msgstr "Gyűjtőkód" + +#. module: account_asset +#: field:account.asset.asset,method:0 +#: field:account.asset.category,method:0 +msgid "Computation Method" +msgstr "Számítási módszer" + +#. module: account_asset +#: constraint:account.asset.asset:0 +msgid "" +"Prorata temporis can be applied only for time method \"number of " +"depreciations\"." +msgstr "" + +#. module: account_asset +#: field:account.asset.depreciation.line,remaining_value:0 +msgid "Next Period Depreciation" +msgstr "" + +#. module: account_asset +#: help:account.asset.history,method_period:0 +msgid "Time in month between two depreciations" +msgstr "" + +#. module: account_asset +#: view:asset.modify:0 +#: model:ir.actions.act_window,name:account_asset.action_asset_modify +#: model:ir.model,name:account_asset.model_asset_modify +msgid "Modify Asset" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,salvage_value:0 +msgid "Salvage Value" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,category_id:0 +#: view:account.asset.category:0 +#: field:account.invoice.line,asset_category_id:0 +#: view:asset.asset.report:0 +msgid "Asset Category" +msgstr "Eszköz kategória" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Assets in closed state" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,parent_id:0 +msgid "Parent Asset" +msgstr "" + +#. module: account_asset +#: view:account.asset.history:0 +#: model:ir.model,name:account_asset.model_account_asset_history +msgid "Asset history" +msgstr "" + +#. module: account_asset +#: view:account.asset.category:0 +msgid "Search Asset Category" +msgstr "" + +#. module: account_asset +#: view:asset.modify:0 +msgid "months" +msgstr "hónapok" + +#. module: account_asset +#: model:ir.model,name:account_asset.model_account_invoice_line +msgid "Invoice Line" +msgstr "Számlasor" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Depreciation Board" +msgstr "" + +#. module: account_asset +#: field:asset.asset.report,unposted_value:0 +msgid "Unposted Amount" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,method_time:0 +#: field:account.asset.category,method_time:0 +#: field:account.asset.history,method_time:0 +msgid "Time Method" +msgstr "" + +#. module: account_asset +#: view:asset.depreciation.confirmation.wizard:0 +#: view:asset.modify:0 +msgid "or" +msgstr "vagy" + +#. module: account_asset +#: field:account.asset.asset,note:0 +#: field:account.asset.category,note:0 +#: field:account.asset.history,note:0 +msgid "Note" +msgstr "Jegyzet" + +#. module: account_asset +#: help:account.asset.history,method_time:0 +msgid "" +"The method to use to compute the dates and number of depreciation lines.\n" +"Number of Depreciations: Fix the number of depreciation lines and the time " +"between 2 depreciations.\n" +"Ending Date: Choose the time between 2 depreciations and the date the " +"depreciations won't go beyond." +msgstr "" + +#. module: account_asset +#: help:account.asset.asset,method_time:0 +#: help:account.asset.category,method_time:0 +msgid "" +"Choose the method to use to compute the dates and number of depreciation " +"lines.\n" +" * Number of Depreciations: Fix the number of depreciation lines and the " +"time between 2 depreciations.\n" +" * Ending Date: Choose the time between 2 depreciations and the date the " +"depreciations won't go beyond." +msgstr "" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Assets in running state" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Closed" +msgstr "Lezárt" + +#. module: account_asset +#: help:account.asset.asset,state:0 +msgid "" +"When an asset is created, the status is 'Draft'.\n" +"If the asset is confirmed, the status goes in 'Running' and the depreciation " +"lines can be posted in the accounting.\n" +"You can manually close an asset when the depreciation is over. If the last " +"line of depreciation is posted, the asset automatically goes in that status." +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,state:0 +#: field:asset.asset.report,state:0 +msgid "Status" +msgstr "Státusz" + +#. module: account_asset +#: field:account.asset.asset,partner_id:0 +#: field:asset.asset.report,partner_id:0 +msgid "Partner" +msgstr "Partner" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Posted depreciation lines" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,child_ids:0 +msgid "Children Assets" +msgstr "" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Date of depreciation" +msgstr "" + +#. module: account_asset +#: field:account.asset.history,user_id:0 +msgid "User" +msgstr "Felhasználó" + +#. module: account_asset +#: field:account.asset.category,account_asset_id:0 +msgid "Asset Account" +msgstr "" + +#. module: account_asset +#: view:asset.asset.report:0 +msgid "Extended Filters..." +msgstr "Kiterjesztett szűrők…" + +#. module: account_asset +#: view:account.asset.asset:0 +#: view:asset.depreciation.confirmation.wizard:0 +msgid "Compute" +msgstr "Kiszámítás" + +#. module: account_asset +#: view:account.asset.history:0 +msgid "Asset History" +msgstr "Eszköz történet" + +#. module: account_asset +#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard +msgid "asset.depreciation.confirmation.wizard" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,active:0 +msgid "Active" +msgstr "Aktív" + +#. module: account_asset +#: field:account.asset.depreciation.line,parent_state:0 +msgid "State of Asset" +msgstr "Eszköz státusza" + +#. module: account_asset +#: field:account.asset.depreciation.line,name:0 +msgid "Depreciation Name" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +#: field:account.asset.asset,history_ids:0 +msgid "History" +msgstr "Előzmény" + +#. module: account_asset +#: view:asset.depreciation.confirmation.wizard:0 +msgid "Compute Asset" +msgstr "" + +#. module: account_asset +#: field:asset.depreciation.confirmation.wizard,period_id:0 +msgid "Period" +msgstr "Időszak" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "General" +msgstr "Általános" + +#. module: account_asset +#: field:account.asset.asset,prorata:0 +#: field:account.asset.category,prorata:0 +msgid "Prorata Temporis" +msgstr "" + +#. module: account_asset +#: model:ir.model,name:account_asset.model_account_invoice +msgid "Invoice" +msgstr "Számla" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Set to Close" +msgstr "" + +#. module: account_asset +#: view:asset.depreciation.confirmation.wizard:0 +#: view:asset.modify:0 +msgid "Cancel" +msgstr "Mégsem" + +#. module: account_asset +#: selection:account.asset.asset,state:0 +#: selection:asset.asset.report,state:0 +msgid "Close" +msgstr "Lezár" + +#. module: account_asset +#: model:ir.model,name:account_asset.model_account_move_line +msgid "Journal Items" +msgstr "Könyvelési tételsorok" + +#. module: account_asset +#: view:asset.modify:0 +msgid "Asset Durations to Modify" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,purchase_date:0 +#: view:asset.asset.report:0 +#: field:asset.asset.report,purchase_date:0 +msgid "Purchase Date" +msgstr "Vásárlás dátuma" + +#. module: account_asset +#: selection:account.asset.asset,method:0 +#: selection:account.asset.category,method:0 +msgid "Degressive" +msgstr "Degresszív" + +#. module: account_asset +#: help:asset.depreciation.confirmation.wizard,period_id:0 +msgid "" +"Choose the period for which you want to automatically post the depreciation " +"lines of running assets" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Current" +msgstr "Jelenlegi" + +#. module: account_asset +#: view:account.asset.category:0 +msgid "Depreciation Method" +msgstr "" + +#. module: account_asset +#: field:account.asset.depreciation.line,amount:0 +msgid "Current Depreciation" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,name:0 +msgid "Asset Name" +msgstr "" + +#. module: account_asset +#: field:account.asset.category,open_asset:0 +msgid "Skip Draft State" +msgstr "" + +#. module: account_asset +#: view:account.asset.category:0 +msgid "Depreciation Dates" +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,currency_id:0 +msgid "Currency" +msgstr "Pénznem" + +#. module: account_asset +#: field:account.asset.category,journal_id:0 +msgid "Journal" +msgstr "Napló" + +#. module: account_asset +#: field:account.asset.history,name:0 +msgid "History name" +msgstr "" + +#. module: account_asset +#: field:account.asset.depreciation.line,depreciated_value:0 +msgid "Amount Already Depreciated" +msgstr "" + +#. module: account_asset +#: help:account.asset.asset,method:0 +#: help:account.asset.category,method:0 +msgid "" +"Choose the method to use to compute the amount of depreciation lines.\n" +" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" +" * Degressive: Calculated on basis of: Residual Value * Degressive Factor" +msgstr "" + +#. module: account_asset +#: field:account.asset.depreciation.line,move_check:0 +#: view:asset.asset.report:0 +#: field:asset.asset.report,move_check:0 +msgid "Posted" +msgstr "Könyvelt" + +#. module: account_asset +#: model:ir.actions.act_window,help:account_asset.action_asset_asset_report +msgid "" +"

\n" +" From this report, you can have an overview on all depreciation. " +"The\n" +" tool search can also be used to personalise your Assets reports " +"and\n" +" so, match this analysis to your needs;\n" +"

\n" +" " +msgstr "" + +#. module: account_asset +#: field:account.asset.asset,purchase_value:0 +msgid "Gross Value" +msgstr "Bruttó érték" + +#. module: account_asset +#: field:account.asset.category,name:0 +msgid "Name" +msgstr "Név" + +#. module: account_asset +#: help:account.asset.category,open_asset:0 +msgid "" +"Check this if you want to automatically confirm the assets of this category " +"when created by invoices." +msgstr "" + +#. module: account_asset +#: field:asset.asset.report,name:0 +msgid "Year" +msgstr "Év" + +#. module: account_asset +#: model:ir.model,name:account_asset.model_account_asset_depreciation_line +msgid "Asset depreciation line" +msgstr "" + +#. module: account_asset +#: view:account.asset.category:0 +#: field:asset.asset.report,asset_category_id:0 +#: model:ir.model,name:account_asset.model_account_asset_category +msgid "Asset category" +msgstr "Eszköz kategória" + +#. module: account_asset +#: view:asset.asset.report:0 +#: field:asset.asset.report,depreciation_value:0 +msgid "Amount of Depreciation Lines" +msgstr "" + +#. module: account_asset +#: code:addons/account_asset/wizard/wizard_asset_compute.py:50 +#, python-format +msgid "Created Asset Moves" +msgstr "" + +#. module: account_asset +#: field:account.asset.depreciation.line,sequence:0 +msgid "Sequence" +msgstr "Sorszám" + +#. module: account_asset +#: help:account.asset.category,method_period:0 +msgid "State here the time between 2 depreciations, in months" +msgstr "" + +#. module: account_asset +#: field:account.asset.history,date:0 +msgid "Date" +msgstr "Dátum" + +#. module: account_asset +#: field:account.asset.asset,method_number:0 +#: selection:account.asset.asset,method_time:0 +#: field:account.asset.category,method_number:0 +#: selection:account.asset.category,method_time:0 +#: field:account.asset.history,method_number:0 +#: selection:account.asset.history,method_time:0 +#: field:asset.modify,method_number:0 +msgid "Number of Depreciations" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Create Move" +msgstr "" + +#. module: account_asset +#: view:account.asset.asset:0 +msgid "Confirm Asset" +msgstr "" + +#. module: account_asset +#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree +#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree +msgid "Asset Hierarchy" +msgstr "" diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 597ed01aa1b..ef4c9379c82 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -884,6 +884,8 @@ class account_voucher(osv.osv): return res def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, date, amount, ttype, company_id, context=None): + if context is None: + context = {} if not journal_id: return False journal_pool = self.pool.get('account.journal') diff --git a/addons/analytic_user_function/analytic_user_function.py b/addons/analytic_user_function/analytic_user_function.py index 1adefb2d59d..2671fc92581 100644 --- a/addons/analytic_user_function/analytic_user_function.py +++ b/addons/analytic_user_function/analytic_user_function.py @@ -42,6 +42,7 @@ class analytic_user_funct_grid(osv.osv): return {} value = {} + prod = False if product_id: prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context) emp = emp_obj.browse(cr, uid, emp_id[0], context=context) diff --git a/addons/edi/i18n/en_GB.po b/addons/edi/i18n/en_GB.po new file mode 100644 index 00000000000..949e1917847 --- /dev/null +++ b/addons/edi/i18n/en_GB.po @@ -0,0 +1,90 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-08-23 16:43+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: edi +#. openerp-web +#: code:addons/edi/static/src/js/edi.js:67 +#, python-format +msgid "Reason:" +msgstr "Reason:" + +#. module: edi +#. openerp-web +#: code:addons/edi/static/src/js/edi.js:60 +#, python-format +msgid "The document has been successfully imported!" +msgstr "The document has been successfully imported!" + +#. module: edi +#. openerp-web +#: code:addons/edi/static/src/js/edi.js:65 +#, python-format +msgid "Sorry, the document could not be imported." +msgstr "Sorry, the document could not be imported." + +#. module: edi +#: model:ir.model,name:edi.model_res_company +msgid "Companies" +msgstr "Companies" + +#. module: edi +#: model:ir.model,name:edi.model_res_currency +msgid "Currency" +msgstr "Currency" + +#. module: edi +#. openerp-web +#: code:addons/edi/static/src/js/edi.js:71 +#, python-format +msgid "Document Import Notification" +msgstr "Document Import Notification" + +#. module: edi +#: code:addons/edi/models/edi.py:130 +#, python-format +msgid "Missing application." +msgstr "Missing application." + +#. module: edi +#: code:addons/edi/models/edi.py:131 +#, python-format +msgid "" +"The document you are trying to import requires the OpenERP `%s` application. " +"You can install it by connecting as the administrator and opening the " +"configuration assistant." +msgstr "" +"The document you are trying to import requires the OpenERP `%s` application. " +"You can install it by connecting as the administrator and opening the " +"configuration assistant." + +#. module: edi +#: code:addons/edi/models/edi.py:47 +#, python-format +msgid "'%s' is an invalid external ID" +msgstr "'%s' is an invalid external ID" + +#. module: edi +#: model:ir.model,name:edi.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. module: edi +#: model:ir.model,name:edi.model_edi_edi +msgid "EDI Subsystem" +msgstr "EDI Subsystem" diff --git a/addons/im/im.py b/addons/im/im.py index 97860d33e0a..534991b8fc8 100644 --- a/addons/im/im.py +++ b/addons/im/im.py @@ -109,7 +109,7 @@ class LongPollingController(http.Controller): registry = openerp.modules.registry.RegistryManager.get(db) with registry.cursor() as cr: registry.get('im.user').im_connect(cr, uid, uuid=uuid, context=request.context) - my_id = registry.get('im.user').get_by_user_id(cr, uid, uuid or uid, request.context)["id"] + my_id = registry.get('im.user').get_my_id(cr, uid, uuid, request.context) num = 0 while True: with registry.cursor() as cr: @@ -156,7 +156,7 @@ class im_message(osv.osv): # complex stuff to determine the last message to show users = self.pool.get("im.user") - my_id = users.get_by_user_id(cr, uid, uuid or uid, context=context)["id"] + my_id = users.get_my_id(cr, uid, uuid, context=context) c_user = users.browse(cr, openerp.SUPERUSER_ID, my_id, context=context) if last: if c_user.im_last_received < last: @@ -181,7 +181,7 @@ class im_message(osv.osv): def post(self, cr, uid, message, to_user_id, uuid=None, context=None): assert_uuid(uuid) - my_id = self.pool.get('im.user').get_by_user_id(cr, uid, uuid or uid)["id"] + my_id = self.pool.get('im.user').get_my_id(cr, uid, uuid) self.create(cr, openerp.SUPERUSER_ID, {"message": message, 'from_id': my_id, 'to_id': to_user_id}, context=context) notify_channel(cr, "im_channel", {'type': 'message', 'receiver': to_user_id}) return False @@ -199,10 +199,9 @@ class im_user(osv.osv): res[obj["id"]] = obj["im_last_status"] and (last_update + delta) > current return res - def search_users(self, cr, uid, domain, fields, limit, context=None): - # do not user openerp.SUPERUSER_ID, reserved to normal users - found = self.pool.get('res.users').search(cr, uid, domain, limit=limit, context=context) - found = self.get_by_user_ids(cr, uid, found, context=context) + def search_users(self, cr, uid, text_search, fields, limit, context=None): + my_id = self.get_my_id(cr, uid, None, context) + found = self.search(cr, uid, [["name", "ilike", text_search], ["id", "<>", my_id], ["uuid", "=", False]], limit=limit, context=context) return self.read(cr, uid, found, fields, context=context) def im_connect(self, cr, uid, uuid=None, context=None): @@ -215,7 +214,7 @@ class im_user(osv.osv): def _im_change_status(self, cr, uid, new_one, uuid=None, context=None): assert_uuid(uuid) - id = self.get_by_user_id(cr, uid, uuid or uid, context=context)["id"] + id = self.get_my_id(cr, uid, uuid, context=context) current_status = self.read(cr, openerp.SUPERUSER_ID, id, ["im_status"], context=None)["im_status"] self.write(cr, openerp.SUPERUSER_ID, id, {"im_last_status": new_one, "im_last_status_update": datetime.datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) @@ -223,37 +222,20 @@ class im_user(osv.osv): notify_channel(cr, "im_channel", {'type': 'status', 'user': id}) return True - def get_by_user_id(self, cr, uid, id, context=None): - ids = self.get_by_user_ids(cr, uid, [id], context=context) - return ids[0] - - def get_by_user_ids(self, cr, uid, ids, context=None): - user_ids = [x for x in ids if isinstance(x, int)] - uuids = [x for x in ids if isinstance(x, (str, unicode))] - users = self.search(cr, openerp.SUPERUSER_ID, ["|", ["user", "in", user_ids], ["uuid", "in", uuids]], context=None) - records = self.read(cr, openerp.SUPERUSER_ID, users, ["user", "uuid"], context=None) - inside = {} - for i in records: - if i["user"]: - inside[i["user"][0]] = True - elif ["uuid"]: - inside[i["uuid"]] = True - not_inside = {} - for i in ids: - if not (i in inside): - not_inside[i] = True - for to_create in not_inside.keys(): - if isinstance(to_create, int): - created = self.create(cr, openerp.SUPERUSER_ID, {"user": to_create}, context=context) - records.append({"id": created, "user": [to_create, ""]}) - else: - created = self.create(cr, openerp.SUPERUSER_ID, {"uuid": to_create}, context=context) - records.append({"id": created, "uuid": to_create}) - return records + def get_my_id(self, cr, uid, uuid=None, context=None): + assert_uuid(uuid) + if uuid: + users = self.search(cr, openerp.SUPERUSER_ID, [["uuid", "=", uuid]], context=None) + else: + users = self.search(cr, openerp.SUPERUSER_ID, [["user_id", "=", uid]], context=None) + my_id = users[0] if len(users) >= 1 else False + if not my_id: + my_id = self.create(cr, openerp.SUPERUSER_ID, {"user_id": uid if not uuid else False, "uuid": uuid if uuid else False}, context=context) + return my_id def assign_name(self, cr, uid, uuid, name, context=None): assert_uuid(uuid) - id = self.get_by_user_id(cr, uid, uuid or uid, context=context)["id"] + id = self.get_my_id(cr, uid, uuid, context=context) self.write(cr, openerp.SUPERUSER_ID, id, {"assigned_name": name}, context=context) return True @@ -261,16 +243,16 @@ class im_user(osv.osv): res = {} for record in self.browse(cr, uid, ids, context=context): res[record.id] = record.assigned_name - if record.user: - res[record.id] = record.user.name + if record.user_id: + res[record.id] = record.user_id.name continue return res _columns = { 'name': fields.function(_get_name, type='char', size=200, string="Name", store=True, readonly=True), 'assigned_name': fields.char(string="Assigned Name", size=200, required=False), - 'image': fields.related('user', 'image_small', type='binary', string="Image", readonly=True), - 'user': fields.many2one("res.users", string="User", select=True, ondelete='cascade'), + 'image': fields.related('user_id', 'image_small', type='binary', string="Image", readonly=True), + 'user_id': fields.many2one("res.users", string="User", select=True, ondelete='cascade'), 'uuid': fields.char(string="UUID", size=50, select=True), 'im_last_received': fields.integer(string="Instant Messaging Last Received Message"), 'im_last_status': fields.boolean(strint="Instant Messaging Last Status"), @@ -283,3 +265,8 @@ class im_user(osv.osv): 'im_last_status': False, 'im_last_status_update': lambda *args: datetime.datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT), } + + _sql_constraints = [ + ('user_uniq', 'unique (user_id)', 'Only one chat user per OpenERP user.'), + ('uuid_uniq', 'unique (uuid)', 'Chat identifier already used.'), + ] diff --git a/addons/im/security/im_security.xml b/addons/im/security/im_security.xml index 10297ac0669..a964855ccf9 100644 --- a/addons/im/security/im_security.xml +++ b/addons/im/security/im_security.xml @@ -5,7 +5,7 @@ Can only read messages that you sent or messages sent to you - ["|", ('to_id.user', '=', user.id), ('from_id.user', '=', user.id)] + ["|", ('to_id.user_id', '=', user.id), ('from_id.user_id', '=', user.id)] @@ -16,11 +16,11 @@ Can only modify your user - [('user', '=', user.id)] - + [('user_id', '=', user.id)] + - + diff --git a/addons/im/static/src/js/im.js b/addons/im/static/src/js/im.js index 9af04bf4f43..63ab694a723 100644 --- a/addons/im/static/src/js/im.js +++ b/addons/im/static/src/js/im.js @@ -85,9 +85,8 @@ search_changed: function(e) { var users = new instance.web.Model("im.user"); var self = this; - return this.user_search_dm.add(users.call("search_users", - [[["name", "ilike", this.get("current_search")], ["id", "<>", instance.session.uid]], - ["name", "user", "uuid", "im_status"], USERS_LIMIT], {context:new instance.web.CompoundContext()})).then(function(result) { + return this.user_search_dm.add(users.call("search_users", [this.get("current_search"), ["name", "user_id", "uuid", "im_status"], + USERS_LIMIT], {context:new instance.web.CompoundContext()})).then(function(result) { self.c_manager.add_to_user_cache(result); self.$(".oe_im_input").val(""); var old_users = self.users; diff --git a/addons/im/static/src/js/im_common.js b/addons/im/static/src/js/im_common.js index a6314a978e2..9e5e13a9099 100644 --- a/addons/im/static/src/js/im_common.js +++ b/addons/im/static/src/js/im_common.js @@ -32,13 +32,8 @@ function declare($, _, openerp) { im_common.ImUser = openerp.Class.extend(openerp.PropertiesMixin, { init: function(parent, user_rec) { openerp.PropertiesMixin.init.call(this, parent); - user_rec.image_url = im_common.connection.url("/im/static/src/img/avatar/avatar.jpeg"); - - // TODO : check it works correctly - if (user_rec.user) - user_rec.image_url = im_common.connection.url('/web/binary/image', {model:'res.users', field: 'image_small', id: user_rec.user[0]}); - /*if (user_rec.image) - user_rec.image_url = "data:image/png;base64," + user_rec.image;*/ + + user_rec.image_url = im_common.connection.url('/web/binary/image', {model:'im.user', field: 'image', id: user_rec.id}); this.set(user_rec); this.set("watcher_count", 0); @@ -97,34 +92,27 @@ function declare($, _, openerp) { }, start_polling: function() { var self = this; - - var auth_def = null; - var user_id = null; + var def = $.when(); + var uuid = false; if (this.options.anonymous_mode) { - var uuid = localStorage["oe_livesupport_uuid"]; - var def = $.when(uuid); + uuid = localStorage["oe_livesupport_uuid"] || false; if (! uuid) { - def = im_common.connection.rpc("/longpolling/im/gen_uuid", {}); + def = im_common.connection.rpc("/longpolling/im/gen_uuid", {}).then(function(my_uuid) { + uuid = my_uuid; + localStorage["oe_livesupport_uuid"] = uuid; + }); } - var anonymous_user_id = null; - auth_def = def.then(function(uuid) { - localStorage["oe_livesupport_uuid"] = uuid; - return im_common.connection.model("im.user").call("get_by_user_id", [uuid]); - }).then(function(my_id) { - user_id = my_id["id"]; + def = def.then(function() { return im_common.connection.model("im.user").call("assign_name", [uuid, self.options.userName]); }); - } else { - auth_def = im_common.connection.model("im.user").call("get_by_user_id", - [im_common.connection.uid]).then(function(my_id) { - user_id = my_id["id"]; - }); } - return auth_def.then(function() { - self.my_id = user_id; + return def.then(function() { + return im_common.connection.model("im.user").call("get_my_id", [uuid]); + }).then(function(my_user_id) { + self.my_id = my_user_id; return self.ensure_users([self.my_id]); }).then(function() { var me = self.users_cache[self.my_id]; diff --git a/addons/im_livechat/im_livechat.py b/addons/im_livechat/im_livechat.py index b68a0079c3a..a47f87a9fd2 100644 --- a/addons/im_livechat/im_livechat.py +++ b/addons/im_livechat/im_livechat.py @@ -161,9 +161,9 @@ class im_livechat_channel(osv.osv): def get_available_user(self, cr, uid, channel_id, context=None): channel = self.browse(cr, openerp.SUPERUSER_ID, channel_id, context=context) + im_user_ids = self.pool.get("im.user").search(cr, uid, [["user_id", "in", [user.id for user in channel.user_ids]]], context=context) users = [] - for user in channel.user_ids: - iuid = self.pool.get("im.user").get_by_user_id(cr, uid, user.id, context=context)["id"] + for iuid in im_user_ids: imuser = self.pool.get("im.user").browse(cr, uid, iuid, context=context) if imuser.im_status: users.append(imuser) @@ -206,12 +206,12 @@ class im_message(osv.osv): res = {} for record in self.browse(cr, uid, ids, context=context): res[record.id] = False - if record.to_id.user and record.from_id.user: + if record.to_id.user_id and record.from_id.user_id: continue - elif record.to_id.user: - res[record.id] = record.to_id.user.id - elif record.from_id.user: - res[record.id] = record.from_id.user.id + elif record.to_id.user_id: + res[record.id] = record.to_id.user_id.id + elif record.from_id.user_id: + res[record.id] = record.from_id.user_id.id return res def _customer(self, cr, uid, ids, name, arg, context=None): @@ -230,11 +230,11 @@ class im_message(osv.osv): res = {} for record in self.browse(cr, uid, ids, context=context): res[record.id] = False - if not not record.to_id.user and not not record.from_id.user: + if not not record.to_id.user_id and not not record.from_id.user_id: continue - elif not not record.to_id.user: + elif not not record.to_id.user_id: res[record.id] = "c2s" - elif not not record.from_id.user: + elif not not record.from_id.user_id: res[record.id] = "s2c" return res diff --git a/addons/im_livechat/im_livechat_view.xml b/addons/im_livechat/im_livechat_view.xml index f684fd561fc..65401f3b88f 100644 --- a/addons/im_livechat/im_livechat_view.xml +++ b/addons/im_livechat/im_livechat_view.xml @@ -124,7 +124,7 @@ History im.message list - ["|", ('to_id.user', '=', None), ('from_id.user', '=', None)] + ["|", ('to_id.user_id', '=', None), ('from_id.user_id', '=', None)] diff --git a/addons/im_livechat/security/im_livechat_security.xml b/addons/im_livechat/security/im_livechat_security.xml index 5ad020a8a78..9088d0ed3db 100644 --- a/addons/im_livechat/security/im_livechat_security.xml +++ b/addons/im_livechat/security/im_livechat_security.xml @@ -25,7 +25,7 @@ Live Support Managers can read messages from live support - ["|", ('to_id.user', '=', None), ('from_id.user', '=', None)] + ["|", ('to_id.user_id', '=', None), ('from_id.user_id', '=', None)] diff --git a/addons/l10n_bo/i18n/en_GB.po b/addons/l10n_bo/i18n/en_GB.po new file mode 100644 index 00000000000..615e9846952 --- /dev/null +++ b/addons/l10n_bo/i18n/en_GB.po @@ -0,0 +1,53 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2013-08-23 16:45+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: l10n_ar +#: model:ir.module.module,description:l10n_ar.module_meta_information +msgid "" +"\n" +" Argentinian Accounting : chart of Account\n" +" " +msgstr "" +"\n" +" Argentinian Accounting : chart of Account\n" +" " + +#. module: l10n_ar +#: model:ir.module.module,shortdesc:l10n_ar.module_meta_information +msgid "Argentinian Chart of Account" +msgstr "Argentinian Chart of Account" + +#. module: l10n_ar +#: model:ir.actions.todo,note:l10n_ar.config_call_account_template_in_minimal +msgid "" +"Generate Chart of Accounts from a Chart Template. You will be asked to pass " +"the name of the company, the chart template to follow, the no. of digits to " +"generate the code for your accounts and Bank account, currency to create " +"Journals. Thus,the pure copy of chart Template is generated.\n" +"\tThis is the same wizard that runs from Financial " +"Management/Configuration/Financial Accounting/Financial Accounts/Generate " +"Chart of Accounts from a Chart Template." +msgstr "" +"Generate Chart of Accounts from a Chart Template. You will be asked to pass " +"the name of the company, the chart template to follow, the no. of digits to " +"generate the code for your accounts and Bank account, currency to create " +"Journals. Thus,the pure copy of chart Template is generated.\n" +"\tThis is the same wizard that runs from Financial " +"Management/Configuration/Financial Accounting/Financial Accounts/Generate " +"Chart of Accounts from a Chart Template." diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py index efad6fd6944..fbd193709ac 100644 --- a/addons/lunch/lunch.py +++ b/addons/lunch/lunch.py @@ -35,6 +35,16 @@ class lunch_order(osv.Model): _description = 'Lunch Order' _order = 'date desc' + def name_get(self, cr, uid, ids, context=None): + if not ids: + return [] + res = [] + for elmt in self.browse(cr, uid, ids, context=context): + name = _("Lunch Order") + name = name + ' ' + str(elmt.id) + res.append((elmt.id, name)) + return res + def _price_get(self, cr, uid, ids, name, arg, context=None): """ get and sum the order lines' price diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml index 2f3af2f461d..a2f22d4dd0a 100644 --- a/addons/lunch/lunch_view.xml +++ b/addons/lunch/lunch_view.xml @@ -7,7 +7,7 @@ - + Search @@ -85,6 +85,40 @@ + + + cashmove tree + lunch.cashmove + + + + + + + + + + + + cashmove form + lunch.cashmove + +
+ + + + + + + +
+
+
+ + New Order @@ -111,6 +145,19 @@
+ + + cashmove tree + lunch.cashmove + + + + + + + + + @@ -119,6 +166,7 @@ tree {"search_default_is_mine_group":1} +

Here you can see your cash moves.
A cash moves can be either an expense or a payment. @@ -175,6 +223,7 @@ tree,form {"search_default_group_by_user":1} +

Click to create a new payment. @@ -196,6 +245,7 @@ tree,form {"search_default_is_payment":1} +

Click to create a payment. @@ -389,39 +439,6 @@ - - - cashmove tree - lunch.cashmove - - - - - - - - - - - - cashmove form - lunch.cashmove - -

- - - - - - - -
-
-
- alert tree diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 4e935e4aa88..e1ca797670b 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -40,6 +40,11 @@ () + + + none + + mail.catchall.alias diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index f90baa5a320..bcb66433964 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -679,14 +679,14 @@ class mail_message(osv.Model): - no model, no res_id, I create a private message OR - pid in message_follower_ids if model, res_id OR - mail_notification (parent_id.id, pid) exists, uid has been notified of the parent, OR - - uid have write access on the related document if model, res_id, OR + - uid have write or create access on the related document if model, res_id, OR - otherwise: raise - write: if - author_id == pid, uid is the author, OR - - uid has write access on the related document if model, res_id + - uid has write or create access on the related document if model, res_id - otherwise: raise - unlink: if - - uid has write access on the related document if model, res_id + - uid has write or create access on the related document if model, res_id - otherwise: raise """ def _generate_model_record_ids(msg_val, msg_ids=[]): diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 94e9126f020..ebb7a40c719 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1038,8 +1038,10 @@ class mail_thread(osv.AbstractModel): # text/plain ->
                 body = tools.append_content_to_html(u'', body, preserve=True)
         else:
-            alternative = (message.get_content_type() == 'multipart/alternative')
+            alternative = False
             for part in message.walk():
+                if part.get_content_type() == 'multipart/alternative':
+                    alternative = True
                 if part.get_content_maintype() == 'multipart':
                     continue  # skip container
                 filename = part.get_filename()  # None if normal part
diff --git a/addons/mail/tests/test_mail_features.py b/addons/mail/tests/test_mail_features.py
index ae5555c01ca..e9563e19246 100644
--- a/addons/mail/tests/test_mail_features.py
+++ b/addons/mail/tests/test_mail_features.py
@@ -294,7 +294,7 @@ class test_mail(TestMailBase):
         # Data creation
         # --------------------------------------------------
         # 0 - Update existing users-partners
-        self.res_users.write(cr, uid, [uid], {'email': 'a@a'})
+        self.res_users.write(cr, uid, [uid], {'email': 'a@a', 'notification_email_send': 'comment'})
         self.res_users.write(cr, uid, [self.user_raoul_id], {'email': 'r@r'})
         # 1 - Bert Tartopoils, with email, should receive emails for comments and emails
         p_b_id = self.res_partner.create(cr, uid, {'name': 'Bert Tartopoils', 'email': 'b@b'})
diff --git a/addons/mail/tests/test_mail_gateway.py b/addons/mail/tests/test_mail_gateway.py
index fade38869f1..3fd8ebd3101 100644
--- a/addons/mail/tests/test_mail_gateway.py
+++ b/addons/mail/tests/test_mail_gateway.py
@@ -81,6 +81,67 @@ Please call me as soon as possible this afternoon!
 Sylvie
 """
 
+MAIL_MULTIPART_MIXED = """Return-Path: 
+X-Original-To: raoul@grosbedon.fr
+Delivered-To: raoul@grosbedon.fr
+Received: by mail1.grosbedon.com (Postfix, from userid 10002)
+    id E8166BFACA; Fri, 23 Aug 2013 13:18:01 +0200 (CEST)
+X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.grosbedon.com
+X-Spam-Level: 
+X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
+    HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1
+Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173])
+    by mail1.grosbedon.com (Postfix) with ESMTPS id 9BBD7BFAAA
+    for ; Fri, 23 Aug 2013 13:17:55 +0200 (CEST)
+Received: by mail-ie0-f173.google.com with SMTP id qd12so575130ieb.4
+        for ; Fri, 23 Aug 2013 04:17:54 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+        d=gmail.com; s=20120113;
+        h=mime-version:date:message-id:subject:from:to:content-type;
+        bh=dMNHV52EC7GAa7+9a9tqwT9joy9z+1950J/3A6/M/hU=;
+        b=DGuv0VjegdSrEe36ADC8XZ9Inrb3Iu+3/52Bm+caltddXFH9yewTr0JkCRQaJgMwG9
+         qXTQgP8qu/VFEbCh6scu5ZgU1hknzlNCYr3LT+Ih7dAZVUEHUJdwjzUU1LFV95G2RaCd
+         /Lwff6CibuUvrA+0CBO7IRKW0Sn5j0mukYu8dbaKsm6ou6HqS8Nuj85fcXJfHSHp6Y9u
+         dmE8jBh3fHCHF/nAvU+8aBNSIzl1FGfiBYb2jCoapIuVFitKR4q5cuoodpkH9XqqtOdH
+         DG+YjEyi8L7uvdOfN16eMr7hfUkQei1yQgvGu9/5kXoHg9+Gx6VsZIycn4zoaXTV3Nhn
+         nu4g==
+MIME-Version: 1.0
+X-Received: by 10.50.124.65 with SMTP id mg1mr1144467igb.43.1377256674216;
+ Fri, 23 Aug 2013 04:17:54 -0700 (PDT)
+Received: by 10.43.99.71 with HTTP; Fri, 23 Aug 2013 04:17:54 -0700 (PDT)
+Date: Fri, 23 Aug 2013 13:17:54 +0200
+Message-ID: 
+Subject: Test mail multipart/mixed
+From: =?ISO-8859-1?Q?Raoul Grosbedon=E9e?= 
+To: Followers of ASUSTeK-Joseph-Walters 
+Content-Type: multipart/mixed; boundary=089e01536c4ed4d17204e49b8e96
+
+--089e01536c4ed4d17204e49b8e96
+Content-Type: multipart/alternative; boundary=089e01536c4ed4d16d04e49b8e94
+
+--089e01536c4ed4d16d04e49b8e94
+Content-Type: text/plain; charset=ISO-8859-1
+
+Should create a multipart/mixed: from gmail, *bold*, with attachment.
+
+-- 
+Marcel Boitempoils.
+
+--089e01536c4ed4d16d04e49b8e94
+Content-Type: text/html; charset=ISO-8859-1
+
+
Should create a multipart/mixed: from gmail, bold, with attachment.

--
Marcel Boitempoils.
+ +--089e01536c4ed4d16d04e49b8e94-- +--089e01536c4ed4d17204e49b8e96 +Content-Type: text/plain; charset=US-ASCII; name="test.txt" +Content-Disposition: attachment; filename="test.txt" +Content-Transfer-Encoding: base64 +X-Attachment-Id: f_hkpb27k00 + +dGVzdAo= +--089e01536c4ed4d17204e49b8e96--""" + class TestMailgateway(TestMailBase): @@ -248,6 +309,24 @@ class TestMailgateway(TestMailBase): self.assertEqual(mail.reply_to, 'someone@example.com', 'mail_mail: reply_to should equal the rpely_to given to create') + def test_09_message_parse(self): + """ Testing incoming emails parsing """ + cr, uid = self.cr, self.uid + + res = self.mail_thread.message_parse(cr, uid, MAIL_TEMPLATE_PLAINTEXT) + self.assertIn('Please call me as soon as possible this afternoon!', res.get('body', ''), + 'message_parse: missing text in text/plain body after parsing') + + res = self.mail_thread.message_parse(cr, uid, MAIL_TEMPLATE) + self.assertIn('

Please call me as soon as possible this afternoon!

', res.get('body', ''), + 'message_parse: missing html in multipart/alternative body after parsing') + + res = self.mail_thread.message_parse(cr, uid, MAIL_MULTIPART_MIXED) + self.assertNotIn('Should create a multipart/mixed: from gmail, *bold*, with attachment', res.get('body', ''), + 'message_parse: text version should not be in body after parsing multipart/mixed') + self.assertIn('
Should create a multipart/mixed: from gmail, bold, with attachment.

', res.get('body', ''), + 'message_parse: html version should be in body after parsing multipart/mixed') + @mute_logger('openerp.addons.mail.mail_thread', 'openerp.osv.orm') def test_10_message_process(self): """ Testing incoming emails processing. """ diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 47abeeaf9a9..65fa21f4709 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -422,6 +422,7 @@ + @@ -511,7 +512,18 @@

- + + product.search.bom + product.product + + + + + + + + + Products product.product @@ -535,16 +547,16 @@ action="mrp_bom_form_action2" id="menu_mrp_bom_form_action2" parent="menu_mrp_configuration" - groups="base.group_no_one" sequence="20"/> Bill of Materials Structure ir.actions.act_window mrp.bom - [('bom_id', '=',active_ids)] + [('id', 'in', active_ids)] tree + tree @@ -692,7 +704,7 @@ - + @@ -708,7 +720,7 @@ - + @@ -722,7 +734,7 @@ - + @@ -1015,6 +1027,7 @@ Bill of Materials [('bom_id','=',False)] mrp.bom + tree {'search_default_product_id': [active_id]} diff --git a/addons/mrp/tests/__init__.py b/addons/mrp/tests/__init__.py new file mode 100644 index 00000000000..39ebd5e451f --- /dev/null +++ b/addons/mrp/tests/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2012-TODAY OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import test_multicompany + +checks = [ + test_multicompany, +] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/tests/test_multicompany.py b/addons/mrp/tests/test_multicompany.py new file mode 100644 index 00000000000..78986bd41b2 --- /dev/null +++ b/addons/mrp/tests/test_multicompany.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2012-TODAY OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.tests import common + + +class TestMrpMulticompany(common.TransactionCase): + + def setUp(self): + super(TestMrpMulticompany, self).setUp() + cr, uid = self.cr, self.uid + + # Usefull models + self.ir_model_data = self.registry('ir.model.data') + self.res_users = self.registry('res.users') + self.stock_location = self.registry('stock.location') + + model, self.multicompany_user_id = self.ir_model_data.get_object_reference(cr, uid, 'stock', 'multicompany_user') + + + def test_00_multicompany_user(self): + """check no error on getting default mrp.production values in multicompany setting""" + cr, uid, context = self.cr, self.multicompany_user_id, {} + fields = ['location_src_id', 'location_dest_id'] + defaults = self.stock_location.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context) + for field in fields: + print field, uid, defaults + if defaults.get(field): + try: + self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) + except Exception, exc: + assert False, "unreadable location %s: %s" % (field, exc) diff --git a/addons/mrp_jit/i18n/en_GB.po b/addons/mrp_jit/i18n/en_GB.po new file mode 100644 index 00000000000..0a2c432a771 --- /dev/null +++ b/addons/mrp_jit/i18n/en_GB.po @@ -0,0 +1,70 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2013-08-23 16:44+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: mrp_jit +#: model:ir.module.module,shortdesc:mrp_jit.module_meta_information +msgid "MRP JIT" +msgstr "MRP JIT" + +#. module: mrp_jit +#: model:ir.module.module,description:mrp_jit.module_meta_information +msgid "" +"\n" +" This module allows Just In Time computation of procurement orders.\n" +"\n" +" If you install this module, you will not have to run the regular " +"procurement \n" +" scheduler anymore (but you still need to run the minimum order point " +"rule \n" +" scheduler, or for example let it run daily.)\n" +" All procurement orders will be processed immediately, which could in " +"some\n" +" cases entail a small performance impact.\n" +"\n" +" It may also increase your stock size because products are reserved as " +"soon\n" +" as possible and the scheduler time range is not taken into account " +"anymore. \n" +" In that case, you can not use priorities any more on the different " +"picking.\n" +" \n" +" \n" +" " +msgstr "" +"\n" +" This module allows Just In Time computation of procurement orders.\n" +"\n" +" If you install this module, you will not have to run the regular " +"procurement \n" +" scheduler anymore (but you still need to run the minimum order point " +"rule \n" +" scheduler, or for example let it run daily.)\n" +" All procurement orders will be processed immediately, which could in " +"some\n" +" cases entail a small performance impact.\n" +"\n" +" It may also increase your stock size because products are reserved as " +"soon\n" +" as possible and the scheduler time range is not taken into account " +"anymore. \n" +" In that case, you can not use priorities any more on the different " +"picking.\n" +" \n" +" \n" +" " diff --git a/addons/note_pad/i18n/en_GB.po b/addons/note_pad/i18n/en_GB.po new file mode 100644 index 00000000000..a94c1103f8b --- /dev/null +++ b/addons/note_pad/i18n/en_GB.po @@ -0,0 +1,28 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-08-23 16:44+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: note_pad +#: model:ir.model,name:note_pad.model_note_note +msgid "Note" +msgstr "Note" + +#. module: note_pad +#: field:note.note,note_pad_url:0 +msgid "Pad Url" +msgstr "Pad URL" diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index e743a9323e4..a6ad5e321dd 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -959,11 +959,12 @@ class pos_order(osv.osv): user_company = user_proxy.browse(cr, order.user_id.id, order.user_id.id).company_id group_tax = {} - account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context).id + account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context) order_account = order.partner_id and \ order.partner_id.property_account_receivable and \ - order.partner_id.property_account_receivable.id or account_def or current_company.account_receivable.id + order.partner_id.property_account_receivable.id or \ + account_def and account_def.id or current_company.account_receivable.id if move_id is None: # Create an entry for the sale diff --git a/addons/portal/portal_demo.xml b/addons/portal/portal_demo.xml index 3660754b4ad..5ec23c0addb 100644 --- a/addons/portal/portal_demo.xml +++ b/addons/portal/portal_demo.xml @@ -8,6 +8,7 @@ demo@portal.example.com + none diff --git a/addons/portal_anonymous/i18n/en_GB.po b/addons/portal_anonymous/i18n/en_GB.po new file mode 100644 index 00000000000..a107e682ba8 --- /dev/null +++ b/addons/portal_anonymous/i18n/en_GB.po @@ -0,0 +1,25 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-08-23 16:44+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: portal_anonymous +#. openerp-web +#: code:addons/portal_anonymous/static/src/xml/portal_anonymous.xml:8 +#, python-format +msgid "Login" +msgstr "Login" diff --git a/addons/portal_claim/i18n/en_GB.po b/addons/portal_claim/i18n/en_GB.po new file mode 100644 index 00000000000..a681c384502 --- /dev/null +++ b/addons/portal_claim/i18n/en_GB.po @@ -0,0 +1,43 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:05+0000\n" +"PO-Revision-Date: 2013-08-23 16:44+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: portal_claim +#: model:ir.actions.act_window,help:portal_claim.crm_case_categ_claim0 +msgid "" +"

\n" +" Click to register a new claim. \n" +"

\n" +" You can track your claims from this menu and the action we\n" +" will take.\n" +"

\n" +" " +msgstr "" +"

\n" +" Click to register a new claim. \n" +"

\n" +" You can track your claims from this menu and the action we\n" +" will take.\n" +"

\n" +" " + +#. module: portal_claim +#: model:ir.actions.act_window,name:portal_claim.crm_case_categ_claim0 +#: model:ir.ui.menu,name:portal_claim.portal_after_sales_claims +msgid "Claims" +msgstr "Claims" diff --git a/addons/portal_project_issue/i18n/en_GB.po b/addons/portal_project_issue/i18n/en_GB.po new file mode 100644 index 00000000000..24d1cae5444 --- /dev/null +++ b/addons/portal_project_issue/i18n/en_GB.po @@ -0,0 +1,47 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:06+0000\n" +"PO-Revision-Date: 2013-08-23 16:46+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: portal_project_issue +#: view:project.issue:0 +msgid "Creation:" +msgstr "Creation:" + +#. module: portal_project_issue +#: model:ir.actions.act_window,help:portal_project_issue.project_issue_categ_act0 +msgid "" +"

\n" +" Click to create an issue.\n" +"

\n" +" You can track your issues from this menu and the action we\n" +" will take.\n" +"

\n" +" " +msgstr "" +"

\n" +" Click to create an issue.\n" +"

\n" +" You can track your issues from this menu and the action we\n" +" will take.\n" +"

\n" +" " + +#. module: portal_project_issue +#: model:ir.actions.act_window,name:portal_project_issue.project_issue_categ_act0 +msgid "Issues" +msgstr "Issues" diff --git a/addons/project/project.py b/addons/project/project.py index db2052224f9..139d007d3ab 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -61,6 +61,13 @@ class project(osv.osv): "mail.alias": "alias_id"} _inherit = ['mail.thread', 'ir.needaction_mixin'] + def _auto_init(self, cr, context=None): + """ Installation hook: aliases, project.project """ + # create aliases for all projects and avoid constraint errors + alias_context = dict(context, alias_model_name='project.task') + self.pool.get('mail.alias').migrate_to_alias(cr, self._name, self._table, super(project, self)._auto_init, + 'project.task', self._columns['alias_id'], 'id', alias_prefix='project+', alias_defaults={'project_id':'id'}, context=alias_context) + def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if user == 1: return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) diff --git a/addons/purchase_analytic_plans/i18n/en_GB.po b/addons/purchase_analytic_plans/i18n/en_GB.po new file mode 100644 index 00000000000..91a197ce900 --- /dev/null +++ b/addons/purchase_analytic_plans/i18n/en_GB.po @@ -0,0 +1,33 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:06+0000\n" +"PO-Revision-Date: 2013-08-23 16:46+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: purchase_analytic_plans +#: field:purchase.order.line,analytics_id:0 +msgid "Analytic Distribution" +msgstr "Analytic Distribution" + +#. module: purchase_analytic_plans +#: model:ir.model,name:purchase_analytic_plans.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Purchase Order Line" + +#. module: purchase_analytic_plans +#: model:ir.model,name:purchase_analytic_plans.model_purchase_order +msgid "Purchase Order" +msgstr "Purchase Order" diff --git a/addons/sale_analytic_plans/i18n/en_GB.po b/addons/sale_analytic_plans/i18n/en_GB.po new file mode 100644 index 00000000000..31605a66d68 --- /dev/null +++ b/addons/sale_analytic_plans/i18n/en_GB.po @@ -0,0 +1,33 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:06+0000\n" +"PO-Revision-Date: 2013-08-23 16:45+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: sale_analytic_plans +#: field:sale.order.line,analytics_id:0 +msgid "Analytic Distribution" +msgstr "Analytic Distribution" + +#. module: sale_analytic_plans +#: model:ir.model,name:sale_analytic_plans.model_sale_order +msgid "Sales Order" +msgstr "Sales Order" + +#. module: sale_analytic_plans +#: model:ir.model,name:sale_analytic_plans.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sales Order Line" diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index 512d124ee0c..603e815fc10 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -21,20 +21,23 @@ import time from openerp.report import report_sxw -from openerp.osv import osv class picking(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(picking, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, - 'get_product_desc':self.get_product_desc + 'get_product_desc': self.get_product_desc, }) - def get_product_desc(self,move_line): + def get_product_desc(self, move_line): desc = move_line.product_id.name if move_line.product_id.default_code: desc = '[' + move_line.product_id.default_code + ']' + ' ' + desc return desc -report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking) +for suffix in ['', '.in', '.out']: + report_sxw.report_sxw('report.stock.picking.list' + suffix, + 'stock.picking' + suffix, + 'addons/stock/report/picking.rml', + parser=picking) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/stock.py b/addons/stock/stock.py index dba506d22ee..7d2a1282cb0 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2930,12 +2930,22 @@ class stock_warehouse(osv.osv): } def _default_lot_input_stock_id(self, cr, uid, context=None): - lot_input_stock = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock') - return lot_input_stock.id + try: + lot_input_stock_model, lot_input_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock') + self.pool.get('stock.location').check_access_rule(cr, uid, [lot_input_stock_id], 'read', context=context) + except (ValueError, orm.except_orm): + # the user does not have read access on the location or it does not exists + lot_input_stock_id = False + return lot_input_stock_id def _default_lot_output_id(self, cr, uid, context=None): - lot_output = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_output') - return lot_output.id + try: + lot_input_stock_model, lot_input_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_output') + self.pool.get('stock.location').check_access_rule(cr, uid, [lot_input_stock_id], 'read', context=context) + except (ValueError, orm.except_orm): + # the user does not have read access on the location or it does not exists + lot_output_id = False + return lot_output_id _defaults = { 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c), diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index eb5a6c46380..94844ee8904 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -287,6 +287,16 @@
+ + multicomp + multicomp + multicomp + + + + + + diff --git a/addons/stock/stock_report.xml b/addons/stock/stock_report.xml index 540e6a8f902..53b89dcf41f 100644 --- a/addons/stock/stock_report.xml +++ b/addons/stock/stock_report.xml @@ -3,8 +3,8 @@ - - + + diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 14b3ba04eb5..8940309dc12 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -161,7 +161,7 @@
- + @@ -786,7 +786,7 @@ - + @@ -921,7 +921,7 @@ - +
@@ -1048,7 +1048,7 @@ - +
diff --git a/addons/stock/tests/__init__.py b/addons/stock/tests/__init__.py new file mode 100644 index 00000000000..39ebd5e451f --- /dev/null +++ b/addons/stock/tests/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2012-TODAY OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import test_multicompany + +checks = [ + test_multicompany, +] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/tests/test_multicompany.py b/addons/stock/tests/test_multicompany.py new file mode 100644 index 00000000000..d30e7d0ef2b --- /dev/null +++ b/addons/stock/tests/test_multicompany.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (c) 2012-TODAY OpenERP S.A. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.tests import common + + +class TestStockMulticompany(common.TransactionCase): + + def setUp(self): + super(TestStockMulticompany, self).setUp() + cr, uid = self.cr, self.uid + + # Usefull models + self.ir_model_data = self.registry('ir.model.data') + self.res_users = self.registry('res.users') + self.stock_location = self.registry('stock.location') + self.stock_move = self.registry('stock.move') + self.stock_fill_inventory = self.registry('stock.fill.inventory') + self.stock_warehouse = self.registry('stock.warehouse') + + model, self.multicompany_user_id = self.ir_model_data.get_object_reference(cr, uid, 'stock', 'multicompany_user') + + def test_00_multicompany_default_stock_move(self): + """check no error on getting default stock.move values in multicompany setting""" + cr, uid, context = self.cr, self.multicompany_user_id, {} + fields = ['location_id', 'location_dest_id'] + for type in ('in', 'internal', 'out'): + context['picking_type'] = type + defaults = self.stock_move.default_get(cr, uid, ['location_id', 'location_dest_id', 'type'], context) + for field in fields: + if defaults.get(field): + try: + self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) + except Exception, exc: + assert False, "unreadable location %s: %s" % (field, exc) + self.assertEqual(defaults['type'], type, "wrong move type") + + + def test_10_multicompany_onchange_move_type(self): + """check onchange_move_type does not return unreadable in multicompany setting""" + cr, uid, context = self.cr, self.multicompany_user_id, {} + fields = ['location_id', 'location_dest_id'] + for type in ('in', 'internal', 'out'): + result = self.stock_move.onchange_move_type(cr, uid, [], type, context)['value'] + for field in fields: + if result.get(field): + try: + self.stock_location.check_access_rule(cr, uid, [result[field]], 'read', context) + except Exception, exc: + assert False, "unreadable location %s: %s" % (field, exc) + + + def test_20_multicompany_default_stock_fill_inventory(self): + """check default location readability for stock_fill_inventory in multicompany setting""" + cr, uid, context = self.cr, self.multicompany_user_id, {} + defaults = self.stock_fill_inventory.default_get(cr, uid, ['location_id'], context) + if defaults.get('location_id'): + try: + self.stock_location.check_access_rule(cr, uid, [defaults['location_id']], 'read', context) + except Exception, exc: + assert False, "unreadable source location: %s" % exc + + + def test_30_multicompany_default_warehouse_location(self): + """check default locations for warehouse in multicompany setting""" + cr, uid, context = self.cr, self.multicompany_user_id, {} + fields = ['lot_input_id', 'lot_stock_id', 'lot_output_id'] + defaults = self.stock_warehouse.default_get(cr, uid, fields, context) + for field in fields: + if defaults.get(field): + try: + self.stock_location.check_access_rule(cr, uid, [defaults[field]], 'read', context) + except Exception, exc: + assert False, "unreadable default %s: %s" % (field, exc) diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py index e3341bd6a80..b367e6069d8 100644 --- a/addons/stock/wizard/stock_fill_inventory.py +++ b/addons/stock/wizard/stock_fill_inventory.py @@ -19,7 +19,7 @@ # ############################################################################## -from openerp.osv import fields, osv +from openerp.osv import fields, osv, orm from openerp.tools.translate import _ class stock_fill_inventory(osv.osv_memory): @@ -28,8 +28,10 @@ class stock_fill_inventory(osv.osv_memory): def _default_location(self, cr, uid, ids, context=None): try: - loc_model, location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock') - except ValueError, e: + location = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock') + location.check_access_rule('read', context=context) + location_id = location.id + except (ValueError, orm.except_orm), e: return False return location_id or False diff --git a/addons/stock_invoice_directly/i18n/en_GB.po b/addons/stock_invoice_directly/i18n/en_GB.po new file mode 100644 index 00000000000..b97e2d4c6a6 --- /dev/null +++ b/addons/stock_invoice_directly/i18n/en_GB.po @@ -0,0 +1,23 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:06+0000\n" +"PO-Revision-Date: 2013-08-23 16:45+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: stock_invoice_directly +#: model:ir.model,name:stock_invoice_directly.model_stock_partial_picking +msgid "Partial Picking Processing Wizard" +msgstr "Partial Picking Processing Wizard" diff --git a/addons/web_shortcuts/i18n/en_GB.po b/addons/web_shortcuts/i18n/en_GB.po new file mode 100644 index 00000000000..f81d0065a68 --- /dev/null +++ b/addons/web_shortcuts/i18n/en_GB.po @@ -0,0 +1,25 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-12-21 17:06+0000\n" +"PO-Revision-Date: 2013-08-23 16:45+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-08-24 05:03+0000\n" +"X-Generator: Launchpad (build 16738)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Add / Remove Shortcut..."