[MERGE]: Merged with addons

bzr revid: atp@tinyerp.com-20130826052312-oxf0719yqy2rjrd8
This commit is contained in:
Atul Patel (OpenERP) 2013-08-26 10:53:12 +05:30
commit 3281f7ed46
40 changed files with 1676 additions and 86 deletions

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: Hungarian <hu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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 ""
"<p>\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"
" </p>\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 ""

View File

@ -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')

View File

@ -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)

View File

@ -955,10 +955,8 @@ class crm_lead(format_address, osv.osv):
"""
if custom_values is None:
custom_values = {}
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'partner_id': msg.get('author_id', False),

90
addons/edi/i18n/en_GB.po Normal file
View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"

View File

@ -351,7 +351,7 @@ class fleet_vehicle(osv.Model):
'fuel_type': fields.selection([('gasoline', 'Gasoline'), ('diesel', 'Diesel'), ('electric', 'Electric'), ('hybrid', 'Hybrid')], 'Fuel Type', help='Fuel Used by the vehicle'),
'horsepower': fields.integer('Horsepower'),
'horsepower_tax': fields.float('Horsepower Taxation'),
'power': fields.integer('Power (kW)', help='Power in kW of the vehicle'),
'power': fields.integer('Power', help='Power in kW of the vehicle'),
'co2': fields.float('CO2 Emissions', help='CO2 emissions of the vehicle'),
'image': fields.related('model_id', 'image', type="binary", string="Logo"),
'image_medium': fields.related('model_id', 'image_medium', type="binary", string="Logo"),
@ -392,9 +392,12 @@ class fleet_vehicle(osv.Model):
}
def create(self, cr, uid, data, context=None):
if not context:
context = {}
context.update({'mail_create_nolog': True})
vehicle_id = super(fleet_vehicle, self).create(cr, uid, data, context=context)
vehicle = self.browse(cr, uid, vehicle_id, context=context)
self.message_post(cr, uid, [vehicle_id], body=_('Vehicle %s has been added to the fleet!') % (vehicle.license_plate), context=context)
self.message_post(cr, uid, [vehicle_id], body=_('%s %s has been added to the fleet!') % (vehicle.model_id.name,vehicle.license_plate), context=context)
return vehicle_id
def write(self, cr, uid, ids, vals, context=None):

View File

@ -13,7 +13,7 @@
<h1>
<field name="modelname" />
</h1>
<label for="brand" class="oe_edit_only"/>
<label for="brand_id" class="oe_edit_only"/>
<h2>
<field name="brand_id" on_change="on_change_brand(brand_id)"/>
</h2>
@ -242,11 +242,17 @@
<group string="Engine Options">
<field name="transmission" />
<field name="fuel_type" />
<field name="co2" />
<label for="co2"/>
<div>
<field name="co2" class="oe_inline"/> g/km
</div>
<field name="horsepower" />
<field name="horsepower_tax" />
<field name="power" />
</group>
<label for="power"/>
<div>
<field name="power" class="oe_inline"/> kW
</div>
</group>
</group>
</sheet>
<div class="oe_chatter">
@ -287,6 +293,10 @@
<field name="location"/>
<field name="state_id" />
<filter name="alert_true" domain="['|',('contract_renewal_due_soon','=',True),('contract_renewal_overdue','=',True)]" string="Has Alert(s)"/>
<group expand="1" string="Group By...">
<filter name="groupby_status" context="{'group_by' : 'state_id'}" string="Status"/>
<filter name="groupby_model" context="{'group_by' : 'model_id'}" string="Model"/>
</group>
</search>
</field>
</record>
@ -400,7 +410,7 @@
<group string="Contract details">
<field name="vehicle_id" on_change="on_change_vehicle(vehicle_id)"/>
<field name="cost_subtype_id" required="1" domain="['|',('category','=','contract'),('category','=','both')]"/>
<field name="amount" string="Activation Cost"/>
<field name="amount" string="Activation Cost" help="Cost that is paid only once at the creation of the contract"/>
<label for="cost_generated"/>
<div>
<field name="cost_generated" class="oe_inline" attrs="{'invisible': [('cost_frequency','=','no')]}" />
@ -440,7 +450,7 @@
</group>
<div class="oe_right"><group><field name="sum_cost" string="Indicative Costs Total"/></group></div>
</page>
<page string="Generated Costs">
<page string="Generated Recurring Costs">
<group>
<field name="generated_cost_ids" context="{'vehicle_id': vehicle_id}" nolabel="1" sum="amount">
<tree version="7.0" editable="bottom" >
@ -704,7 +714,7 @@
<group string="Services Details">
<field name="vehicle_id" on_change="on_change_vehicle(vehicle_id)"/>
<field name="cost_subtype_id" string="Service Type" domain="['|',('category','=','service'),('category','=','both')]" required="1"/>
<field name="amount" string="Price"/>
<field name="amount"/>
</group>
<group string="Odometer Details">
<label for="odometer"/>
@ -726,7 +736,7 @@
<field name="cost_ids" nolabel="1">
<tree string="Included Services" version="7.0" editable="bottom">
<field name="cost_subtype_id" string="Service" domain="[('category','=','service')]"/>
<field name="amount" sum="Price" string="Cost"/>
<field name="amount" sum="Price" string="Indicative Cost"/>
</tree>
</field>
</group>
@ -767,6 +777,17 @@
</field>
</record>
<record model='ir.ui.view' id='fleet_vehicle_log_services_search'>
<field name="name">fleet.vehicle.log.services.search</field>
<field name="model">fleet.vehicle.log.services</field>
<field name="arch" type="xml">
<search string="Services Logs" >
<field name="vehicle_id"/>
<field name="cost_subtype_id"/>
</search>
</field>
</record>
<record model='ir.actions.act_window' id='fleet_vehicle_log_services_act'>
<field name="name">Vehicles Services Logs</field>
<field name="res_model">fleet.vehicle.log.services</field>
@ -789,7 +810,7 @@
<field name="name">fleet.service.type.tree</field>
<field name="model">fleet.service.type</field>
<field name="arch" type="xml">
<tree string="Service types" editable="bottom">
<tree string="Service types" editable="top">
<field name="name" />
<field name="category"/>
</tree>

View File

@ -331,10 +331,8 @@ class hr_applicant(osv.Model):
"""
if custom_values is None: custom_values = {}
val = msg.get('from').split('<')[0]
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'partner_name':val,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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."

View File

@ -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

View File

@ -7,7 +7,7 @@
<menuitem name="Administrate Orders" parent="menu_lunch" id="menu_lunch_admin" sequence="51" groups="group_lunch_manager"/>
<menuitem name="Administrate Cash Moves" parent="menu_lunch" id="menu_lunch_cash" sequence="52" groups="group_lunch_manager"/>
<menuitem name="Configuration" parent="menu_lunch" id="menu_lunch_config" sequence="53" groups="group_lunch_manager"/>
<!--View Search to group/filter by Supplier and time-->
<record model="ir.ui.view" id="lunch_order_line_search_view">
<field name="name">Search</field>
@ -85,6 +85,40 @@
</field>
</record>
<!--view for cashmove-->
<record model="ir.ui.view" id="casmove_tree_view">
<field name="name">cashmove tree</field>
<field name="model">lunch.cashmove</field>
<field name="arch" type="xml">
<tree string="cashmove tree">
<field name="date"/>
<field name="user_id"/>
<field name="description"/>
<field name="amount" sum="Total"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="casmove_form_view">
<field name="name">cashmove form</field>
<field name="model">lunch.cashmove</field>
<field name="arch" type="xml">
<form string="cashmove form" version="7.0">
<sheet>
<group>
<field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'lunch.group_lunch_user']}"/>
<field name="date"/>
<field name="amount"/>
</group>
<label for='description'/>
<field name="description"/>
</sheet>
</form>
</field>
</record>
<!--Action for Your Orders-->
<record model="ir.actions.act_window" id="action_lunch_order_form">
<field name="name">New Order</field>
@ -111,6 +145,19 @@
</field>
</record>
<menuitem name="Previous Orders" parent="menu_lunch_title" id="menu_lunch_order_tree" action="action_lunch_order_tree" sequence="2"/>
<record model="ir.ui.view" id="casmove_tree">
<field name="name">cashmove tree</field>
<field name="model">lunch.cashmove</field>
<field name="arch" type="xml">
<tree string="cashmove tree" version="7.0" create='false'>
<field name="date"/>
<field name="user_id"/>
<field name="description"/>
<field name="amount" sum="Total"/>
</tree>
</field>
</record>
<!--Action for Lunch cashmoves-->
<record model="ir.actions.act_window" id="action_lunch_cashmove_form">
@ -119,6 +166,7 @@
<field name="view_mode">tree</field>
<field name="search_view_id" ref="view_lunch_employee_payment_filter"/>
<field name="context">{"search_default_is_mine_group":1}</field>
<field name="view_id" ref="casmove_tree"/>
<field name="help" type="html">
<p>
Here you can see your cash moves.<br/>A cash moves can be either an expense or a payment.
@ -175,6 +223,7 @@
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_lunch_cashmove_filter"/>
<field name="context">{"search_default_group_by_user":1}</field>
<field name="view_id" ref="casmove_tree_view"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new payment.
@ -196,6 +245,7 @@
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_lunch_employee_payment_filter"/>
<field name="context">{"search_default_is_payment":1}</field>
<field name="view_id" ref="casmove_tree_view"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a payment.
@ -389,39 +439,6 @@
</field>
</record>
<!--view for cashmove-->
<record model="ir.ui.view" id="casmove_tree_view">
<field name="name">cashmove tree</field>
<field name="model">lunch.cashmove</field>
<field name="arch" type="xml">
<tree string="cashmove tree">
<field name="date"/>
<field name="user_id"/>
<field name="description"/>
<field name="amount" sum="Total"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="casmove_form_view">
<field name="name">cashmove form</field>
<field name="model">lunch.cashmove</field>
<field name="arch" type="xml">
<form string="cashmove form" version="7.0">
<sheet>
<group>
<field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'lunch.group_lunch_user']}"/>
<field name="date"/>
<field name="amount"/>
</group>
<label for='description'/>
<field name="description"/>
</sheet>
</form>
</field>
</record>
<!--view for alerts-->
<record model="ir.ui.view" id="alert_tree_view">
<field name="name">alert tree</field>

View File

@ -40,6 +40,11 @@
<field name="args">()</field>
</record>
<!-- Admin should not receivve emails at creation -->
<record id="base.partner_root" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<!-- Catchall Email Alias -->
<record id="icp_mail_catchall_alias" model="ir.config_parameter">
<field name="key">mail.catchall.alias</field>

View File

@ -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=[]):

View File

@ -1038,8 +1038,10 @@ class mail_thread(osv.AbstractModel):
# text/plain -> <pre/>
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

View File

@ -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'})

View File

@ -81,6 +81,67 @@ Please call me as soon as possible this afternoon!
Sylvie
"""
MAIL_MULTIPART_MIXED = """Return-Path: <ignasse.carambar@gmail.com>
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 <raoul@openerp.fr>; Fri, 23 Aug 2013 13:17:55 +0200 (CEST)
Received: by mail-ie0-f173.google.com with SMTP id qd12so575130ieb.4
for <raoul@grosbedon.fr>; 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: <CAP76m_V4BY2F7DWHzwfjteyhW8L2LJswVshtmtVym+LUJ=rASQ@mail.gmail.com>
Subject: Test mail multipart/mixed
From: =?ISO-8859-1?Q?Raoul Grosbedon=E9e?= <ignasse.carambar@gmail.com>
To: Followers of ASUSTeK-Joseph-Walters <raoul@grosbedon.fr>
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
<div dir="ltr">Should create a multipart/mixed: from gmail, <b>bold</b>, with attachment.<br clear="all"><div><br></div>-- <br>Marcel Boitempoils.</div>
--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('<p>Please call me as soon as possible this afternoon!</p>', 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('<div dir="ltr">Should create a multipart/mixed: from gmail, <b>bold</b>, with attachment.<br clear="all"><div><br></div>', 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. """

View File

@ -422,6 +422,7 @@
<field name="arch" type="xml">
<search string="Search Bill Of Material">
<field name="name" string="Bill Of Material" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
<field name="bom_lines" string="Components"/>
<field name="product_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<group expand="0" string="Group By...">
@ -511,7 +512,18 @@
</p>
</field>
</record>
<record id="product_search_form_view_procurment" model="ir.ui.view">
<field name="name">product.search.bom</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_search_form_view"/>
<field name="arch" type="xml">
<xpath expr="//filter[@string='Consumable']" position="after">
<separator/>
<filter string="Components" name="components" icon="terp-accessories-archiver" domain="[('bom_ids','not in',[]),('bom_ids.bom_id','!=',False)]" invisible="not context.get('search_default_filter_supply_method_produce', False)"/>
</xpath>
</field>
</record>
<record id="product_supply_method_produce" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
@ -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"/>
<record id="action2" model="ir.actions.act_window">
<field name="name">Bill of Materials Structure</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.bom</field>
<field name="domain">[('bom_id', '=',active_ids)]</field>
<field name="domain">[('id', 'in', active_ids)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="mrp_bom_tree_view"/>
<field name="view_type">tree</field>
</record>
<record id="ir_BOM_structure" model="ir.values">
<field eval="'client_action_multi'" name="key2"/>
@ -692,7 +704,7 @@
</field>
</group>
<group string="Consumed Products">
<field name="move_lines2" nolabel="1">
<field name="move_lines2" nolabel="1" options="{'reload_on_button': true}">
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1"/>
@ -708,7 +720,7 @@
<page string="Finished Products">
<group>
<group string="Products to Produce">
<field name="move_created_ids" nolabel="1">
<field name="move_created_ids" nolabel="1" options="{'reload_on_button': true}">
<tree string="Products to Finish">
<field name="product_id"/>
<field name="product_qty"/>
@ -722,7 +734,7 @@
</field>
</group>
<group string="Produced Products">
<field name="move_created_ids2" nolabel="1">
<field name="move_created_ids2" nolabel="1" options="{'reload_on_button': true}">
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1"/>
@ -1015,6 +1027,7 @@
<field name="name">Bill of Materials</field>
<field name="domain">[('bom_id','=',False)]</field>
<field name="res_model">mrp.bom</field>
<field name="view_type">tree</field>
</record>
<record id="act_product_mrp_production" model="ir.actions.act_window">
<field name="context">{'search_default_product_id': [active_id]}</field>

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import test_multicompany
checks = [
test_multicompany,
]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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)

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"
" "

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"

View File

@ -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

View File

@ -8,6 +8,7 @@
<field name="email">demo@portal.example.com</field>
<field name="supplier" eval="False"/>
<field name="customer" eval="True"/>
<field name="notification_email_send">none</field>
</record>
<record id="demo_user0" model="res.users">
<field name="partner_id" ref="partner_demo_portal"/>

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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 ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to register a new claim. \n"
" </p><p>\n"
" You can track your claims from this menu and the action we\n"
" will take.\n"
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to register a new claim. \n"
" </p><p>\n"
" You can track your claims from this menu and the action we\n"
" will take.\n"
" </p>\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"

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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 ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to create an issue.\n"
" </p><p>\n"
" You can track your issues from this menu and the action we\n"
" will take.\n"
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to create an issue.\n"
" </p><p>\n"
" You can track your issues from this menu and the action we\n"
" will take.\n"
" </p>\n"
" "
#. module: portal_project_issue
#: model:ir.actions.act_window,name:portal_project_issue.project_issue_categ_act0
msgid "Issues"
msgstr "Issues"

View File

@ -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)

View File

@ -495,21 +495,19 @@ class project_issue(osv.Model):
through message_process.
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
if context is None: context = {}
if custom_values is None:
custom_values = {}
if context is None:
context = {}
context['state_to'] = 'draft'
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
'description': desc,
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'partner_id': msg.get('author_id', False),
'user_id': False,
}
if msg.get('priority'):
if msg.get('priority'):
defaults['priority'] = msg.get('priority')
defaults.update(custom_values)

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"

View File

@ -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:

View File

@ -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),

View File

@ -287,6 +287,16 @@
<field name="company_id" ref="base.main_company"/>
</record>
<record id="multicompany_user" model="res.users">
<field name="name">multicomp</field>
<field name="login">multicomp</field>
<field name="password">multicomp</field>
<field name="company_id" ref="res_company_2"/>
<field name="company_ids" eval="[(6,0,[ref('res_company_2')])]"/>
<field name="groups_id" eval="[(6,0,[ref('base.group_user'), ref('stock.group_stock_manager')])]"/>
</record>
</data>
</openerp>

View File

@ -3,8 +3,8 @@
<data>
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Stock Level Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking Slip" rml="stock/report/picking.rml"/>
<report id="report_picking_list_in" model="stock.picking.in" name="stock.picking.list" string="Receipt Slip" rml="stock/report/picking.rml"/>
<report id="report_picking_list_out" model="stock.picking.out" name="stock.picking.list" string="Delivery Slip" rml="stock/report/picking.rml"/>
<report id="report_picking_list_in" model="stock.picking.in" name="stock.picking.list.in" string="Receipt Slip" rml="stock/report/picking.rml"/>
<report id="report_picking_list_out" model="stock.picking.out" name="stock.picking.list.out" string="Delivery Slip" rml="stock/report/picking.rml"/>
<report id="report_move_labels" model="stock.move" name="stock.move.label" string="Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Inventory Overview" rml="stock/report/lot_overview.rml"/>
<report id="report_location_overview_all" model="stock.location" name="lot.stock.overview_all" string="Location Content" rml="stock/report/lot_overview_all.rml"/>

View File

@ -161,7 +161,7 @@
</field>
</page>
<page string="Posted Inventory">
<field name="move_ids" context="{'inventory_id':active_id}" >
<field name="move_ids" context="{'inventory_id':active_id}" options='{"reload_on_button": true}' >
<tree string="Stock Moves">
<field name="product_id"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
@ -786,7 +786,7 @@
</group>
<notebook>
<page string="Products">
<field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree', 'picking_type': 'internal'}"/>
<field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree', 'picking_type': 'internal'}" options='{"reload_on_button": true}'/>
<field name="note" placeholder="Add an internal note..." class="oe_inline"/>
</page>
<page string="Additional Info">
@ -921,7 +921,7 @@
<field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Customer" domain="[('customer','=',True)]" />
</xpath>
<xpath expr="//field[@name='move_lines']" position="replace">
<field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}"/>
<field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_chatter">
@ -1048,7 +1048,7 @@
<field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Supplier" domain="[('supplier','=',True)]" />
</xpath>
<xpath expr="//field[@name='move_lines']" position="replace">
<field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}"/>
<field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_chatter">

View File

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import test_multicompany
checks = [
test_multicompany,
]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,92 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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)

View File

@ -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

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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"

View File

@ -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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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..."