diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 0fb6af05e58..87e6a66740c 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -221,8 +221,8 @@ class account_invoice(osv.osv):
'type': {
},
'state': {
- 'account.mt_invoice_paid': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'paid' and obj['type'] in ('out_invoice', 'out_refund'),
- 'account.mt_invoice_validated': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open' and obj['type'] in ('out_invoice', 'out_refund'),
+ 'account.mt_invoice_paid': lambda self, cr, uid, obj, ctx=None: obj.state == 'paid' and obj.type in ('out_invoice', 'out_refund'),
+ 'account.mt_invoice_validated': lambda self, cr, uid, obj, ctx=None: obj.state == 'open' and obj.type in ('out_invoice', 'out_refund'),
},
}
_columns = {
diff --git a/addons/account/i18n/ru.po b/addons/account/i18n/ru.po
index da620808a85..e3b3f080365 100644
--- a/addons/account/i18n/ru.po
+++ b/addons/account/i18n/ru.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2013-06-07 12:52+0000\n"
+"PO-Revision-Date: 2013-06-19 11:49+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-06-08 05:52+0000\n"
-"X-Generator: Launchpad (build 16667)\n"
+"X-Launchpad-Export-Date: 2013-06-20 05:17+0000\n"
+"X-Generator: Launchpad (build 16673)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@@ -134,10 +134,10 @@ msgstr ""
#: code:addons/account/account.py:686
#: code:addons/account/account.py:781
#: code:addons/account/account.py:1058
-#: code:addons/account/account_invoice.py:817
#: code:addons/account/account_invoice.py:820
#: code:addons/account/account_invoice.py:823
-#: code:addons/account/account_invoice.py:1542
+#: code:addons/account/account_invoice.py:826
+#: code:addons/account/account_invoice.py:1545
#: code:addons/account/account_move_line.py:98
#: code:addons/account/account_move_line.py:771
#: code:addons/account/account_move_line.py:824
@@ -257,7 +257,8 @@ msgid ""
"entries."
msgstr ""
"Тип счета используется в информационных целях, при создании официальных "
-"отчетов для конкретной страны, определении правил"
+"отчетов для конкретной страны, определении правил закрытия финансового года "
+"и проводок открытия."
#. module: account
#: field:account.config.settings,sale_refund_sequence_next:0
@@ -285,7 +286,7 @@ msgstr "Разрешить списание"
#. module: account
#: view:account.analytic.chart:0
msgid "Select the Period for Analysis"
-msgstr "Выберите период для проведения анализа"
+msgstr "Выберите период для анализа"
#. module: account
#: model:ir.actions.act_window,help:account.action_invoice_tree3
@@ -355,7 +356,7 @@ msgid "Allow multi currencies"
msgstr "Разрешить мульти-валютность"
#. module: account
-#: code:addons/account/account_invoice.py:74
+#: code:addons/account/account_invoice.py:77
#, python-format
msgid "You must define an analytic journal of type '%s'!"
msgstr "Вы должны определить журнал аналитики типа '%s'!"
@@ -757,7 +758,9 @@ msgstr ""
#: selection:account.common.partner.report,result_selection:0
#: selection:account.partner.balance,result_selection:0
#: selection:account.partner.ledger,result_selection:0
+#: report:account.third_party_ledger:0
#: code:addons/account/report/account_partner_balance.py:297
+#: code:addons/account/report/account_partner_ledger.py:272
#, python-format
msgid "Receivable Accounts"
msgstr "Счета к получению"
@@ -797,7 +800,7 @@ msgid "Are you sure you want to create entries?"
msgstr "Вы действительно хотите создать проводки?"
#. module: account
-#: code:addons/account/account_invoice.py:1358
+#: code:addons/account/account_invoice.py:1361
#, python-format
msgid "Invoice partially paid: %s%s of %s%s (%s%s remaining)."
msgstr "Счет частично оплачен: %s%s из %s%s (%s%s остаток)."
@@ -866,7 +869,7 @@ msgid "Type"
msgstr "Тип"
#. module: account
-#: code:addons/account/account_invoice.py:823
+#: code:addons/account/account_invoice.py:826
#, python-format
msgid ""
"Taxes are missing!\n"
@@ -1052,7 +1055,7 @@ msgid "Liability"
msgstr "Обязательства"
#. module: account
-#: code:addons/account/account_invoice.py:896
+#: code:addons/account/account_invoice.py:899
#, python-format
msgid "Please define sequence on the journal related to this invoice."
msgstr "Пожалуйста, определите нумерацию в журнале, связанном с этим счетом."
@@ -1128,8 +1131,8 @@ msgstr "Возможности"
#. module: account
#: code:addons/account/account.py:2346
#: code:addons/account/account_bank_statement.py:424
-#: code:addons/account/account_invoice.py:74
-#: code:addons/account/account_invoice.py:772
+#: code:addons/account/account_invoice.py:77
+#: code:addons/account/account_invoice.py:775
#: code:addons/account/account_move_line.py:195
#, python-format
msgid "No Analytic Journal !"
@@ -1168,7 +1171,7 @@ msgstr "Название счета."
#. module: account
#: field:account.journal,with_last_closing_balance:0
msgid "Opening With Last Closing Balance"
-msgstr ""
+msgstr "Открыть с предыдущим остатком"
#. module: account
#: help:account.tax.code,notprintable:0
@@ -1567,8 +1570,10 @@ msgid "%s (copy)"
msgstr "%s (копия)"
#. module: account
+#: report:account.account.balance:0
#: selection:account.balance.report,display_account:0
#: selection:account.common.account.report,display_account:0
+#: report:account.general.ledger_landscape:0
#: selection:account.partner.balance,display_partner:0
#: selection:account.report.general.ledger,display_account:0
msgid "With balance is not equal to 0"
@@ -1803,7 +1808,7 @@ msgstr ""
#: view:account.invoice:0
#: view:account.invoice.report:0
#: field:account.move.line,invoice:0
-#: code:addons/account/account_invoice.py:1154
+#: code:addons/account/account_invoice.py:1157
#: model:ir.model,name:account.model_account_invoice
#: model:res.request.link,name:account.req_link_invoice
#, python-format
@@ -2029,6 +2034,12 @@ msgid ""
"useful because it enables you to preview at any time the tax that you owe at "
"the start and end of the month or quarter."
msgstr ""
+"Это меню печати налоговой декларации на основе счетов и платежей. Выберите "
+"один или несколько периодов финансового года. Информация, необходимая для "
+"налоговой декларации генерируется автоматически OpenERP из счета (или "
+"платежей, в некоторых странах). Эти данные обновляются в режиме реального "
+"времени. Это очень полезно, потому что позволяет просматривать в любое время "
+"налоги, которые вы должны в начале и в конце месяца или квартала."
#. module: account
#: code:addons/account/account.py:409
@@ -2057,9 +2068,9 @@ msgstr ""
#: code:addons/account/account_bank_statement.py:419
#: code:addons/account/account_cash_statement.py:256
#: code:addons/account/account_cash_statement.py:300
-#: code:addons/account/account_invoice.py:896
-#: code:addons/account/account_invoice.py:930
-#: code:addons/account/account_invoice.py:1121
+#: code:addons/account/account_invoice.py:899
+#: code:addons/account/account_invoice.py:933
+#: code:addons/account/account_invoice.py:1124
#: code:addons/account/account_move_line.py:579
#: code:addons/account/account_move_line.py:828
#: code:addons/account/account_move_line.py:851
@@ -2104,7 +2115,7 @@ msgstr ""
"
\n"
" Вы можете управлять счетом от поставщика в соответствии с\n"
" тем, что вы приобрели. OpenERP также может создавать\n"
-" черновые счета автоматически из заказов на закупку.\n"
+" черновые счета автоматически из заказов закупки.\n"
"
\n"
" "
@@ -2230,7 +2241,7 @@ msgstr "Счет - печать журнала"
#. module: account
#: model:ir.model,name:account.model_product_category
msgid "Product Category"
-msgstr "Категория ТМЦ"
+msgstr "Категория продукции"
#. module: account
#: code:addons/account/account.py:656
@@ -2307,7 +2318,9 @@ msgstr "Управление активами"
#: selection:account.common.partner.report,result_selection:0
#: selection:account.partner.balance,result_selection:0
#: selection:account.partner.ledger,result_selection:0
+#: report:account.third_party_ledger:0
#: code:addons/account/report/account_partner_balance.py:299
+#: code:addons/account/report/account_partner_ledger.py:274
#, python-format
msgid "Payable Accounts"
msgstr "Кредиторская задолженность"
@@ -2600,7 +2613,7 @@ msgstr "Учетный год"
#: help:accounting.report,fiscalyear_id:0
#: help:accounting.report,fiscalyear_id_cmp:0
msgid "Keep empty for all open fiscal year"
-msgstr "Keep empty for all open fiscal year"
+msgstr "Оставьте пустым для всех открытых финансовых лет"
#. module: account
#: code:addons/account/account.py:653
@@ -2623,7 +2636,7 @@ msgid "Create an Account Based on this Template"
msgstr "Создать счет на основе этого шаблона"
#. module: account
-#: code:addons/account/account_invoice.py:930
+#: code:addons/account/account_invoice.py:933
#, python-format
msgid ""
"Cannot create the invoice.\n"
@@ -2896,11 +2909,11 @@ msgstr "Счета"
#. module: account
#: code:addons/account/account.py:3541
#: code:addons/account/account_bank_statement.py:405
-#: code:addons/account/account_invoice.py:504
-#: code:addons/account/account_invoice.py:606
-#: code:addons/account/account_invoice.py:621
-#: code:addons/account/account_invoice.py:629
-#: code:addons/account/account_invoice.py:654
+#: code:addons/account/account_invoice.py:507
+#: code:addons/account/account_invoice.py:609
+#: code:addons/account/account_invoice.py:624
+#: code:addons/account/account_invoice.py:632
+#: code:addons/account/account_invoice.py:657
#: code:addons/account/account_move_line.py:536
#, python-format
msgid "Configuration Error!"
@@ -2932,7 +2945,7 @@ msgstr "Метка"
#. module: account
#: view:res.partner.bank:0
msgid "Accounting Information"
-msgstr "Бухгалтерская информация"
+msgstr "Учетная информация"
#. module: account
#: view:account.tax:0
@@ -3098,6 +3111,8 @@ msgid ""
"Selected invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-"
"Forma' state."
msgstr ""
+"Выбранные счета нельзя подтвердить, так как состояние не \"Черновик\" и не "
+"\"Проформа\""
#. module: account
#: code:addons/account/account.py:1071
@@ -3130,7 +3145,7 @@ msgstr "Журнал продаж"
#. module: account
#: code:addons/account/account.py:2346
-#: code:addons/account/account_invoice.py:772
+#: code:addons/account/account_invoice.py:775
#: code:addons/account/account_move_line.py:195
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
@@ -3299,7 +3314,7 @@ msgid "Fiscal Position"
msgstr "Система налогообложения"
#. module: account
-#: code:addons/account/account_invoice.py:820
+#: code:addons/account/account_invoice.py:823
#, python-format
msgid ""
"Tax base different!\n"
@@ -3464,7 +3479,7 @@ msgstr "Вид"
#. module: account
#: code:addons/account/account.py:3460
-#: code:addons/account/account_bank.py:95
+#: code:addons/account/account_bank.py:94
#, python-format
msgid "BNK"
msgstr "BNK"
@@ -3734,7 +3749,7 @@ msgstr ""
"иметь названия как и у самого документа"
#. module: account
-#: code:addons/account/account_invoice.py:1013
+#: code:addons/account/account_invoice.py:1016
#, python-format
msgid ""
"You cannot create an invoice on a centralized journal. Uncheck the "
@@ -3749,7 +3764,7 @@ msgid "Starting Balance"
msgstr "Начальный баланс"
#. module: account
-#: code:addons/account/account_invoice.py:1462
+#: code:addons/account/account_invoice.py:1465
#, python-format
msgid "No Partner Defined !"
msgstr "Партнер не определен!"
@@ -4040,9 +4055,13 @@ msgid "VAT :"
msgstr "НДС:"
#. module: account
+#: report:account.account.balance:0
#: report:account.central.journal:0
#: view:account.config.settings:0
+#: report:account.general.journal:0
#: report:account.general.ledger:0
+#: report:account.general.ledger_landscape:0
+#: report:account.journal.period.print:0
#: report:account.partner.balance:0
#: report:account.third_party_ledger:0
#: report:account.third_party_ledger_other:0
@@ -4145,8 +4164,10 @@ msgstr ""
"условии оплаты контрагента."
#. module: account
+#: report:account.account.balance:0
#: selection:account.balance.report,display_account:0
#: selection:account.common.account.report,display_account:0
+#: report:account.general.ledger_landscape:0
#: selection:account.report.general.ledger,display_account:0
#: selection:account.tax,type_tax_use:0
#: selection:account.tax.template,type_tax_use:0
@@ -4283,7 +4304,7 @@ msgstr "Открыть счет"
#. module: account
#: field:account.invoice.tax,factor_tax:0
msgid "Multipication factor Tax code"
-msgstr ""
+msgstr "Коэффициент кода налога"
#. module: account
#: field:account.config.settings,complete_tax_set:0
@@ -4409,7 +4430,7 @@ msgid "Consolidated Children"
msgstr "Субсчета"
#. module: account
-#: code:addons/account/account_invoice.py:570
+#: code:addons/account/account_invoice.py:573
#: code:addons/account/wizard/account_invoice_refund.py:146
#, python-format
msgid "Insufficient Data!"
@@ -4592,7 +4613,7 @@ msgstr ""
#: field:account.account,shortcut:0
#: field:account.account.template,shortcut:0
msgid "Shortcut"
-msgstr "Горячая клвиша"
+msgstr "Закладка"
#. module: account
#: view:account.account:0
@@ -4666,6 +4687,8 @@ msgid ""
"Error!\n"
"The duration of the Period(s) is/are invalid."
msgstr ""
+"Ошибка!\n"
+"Не допустимая продолжительность периода."
#. module: account
#: field:account.entries.report,month:0
@@ -4690,8 +4713,8 @@ msgid "Supplier invoice sequence"
msgstr "Нумерация счетов поставщиков"
#. module: account
-#: code:addons/account/account_invoice.py:607
-#: code:addons/account/account_invoice.py:622
+#: code:addons/account/account_invoice.py:610
+#: code:addons/account/account_invoice.py:625
#, python-format
msgid ""
"Cannot find a chart of account, you should create one from Settings\\"
@@ -4826,7 +4849,7 @@ msgstr "Документ из счета или платежа"
msgid ""
"There is currently no company without chart of account. The wizard will "
"therefore not be executed."
-msgstr ""
+msgstr "Не ни одной компании без плана счетов. Мастер не будет запущен."
#. module: account
#: model:ir.actions.act_window,name:account.action_wizard_multi_chart
@@ -4971,7 +4994,7 @@ msgstr ""
"Нельзя создать счет, который имеет родительский счет другой компании."
#. module: account
-#: code:addons/account/account_invoice.py:655
+#: code:addons/account/account_invoice.py:658
#, python-format
msgid ""
"Cannot find any account journal of %s type for this company.\n"
@@ -5019,7 +5042,7 @@ msgstr "Контроль типа"
#. module: account
#: help:account.journal,default_credit_account_id:0
msgid "It acts as a default account for credit amount"
-msgstr "Выступает в качестве счета по умолчанию для сумм по кредиту"
+msgstr "Используется как кредитовый счет по умолчанию"
#. module: account
#: view:cash.box.out:0
@@ -5036,7 +5059,7 @@ msgstr "Отменено"
#. module: account
#: help:account.config.settings,group_proforma_invoices:0
msgid "Allows you to put invoices in pro-forma state."
-msgstr ""
+msgstr "Позволяет устанавливать статус \"Проформа\" для счетов."
#. module: account
#: view:account.journal:0
@@ -5050,6 +5073,7 @@ msgid ""
"It adds the currency column on report if the currency differs from the "
"company currency."
msgstr ""
+"Добавляет колонку валюты в отчет, если валюта отлична от валюты компании."
#. module: account
#: code:addons/account/account.py:3394
@@ -5281,7 +5305,7 @@ msgstr "Проводки журнала для проверки"
#. module: account
#: selection:res.company,tax_calculation_rounding_method:0
msgid "Round Globally"
-msgstr ""
+msgstr "Глобальное округление"
#. module: account
#: view:account.bank.statement:0
@@ -5295,7 +5319,7 @@ msgid "Tax Application"
msgstr "Применение налога"
#. module: account
-#: code:addons/account/account_invoice.py:919
+#: code:addons/account/account_invoice.py:922
#, python-format
msgid ""
"Please verify the price of the invoice !\n"
@@ -5561,7 +5585,7 @@ msgstr ""
#. module: account
#: view:account.invoice:0
msgid "Pro Forma Invoice "
-msgstr "Предварительный счет "
+msgstr "Проформа счета "
#. module: account
#: selection:account.subscription,period_type:0
@@ -5597,7 +5621,7 @@ msgstr "Прибыль и убыток (счет доходов)"
#. module: account
#: field:account.journal,allow_date:0
msgid "Check Date in Period"
-msgstr ""
+msgstr "Проверка даты в периоде"
#. module: account
#: model:ir.ui.menu,name:account.final_accounting_reports
@@ -5622,7 +5646,7 @@ msgid "Compute Code (if type=code)"
msgstr "Вычислить код (если тип=код)"
#. module: account
-#: code:addons/account/account_invoice.py:505
+#: code:addons/account/account_invoice.py:508
#, python-format
msgid ""
"Cannot find a chart of accounts for this company, you should create one."
@@ -5973,7 +5997,7 @@ msgstr "Сумма в валюте"
#. module: account
#: selection:res.company,tax_calculation_rounding_method:0
msgid "Round per Line"
-msgstr ""
+msgstr "Округление каждой позиции"
#. module: account
#: report:account.analytic.account.balance:0
@@ -6063,7 +6087,7 @@ msgstr "Открыть кассу"
#. module: account
#: selection:account.financial.report,style_overwrite:0
msgid "Automatic formatting"
-msgstr ""
+msgstr "Автоматическое форматирование"
#. module: account
#: view:account.move.line.reconcile:0
@@ -6166,7 +6190,7 @@ msgstr "Доход"
#: view:account.config.settings:0
#: view:account.invoice:0
#: view:account.invoice.report:0
-#: code:addons/account/account_invoice.py:387
+#: code:addons/account/account_invoice.py:390
#, python-format
msgid "Supplier"
msgstr "Поставщик"
@@ -6186,7 +6210,7 @@ msgid "Account n°"
msgstr "№ счета"
#. module: account
-#: code:addons/account/account_invoice.py:92
+#: code:addons/account/account_invoice.py:95
#, python-format
msgid "Free Reference"
msgstr "Свободная Ссылка"
@@ -6196,7 +6220,9 @@ msgstr "Свободная Ссылка"
#: selection:account.common.partner.report,result_selection:0
#: selection:account.partner.balance,result_selection:0
#: selection:account.partner.ledger,result_selection:0
+#: report:account.third_party_ledger:0
#: code:addons/account/report/account_partner_balance.py:301
+#: code:addons/account/report/account_partner_ledger.py:276
#, python-format
msgid "Receivable and Payable Accounts"
msgstr "Счета дебиторской и кредиторской задолженности"
@@ -6323,7 +6349,7 @@ msgstr ""
#. module: account
#: field:account.journal,loss_account_id:0
msgid "Loss Account"
-msgstr ""
+msgstr "Счет убытков"
#. module: account
#: field:account.tax,account_collected_id:0
@@ -6501,7 +6527,7 @@ msgid "Models"
msgstr ""
#. module: account
-#: code:addons/account/account_invoice.py:1121
+#: code:addons/account/account_invoice.py:1124
#, python-format
msgid ""
"You cannot cancel an invoice which is partially paid. You need to "
@@ -6673,7 +6699,7 @@ msgid "You cannot create journal items on closed account."
msgstr ""
#. module: account
-#: code:addons/account/account_invoice.py:630
+#: code:addons/account/account_invoice.py:633
#, python-format
msgid "Invoice line account's company and invoice's compnay does not match."
msgstr ""
@@ -6718,7 +6744,7 @@ msgstr "Собственные средства"
#. module: account
#: field:account.journal,internal_account_id:0
msgid "Internal Transfers Account"
-msgstr ""
+msgstr "Счет внутренних переводов"
#. module: account
#: code:addons/account/wizard/pos_box.py:32
@@ -6734,7 +6760,7 @@ msgstr "Процент"
#. module: account
#: selection:account.config.settings,tax_calculation_rounding_method:0
msgid "Round globally"
-msgstr ""
+msgstr "Глобальное округление"
#. module: account
#: selection:account.report.general.ledger,sortby:0
@@ -6825,7 +6851,7 @@ msgstr ""
#: code:addons/account/account.py:1453
#: code:addons/account/account.py:1482
#: code:addons/account/account.py:1489
-#: code:addons/account/account_invoice.py:1012
+#: code:addons/account/account_invoice.py:1015
#: code:addons/account/account_move_line.py:1005
#: code:addons/account/wizard/account_automatic_reconcile.py:148
#: code:addons/account/wizard/account_fiscalyear_close.py:88
@@ -6912,7 +6938,7 @@ msgstr ""
#: report:account.invoice:0
#: selection:account.invoice,type:0
#: selection:account.invoice.report,type:0
-#: code:addons/account/account_invoice.py:1157
+#: code:addons/account/account_invoice.py:1160
#: selection:report.invoice.created,type:0
#, python-format
msgid "Supplier Refund"
@@ -7553,7 +7579,7 @@ msgstr "Для процентных налогов, введите % как чи
#. module: account
#: model:ir.actions.act_window,name:account.action_account_report_tree_hierarchy
msgid "Financial Reports Hierarchy"
-msgstr ""
+msgstr "Структура финансовых отчетов"
#. module: account
#: model:ir.actions.act_window,name:account.act_account_invoice_partner_relation
@@ -7718,7 +7744,7 @@ msgstr ""
#. module: account
#: field:account.config.settings,group_proforma_invoices:0
msgid "Allow pro-forma invoices"
-msgstr ""
+msgstr "Разрешить проформы счетов"
#. module: account
#: view:account.bank.statement:0
@@ -7789,7 +7815,7 @@ msgstr "Журнал счета"
#. module: account
#: field:account.config.settings,tax_calculation_rounding_method:0
msgid "Tax calculation rounding method"
-msgstr ""
+msgstr "Метод округления при расчете налога"
#. module: account
#: model:process.node,name:account.process_node_paidinvoice0
@@ -7912,7 +7938,7 @@ msgstr "Нормальный"
#: model:ir.actions.act_window,name:account.action_email_templates
#: model:ir.ui.menu,name:account.menu_email_templates
msgid "Email Templates"
-msgstr ""
+msgstr "Шаблоны писем"
#. module: account
#: view:account.move.line:0
@@ -7974,7 +8000,7 @@ msgstr "Нет номера части !"
#: view:account.financial.report:0
#: model:ir.ui.menu,name:account.menu_account_report_tree_hierarchy
msgid "Account Reports Hierarchy"
-msgstr ""
+msgstr "Структура отчетов по счетам"
#. module: account
#: help:account.account.template,chart_template_id:0
@@ -8050,6 +8076,8 @@ msgstr "Отмена выбранных счетов"
msgid ""
"This field is used to generate legal reports: profit and loss, balance sheet."
msgstr ""
+"Это поле используется для генерации официальных отчетов: прибыль и убыток, "
+"баланс."
#. module: account
#: selection:account.entries.report,month:0
@@ -8061,7 +8089,7 @@ msgid "May"
msgstr "Май"
#. module: account
-#: code:addons/account/account_invoice.py:817
+#: code:addons/account/account_invoice.py:820
#, python-format
msgid "Global taxes defined, but they are not in invoice lines !"
msgstr ""
@@ -8102,7 +8130,7 @@ msgstr "Провести записи журнала"
#: view:account.config.settings:0
#: view:account.invoice:0
#: view:account.invoice.report:0
-#: code:addons/account/account_invoice.py:385
+#: code:addons/account/account_invoice.py:388
#, python-format
msgid "Customer"
msgstr "Заказчик"
@@ -8303,7 +8331,7 @@ msgstr ""
#. module: account
#: field:res.company,tax_calculation_rounding_method:0
msgid "Tax Calculation Rounding Method"
-msgstr ""
+msgstr "Метод округления при расчете налога"
#. module: account
#: field:account.entries.report,move_line_state:0
@@ -8357,7 +8385,7 @@ msgid "Select a currency to apply on the invoice"
msgstr "Выбрать валюту применяемую в счете"
#. module: account
-#: code:addons/account/account_invoice.py:898
+#: code:addons/account/account_invoice.py:901
#, python-format
msgid "No Invoice Lines !"
msgstr "Нет позиций в счете !"
@@ -8433,7 +8461,7 @@ msgid "Associated Partner"
msgstr "Связанный контрагент"
#. module: account
-#: code:addons/account/account_invoice.py:1462
+#: code:addons/account/account_invoice.py:1465
#, python-format
msgid "You must first select a partner !"
msgstr "Сначала вы должны выбрать партнера !"
@@ -8998,7 +9026,7 @@ msgstr "Вы уверены?"
#. module: account
#: view:account.journal:0
msgid "Accounts Allowed (empty for no control)"
-msgstr "Разрешенные счета (остваьте пустым для снятия проверок)"
+msgstr "Разрешенные счета (оставьте пустым для снятия проверок)"
#. module: account
#: field:account.config.settings,sale_tax_rate:0
@@ -9384,7 +9412,7 @@ msgid "Purchase Tax(%)"
msgstr "Налог на покупку(%)"
#. module: account
-#: code:addons/account/account_invoice.py:898
+#: code:addons/account/account_invoice.py:901
#, python-format
msgid "Please create some invoice lines."
msgstr "Пожалуйста, создайте позиции счета"
@@ -9396,6 +9424,8 @@ msgid ""
"Please check that the field 'Internal Transfers Account' is set on the "
"payment method '%s'."
msgstr ""
+"Пожалуйста, проверьте , что поле \"Счет внутренних переводов\" установлено "
+"для способа оплаты '%s'."
#. module: account
#: field:account.vat.declaration,display_detail:0
@@ -9448,7 +9478,7 @@ msgstr "Конец периода"
#: model:ir.actions.act_window,name:account.action_account_report
#: model:ir.ui.menu,name:account.menu_account_reports
msgid "Financial Reports"
-msgstr ""
+msgstr "Финансовые отчеты"
#. module: account
#: model:account.account.type,name:account.account_type_liability_view1
@@ -9737,6 +9767,7 @@ msgid ""
"This field contains the information related to the numbering of the journal "
"entries of this journal."
msgstr ""
+"Это поле содержит информацию, связанную с нумерацией проводок этого журнала."
#. module: account
#: field:account.invoice,sent:0
@@ -9768,7 +9799,7 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_periodical_processing
msgid "Periodic Processing"
-msgstr ""
+msgstr "Периодическая обработка"
#. module: account
#: view:account.invoice.report:0
@@ -9940,7 +9971,7 @@ msgid "Unreconciled"
msgstr "Не сверенные"
#. module: account
-#: code:addons/account/account_invoice.py:919
+#: code:addons/account/account_invoice.py:922
#, python-format
msgid "Bad total !"
msgstr "Плохой итог !"
@@ -10046,7 +10077,7 @@ msgstr ""
#. module: account
#: field:account.bank.statement.line,name:0
msgid "OBI"
-msgstr ""
+msgstr "Назначение"
#. module: account
#: help:res.partner,property_account_payable:0
@@ -10196,7 +10227,7 @@ msgstr "Апрель"
#. module: account
#: model:account.financial.report,name:account.account_financial_report_profitloss_toreport0
msgid "Profit (Loss) to report"
-msgstr ""
+msgstr "Прибыль (убыток) в отчет"
#. module: account
#: code:addons/account/account_invoice.py:379
@@ -10401,7 +10432,7 @@ msgstr "Всего"
#: code:addons/account/wizard/account_invoice_refund.py:109
#, python-format
msgid "Cannot %s draft/proforma/cancel invoice."
-msgstr ""
+msgstr "Нельзя %s черновик/проформу/закрытый счет."
#. module: account
#: field:account.tax,account_analytic_paid_id:0
@@ -10415,6 +10446,7 @@ msgstr "Открыть для банковской сверки"
#. module: account
#: field:account.account,company_id:0
+#: report:account.account.balance:0
#: field:account.aged.trial.balance,company_id:0
#: field:account.analytic.journal,company_id:0
#: field:account.balance.report,company_id:0
@@ -10430,7 +10462,9 @@ msgstr "Открыть для банковской сверки"
#: field:account.entries.report,company_id:0
#: field:account.fiscal.position,company_id:0
#: field:account.fiscalyear,company_id:0
+#: report:account.general.journal:0
#: field:account.general.journal,company_id:0
+#: report:account.general.ledger_landscape:0
#: field:account.installer,company_id:0
#: field:account.invoice,company_id:0
#: field:account.invoice.line,company_id:0
@@ -10439,6 +10473,7 @@ msgstr "Открыть для банковской сверки"
#: field:account.invoice.tax,company_id:0
#: field:account.journal,company_id:0
#: field:account.journal.period,company_id:0
+#: report:account.journal.period.print:0
#: field:account.model,company_id:0
#: field:account.move,company_id:0
#: field:account.move.line,company_id:0
@@ -10603,7 +10638,7 @@ msgstr "Счета системы налогообложения"
#: view:account.invoice:0
#: selection:account.invoice,type:0
#: selection:account.invoice.report,type:0
-#: code:addons/account/account_invoice.py:1155
+#: code:addons/account/account_invoice.py:1158
#: model:process.process,name:account.process_process_supplierinvoiceprocess0
#: selection:report.invoice.created,type:0
#, python-format
@@ -10692,8 +10727,10 @@ msgid ""
msgstr ""
#. module: account
+#: report:account.account.balance:0
#: selection:account.balance.report,display_account:0
#: selection:account.common.account.report,display_account:0
+#: report:account.general.ledger_landscape:0
#: selection:account.report.general.ledger,display_account:0
msgid "With movements"
msgstr "С движением"
@@ -10789,7 +10826,7 @@ msgid "Entries Sorted by"
msgstr ""
#. module: account
-#: code:addons/account/account_invoice.py:1543
+#: code:addons/account/account_invoice.py:1546
#, python-format
msgid ""
"The selected unit of measure is not compatible with the unit of measure of "
@@ -10870,7 +10907,7 @@ msgstr "Искать счет"
#: report:account.invoice:0
#: view:account.invoice:0
#: view:account.invoice.report:0
-#: code:addons/account/account_invoice.py:1156
+#: code:addons/account/account_invoice.py:1159
#, python-format
msgid "Refund"
msgstr "Возвраты"
@@ -10942,7 +10979,7 @@ msgid "Manual Invoice Taxes"
msgstr ""
#. module: account
-#: code:addons/account/account_invoice.py:570
+#: code:addons/account/account_invoice.py:573
#, python-format
msgid "The payment term of supplier does not have a payment term line."
msgstr ""
@@ -11096,7 +11133,7 @@ msgstr ""
#. module: account
#: selection:account.config.settings,tax_calculation_rounding_method:0
msgid "Round per line"
-msgstr ""
+msgstr "Округление каждой позиции"
#. module: account
#: help:account.move.line,amount_residual_currency:0
diff --git a/addons/account/partner.py b/addons/account/partner.py
index f582da6b765..a7df31b2f32 100644
--- a/addons/account/partner.py
+++ b/addons/account/partner.py
@@ -189,44 +189,34 @@ class res_partner(osv.osv):
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
'debit_limit': fields.float('Payable Limit'),
'property_account_payable': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Account Payable",
- view_load=True,
domain="[('type', '=', 'payable')]",
help="This account will be used instead of the default one as the payable account for the current partner",
required=True),
'property_account_receivable': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Account Receivable",
- view_load=True,
domain="[('type', '=', 'receivable')]",
help="This account will be used instead of the default one as the receivable account for the current partner",
required=True),
'property_account_position': fields.property(
- 'account.fiscal.position',
type='many2one',
relation='account.fiscal.position',
string="Fiscal Position",
- view_load=True,
help="The fiscal position will determine taxes and accounts used for the partner.",
),
'property_payment_term': fields.property(
- 'account.payment.term',
type='many2one',
relation='account.payment.term',
string ='Customer Payment Term',
- view_load=True,
help="This payment term will be used instead of the default one for sale orders and customer invoices"),
'property_supplier_payment_term': fields.property(
- 'account.payment.term',
type='many2one',
relation='account.payment.term',
string ='Supplier Payment Term',
- view_load=True,
help="This payment term will be used instead of the default one for purchase orders and supplier invoices"),
'ref_companies': fields.one2many('res.company', 'partner_id',
'Companies that refers to partner'),
diff --git a/addons/account/product.py b/addons/account/product.py
index 3df3ad9bd17..b7bffee43a9 100644
--- a/addons/account/product.py
+++ b/addons/account/product.py
@@ -25,18 +25,14 @@ class product_category(osv.osv):
_inherit = "product.category"
_columns = {
'property_account_income_categ': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Income Account",
- view_load=True,
help="This account will be used for invoices to value sales."),
'property_account_expense_categ': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
- view_load=True,
help="This account will be used for invoices to value expenses."),
}
@@ -54,18 +50,14 @@ class product_template(osv.osv):
'product_supplier_taxes_rel', 'prod_id', 'tax_id',
'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]),
'property_account_income': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Income Account",
- view_load=True,
help="This account will be used for invoices instead of the default one to value sales for the current product."),
'property_account_expense': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
- view_load=True,
help="This account will be used for invoices instead of the default one to value expenses for the current product."),
}
diff --git a/addons/account_analytic_analysis/i18n/ru.po b/addons/account_analytic_analysis/i18n/ru.po
index 339d425c717..30313796af9 100644
--- a/addons/account_analytic_analysis/i18n/ru.po
+++ b/addons/account_analytic_analysis/i18n/ru.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2013-05-31 07:35+0000\n"
+"PO-Revision-Date: 2013-06-19 13:43+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
-"X-Generator: Launchpad (build 16660)\n"
+"X-Launchpad-Export-Date: 2013-06-20 05:17+0000\n"
+"X-Generator: Launchpad (build 16673)\n"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "No order to invoice, create"
-msgstr ""
+msgstr "Нет заказа для счета, создать"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -39,7 +39,7 @@ msgstr "Остаётся"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts in progress"
-msgstr ""
+msgstr "Незавершенные контракты"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_invoiced_date:0
@@ -88,7 +88,7 @@ msgstr "Дата последнего счета расходов"
#. module: account_analytic_analysis
#: help:account.analytic.account,fix_price_to_invoice:0
msgid "Sum of quotations for this contract."
-msgstr ""
+msgstr "Сумма предложений по этому контракту."
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_invoiced:0
@@ -98,18 +98,18 @@ msgstr "Итого сумма к оплате заказчику для этог
#. module: account_analytic_analysis
#: help:account.analytic.account,timesheet_ca_invoiced:0
msgid "Sum of timesheet lines invoiced for this contract."
-msgstr ""
+msgstr "Сумма позиций табеля выставленная в счет за этот контракт ."
#. module: account_analytic_analysis
-#: code:addons/account_analytic_analysis/account_analytic_analysis.py:466
+#: code:addons/account_analytic_analysis/account_analytic_analysis.py:464
#, python-format
msgid "Sales Order Lines of %s"
-msgstr ""
+msgstr "Позиции заказа продаж %s"
#. module: account_analytic_analysis
#: help:account.analytic.account,revenue_per_hour:0
msgid "Computed using the formula: Invoiced Amount / Total Time"
-msgstr ""
+msgstr "Рассчитанный по формуле: Сумма по счетам / Итоговое время"
#. module: account_analytic_analysis
#: field:account_analytic_analysis.summary.month,account_id:0
@@ -126,7 +126,7 @@ msgstr "Партнёр"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts that are not assigned to an account manager."
-msgstr ""
+msgstr "Контракты, которые не назначены бухгалтеру."
#. module: account_analytic_analysis
#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue
@@ -161,6 +161,7 @@ msgstr "Управляющий счётом"
#: help:account.analytic.account,remaining_hours_to_invoice:0
msgid "Computed using the formula: Maximum Time - Total Invoiced Time"
msgstr ""
+"Рассчитанный по формуле: Максимальное время - Всё время выставленное в счетах"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -170,12 +171,12 @@ msgstr "Ожидается"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts not assigned"
-msgstr ""
+msgstr "Контракты не назначены"
#. module: account_analytic_analysis
#: help:account.analytic.account,theorical_margin:0
msgid "Computed using the formula: Theoretical Revenue - Total Costs"
-msgstr ""
+msgstr "Рассчитанный по формуле: теоретическая выручка - общие издержки"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_invoiced:0
@@ -219,17 +220,17 @@ msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Nothing to invoice, create"
-msgstr ""
+msgstr "Нечего выставить в счете, создать"
#. module: account_analytic_analysis
#: model:res.groups,name:account_analytic_analysis.group_template_required
msgid "Mandatory use of templates in contracts"
-msgstr ""
+msgstr "Обязательное использование шаблонов в контрактах"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
msgid "Total Worked Time"
-msgstr ""
+msgstr "Всё отработанное время"
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin:0
@@ -249,12 +250,12 @@ msgstr "Вычисляется по формуле: (Реальная маржа
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "or view"
-msgstr ""
+msgstr "или вид"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Customer Contracts"
-msgstr ""
+msgstr "Контакты заказчика"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -271,7 +272,7 @@ msgstr "Месяц"
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_all
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_all
msgid "Time & Materials to Invoice"
-msgstr ""
+msgstr "Время и материалы в счет"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@@ -343,9 +344,10 @@ msgstr "К продлению"
#: view:account.analytic.account:0
msgid ""
"A contract in OpenERP is an analytic account having a partner set on it."
-msgstr ""
+msgstr "Контракт в OpenERP это аналитический счет с установленным партнером."
#. module: account_analytic_analysis
+#: view:account.analytic.account:0
#: model:ir.actions.act_window,name:account_analytic_analysis.action_sales_order
msgid "Sales Orders"
msgstr "Заказы продаж"
@@ -412,7 +414,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,revenue_per_hour:0
msgid "Revenue per Time (real)"
-msgstr ""
+msgstr "Выручка за время (реальная)"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue_all
@@ -578,7 +580,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,est_total:0
msgid "Total Estimation"
-msgstr ""
+msgstr "Общая оценка"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_ca:0
diff --git a/addons/account_anglo_saxon/__openerp__.py b/addons/account_anglo_saxon/__openerp__.py
index 7ac4bdbd71e..4fc15bba4f5 100644
--- a/addons/account_anglo_saxon/__openerp__.py
+++ b/addons/account_anglo_saxon/__openerp__.py
@@ -44,7 +44,7 @@ account.""",
'category': 'Accounting & Finance',
'demo': [],
'data': ['product_view.xml'],
- 'test': ['test/anglo_saxon.yml'],
+ 'test': ['test/anglo_saxon.yml', 'test/anglo_saxon_avg_fifo.yml'],
'auto_install': False,
'installable': True,
}
diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py
index f27d9b3ae72..8b31a48b92b 100644
--- a/addons/account_anglo_saxon/invoice.py
+++ b/addons/account_anglo_saxon/invoice.py
@@ -117,21 +117,27 @@ class account_invoice_line(osv.osv):
for line in res:
if a == line['account_id'] and i_line.product_id.id == line['product_id']:
uom = i_line.product_id.uos_id or i_line.product_id.uom_id
- standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)
- if standard_price != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc:
- price_diff = i_line.price_unit - standard_price
- line.update({'price':standard_price * line['quantity']})
+ valuation_price_unit = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)
+ if i_line.product_id.cost_method != 'standard' and i_line.purchase_line_id:
+ #for average/fifo/lifo costing method, fetch real cost price from incomming moves
+ stock_move_obj = self.pool.get('stock.move')
+ valuation_stock_move = stock_move_obj.search(cr, uid, [('purchase_line_id', '=', i_line.purchase_line_id.id)], limit=1, context=context)
+ if valuation_stock_move:
+ valuation_price_unit = stock_move_obj.browse(cr, uid, valuation_stock_move[0], context=context).price_unit
+ if valuation_price_unit != i_line.price_unit and line['price_unit'] == i_line.price_unit and acc:
+ price_diff = i_line.price_unit - valuation_price_unit
+ line.update({'price': valuation_price_unit * line['quantity']})
diff_res.append({
- 'type':'src',
+ 'type': 'src',
'name': i_line.name[:64],
- 'price_unit':price_diff,
- 'quantity':line['quantity'],
+ 'price_unit': price_diff,
+ 'quantity': line['quantity'],
'price': price_diff * line['quantity'],
- 'account_id':acc,
- 'product_id':line['product_id'],
- 'uos_id':line['uos_id'],
- 'account_analytic_id':line['account_analytic_id'],
- 'taxes':line.get('taxes',[]),
+ 'account_id': acc,
+ 'product_id': line['product_id'],
+ 'uos_id': line['uos_id'],
+ 'account_analytic_id': line['account_analytic_id'],
+ 'taxes': line.get('taxes', []),
})
res += diff_res
return res
diff --git a/addons/account_anglo_saxon/product.py b/addons/account_anglo_saxon/product.py
index b52d9ed3bbd..1c9e8ee3673 100644
--- a/addons/account_anglo_saxon/product.py
+++ b/addons/account_anglo_saxon/product.py
@@ -24,27 +24,21 @@ class product_category(osv.osv):
_inherit = "product.category"
_columns = {
'property_account_creditor_price_difference_categ': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Price Difference Account",
- view_load=True,
help="This account will be used to value price difference between purchase price and cost price."),
#Redefine fields to change help text for anglo saxon methodology.
'property_account_income_categ': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Income Account",
- view_load=True,
help="This account will be used to value outgoing stock using sale price."),
'property_account_expense_categ': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
- view_load=True,
help="This account will be used to value outgoing stock using cost price."),
}
@@ -53,27 +47,21 @@ class product_template(osv.osv):
_inherit = "product.template"
_columns = {
'property_account_creditor_price_difference': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Price Difference Account",
- view_load=True,
help="This account will be used to value price difference between purchase price and cost price."),
#Redefine fields to change help text for anglo saxon methodology.
'property_account_income': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Income Account",
- view_load=True,
help="This account will be used to value outgoing stock using sale price."),
'property_account_expense': fields.property(
- 'account.account',
type='many2one',
relation='account.account',
string="Expense Account",
- view_load=True,
help="This account will be used to value outgoing stock using cost price."),
}
diff --git a/addons/account_anglo_saxon/purchase.py b/addons/account_anglo_saxon/purchase.py
index c10a2a97d80..fc36dab41c2 100644
--- a/addons/account_anglo_saxon/purchase.py
+++ b/addons/account_anglo_saxon/purchase.py
@@ -26,16 +26,15 @@ class purchase_order(osv.osv):
_inherit = "purchase.order"
_description = "Purchase Order"
- def _prepare_inv_line(self, cr, uid, account_id, order_line, context=None):
- line = super(purchase_order, self)._prepare_inv_line(cr, uid, account_id, order_line, context=context)
+ def _choose_account_from_po_line(self, cr, uid, order_line, context=None):
+ account_id = super(purchase_order, self)._choose_account_from_po_line(cr, uid, order_line, context=context)
if order_line.product_id and not order_line.product_id.type == 'service':
acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id
if not acc_id:
acc_id = order_line.product_id.categ_id.property_stock_account_input_categ and order_line.product_id.categ_id.property_stock_account_input_categ.id
if acc_id:
fpos = order_line.order_id.fiscal_position or False
- new_account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
- line.update({'account_id': new_account_id})
- return line
+ account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, acc_id)
+ return account_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_anglo_saxon/test/anglo_saxon.yml b/addons/account_anglo_saxon/test/anglo_saxon.yml
index 9e46aa52b12..6e9ebc0068e 100644
--- a/addons/account_anglo_saxon/test/anglo_saxon.yml
+++ b/addons/account_anglo_saxon/test/anglo_saxon.yml
@@ -109,7 +109,7 @@
-
!record {model: purchase.order, id: purchase_order_001}:
partner_id: base.res_partner_3
- location_id: stock.stock_location_3
+ location_id: stock.stock_location_stock
pricelist_id: 1
order_line:
- product_id: product.product_product_3
@@ -128,12 +128,12 @@
partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
self.do_partial(cr, uid, [partial_id])
-
- I check the Stock Interim account (Received) is credit successfully.
+ I check the Stock Interim account (Received) is credited successfully.
-
!assert {model: account.account, id : account_anglo_stock_input, string : Stock Interim account (Received) is not credited successfully.}:
- credit == 9
-
- I check the Stock valuation account is debit sucessfully.
+ I check the Stock valuation account is debited sucessfully.
-
!assert {model: account.account, id : account_anglo_stock_valuation, string : Stock valuation account is not debited successfully.}:
- debit == 9
@@ -192,7 +192,7 @@
invoice_state: 2binvoiced
move_lines:
- company_id: base.main_company
- location_id: stock.stock_location_3
+ location_id: stock.stock_location_stock
product_id: product.product_product_3
product_qty: 1.0
product_uom: product.product_uom_unit
diff --git a/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml b/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml
new file mode 100644
index 00000000000..f7d52f4f5a8
--- /dev/null
+++ b/addons/account_anglo_saxon/test/anglo_saxon_avg_fifo.yml
@@ -0,0 +1,304 @@
+-
+ In order to test anglo_saxon Configure Different Accounts.
+-
+ !record {model: account.account, id: account_anglo_stock_valuation_fifo}:
+ code: X3000f
+ name: Stock Valuation Account- (test)
+ parent_id: account.cas
+ type: other
+ user_type: account.data_account_type_asset
+-
+ Configure Stock Interim account (Received).
+-
+ !record {model: account.account, id: account_anglo_stock_input_fifo}:
+ code: X2800f
+ name: Stock Interim account (Received)
+ parent_id: account.cos
+ type: other
+ user_type: account.data_account_type_expense
+-
+ Configure Stock Interim account (Delivered).
+-
+ !record {model: account.account, id: account_anglo_stock_output_fifo}:
+ code: X2801f
+ name: Stock Interim account (Delivered)
+ parent_id: account.rev
+ type: other
+ user_type: account.data_account_type_income
+-
+ Configure Price difference creditor Account.
+-
+ !record {model: account.account, id: account_anglo_price_difference_fifo}:
+ code: X7095f
+ name: Price difference creditor Account
+ parent_id: account.cos
+ type: other
+ user_type: account.data_account_type_expense
+-
+ Configure Cash Bank Account.
+-
+ !record {model: account.account, id: account_anglo_cash_fifo}:
+ code: X5000f
+ name: Cash/Bank Account
+ parent_id: account.cash
+ type: other
+ user_type: account.data_account_type_asset
+-
+ Configure Creditor Account Payable.
+-
+ !record {model: account.account, id: account_anglo_payable_fifo}:
+ code: X440001f
+ name: Creditor Account Payable
+ parent_id: account.a_pay
+ type: other
+ user_type: account.data_account_type_payable
+-
+ Configure Debtor Account Receivable.
+-
+ !record {model: account.account, id: account_anglo_receivable_fifo}:
+ code: X400001f
+ name: Debtor Account Receivable
+ parent_id: account.a_recv
+ type: other
+ user_type: account.data_account_type_receivable
+-
+ Configure Cost of Good sale Account.
+-
+ !record {model: account.account, id: account_anglo_cogs_fifo}:
+ code: X7000f
+ name: Cost of goods sale account
+ parent_id: account.o_expense
+ type: other
+ user_type: account.data_account_type_expense
+-
+ Configure Income Account.
+-
+ !record {model: account.account, id: account_anglo_income_fifo}:
+ code: X8000f
+ name: Income Account
+ parent_id: account.o_income
+ type: other
+ user_type: account.data_account_type_income
+-
+ I configure the account receivable of supplier
+-
+ !record {model: res.partner, id: base.res_partner_3}:
+ property_account_payable: account_anglo_payable_fifo
+ property_account_receivable: account_anglo_receivable_fifo
+-
+ I configure the account receivable of Customer.
+-
+ !record {model: res.partner, id: base.res_partner_13}:
+ property_account_payable: account_anglo_payable_fifo
+ property_account_receivable: account_anglo_receivable_fifo
+-
+ I configure the product category with stock valuation account.
+-
+ !record {model: product.category, id: product.product_category_4}:
+ property_stock_valuation_account_id: account_anglo_stock_valuation_fifo
+-
+ I create a product with required accounts, and cost method average (but same applies for fifo)
+-
+ !record {model: product.product, id: product_fifo_anglo_saxon}:
+ name: 'FIFO product for anglo saxon tests'
+ list_price: 20.00
+ standard_price: 0
+ categ_id: product.product_category_4
+ valuation: 'real_time'
+ property_account_income: account_anglo_income_fifo
+ property_account_expense: account_anglo_cogs_fifo
+ property_account_creditor_price_difference: account_anglo_price_difference_fifo
+ property_stock_account_input: account_anglo_stock_input_fifo
+ property_stock_account_output: account_anglo_stock_output_fifo
+ cost_method: 'average'
+-
+ I create a draft Purchase Order.
+-
+ !record {model: purchase.order, id: purchase_order_001_fifo}:
+ partner_id: base.res_partner_3
+ location_id: stock.stock_location_stock
+ pricelist_id: 1
+ order_line:
+ - product_id: product_fifo_anglo_saxon
+ product_qty: 1
+ price_unit: 9
+ date_planned: '2013-08-31'
+ taxes_id: []
+-
+ I confirm the purchase order.
+-
+ !workflow {model: purchase.order, ref: purchase_order_001_fifo, action: purchase_confirm}
+-
+ Reception is ready for process so now done the reception.
+-
+ !python {model: stock.partial.picking}: |
+ pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001_fifo")).picking_ids
+ partial_id = self.create(cr, uid, {},context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
+ self.do_partial(cr, uid, [partial_id])
+-
+ I check the Stock Interim account (Received) is credit successfully.
+-
+ !assert {model: account.account, id : account_anglo_stock_input_fifo, string : Stock Interim account (Received) is not credited successfully.}:
+ - credit == 9
+-
+ I check the Stock valuation account is debit sucessfully.
+-
+ !assert {model: account.account, id : account_anglo_stock_valuation_fifo, string : Stock valuation account is not debited successfully.}:
+ - debit == 9
+-
+ I Validate Invoice of Purchase Order after having changed the price to 10.
+-
+ !python {model: purchase.order}: |
+ invoice_ids = [x.id for x in self.browse(cr, uid, ref("purchase_order_001_fifo")).invoice_ids]
+ line_ids = self.pool.get('account.invoice.line').search(cr, uid, [('invoice_id', 'in', invoice_ids)])
+ self.pool.get('account.invoice.line').write(cr, uid, line_ids, {'price_unit': 10})
+ self.pool.get('account.invoice').signal_invoice_open(cr, uid, invoice_ids)
+-
+ I check the Stock Interim account (Received) is debited sucessfully when Invoice validated.
+-
+ !assert {model: account.account, id : account_anglo_stock_input_fifo, string : Stock Interim account (Received) is not debited successfully.}:
+ - debit == 9
+-
+ I check the Price difference creditor Account is debited sucessfully when Invoice validated.
+-
+ !assert {model: account.account, id : account_anglo_price_difference_fifo, string : Price difference creditor Account is not debited successfully.}:
+ - debit == 1
+-
+ I check Payable(creditor) Account is Credited sucessfully when Invoice validated.
+-
+ !assert {model: account.account, id : account_anglo_payable_fifo, string : Payable(creditor) Account is not Credited successfully.}:
+ - credit == 10
+-
+ I pay the invoice.
+-
+ !python {model: purchase.order}: |
+ invoice_ids = self.browse(cr, uid, ref("purchase_order_001_fifo")).invoice_ids
+ order = self.browse(cr, uid, ref("purchase_order_001_fifo"))
+ journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', order.company_id.id)], limit=1)
+ for invoice in invoice_ids:
+ invoice.pay_and_reconcile(invoice.amount_total, ref('account_anglo_cash_fifo'), ref('account.period_8'), journal_ids[0], ref('account_anglo_cash_fifo'), ref('account.period_8'), journal_ids[0], name='test')
+-
+ I check Payable(Creditors) Account is Debited sucessfully after invoice paid.
+-
+ !assert {model: account.account, id : account_anglo_payable_fifo, string : Payable(Creditors) Account is not Debited successfully.}:
+ - debit == 10
+-
+ I check Bank/Cash account is credited sucessfully after invoice paid.
+-
+ !assert {model: account.account, id : account_anglo_cash_fifo, string: Bank/Cash account is not credited successfully.}:
+ - credit == 10
+-
+ I create an Outgoing Picking order
+-
+ !record {model: stock.picking, id: stock_picking_out001_fifo}:
+ partner_id: base.res_partner_13
+ invoice_state: 2binvoiced
+ move_lines:
+ - company_id: base.main_company
+ location_id: stock.stock_location_stock
+ product_id: product_fifo_anglo_saxon
+ product_qty: 1.0
+ location_dest_id: stock.stock_location_customers
+ move_type: direct
+ type: out
+-
+ I need to check the availability of the product, So I make my picking order for processing later.
+-
+ !python {model: stock.picking}: |
+ self.draft_force_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available":
+ 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
+ "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
+ })
+-
+ I check the product availability, Product is available in the stock and ready to be sent.
+-
+ !python {model: stock.picking}: |
+ self.action_assign(cr, uid, [ref("stock_picking_out001_fifo")], {"lang": "en_US", "search_default_available":
+ 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner",
+ "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"),
+ })
+-
+ I process the delivery.
+-
+ !python {model: stock.partial.picking}: |
+ partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001_fifo')]})
+ self.do_partial(cr, uid, [partial_id])
+-
+ I check Stock Interim account (Delivery) is debited successfully.
+-
+ !assert {model: account.account, id : account_anglo_stock_output_fifo, string : Stock Interim account (Delivery) is not debited successfully.}:
+ - debit == 9
+-
+ I check the Stock valuation account is credited sucessfully.
+-
+ !assert {model: account.account, id : account_anglo_stock_valuation_fifo, string : Stock valuation account is not credited successfully.}:
+ - credit == 9
+-
+ As the Invoice state of the picking order is To be invoiced. I create invoice for my outgoing picking order.
+-
+ !python {model: stock.invoice.onshipping}: |
+ wiz_id = self.create(cr, uid, {'invoice_date': '2013-03-04', 'journal_id': ref('account.sales_journal')},
+ {'active_ids': [ref("stock_picking_out001_fifo")], "active_model": "stock.picking"})
+ self.create_invoice(cr, uid, [wiz_id], {"lang": "en_US",
+ "search_default_available": 1, "tz": False, "active_model": "stock.picking",
+ "contact_display": "partner", "active_ids": [ref("stock_picking_out001_fifo")], "active_id": ref("stock_picking_out001_fifo")})
+-
+ I check that the customer invoice is created successfully.
+-
+ !python {model: account.invoice}: |
+ partner_id = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).partner_id.id
+ inv_ids = self.search(cr, uid, [('type','=','out_invoice'),('partner_id','=',partner_id)])
+ assert inv_ids, 'No Invoice is generated!'
+-
+ I open the Invoice.
+-
+ !python {model: stock.picking}: |
+ move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).name
+ account_invoice = self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
+ account_invoice_line = self.pool.get('account.invoice.line').search(cr, uid, [('invoice_id', 'in', account_invoice)])
+ self.pool.get('account.invoice.line').write(cr, uid, account_invoice_line, {'invoice_line_tax_id': [(6, 0, [])]})
+ self.pool.get('account.invoice').button_reset_taxes(cr, uid, account_invoice)
+ self.pool.get('account.invoice').signal_invoice_open(cr, uid, account_invoice)
+-
+ I check Income Account is Credited sucessfully when Invoice validated.
+-
+ !assert {model: account.account, id : account_anglo_income_fifo, string : Income Account is not Credited successfully.}:
+ - credit == 20
+-
+ I check Cost of goods sold account for debit.
+-
+ !assert {model: account.account, id : account_anglo_cogs_fifo, string : Cost of goods sale is not Debited successfully.}:
+ - debit == 9
+-
+ I check Stock Interim account (Delivery)
+-
+ !assert {model: account.account, id : account_anglo_stock_output_fifo, string : Stock Interim account (Delivery) is not credited successfully.}:
+ - credit == 9
+-
+ I check Receivable(Debtor) Account for debit.
+-
+ !assert {model: account.account, id : account_anglo_receivable_fifo, string : Receivable(Debtors) Account is not Debited successfully.}:
+ - debit == 20
+-
+ I pay the invoice.
+-
+ !python {model: account.invoice}: |
+ move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001_fifo')).name
+ account_invoice= self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
+ journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')], limit=1)
+ pay = self.pay_and_reconcile(cr, uid, account_invoice,
+ 20.0, ref('account_anglo_cash_fifo'), ref('account.period_8'),
+ journal_ids[0], ref('account_anglo_cash_fifo'),
+ ref('account.period_8'), journal_ids[0],
+ name='Payment for test customer invoice')
+ assert (pay == True), "Incorrect Payment."
+-
+ I check Receivable(Debtor) Account for credit.
+-
+ !assert {model: account.account, id : account_anglo_receivable_fifo, string : Receivable(Debtors) Account is not Credited successfully.}:
+ - credit == 20
+-
+ I check Bank/Cash account is debited sucessfully after invoice paid.
+-
+ !assert {model: account.account, id : account_anglo_cash_fifo, string: Bank/Cash account is not successfully credited.}:
+ - debit == 20
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index ce79c4d5ffb..df852181709 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -33,9 +33,9 @@ class account_analytic_account(osv.osv):
_description = 'Analytic Account'
_track = {
'state': {
- 'analytic.mt_account_pending': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'pending',
- 'analytic.mt_account_closed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'close',
- 'analytic.mt_account_opened': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'open',
+ 'analytic.mt_account_pending': lambda self, cr, uid, obj, ctx=None: obj.state == 'pending',
+ 'analytic.mt_account_closed': lambda self, cr, uid, obj, ctx=None: obj.state == 'close',
+ 'analytic.mt_account_opened': lambda self, cr, uid, obj, ctx=None: obj.state == 'open',
},
}
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index 62eb2e812cc..35a06871696 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -7,7 +7,8 @@ from werkzeug.exceptions import BadRequest
import openerp
from openerp import SUPERUSER_ID
-import openerp.addons.web.http as oeweb
+import openerp.addons.web.http as http
+from openerp.addons.web.http import request
from openerp.addons.web.controllers.main import db_monodb, set_cookie_and_redirect, login_and_redirect
from openerp.modules.registry import RegistryManager
@@ -18,7 +19,7 @@ _logger = logging.getLogger(__name__)
#----------------------------------------------------------
def fragment_to_query_string(func):
@functools.wraps(func)
- def wrapper(self, req, **kw):
+ def wrapper(self, **kw):
if not kw:
return """"""
- return func(self, req, **kw)
+ return func(self, **kw)
return wrapper
#----------------------------------------------------------
# Controller
#----------------------------------------------------------
-class OAuthController(oeweb.Controller):
- _cp_path = '/auth_oauth'
+class OAuthController(http.Controller):
- @oeweb.jsonrequest
- def list_providers(self, req, dbname):
+ @http.route('/auth_oauth/list_providers', type='json', auth='none')
+ def list_providers(self, dbname):
try:
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
@@ -51,9 +51,9 @@ class OAuthController(oeweb.Controller):
l = []
return l
- @oeweb.httprequest
+ @http.route('/auth_oauth/signin', type='http', auth='none')
@fragment_to_query_string
- def signin(self, req, **kw):
+ def signin(self, **kw):
state = simplejson.loads(kw['state'])
dbname = state['d']
provider = state['p']
@@ -71,7 +71,7 @@ class OAuthController(oeweb.Controller):
url = '/#action=%s' % action
elif menu:
url = '/#menu_id=%s' % menu
- return login_and_redirect(req, *credentials, redirect_url=url)
+ return login_and_redirect(*credentials, redirect_url=url)
except AttributeError:
# auth_signup is not installed
_logger.error("auth_signup not installed on database %s: oauth sign up cancelled." % (dbname,))
@@ -88,14 +88,14 @@ class OAuthController(oeweb.Controller):
_logger.exception("OAuth2: %s" % str(e))
url = "/#action=login&oauth_error=2"
- return set_cookie_and_redirect(req, url)
+ return set_cookie_and_redirect(url)
- @oeweb.httprequest
- def oea(self, req, **kw):
+ @http.route('/auth_oauth/oea', type='http', auth='none')
+ def oea(self, **kw):
"""login user via OpenERP Account provider"""
dbname = kw.pop('db', None)
if not dbname:
- dbname = db_monodb(req)
+ dbname = db_monodb()
if not dbname:
return BadRequest()
@@ -105,7 +105,7 @@ class OAuthController(oeweb.Controller):
try:
model, provider_id = IMD.get_object_reference(cr, SUPERUSER_ID, 'auth_oauth', 'provider_openerp')
except ValueError:
- return set_cookie_and_redirect(req, '/?db=%s' % dbname)
+ return set_cookie_and_redirect('/?db=%s' % dbname)
assert model == 'auth.oauth.provider'
state = {
@@ -115,6 +115,6 @@ class OAuthController(oeweb.Controller):
}
kw['state'] = simplejson.dumps(state)
- return self.signin(req, **kw)
+ return self.signin(**kw)
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/auth_openid/controllers/main.py b/addons/auth_openid/controllers/main.py
index 1fcc34c82a0..a4ef1bfa07b 100644
--- a/addons/auth_openid/controllers/main.py
+++ b/addons/auth_openid/controllers/main.py
@@ -38,6 +38,8 @@ import openerp
from openerp import SUPERUSER_ID
from openerp.modules.registry import RegistryManager
from openerp.addons.web.controllers.main import login_and_redirect, set_cookie_and_redirect
+import openerp.addons.web.http as http
+from openerp.addons.web.http import request
from .. import utils
@@ -88,20 +90,19 @@ class GoogleAppsAwareConsumer(consumer.GenericConsumer):
return super(GoogleAppsAwareConsumer, self).complete(message, endpoint, return_to)
-class OpenIDController(openerp.addons.web.http.Controller):
- _cp_path = '/auth_openid/login'
+class OpenIDController(http.Controller):
_store = filestore.FileOpenIDStore(_storedir)
_REQUIRED_ATTRIBUTES = ['email']
_OPTIONAL_ATTRIBUTES = 'nickname fullname postcode country language timezone'.split()
- def _add_extensions(self, request):
- """Add extensions to the request"""
+ def _add_extensions(self, oidrequest):
+ """Add extensions to the oidrequest"""
sreg_request = sreg.SRegRequest(required=self._REQUIRED_ATTRIBUTES,
optional=self._OPTIONAL_ATTRIBUTES)
- request.addExtension(sreg_request)
+ oidrequest.addExtension(sreg_request)
ax_request = ax.FetchRequest()
for alias in self._REQUIRED_ATTRIBUTES:
@@ -111,7 +112,7 @@ class OpenIDController(openerp.addons.web.http.Controller):
uri = utils.SREG2AX[alias]
ax_request.add(ax.AttrInfo(uri, required=False, alias=alias))
- request.addExtension(ax_request)
+ oidrequest.addExtension(ax_request)
def _get_attributes_from_success_response(self, success_response):
attrs = {}
@@ -133,58 +134,58 @@ class OpenIDController(openerp.addons.web.http.Controller):
attrs[attr] = value
return attrs
- def _get_realm(self, req):
- return req.httprequest.host_url
+ def _get_realm(self):
+ return request.httprequest.host_url
- @openerp.addons.web.http.httprequest
- def verify_direct(self, req, db, url):
- result = self._verify(req, db, url)
+ @http.route('/auth_openid/login/verify_direct', type='http', auth='none')
+ def verify_direct(self, db, url):
+ result = self._verify(db, url)
if 'error' in result:
return werkzeug.exceptions.BadRequest(result['error'])
if result['action'] == 'redirect':
return werkzeug.utils.redirect(result['value'])
return result['value']
- @openerp.addons.web.http.jsonrequest
- def verify(self, req, db, url):
- return self._verify(req, db, url)
+ @http.route('/auth_openid/login/verify', type='json', auth='none')
+ def verify(self, db, url):
+ return self._verify(db, url)
- def _verify(self, req, db, url):
- redirect_to = werkzeug.urls.Href(req.httprequest.host_url + 'auth_openid/login/process')(session_id=req.session_id)
- realm = self._get_realm(req)
+ def _verify(self, db, url):
+ redirect_to = werkzeug.urls.Href(request.httprequest.host_url + 'auth_openid/login/process')(session_id=request.session_id)
+ realm = self._get_realm()
session = dict(dbname=db, openid_url=url) # TODO add origin page ?
oidconsumer = consumer.Consumer(session, self._store)
try:
- request = oidconsumer.begin(url)
+ oidrequest = oidconsumer.begin(url)
except consumer.DiscoveryFailure, exc:
fetch_error_string = 'Error in discovery: %s' % (str(exc[0]),)
return {'error': fetch_error_string, 'title': 'OpenID Error'}
- if request is None:
+ if oidrequest is None:
return {'error': 'No OpenID services found', 'title': 'OpenID Error'}
- req.session.openid_session = session
- self._add_extensions(request)
+ request.session.openid_session = session
+ self._add_extensions(oidrequest)
- if request.shouldSendRedirect():
- redirect_url = request.redirectURL(realm, redirect_to)
- return {'action': 'redirect', 'value': redirect_url, 'session_id': req.session_id}
+ if oidrequest.shouldSendRedirect():
+ redirect_url = oidrequest.redirectURL(realm, redirect_to)
+ return {'action': 'redirect', 'value': redirect_url, 'session_id': request.session_id}
else:
- form_html = request.htmlMarkup(realm, redirect_to)
- return {'action': 'post', 'value': form_html, 'session_id': req.session_id}
+ form_html = oidrequest.htmlMarkup(realm, redirect_to)
+ return {'action': 'post', 'value': form_html, 'session_id': request.session_id}
- @openerp.addons.web.http.httprequest
- def process(self, req, **kw):
- session = getattr(req.session, 'openid_session', None)
+ @http.route('/auth_openid/login/process', type='http', auth='none')
+ def process(self, **kw):
+ session = getattr(request.session, 'openid_session', None)
if not session:
- return set_cookie_and_redirect(req, '/')
+ return set_cookie_and_redirect('/')
oidconsumer = consumer.Consumer(session, self._store, consumer_class=GoogleAppsAwareConsumer)
- query = req.httprequest.args
- info = oidconsumer.complete(query, req.httprequest.base_url)
+ query = request.httprequest.args
+ info = oidconsumer.complete(query, request.httprequest.base_url)
display_identifier = info.getDisplayIdentifier()
session['status'] = info.status
@@ -225,7 +226,7 @@ class OpenIDController(openerp.addons.web.http.Controller):
# TODO fill empty fields with the ones from sreg/ax
cr.commit()
- return login_and_redirect(req, dbname, login, key)
+ return login_and_redirect(dbname, login, key)
session['message'] = 'This OpenID identifier is not associated to any active users'
@@ -241,11 +242,11 @@ class OpenIDController(openerp.addons.web.http.Controller):
# information in a log.
session['message'] = 'Verification failed.'
- return set_cookie_and_redirect(req, '/#action=login&loginerror=1')
+ return set_cookie_and_redirect('/#action=login&loginerror=1')
- @openerp.addons.web.http.jsonrequest
- def status(self, req):
- session = getattr(req.session, 'openid_session', {})
+ @http.route('/auth_openid/login/status', type='json', auth='none')
+ def status(self):
+ session = getattr(request.session, 'openid_session', {})
return {'status': session.get('status'), 'message': session.get('message')}
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py
index 924e1546862..8c61af1f03c 100644
--- a/addons/auth_signup/controllers/main.py
+++ b/addons/auth_signup/controllers/main.py
@@ -23,14 +23,15 @@ import logging
import openerp
from openerp.modules.registry import RegistryManager
from ..res_users import SignupError
+import openerp.addons.web.http as http
+from openerp.addons.web.http import request
_logger = logging.getLogger(__name__)
-class Controller(openerp.addons.web.http.Controller):
- _cp_path = '/auth_signup'
+class Controller(http.Controller):
- @openerp.addons.web.http.jsonrequest
- def get_config(self, req, dbname):
+ @http.route('/auth_signup/get_config', type='json', auth="none")
+ def get_config(self, dbname):
""" retrieve the module config (which features are enabled) for the login page """
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
@@ -41,8 +42,8 @@ class Controller(openerp.addons.web.http.Controller):
}
return config
- @openerp.addons.web.http.jsonrequest
- def retrieve(self, req, dbname, token):
+ @http.route('/auth_signup/retrieve', type='json', auth="user")
+ def retrieve(self, dbname, token):
""" retrieve the user info (name, login or email) corresponding to a signup token """
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
@@ -50,23 +51,23 @@ class Controller(openerp.addons.web.http.Controller):
user_info = res_partner.signup_retrieve_info(cr, openerp.SUPERUSER_ID, token)
return user_info
- @openerp.addons.web.http.jsonrequest
- def signup(self, req, dbname, token, **values):
+ @http.route('/auth_signup/signup', type='json', auth="user")
+ def signup(self, dbname, token, **values):
""" sign up a user (new or existing)"""
try:
- self._signup_with_values(req, dbname, token, values)
+ self._signup_with_values(dbname, token, values)
except SignupError, e:
return {'error': openerp.tools.exception_to_unicode(e)}
return {}
- def _signup_with_values(self, req, dbname, token, values):
+ def _signup_with_values(self, dbname, token, values):
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
res_users = registry.get('res.users')
res_users.signup(cr, openerp.SUPERUSER_ID, values, token)
- @openerp.addons.web.http.jsonrequest
- def reset_password(self, req, dbname, login):
+ @http.route('/auth_signup/reset_password', type='json', auth="user")
+ def reset_password(self, dbname, login):
""" retrieve user, and perform reset password """
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
diff --git a/addons/base_gengo/i18n/th.po b/addons/base_gengo/i18n/th.po
new file mode 100644
index 00000000000..e0b5ba3e2fc
--- /dev/null
+++ b/addons/base_gengo/i18n/th.po
@@ -0,0 +1,249 @@
+# Thai 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-06-20 13:54+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
-% if ctx["history_mode"] in ('whole'):
- % for message in object.message_ids:
- ---- Original Message (${message.date or ''}) ----
- ${message.body | safe}
- % endfor
+
We have been contacted by those prospects that are in your region. Thus, the following leads have been assigned to ${ctx['partner_id'].name}:
+
+
+% for lead in ctx['partner_leads']:
+
${lead.lead_id.name or 'Subject Undefined'}, ${lead.lead_id.contact_name or 'Contact Name Undefined'}, ${lead.lead_id.country_id and lead.lead_id.country_id.name or 'Country Undefined' }, ${lead.lead_id.email_from or 'Email Undefined'}, ${lead.lead_id.phone or ''}
+% endfor
+
+
+% if ctx.get('partner_in_portal'):
+
Please connect to your Partner Portal to get details. On each lead are two buttons on the top left corner that you should press after having contacted the lead: "I'm interested" & "I'm not interested".
+% else:
+
+ You do not have yet a portal access to our database. Please contact
+ ${ctx['partner_id'].user_id and ctx['partner_id'].user_id.email and 'your account manager %s (%s)' % (ctx['partner_id'].user_id.name,ctx['partner_id'].user_id.email) or 'us'}.
+
% endif
-% if ctx['history_mode'] == 'latest':
- ---- Original Message (${object.message_ids[0].date or ''}) ----
- ${object.message_ids[0].body | safe}
+
The lead will be sent to another partner if you do not contact the lead before 20 days.
+
+
Thanks,
+
+
+${ctx['partner_id'].user_id and ctx['partner_id'].user_id.signature or ''}
+
+ Higher is the value, higher is the probability for this partner to get more leads.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_partner_assign/security/ir.model.access.csv b/addons/crm_partner_assign/security/ir.model.access.csv
index 69b74ef6b3d..81d74bf43e3 100644
--- a/addons/crm_partner_assign/security/ir.model.access.csv
+++ b/addons/crm_partner_assign/security/ir.model.access.csv
@@ -5,3 +5,4 @@ access_crm_partner_report,crm.partner.report.assign.all,model_crm_partner_report
access_res_partner_grade,res.partner.grade,model_res_partner_grade,base.group_sale_salesman,1,1,1,0
access_res_partner_grade_manager,res.partner.grade.manager,model_res_partner_grade,base.group_sale_manager,1,1,1,1
"access_partner_activation_manager","res.partner.activation.manager","model_res_partner_activation","base.group_partner_manager",1,1,1,1
+partner_access_crm_lead,crm.lead,model_crm_lead,portal.group_portal,1,1,0,0
\ No newline at end of file
diff --git a/addons/crm_partner_assign/static/src/js/next.js b/addons/crm_partner_assign/static/src/js/next.js
new file mode 100644
index 00000000000..c40f104d6c6
--- /dev/null
+++ b/addons/crm_partner_assign/static/src/js/next.js
@@ -0,0 +1,13 @@
+openerp.crm_partner_assign = function (instance) {
+ instance.crm_partner_assign = instance.crm_partner_assign || {};
+ instance.crm_partner_assign.next_or_list = function(parent) {
+ var form = parent.inner_widget.views.form.controller;
+ form.dataset.remove_ids([form.dataset.ids[form.dataset.index]]);
+ form.reload();
+ if (!form.dataset.ids.length){
+ parent.inner_widget.switch_mode('list');
+ }
+ parent.do_action({ type: 'ir.actions.act_window_close' });
+ };
+ instance.web.client_actions.add("next_or_list", "instance.crm_partner_assign.next_or_list");
+}
\ No newline at end of file
diff --git a/addons/crm_partner_assign/wizard/__init__.py b/addons/crm_partner_assign/wizard/__init__.py
index 9224173145b..ab6c7b7f06a 100644
--- a/addons/crm_partner_assign/wizard/__init__.py
+++ b/addons/crm_partner_assign/wizard/__init__.py
@@ -20,3 +20,4 @@
##############################################################################
import crm_forward_to_partner
+import crm_channel_interested
\ No newline at end of file
diff --git a/addons/crm_partner_assign/wizard/crm_channel_interested.py b/addons/crm_partner_assign/wizard/crm_channel_interested.py
new file mode 100644
index 00000000000..57db36cb51f
--- /dev/null
+++ b/addons/crm_partner_assign/wizard/crm_channel_interested.py
@@ -0,0 +1,76 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# 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.osv import fields, osv
+from openerp.tools.translate import _
+from openerp import SUPERUSER_ID
+
+
+class crm_lead_forward_to_partner(osv.TransientModel):
+ """ Forward info history to partners. """
+ _name = 'crm.lead.channel.interested'
+ _columns = {
+ 'interested': fields.boolean('Interested by this lead'),
+ 'contacted': fields.boolean('Did you contact the lead?', help="The lead has been contacted"),
+ 'comment': fields.text('Comment', help="What are the elements that have led to this decision?", required=True),
+ }
+ _defaults = {
+ 'interested': lambda self, cr, uid, c: c.get('interested', True),
+ 'contacted': False,
+ }
+
+ def action_confirm(self, cr, uid, ids, context=None):
+ wizard = self.browse(cr, uid, ids[0], context=context)
+ if wizard.interested and not wizard.contacted:
+ raise osv.except_osv(_('Error!'), _("You must contact the lead before saying that you are interested"))
+ lead_obj = self.pool.get('crm.lead')
+ lead_obj.check_access_rights(cr, uid, 'write')
+ if wizard.interested:
+ message = _('
' % wizard.comment
+ lead_obj.message_post(cr, uid, context.get('active_ids'), body=message, context=context)
+ if values:
+ lead_obj.write(cr, SUPERUSER_ID, context.get('active_ids'), values)
+ if wizard.interested:
+ for lead in lead_obj.browse(cr, uid, context.get('active_ids'), context=context):
+ lead_obj.convert_opportunity(cr, SUPERUSER_ID, [lead.id], lead.partner_id and lead.partner_id.id or None, context=None)
+ return {
+ 'type': 'ir.actions.client',
+ 'tag': 'next_or_list',
+ 'params': {
+ },
+ }
diff --git a/addons/crm_partner_assign/wizard/crm_channel_interested_view.xml b/addons/crm_partner_assign/wizard/crm_channel_interested_view.xml
new file mode 100644
index 00000000000..400e02cd48a
--- /dev/null
+++ b/addons/crm_partner_assign/wizard/crm_channel_interested_view.xml
@@ -0,0 +1,45 @@
+
+
+
+
+ crm_lead_channel_interested
+ crm.lead.channel.interested
+
+
+
+
+
+ Lead Feedback
+ crm.lead.channel.interested
+ form
+ form
+
+ new
+
+
+
\ No newline at end of file
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
index 724102a84b1..80fa2f28b04 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
@@ -27,107 +27,182 @@ from openerp.tools.translate import _
class crm_lead_forward_to_partner(osv.TransientModel):
""" Forward info history to partners. """
_name = 'crm.lead.forward.to.partner'
- _inherit = "mail.compose.message"
- def _get_composition_mode_selection(self, cr, uid, context=None):
- composition_mode = super(crm_lead_forward_to_partner, self)._get_composition_mode_selection(cr, uid, context=context)
- composition_mode.append(('forward', 'Forward'))
- return composition_mode
-
- _columns = {
- 'partner_ids': fields.many2many('res.partner',
- 'lead_forward_to_partner_res_partner_rel',
- 'wizard_id', 'partner_id', 'Additional contacts'),
- 'attachment_ids': fields.many2many('ir.attachment',
- 'lead_forward_to_partner_attachment_rel',
- 'wizard_id', 'attachment_id', 'Attachments'),
- 'history_mode': fields.selection([('info', 'Internal notes'),
- ('latest', 'Latest email'), ('whole', 'Whole Story')],
- 'Send history', required=True),
- }
-
- _defaults = {
- 'history_mode': 'info',
- }
+ def _convert_to_assignation_line(self, cr, uid, lead, partner, context=None):
+ lead_location = []
+ partner_location = []
+ if lead.country_id:
+ lead_location.append(lead.country_id.name)
+ if lead.city:
+ lead_location.append(lead.city)
+ if partner:
+ if partner.country_id:
+ partner_location.append(partner.country_id.name)
+ if partner.city:
+ partner_location.append(partner.city)
+ return {'lead_id': lead.id,
+ 'lead_location': ", ".join(lead_location),
+ 'partner_assigned_id': partner and partner.id or False,
+ 'partner_location': ", ".join(partner_location),
+ 'lead_link': self.get_lead_portal_url(cr, uid, lead.id, lead.type, context=context),
+ }
def default_get(self, cr, uid, fields, context=None):
if context is None:
context = {}
- # set as comment, perform overrided document-like action that calls get_record_data
- old_mode = context.get('default_composition_mode', 'forward')
- context['default_composition_mode'] = 'comment'
+ lead_obj = self.pool.get('crm.lead')
+ email_template_obj = self.pool.get('email.template')
+ try:
+ template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'crm_partner_assign', 'email_template_lead_forward_mail')[1]
+ except ValueError:
+ template_id = False
res = super(crm_lead_forward_to_partner, self).default_get(cr, uid, fields, context=context)
- # back to forward mode
- context['default_composition_mode'] = old_mode
- res['composition_mode'] = context['default_composition_mode']
+ active_ids = context.get('active_ids')
+ default_composition_mode = context.get('default_composition_mode')
+ res['assignation_lines'] = []
+ if template_id:
+ res['body'] = email_template_obj.get_email_template(cr, uid, template_id).body_html
+ if active_ids:
+ lead_ids = lead_obj.browse(cr, uid, active_ids, context=context)
+ if default_composition_mode == 'mass_mail':
+ partner_assigned_ids = lead_obj.search_geo_partner(cr, uid, active_ids, context=context)
+ else:
+ partner_assigned_ids = dict((lead.id, lead.partner_assigned_id and lead.partner_assigned_id.id or False) for lead in lead_ids)
+ res['partner_id'] = lead_ids[0].partner_assigned_id.id
+ for lead in lead_ids:
+ partner_id = partner_assigned_ids.get(lead.id) or False
+ partner = False
+ if partner_id:
+ partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
+ res['assignation_lines'].append(self._convert_to_assignation_line(cr, uid, lead, partner))
return res
- def get_record_data(self, cr, uid, model, res_id, context=None):
- """ Override of mail.compose.message, to add default values coming
- form the related lead.
- """
- if context is None:
- context = {}
- res = super(crm_lead_forward_to_partner, self).get_record_data(cr, uid, model, res_id, context=context)
- if model not in ('crm.lead') or not res_id:
- return res
- template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'crm_partner_assign', 'crm_partner_assign_email_template')[1]
- context['history_mode'] = context.get('history_mode','whole')
- mail_body_fields = ['partner_id', 'partner_name', 'title', 'function', 'street', 'street2', 'zip', 'city', 'country_id', 'state_id', 'email_from', 'phone', 'fax', 'mobile', 'description']
- lead = self.pool.get('crm.lead').browse(cr, uid, res_id, context=context)
- context['mail_body'] = self.pool.get('crm.lead')._mail_body(cr, uid, lead, mail_body_fields, context=context)
- template = self.generate_email_for_composer(cr, uid, template_id, res_id, context)
- res['subject'] = template['subject']
- res['body'] = template['body']
- return res
-
- def on_change_history_mode(self, cr, uid, ids, history_mode, model, res_id, context=None):
- """ Update body when changing history_mode """
- if context is None:
- context = {}
- if model and model == 'crm.lead' and res_id:
- lead = self.pool[model].browse(cr, uid, res_id, context=context)
- context['history_mode'] = history_mode
- body = self.get_record_data(cr, uid, 'crm.lead', res_id, context=context)['body']
- return {'value': {'body': body}}
-
- def create(self, cr, uid, values, context=None):
- """ TDE-HACK: remove 'type' from context, because when viewing an
- opportunity form view, a default_type is set and propagated
- to the wizard, that has a not matching type field. """
- default_type = context.pop('default_type', None)
- new_id = super(crm_lead_forward_to_partner, self).create(cr, uid, values, context=context)
- if default_type:
- context['default_type'] = default_type
- return new_id
-
def action_forward(self, cr, uid, ids, context=None):
- """ Forward the lead to a partner """
- if context is None:
+ lead_obj = self.pool.get('crm.lead')
+ record = self.browse(cr, uid, ids[0], context=context)
+ email_template_obj = self.pool.get('email.template')
+ try:
+ template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'crm_partner_assign', 'email_template_lead_forward_mail')[1]
+ except ValueError:
+ raise osv.except_osv(_('Email Template Error'),
+ _('The Forward Email Template is not in the database'))
+ try:
+ portal_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'portal', 'group_portal')[1]
+ except ValueError:
+ raise osv.except_osv(_('Portal Group Error'),
+ _('The Portal group cannot be found'))
+
+ local_context = context.copy()
+ if not (record.forward_type == 'single'):
+ no_email = set()
+ for lead in record.assignation_lines:
+ if lead.partner_assigned_id and not lead.partner_assigned_id.email:
+ no_email.add(lead.partner_assigned_id.name)
+ if no_email:
+ raise osv.except_osv(_('Email Error'),
+ ('Set an email address for the partner(s): %s' % ", ".join(no_email)))
+ if record.forward_type == 'single' and not record.partner_id.email:
+ raise osv.except_osv(_('Email Error'),
+ ('Set an email address for the partner %s' % record.partner_id.name))
+
+ partners_leads = {}
+ for lead in record.assignation_lines:
+ partner = record.forward_type == 'single' and record.partner_id or lead.partner_assigned_id
+ lead_details = {
+ 'lead_link': lead.lead_link,
+ 'lead_id': lead.lead_id,
+ }
+ if partner:
+ partner_leads = partners_leads.get(partner.id)
+ if partner_leads:
+ partner_leads['leads'].append(lead_details)
+ else:
+ partners_leads[partner.id] = {'partner': partner, 'leads': [lead_details]}
+ stage_id = False
+ if record.assignation_lines and record.assignation_lines[0].lead_id.type == 'lead':
+ try:
+ stage_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'crm_partner_assign', 'stage_portal_lead_assigned')[1]
+ except ValueError:
+ pass
+
+ for partner_id, partner_leads in partners_leads.items():
+ in_portal = False
+ for contact in (partner.child_ids or [partner]):
+ if contact.user_ids:
+ in_portal = portal_id in [g.id for g in contact.user_ids[0].groups_id]
+
+ local_context['partner_id'] = partner_leads['partner']
+ local_context['partner_leads'] = partner_leads['leads']
+ local_context['partner_in_portal'] = in_portal
+ email_template_obj.send_mail(cr, uid, template_id, ids[0], context=local_context)
+ lead_ids = [lead['lead_id'].id for lead in partner_leads['leads']]
+ values = {'partner_assigned_id': partner_id, 'user_id': partner_leads['partner'].user_id.id}
+ if stage_id:
+ values['stage_id'] = stage_id
+ lead_obj.write(cr, uid, lead_ids, values)
+ self.pool.get('crm.lead').message_subscribe(cr, uid, lead_ids, [partner_id], context=context)
+ return True
+
+ def get_lead_portal_url(self, cr, uid, lead_id, type, context=None):
+ action = type == 'opportunity' and 'action_portal_opportunities' or 'action_portal_leads'
+ try:
+ action_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'crm_partner_assign', action)[1]
+ except ValueError:
+ action_id = False
+ portal_link = "%s/?db=%s#id=%s&action=%s&view_type=form" % (self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url'), cr.dbname, lead_id, action_id)
+ return portal_link
+
+ def get_portal_url(self, cr, uid, ids, context=None):
+ portal_link = "%s/?db=%s" % (self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url'), cr.dbname)
+ return portal_link
+
+ _columns = {
+ 'forward_type': fields.selection([('single', 'a single partner: manual selection of partner'), ('assigned', "several partners: automatic assignation, using GPS coordinates and partner's grades"), ], 'Forward selected leads to'),
+ 'partner_id': fields.many2one('res.partner', 'Forward Leads To'),
+ 'assignation_lines': fields.one2many('crm.lead.assignation', 'forward_id', 'Partner Assignation'),
+ 'body': fields.html('Contents', help='Automatically sanitized HTML contents'),
+ }
+
+ _defaults = {
+ 'forward_type': lambda self, cr, uid, c: c.get('forward_type') or 'single',
+ }
+
+
+class crm_lead_assignation (osv.TransientModel):
+ _name = 'crm.lead.assignation'
+ _columns = {
+ 'forward_id': fields.many2one('crm.lead.forward.to.partner', 'Partner Assignation'),
+ 'lead_id': fields.many2one('crm.lead', 'Lead'),
+ 'lead_location': fields.char('Lead Location', size=128),
+ 'partner_assigned_id': fields.many2one('res.partner', 'Assigned Partner'),
+ 'partner_location': fields.char('Partner Location', size=128),
+ 'lead_link': fields.char('Lead Single Links', size=128),
+ }
+
+ def on_change_lead_id(self, cr, uid, ids, lead_id, context=None):
+ if not context:
context = {}
- # TDE FIX in 7.0: force mass_mailing mode; this way, the message will be
- # send only to partners; default subtype of mass_mailing is indeed False
- # Chatter will show 'logged a note', but partner_ids (aka, the assigned partner)
- # will effectively receive the message if present in the composition window
- self.write(cr, uid, ids, {'composition_mode': 'mass_mail'}, context=context)
- res = {'type': 'ir.actions.act_window_close'}
- wizard = self.browse(cr, uid, ids[0], context=context)
- if wizard.model not in ('crm.lead'):
- return res
- if context.get('active_ids') is None:
- context['active_ids'] = [wizard.res_id]
+ if not lead_id:
+ return {'value': {'lead_location': False}}
+ lead = self.pool.get('crm.lead').browse(cr, uid, lead_id, context=context)
+ lead_location = []
+ if lead.country_id:
+ lead_location.append(lead.country_id.name)
+ if lead.city:
+ lead_location.append(lead.city)
+ return {'value': {'lead_location': ", ".join(lead_location)}}
- lead = self.pool[wizard.model]
- lead_ids = wizard.res_id and [wizard.res_id] or []
+ def on_change_partner_assigned_id(self, cr, uid, ids, partner_assigned_id, context=None):
+ if not context:
+ context = {}
+ if not partner_assigned_id:
+ return {'value': {'lead_location': False}}
+ partner = self.pool.get('res.partner').browse(cr, uid, partner_assigned_id, context=context)
+ partner_location = []
+ if partner.country_id:
+ partner_location.append(partner.country_id.name)
+ if partner.city:
+ partner_location.append(partner.city)
+ return {'value': {'partner_location': ", ".join(partner_location)}}
- if wizard.composition_mode == 'mass_mail':
- lead_ids = context and context.get('active_ids', []) or []
- value = self.default_get(cr, uid, ['body', 'email_to', 'email_cc', 'subject', 'history_mode'], context=context)
- value.pop('composition_mode')
- self.pool.get('crm.lead').message_subscribe(cr, uid, lead_ids, [partner.id for partner in wizard.partner_ids], context=context)
- self.write(cr, uid, ids, value, context=context)
-
- return self.send_mail(cr, uid, ids, context=context)
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
index 0fda8c8beaa..26ad08f1528 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml
@@ -1,36 +1,38 @@
-
crm_lead_forward_to_partnercrm.lead.forward.to.partner
@@ -45,14 +47,11 @@
new
-
+
diff --git a/addons/crm_todo/i18n/da.po b/addons/crm_todo/i18n/da.po
new file mode 100644
index 00000000000..1214801638f
--- /dev/null
+++ b/addons/crm_todo/i18n/da.po
@@ -0,0 +1,85 @@
+# Danish 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-06-19 17:34+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Danish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-06-20 05:17+0000\n"
+"X-Generator: Launchpad (build 16673)\n"
+
+#. module: crm_todo
+#: model:ir.model,name:crm_todo.model_project_task
+msgid "Task"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Timebox"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Lead"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "For cancelling the task"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Next"
+msgstr ""
+
+#. module: crm_todo
+#: model:ir.actions.act_window,name:crm_todo.crm_todo_action
+#: model:ir.ui.menu,name:crm_todo.menu_crm_todo
+msgid "My Tasks"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+#: field:crm.lead,task_ids:0
+msgid "Tasks"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Done"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Cancel"
+msgstr ""
+
+#. module: crm_todo
+#: model:ir.model,name:crm_todo.model_crm_lead
+msgid "Lead/Opportunity"
+msgstr ""
+
+#. module: crm_todo
+#: field:project.task,lead_id:0
+msgid "Lead / Opportunity"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "For changing to done state"
+msgstr ""
+
+#. module: crm_todo
+#: view:crm.lead:0
+msgid "Previous"
+msgstr ""
diff --git a/addons/delivery/partner.py b/addons/delivery/partner.py
index 477315dfc9b..226b5e493ab 100644
--- a/addons/delivery/partner.py
+++ b/addons/delivery/partner.py
@@ -25,11 +25,9 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'property_delivery_carrier': fields.property(
- 'delivery.carrier',
type='many2one',
relation='delivery.carrier',
string="Delivery Method",
- view_load=True,
help="This delivery method will be used when invoicing from picking."),
}
diff --git a/addons/event/event.py b/addons/event/event.py
index eb18afd747c..3c04f5c1baa 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -172,6 +172,12 @@ class event_event(osv.osv):
continue
return res
+ def _get_visibility_selection(self, cr, uid, context=None):
+ return [('public', 'All Users'),
+ ('employees', 'Employees Only')]
+ # Lambda indirection method to avoid passing a copy of the overridable method when declaring the field
+ _visibility_selection = lambda self, *args, **kwargs: self._get_visibility_selection(*args, **kwargs)
+
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True, readonly=False, states={'done': [('readonly', True)]}),
'user_id': fields.many2one('res.users', 'Responsible User', readonly=False, states={'done': [('readonly', True)]}),
@@ -209,11 +215,14 @@ class event_event(osv.osv):
'note': fields.text('Description', readonly=False, states={'done': [('readonly', True)]}),
'company_id': fields.many2one('res.company', 'Company', required=False, change_default=True, readonly=False, states={'done': [('readonly', True)]}),
'is_subscribed' : fields.function(_subscribe_fnc, type="boolean", string='Subscribed'),
+ 'visibility': fields.selection(_visibility_selection, 'Privacy / Visibility',
+ select=True, required=True),
}
_defaults = {
'state': 'draft',
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'event.event', context=c),
'user_id': lambda obj, cr, uid, context: uid,
+ 'visibility': 'employees',
}
def subscribe_to_event(self, cr, uid, ids, context=None):
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 4f5e33eeafd..a9831720abf 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -76,6 +76,7 @@
+
diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml
index 83039ca4686..90a232731a7 100644
--- a/addons/event/security/event_security.xml
+++ b/addons/event/security/event_security.xml
@@ -25,25 +25,35 @@
-
- Event multi-company
+
+ Event: multi-company
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+ ['|',
+ ('company_id', '=', False),
+ ('company_id', 'child_of', [user.company_id.id]),
+ ]
+
-
-
- Event Registration multi-company
+
+ Event/Registration: multi-company
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+ ['|',
+ ('company_id', '=', False),
+ ('company_id', 'child_of', [user.company_id.id]),
+ ]
+
-
-
- Report Event Registration multi-company
+
+ Event/Report Registration: multi-company
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+ ['|',
+ ('company_id', '=', False),
+ ('company_id', 'child_of', [user.company_id.id]),
+ ]
+
diff --git a/addons/event_sale/i18n/da.po b/addons/event_sale/i18n/da.po
new file mode 100644
index 00000000000..fb3faa70fc0
--- /dev/null
+++ b/addons/event_sale/i18n/da.po
@@ -0,0 +1,90 @@
+# Danish 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-06-19 17:36+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Danish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-06-20 05:17+0000\n"
+"X-Generator: Launchpad (build 16673)\n"
+
+#. module: event_sale
+#: model:ir.model,name:event_sale.model_product_product
+msgid "Product"
+msgstr ""
+
+#. module: event_sale
+#: help:product.product,event_ok:0
+msgid ""
+"Determine if a product needs to create automatically an event registration "
+"at the confirmation of a sales order line."
+msgstr ""
+
+#. module: event_sale
+#: help:sale.order.line,event_id:0
+msgid ""
+"Choose an event and it will automatically create a registration for this "
+"event."
+msgstr ""
+
+#. module: event_sale
+#: model:event.event,name:event_sale.event_technical_training
+msgid "Technical training in Grand-Rosiere"
+msgstr ""
+
+#. module: event_sale
+#: help:product.product,event_type_id:0
+msgid ""
+"Select event types so when we use this product in sales order lines, it will "
+"filter events of this type only."
+msgstr ""
+
+#. module: event_sale
+#: field:product.product,event_type_id:0
+msgid "Type of Event"
+msgstr ""
+
+#. module: event_sale
+#: field:sale.order.line,event_ok:0
+msgid "event_ok"
+msgstr ""
+
+#. module: event_sale
+#: field:product.product,event_ok:0
+msgid "Event Subscription"
+msgstr ""
+
+#. module: event_sale
+#: field:sale.order.line,event_type_id:0
+msgid "Event Type"
+msgstr ""
+
+#. module: event_sale
+#: model:product.template,name:event_sale.event_product_product_template
+msgid "Technical Training"
+msgstr ""
+
+#. module: event_sale
+#: code:addons/event_sale/event_sale.py:88
+#, python-format
+msgid "The registration %s has been created from the Sales Order %s."
+msgstr ""
+
+#. module: event_sale
+#: field:sale.order.line,event_id:0
+msgid "Event"
+msgstr ""
+
+#. module: event_sale
+#: model:ir.model,name:event_sale.model_sale_order_line
+msgid "Sales Order Line"
+msgstr ""
diff --git a/addons/fleet/i18n/bg.po b/addons/fleet/i18n/bg.po
new file mode 100644
index 00000000000..503b13d7840
--- /dev/null
+++ b/addons/fleet/i18n/bg.po
@@ -0,0 +1,1912 @@
+# Bulgarian 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-06-19 10:29+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Bulgarian \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-06-20 05:17+0000\n"
+"X-Generator: Launchpad (build 16673)\n"
+
+#. module: fleet
+#: selection:fleet.vehicle,fuel_type:0
+msgid "Hybrid"
+msgstr "Хибридна"
+
+#. module: fleet
+#: model:fleet.vehicle.tag,name:fleet.vehicle_tag_compact
+msgid "Compact"
+msgstr "Компактен"
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_1
+msgid "A/C Compressor Replacement"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,vin_sn:0
+msgid "Unique number written on the vehicle motor (VIN/SN number)"
+msgstr ""
+
+#. module: fleet
+#: selection:fleet.service.type,category:0
+#: view:fleet.vehicle.log.contract:0
+#: view:fleet.vehicle.log.services:0
+msgid "Service"
+msgstr "Сервиз"
+
+#. module: fleet
+#: selection:fleet.vehicle.log.contract,cost_frequency:0
+msgid "Monthly"
+msgstr "Месечно"
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:62
+#, python-format
+msgid "Unknown"
+msgstr "Неизвестно"
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_20
+msgid "Engine/Drive Belt(s) Replacement"
+msgstr "Смяна ангренажен ремък"
+
+#. module: fleet
+#: view:fleet.vehicle.cost:0
+msgid "Vehicle costs"
+msgstr "Цена на превозното средство"
+
+#. module: fleet
+#: selection:fleet.vehicle,fuel_type:0
+msgid "Diesel"
+msgstr "Дизел"
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:421
+#, python-format
+msgid "License Plate: from '%s' to '%s'"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_38
+msgid "Resurface Rotors"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.cost:0
+#: view:fleet.vehicle.model:0
+msgid "Group By..."
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_32
+msgid "Oil Pump Replacement"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_18
+msgid "Engine Belt Inspection"
+msgstr ""
+
+#. module: fleet
+#: selection:fleet.vehicle.log.contract,cost_frequency:0
+msgid "No"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,power:0
+msgid "Power in kW of the vehicle"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_service_2
+msgid "Depreciation and Interests"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle.log.contract,insurer_id:0
+#: field:fleet.vehicle.log.fuel,vendor_id:0
+#: field:fleet.vehicle.log.services,vendor_id:0
+msgid "Supplier"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_35
+msgid "Power Steering Hose Replacement"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.contract:0
+msgid "Odometer details"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle:0
+msgid "Has Alert(s)"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle.log.fuel,liter:0
+msgid "Liter"
+msgstr ""
+
+#. module: fleet
+#: model:ir.actions.client,name:fleet.action_fleet_menu
+msgid "Open Fleet Menu"
+msgstr ""
+
+#. module: fleet
+#: view:board.board:0
+msgid "Fuel Costs"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_9
+msgid "Battery Inspection"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.contract:0
+msgid "Invoice Date"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.fuel:0
+msgid "Refueling Details"
+msgstr ""
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:669
+#, python-format
+msgid "%s contract(s) need(s) to be renewed and/or closed!"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.cost:0
+msgid "Indicative Costs"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_16
+msgid "Charging System Diagnosis"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,car_value:0
+msgid "Value of the bought vehicle"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_44
+msgid "Tie Rod End Replacement"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_24
+msgid "Head Gasket(s) Replacement"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle:0
+#: selection:fleet.vehicle.cost,cost_type:0
+msgid "Services"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,odometer:0
+#: help:fleet.vehicle.cost,odometer:0
+#: help:fleet.vehicle.cost,odometer_id:0
+msgid "Odometer measure of the vehicle at the moment of this log"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.contract:0
+#: field:fleet.vehicle.log.contract,notes:0
+msgid "Terms and Conditions"
+msgstr ""
+
+#. module: fleet
+#: model:ir.actions.act_window,name:fleet.action_fleet_vehicle_kanban
+msgid "Vehicles with alerts"
+msgstr ""
+
+#. module: fleet
+#: model:ir.actions.act_window,name:fleet.fleet_vehicle_costs_act
+#: model:ir.ui.menu,name:fleet.fleet_vehicle_costs_menu
+msgid "Vehicle Costs"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.cost:0
+msgid "Total Cost"
+msgstr ""
+
+#. module: fleet
+#: selection:fleet.service.type,category:0
+msgid "Both"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle.log.contract,cost_id:0
+#: field:fleet.vehicle.log.fuel,cost_id:0
+#: field:fleet.vehicle.log.services,cost_id:0
+msgid "Automatically created field to link to parent fleet.vehicle.cost"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.contract:0
+msgid "Terminate Contract"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.cost,parent_id:0
+msgid "Parent cost to this current cost"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.log.contract,cost_frequency:0
+msgid "Frequency of the recuring cost"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_service_1
+msgid "Calculation Benefit In Kind"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.log.contract,expiration_date:0
+msgid ""
+"Date when the coverage of the contract expirates (by default, one year after "
+"begin date)"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.fuel:0
+#: field:fleet.vehicle.log.fuel,notes:0
+#: view:fleet.vehicle.log.services:0
+#: field:fleet.vehicle.log.services,notes:0
+msgid "Notes"
+msgstr ""
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:47
+#, python-format
+msgid "Operation not allowed!"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle,message_ids:0
+msgid "Messages"
+msgstr ""
+
+#. module: fleet
+#: model:res.groups,name:fleet.group_fleet_user
+msgid "User"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.cost,vehicle_id:0
+msgid "Vehicle concerned by this log"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle.log.contract,cost_amount:0
+#: field:fleet.vehicle.log.fuel,cost_amount:0
+#: field:fleet.vehicle.log.services,cost_amount:0
+msgid "Amount"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle,message_unread:0
+msgid "Unread Messages"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_6
+msgid "Air Filter Replacement"
+msgstr ""
+
+#. module: fleet
+#: model:ir.model,name:fleet.model_fleet_vehicle_tag
+msgid "fleet.vehicle.tag"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle:0
+msgid "show the services logs for this vehicle"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle,contract_renewal_name:0
+msgid "Name of contract to renew soon"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.vehicle.tag,name:fleet.vehicle_tag_senior
+msgid "Senior"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.log.contract,state:0
+msgid "Choose wheter the contract is still valid or not"
+msgstr ""
+
+#. module: fleet
+#: selection:fleet.vehicle,transmission:0
+msgid "Automatic"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr ""
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:414
+#, python-format
+msgid "Driver: from '%s' to '%s'"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle:0
+msgid "and"
+msgstr ""
+
+#. module: fleet
+#: field:fleet.vehicle.model.brand,image_medium:0
+msgid "Medium-sized photo"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_34
+msgid "Oxygen Sensor Replacement"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.services:0
+msgid "Service Type"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,transmission:0
+msgid "Transmission Used by the vehicle"
+msgstr ""
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:740
+#: view:fleet.vehicle.log.contract:0
+#: model:ir.actions.act_window,name:fleet.act_renew_contract
+#, python-format
+msgid "Renew Contract"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle:0
+msgid "show the odometer logs for this vehicle"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,odometer_unit:0
+msgid "Unit of the odometer "
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.services:0
+msgid "Services Costs Per Month"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.cost:0
+msgid "Effective Costs"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_service_8
+msgid "Repair and maintenance"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.log.contract,purchaser_id:0
+msgid "Person to which the contract is signed for"
+msgstr ""
+
+#. module: fleet
+#: model:ir.actions.act_window,help:fleet.fleet_vehicle_log_contract_act
+msgid ""
+"
\n"
+" Click to create a new contract. \n"
+"
\n"
+" Manage all your contracts (leasing, insurances, etc.) with\n"
+" their related services, costs. OpenERP will automatically "
+"warn\n"
+" you when some contracts have to be renewed.\n"
+"
\n"
+" Each contract (e.g.: leasing) may include several services\n"
+" (reparation, insurances, periodic maintenance).\n"
+"
\n"
+" OpenERP helps you managing the costs for your different\n"
+" vehicles. Costs are created automatically from services,\n"
+" contracts (fixed or recurring) and fuel logs.\n"
+"
\n"
+" Here you can add refuelling entries for all vehicles. You "
+"can\n"
+" also filter logs of a particular vehicle using the search\n"
+" field.\n"
+"
\n"
+" You will be able to manage your fleet by keeping track of "
+"the\n"
+" contracts, services, fixed and recurring costs, odometers "
+"and\n"
+" fuel logs associated to each vehicle.\n"
+"
\n"
+" OpenERP will warn you when services or contract have to be\n"
+" renewed.\n"
+"
\n"
+" To add your first report into this dashboard, go to any\n"
+" menu, switch to list or graph view, and click 'Add "
+"to\n"
+" Dashboard' in the extended search options.\n"
+"
\n"
+" You can filter and group data before inserting into the\n"
+" dashboard using the search options.\n"
+"
\n"
+" OpenERP helps you managing the costs for your different vehicles\n"
+" Costs are generally created from services and contract and appears "
+"here.\n"
+"
\n"
+"
\n"
+" Thanks to the different filters, OpenERP can only print the "
+"effective\n"
+" costs, sort them by type and by vehicle.\n"
+"
\n"
+" Here you can add various odometer entries for all vehicles.\n"
+" You can also show odometer value for a particular vehicle "
+"using\n"
+" the search field.\n"
+"
\n"
+" Here are displayed vehicles for which one or more contracts need "
+"to be renewed. If you see this message, then there is no contracts to "
+"renew.\n"
+"
\n"
+" Click to create a new service entry. \n"
+"
\n"
+" OpenERP helps you keeping track of all the services done\n"
+" on your vehicle. Services can be of many type: occasional\n"
+" repair, fixed maintenance, etc.\n"
+"
\n"
+" Click to create a new type of service.\n"
+"
\n"
+" Each service can used in contracts, as a standalone service "
+"or both.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: fleet
+#: view:board.board:0
+msgid "Services Costs"
+msgstr ""
+
+#. module: fleet
+#: code:addons/fleet/fleet.py:47
+#, python-format
+msgid "Emptying the odometer value of a vehicle is not allowed."
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,seats:0
+msgid "Number of seats of the vehicle"
+msgstr ""
+
+#. module: fleet
+#: model:res.groups,name:fleet.group_fleet_manager
+msgid "Manager"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.services:0
+msgid "Cost"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_39
+msgid "Rotate Tires"
+msgstr ""
+
+#. module: fleet
+#: model:fleet.service.type,name:fleet.type_service_42
+msgid "Starter Replacement"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.cost:0
+#: field:fleet.vehicle.cost,year:0
+msgid "Year"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle,license_plate:0
+msgid "License plate number of the vehicle (ie: plate number for a car)"
+msgstr ""
+
+#. module: fleet
+#: model:ir.model,name:fleet.model_fleet_contract_state
+msgid "Contains the different possible status of a leasing contract"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle:0
+msgid "show the contract for this vehicle"
+msgstr ""
+
+#. module: fleet
+#: view:fleet.vehicle.log.services:0
+msgid "Total"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.service.type,category:0
+msgid ""
+"Choose wheter the service refer to contracts, vehicle services or both"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.cost,cost_type:0
+msgid "For internal purpose only"
+msgstr ""
+
+#. module: fleet
+#: help:fleet.vehicle.state,sequence:0
+msgid "Used to order the note stages"
+msgstr ""
diff --git a/addons/google_base_account/__init__.py b/addons/google_base_account/__init__.py
index e1a476431af..44a5aabe277 100644
--- a/addons/google_base_account/__init__.py
+++ b/addons/google_base_account/__init__.py
@@ -20,7 +20,6 @@
##############################################################################
import google_base_account
-import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/google_base_account/__openerp__.py b/addons/google_base_account/__openerp__.py
index b4d996f2807..99678d2785d 100644
--- a/addons/google_base_account/__openerp__.py
+++ b/addons/google_base_account/__openerp__.py
@@ -30,10 +30,9 @@ The module adds google user in res user.
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
- 'depends': ['base'],
+ 'depends': ['base_setup'],
'data': [
- 'google_base_account_view.xml',
- 'wizard/google_login_view.xml',
+ 'google_base_account_data.xml',
],
'demo': [],
'installable': True,
diff --git a/addons/google_base_account/google_base_account.py b/addons/google_base_account/google_base_account.py
index 06e5643344c..a6cf67bbe62 100644
--- a/addons/google_base_account/google_base_account.py
+++ b/addons/google_base_account/google_base_account.py
@@ -19,14 +19,48 @@
#
##############################################################################
-from openerp.osv import fields,osv
-
-class res_users(osv.osv):
- _inherit = "res.users"
- _columns = {
- 'gmail_user': fields.char('Username', size=64,),
- 'gmail_password': fields.char('Password', size=64),
- }
+from openerp.osv import osv
+from openerp import SUPERUSER_ID
+from openerp.tools.translate import _
+
+import urllib
+import urllib2
+import simplejson
+
+
+class google_service(osv.osv):
+ _name = 'google.service'
+
+ def generate_refresh_token(self, cr, uid, service, authorization_code, context=None):
+ if authorization_code:
+ ir_config = self.pool['ir.config_parameter']
+ client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_id' % service)
+ client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_secret' % service)
+ redirect_uri = ir_config.get_param(cr, SUPERUSER_ID, 'google_redirect_uri')
+
+ #Get the Refresh Token From Google And store it in ir.config_parameter
+ headers = {"Content-type": "application/x-www-form-urlencoded"}
+ data = dict(code=authorization_code, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, grant_type="authorization_code")
+ data = urllib.urlencode(data)
+ try:
+ req = urllib2.Request("https://accounts.google.com/o/oauth2/token", data, headers)
+ content = urllib2.urlopen(req).read()
+ except urllib2.HTTPError:
+ raise self.pool.get('res.config.settings').get_config_warning(cr, _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired"), context=context)
+
+ content = simplejson.loads(content)
+ return content.get('refresh_token')
+
+ def _get_google_token_uri(self, cr, uid, service, context=None):
+ ir_config = self.pool['ir.config_parameter']
+ params = {
+ 'scope': 'https://www.googleapis.com/auth/drive',
+ 'redirect_uri': ir_config.get_param(cr, SUPERUSER_ID, 'google_redirect_uri'),
+ 'client_id': ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_id' % service),
+ 'response_type': 'code',
+ 'client_id': ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_id' % service),
+ }
+ uri = 'https://accounts.google.com/o/oauth2/auth?%s' % urllib.urlencode(params)
+ return uri
# vim:expandtab:smartindent:toabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/google_base_account/google_base_account_data.xml b/addons/google_base_account/google_base_account_data.xml
new file mode 100644
index 00000000000..c6748df7dc9
--- /dev/null
+++ b/addons/google_base_account/google_base_account_data.xml
@@ -0,0 +1,9 @@
+
+
+
+
+ google_redirect_uri
+ urn:ietf:wg:oauth:2.0:oob
+
+
+
\ No newline at end of file
diff --git a/addons/google_base_account/google_base_account_view.xml b/addons/google_base_account/google_base_account_view.xml
deleted file mode 100644
index 8613582692f..00000000000
--- a/addons/google_base_account/google_base_account_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- res.users.google.form1
- res.users
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/google_base_account/wizard/google_login.py b/addons/google_base_account/wizard/google_login.py
deleted file mode 100644
index 1771d99b51e..00000000000
--- a/addons/google_base_account/wizard/google_login.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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.osv import fields,osv
-from openerp.tools.translate import _
-try:
- import gdata.contacts.service
- import gdata.contacts.client
- import gdata.calendar.service
-except ImportError:
- raise osv.except_osv(_('Google Contacts Import Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list'))
-
-class google_login(osv.osv_memory):
- _description ='Google Contact'
- _name = 'google.login'
- _columns = {
- 'user': fields.char('Google Username', size=64, required=True),
- 'password': fields.char('Google Password', size=64),
- }
-
- def google_login(self, user, password, type='', context=None):
- if type == 'group':
- gd_client = gdata.contacts.service.ContactsService()
- elif type == 'contact':
- gd_client = gdata.contacts.service.ContactsService()
- elif type == 'calendar':
- gd_client = gdata.calendar.service.CalendarService()
- elif type =='docs_client':
- gd_client = gdata.docs.client.DocsClient()
- else:
- gd_client = gdata.contacts.service.ContactsService()
- try:
- gd_client.ClientLogin(user, password, gd_client.source)
- except Exception:
- return False
- return gd_client
-
-
- def default_get(self, cr, uid, fields, context=None):
- res = super(google_login, self).default_get(cr, uid, fields, context=context)
- user_obj = self.pool.get('res.users').browse(cr, uid, uid)
- if 'user' in fields:
- res.update({'user': user_obj.gmail_user})
- if 'password' in fields:
- res.update({'password': user_obj.gmail_password})
- return res
-
- def login(self, cr, uid, ids, context=None):
- data = self.read(cr, uid, ids)[0]
- user = data['user']
- password = data['password']
- if self.google_login(user, password):
- res = {
- 'gmail_user': user,
- 'gmail_password': password
- }
- self.pool.get('res.users').write(cr, uid, uid, res, context=context)
- else:
- raise osv.except_osv(_('Error!'), _("Authentication failed. Check the user and password."))
-
- return self._get_next_action(cr, uid, context=context)
-
- def _get_next_action(self, cr, uid, context=None):
- return {'type': 'ir.actions.act_window_close'}
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/google_base_account/wizard/google_login_view.xml b/addons/google_base_account/wizard/google_login_view.xml
deleted file mode 100644
index ed345ab5a0f..00000000000
--- a/addons/google_base_account/wizard/google_login_view.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- google.login.form
- google.login
-
-
-
-
-
-
-
- Google Login
- ir.actions.act_window
- google.login
- form
- form
- new
-
-
-
-
diff --git a/addons/google_docs/__init__.py b/addons/google_docs/__init__.py
deleted file mode 100644
index dd6285502c0..00000000000
--- a/addons/google_docs/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-import google_docs
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
deleted file mode 100644
index 2fd1976ae3b..00000000000
--- a/addons/google_docs/google_docs.py
+++ /dev/null
@@ -1,193 +0,0 @@
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2012 OpenERP SA ().
-#
-# 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 .
-#
-##############################################################################
-import logging
-from datetime import datetime
-
-from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-_logger = logging.getLogger(__name__)
-
-try:
- import gdata.docs.data
- import gdata.docs.client
-
- # API breakage madness in the gdata API - those guys are insane.
- try:
- # gdata 2.0.15+
- gdata.docs.client.DocsClient.copy_resource
- except AttributeError:
- # gdata 2.0.14- : copy_resource() was copy()
- gdata.docs.client.DocsClient.copy_resource = gdata.docs.client.DocsClient.copy
-
- try:
- # gdata 2.0.16+
- gdata.docs.client.DocsClient.get_resource_by_id
- except AttributeError:
- try:
- # gdata 2.0.15+
- gdata.docs.client.DocsClient.get_resource_by_self_link
- def get_resource_by_id_2_0_16(self, resource_id, **kwargs):
- return self.GetResourceBySelfLink(
- gdata.docs.client.RESOURCE_FEED_URI + ('/%s' % resource_id), **kwargs)
- gdata.docs.client.DocsClient.get_resource_by_id = get_resource_by_id_2_0_16
- except AttributeError:
- # gdata 2.0.14- : alias get_resource_by_id()
- gdata.docs.client.DocsClient.get_resource_by_id = gdata.docs.client.DocsClient.get_doc
-
- try:
- import atom.http_interface
- _logger.info('GData lib version `%s` detected' % atom.http_interface.USER_AGENT)
- except (ImportError, AttributeError):
- _logger.debug('GData lib version could not be detected', exc_info=True)
-
-except ImportError:
- _logger.warning("Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list")
-
-
-class google_docs_ir_attachment(osv.osv):
- _inherit = 'ir.attachment'
-
- def _auth(self, cr, uid, context=None):
- '''
- Connexion with google base account
- @return client object for connexion
- '''
- #pool the google.login in google_base_account
- google_pool = self.pool.get('google.login')
- #get gmail password and login. We use default_get() instead of a create() followed by a read() on the
- # google.login object, because it is easier. The keys 'user' and 'password' ahve to be passed in the dict
- # but the values will be replaced by the user gmail password and login.
- user_config = google_pool.default_get(cr, uid, {'user' : '' , 'password' : ''}, context=context)
- #login gmail account
- client = google_pool.google_login(user_config['user'], user_config['password'], type='docs_client', context=context)
- if not client:
- raise osv.except_osv(_('Google Docs Error!'), _("Check your google configuration in Users/Users/Synchronization tab."))
- _logger.info('Logged into google docs as %s', user_config['user'])
- return client
-
- def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None):
- '''Create a new google document, empty and with a default type (txt)
- :param res_model: the object for which the google doc is created
- :param res_id: the Id of the object for which the google doc is created
- :return: the ID of the google document object created
- '''
- #login with the base account google module
- client = self._auth(cr, uid, context=context)
- # create the document in google docs
- title = "%s %s" % (context.get("name","Untitled Document."), datetime.today().strftime(DEFAULT_SERVER_DATETIME_FORMAT))
- local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL,title=title)
- #create a new doc in Google Docs
- gdocs_resource = client.post(entry=local_resource, uri='https://docs.google.com/feeds/default/private/full/')
- # create an ir.attachment into the db
- self.create(cr, uid, {
- 'res_model': res_model,
- 'res_id': res_id,
- 'type': 'url',
- 'name': title,
- 'url': gdocs_resource.get_alternate_link().href,
- }, context=context)
- return {'resource_id': gdocs_resource.resource_id.text,
- 'title': title,
- 'url': gdocs_resource.get_alternate_link().href}
-
- def copy_gdoc(self, cr, uid, res_model, res_id, name_gdocs, gdoc_template_id, context=None):
- '''
- copy an existing document in google docs
- :param res_model: the object for which the google doc is created
- :param res_id: the Id of the object for which the google doc is created
- :param name_gdocs: the name of the future ir.attachment that will be created. Based on the google doc template foun.
- :param gdoc_template_id: the id of the google doc document to copy
- :return: the ID of the google document object created
- '''
- #login with the base account google module
- client = self._auth(cr, uid)
- # fetch and copy the original document
- try:
- doc = client.get_resource_by_id(gdoc_template_id)
- #copy the document you choose in the configuration
- copy_resource = client.copy_resource(doc, name_gdocs)
- except:
- raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
- # create an ir.attachment
- self.create(cr, uid, {
- 'res_model': res_model,
- 'res_id': res_id,
- 'type': 'url',
- 'name': name_gdocs,
- 'url': copy_resource.get_alternate_link().href
- }, context=context)
- return copy_resource.resource_id.text
-
- def google_doc_get(self, cr, uid, res_model, ids, context=None):
- '''
- Function called by the js, when no google doc are yet associated with a record, with the aim to create one. It
- will first seek for a google.docs.config associated with the model `res_model` to find out what's the template
- of google doc to copy (this is usefull if you want to start with a non-empty document, a type or a name
- different than the default values). If no config is associated with the `res_model`, then a blank text document
- with a default name is created.
- :param res_model: the object for which the google doc is created
- :param ids: the list of ids of the objects for which the google doc is created. This list is supposed to have
- a length of 1 element only (batch processing is not supported in the code, though nothing really prevent it)
- :return: the google document object created
- '''
- if len(ids) != 1:
- raise osv.except_osv(_('Google Docs Error!'), _("Creating google docs may only be done by one at a time."))
- res_id = ids[0]
- pool_ir_attachment = self.pool.get('ir.attachment')
- pool_gdoc_config = self.pool.get('google.docs.config')
- name_gdocs = ''
- model_fields_dic = self.pool[res_model].read(cr, uid, res_id, [], context=context)
-
- # check if a model is configured with a template
- google_docs_config = pool_gdoc_config.search(cr, uid, [('model_id', '=', res_model)], context=context)
- if google_docs_config:
- name_gdocs = pool_gdoc_config.browse(cr, uid, google_docs_config, context=context)[0].name_template
- try:
- name_gdocs = name_gdocs % model_fields_dic
- except:
- raise osv.except_osv(_('Key Error!'), _("Your Google Doc Name Pattern's key does not found in object."))
- google_template_id = pool_gdoc_config.browse(cr, uid, google_docs_config[0], context=context).gdocs_resource_id
- google_document = pool_ir_attachment.copy_gdoc(cr, uid, res_model, res_id, name_gdocs, google_template_id, context=context)
- else:
- google_document = pool_ir_attachment.create_empty_google_doc(cr, uid, res_model, res_id, context=context)
- return google_document
-
-class config(osv.osv):
- _name = 'google.docs.config'
- _description = "Google Docs templates config"
-
- _columns = {
- 'model_id': fields.many2one('ir.model', 'Model', required=True),
- 'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64, help='''
-This is the id of the template document, on google side. You can find it thanks to its URL:
-*for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`
-*for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`
-*for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789`
-*for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`
-...
-''', required=True),
- 'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side. Eg. gdoc_%(field_name)s', required=True),
- }
-
- _defaults = {
- 'name_template': 'gdoc_%(name)s',
- }
diff --git a/addons/google_docs/i18n/google_docs.pot b/addons/google_docs/i18n/google_docs.pot
deleted file mode 100644
index 8da7c5d2f70..00000000000
--- a/addons/google_docs/i18n/google_docs.pot
+++ /dev/null
@@ -1,159 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-# * google_docs
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 7.0alpha\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-21 17:05+0000\n"
-"PO-Revision-Date: 2012-12-21 17:05+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: google_docs
-#: code:addons/google_docs/google_docs.py:139
-#, python-format
-msgid "Key Error!"
-msgstr ""
-
-#. module: google_docs
-#: view:google.docs.config:0
-msgid "for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789`"
-msgstr ""
-
-#. module: google_docs
-#: view:google.docs.config:0
-msgid "for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`"
-msgstr ""
-
-#. module: google_docs
-#: field:google.docs.config,gdocs_resource_id:0
-msgid "Google Resource ID to Use as Template"
-msgstr ""
-
-#. module: google_docs
-#: view:google.docs.config:0
-msgid "for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`"
-msgstr ""
-
-#. module: google_docs
-#. openerp-web
-#: code:addons/google_docs/static/src/xml/gdocs.xml:6
-#, python-format
-msgid "Add Google Doc..."
-msgstr ""
-
-#. module: google_docs
-#: view:google.docs.config:0
-msgid "This is the id of the template document, on google side. You can find it thanks to its URL:"
-msgstr ""
-
-#. module: google_docs
-#: model:ir.model,name:google_docs.model_google_docs_config
-msgid "Google Docs templates config"
-msgstr ""
-
-#. module: google_docs
-#. openerp-web
-#: code:addons/google_docs/static/src/js/gdocs.js:25
-#, python-format
-msgid "The user google credentials are not set yet. Contact your administrator for help."
-msgstr ""
-
-#. module: google_docs
-#: view:google.docs.config:0
-msgid "for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`"
-msgstr ""
-
-#. module: google_docs
-#: code:addons/google_docs/google_docs.py:101
-#, python-format
-msgid "Your resource id is not correct. You can find the id in the google docs URL."
-msgstr ""
-
-#. module: google_docs
-#: code:addons/google_docs/google_docs.py:125
-#, python-format
-msgid "Creating google docs may only be done by one at a time."
-msgstr ""
-
-#. module: google_docs
-#: code:addons/google_docs/google_docs.py:56
-#: code:addons/google_docs/google_docs.py:101
-#: code:addons/google_docs/google_docs.py:125
-#, python-format
-msgid "Google Docs Error!"
-msgstr ""
-
-#. module: google_docs
-#: code:addons/google_docs/google_docs.py:56
-#, python-format
-msgid "Check your google configuration in Users/Users/Synchronization tab."
-msgstr ""
-
-#. module: google_docs
-#: model:ir.ui.menu,name:google_docs.menu_gdocs_config
-msgid "Google Docs configuration"
-msgstr ""
-
-#. module: google_docs
-#: model:ir.actions.act_window,name:google_docs.action_google_docs_users_config
-#: model:ir.ui.menu,name:google_docs.menu_gdocs_model_config
-msgid "Models configuration"
-msgstr ""
-
-#. module: google_docs
-#: field:google.docs.config,model_id:0
-msgid "Model"
-msgstr ""
-
-#. module: google_docs
-#. openerp-web
-#: code:addons/google_docs/static/src/js/gdocs.js:28
-#, python-format
-msgid "User Google credentials are not yet set."
-msgstr ""
-
-#. module: google_docs
-#: code:addons/google_docs/google_docs.py:139
-#, python-format
-msgid "Your Google Doc Name Pattern's key does not found in object."
-msgstr ""
-
-#. module: google_docs
-#: help:google.docs.config,name_template:0
-msgid "Choose how the new google docs will be named, on google side. Eg. gdoc_%(field_name)s"
-msgstr ""
-
-#. module: google_docs
-#: view:google.docs.config:0
-msgid "Google Docs Configuration"
-msgstr ""
-
-#. module: google_docs
-#: help:google.docs.config,gdocs_resource_id:0
-msgid "\n"
-"This is the id of the template document, on google side. You can find it thanks to its URL: \n"
-"*for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`\n"
-"*for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`\n"
-"*for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789`\n"
-"*for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`\n"
-"...\n"
-""
-msgstr ""
-
-#. module: google_docs
-#: model:ir.model,name:google_docs.model_ir_attachment
-msgid "ir.attachment"
-msgstr ""
-
-#. module: google_docs
-#: field:google.docs.config,name_template:0
-msgid "Google Doc Name Pattern"
-msgstr ""
-
diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_docs/res_config_user_view.xml
deleted file mode 100644
index e6c4223735f..00000000000
--- a/addons/google_docs/res_config_user_view.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
- google_docs.config.tree
- google.docs.config
-
-
-
-
-
-
-
-
-
- google_docs.config.form
- google.docs.config
-
-
-
-
-
-
- Models configuration
- google.docs.config
- ir.actions.act_window
- form
-
-
-
-
-
-
diff --git a/addons/google_docs/security/ir.model.access.csv b/addons/google_docs/security/ir.model.access.csv
deleted file mode 100644
index 9393d586fb8..00000000000
--- a/addons/google_docs/security/ir.model.access.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_google_docs,google.docs.config,model_google_docs_config,,1,0,0,0
-access_google_docs,google.docs.config,model_google_docs_config,base.group_system,1,1,1,1
\ No newline at end of file
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js
deleted file mode 100644
index 1cc511ef4d9..00000000000
--- a/addons/google_docs/static/src/js/gdocs.js
+++ /dev/null
@@ -1,40 +0,0 @@
-openerp.google_docs = function(instance, m) {
-var _t = instance.web._t,
- QWeb = instance.web.qweb;
-
- instance.web.Sidebar.include({
- redraw: function() {
- var self = this;
- this._super.apply(this, arguments);
- self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('AddGoogleDocumentItem', {widget: self}))
- self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) {
- self.on_google_doc();
- });
- },
- on_google_doc: function() {
- var self = this;
- var view = self.getParent();
- var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
- if( !_.isEmpty(ids) ){
- view.sidebar_eval_context().done(function (context) {
- var ds = new instance.web.DataSet(this, 'ir.attachment', context);
- ds.call('google_doc_get', [view.dataset.model, ids, context]).done(function(r) {
- if (r == 'False') {
- var params = {
- error: response,
- message: _t("The user google credentials are not set yet. Contact your administrator for help.")
- }
- $(openerp.web.qweb.render("DialogWarning", params)).dialog({
- title: _t("User Google credentials are not yet set."),
- modal: true,
- });
- }
- }).done(function(r){
- window.open(r.url,"_blank");
- view.reload();
- });
- });
- }
- }
- });
-};
diff --git a/addons/google_drive/__init__.py b/addons/google_drive/__init__.py
new file mode 100644
index 00000000000..e1cf2d00f3c
--- /dev/null
+++ b/addons/google_drive/__init__.py
@@ -0,0 +1 @@
+import google_drive
diff --git a/addons/google_docs/__openerp__.py b/addons/google_drive/__openerp__.py
similarity index 63%
rename from addons/google_docs/__openerp__.py
rename to addons/google_drive/__openerp__.py
index 2d064fdb8a9..9e6c73d2649 100644
--- a/addons/google_docs/__openerp__.py
+++ b/addons/google_drive/__openerp__.py
@@ -20,22 +20,31 @@
##############################################################################
{
- 'name': 'Google Docs integration',
+ 'name': 'Google Drive™ integration',
'version': '0.2',
'author': 'OpenERP SA',
'website': 'http://openerp.com',
'category': 'Tools',
'installable': True,
'auto_install': False,
- 'js': ['static/src/js/gdocs.js'],
- 'qweb': ['static/src/xml/gdocs.xml'],
+ 'js': [
+ 'static/lib/gapi/client.js',
+ 'static/src/js/gdrive.js',
+ ],
'data': [
'security/ir.model.access.csv',
- 'res_config_user_view.xml'
+ 'res_config_user_view.xml',
+ 'google_drive_data.xml'
],
- 'depends': ['google_base_account','document'],
+ 'demo': [
+ 'google_drive_demo.xml'
+ ],
+ 'depends': ['base_setup', 'google_base_account'],
'description': """
-Module to attach a google document to any model.
-================================================
+Integrate google document to OpenERP record.
+============================================
+
+This module allows you to integrate google documents to any of your OpenERP record quickly and easily using OAuth 2.0 for Installed Applications,
+You can configure your google Authorization Code from Settings > Configuration > General Settings by clicking on "Generate Google Authorization Code"
"""
}
diff --git a/addons/google_drive/google_drive.py b/addons/google_drive/google_drive.py
new file mode 100644
index 00000000000..1dc6b25f27c
--- /dev/null
+++ b/addons/google_drive/google_drive.py
@@ -0,0 +1,211 @@
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2012 OpenERP SA ().
+#
+# 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 .
+#
+##############################################################################
+import logging
+
+from openerp import SUPERUSER_ID
+from openerp.osv import fields, osv
+from openerp.tools.translate import _
+
+import urllib
+import urllib2
+import json
+import re
+
+_logger = logging.getLogger(__name__)
+
+
+class config(osv.osv):
+ _name = 'google.drive.config'
+ _description = "Google Drive templates config"
+
+ def get_google_drive_url(self, cr, uid, config_id, res_id, template_id, context=None):
+ config = self.browse(cr, SUPERUSER_ID, config_id, context=context)
+ model = config.model_id
+ filter_name = config.filter_id and config.filter_id.name or False
+ record = self.pool.get(model.model).read(cr, uid, res_id, [], context=context)
+ record.update({'model': model.name, 'filter': filter_name})
+ name_gdocs = config.name_template
+ try:
+ name_gdocs = name_gdocs % record
+ except:
+ raise osv.except_osv(_('Key Error!'), _("At least one key cannot be found in your Google Drive name pattern"))
+
+ attach_pool = self.pool.get("ir.attachment")
+ attach_ids = attach_pool.search(cr, uid, [('res_model', '=', model.model), ('name', '=', name_gdocs), ('res_id', '=', res_id)])
+ url = False
+ if attach_ids:
+ attachment = attach_pool.browse(cr, uid, attach_ids[0], context)
+ url = attachment.url
+ else:
+ url = self.copy_doc(cr, uid, res_id, template_id, name_gdocs, model.model, context)
+ return url
+
+ def copy_doc(self, cr, uid, res_id, template_id, name_gdocs, res_model, context=None):
+ ir_config = self.pool['ir.config_parameter']
+ google_drive_refresh_token = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_refresh_token')
+ if not google_drive_refresh_token:
+ raise self.pool.get('res.config.settings').get_config_warning(cr, _("You haven't configured 'Authorization Code' generated from google, Please generate and configure it in %(menu:base_setup.menu_general_configuration)s."), context=context)
+ google_drive_client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_id')
+ google_drive_client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_drive_client_secret')
+ google_web_base_url = ir_config.get_param(cr, SUPERUSER_ID, 'web.base.url')
+
+ #For Getting New Access Token With help of old Refresh Token
+ headers = {"Content-type": "application/x-www-form-urlencoded", "Accept-Encoding": "gzip, deflate"}
+ data = dict(client_id=google_drive_client_id,
+ refresh_token=google_drive_refresh_token,
+ client_secret=google_drive_client_secret,
+ grant_type="refresh_token")
+
+ data = urllib.urlencode(data)
+ try:
+ req = urllib2.Request('https://accounts.google.com/o/oauth2/token', data, headers)
+ content = urllib2.urlopen(req).read()
+ except urllib2.HTTPError:
+ raise self.pool.get('res.config.settings').get_config_warning(cr, _("Something went wrong during the token generation. Please request again an authorization code in %(menu:base_setup.menu_general_configuration)s."), context=context)
+ content = json.loads(content)
+
+ # Copy template in to drive with help of new access token
+ if 'access_token' in content:
+ request_url = "https://www.googleapis.com/drive/v2/files/%s?fields=parents/id&access_token=%s" % (template_id, content['access_token'])
+ try:
+ req = urllib2.Request(request_url, None, headers)
+ parents = urllib2.urlopen(req).read()
+ except urllib2.HTTPError:
+ raise self.pool.get('res.config.settings').get_config_warning(cr, _("The Google Template cannot be found. Maybe it has been deleted."), context=context)
+ parents_dict = json.loads(parents)
+
+ record_url = "Click on link to open Record in OpenERP\n %s/?db=%s#id=%s&model=%s" % (google_web_base_url, cr.dbname, res_id, res_model)
+ data = {"title": name_gdocs, "description": record_url, "parents": parents_dict['parents']}
+ request_url = "https://www.googleapis.com/drive/v2/files/%s/copy?access_token=%s" % (template_id, content['access_token'])
+ headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
+ data_json = json.dumps(data)
+ # resp, content = Http().request(request_url, "POST", data_json, headers)
+ req = urllib2.Request(request_url, data_json, headers)
+ content = urllib2.urlopen(req).read()
+ content = json.loads(content)
+ res = False
+ if 'alternateLink' in content.keys():
+ attach_pool = self.pool.get("ir.attachment")
+ attach_vals = {'res_model': res_model, 'name': name_gdocs, 'res_id': res_id, 'type': 'url', 'url': content['alternateLink']}
+ attach_pool.create(cr, uid, attach_vals)
+ res = content['alternateLink']
+ return res
+
+ def get_google_drive_config(self, cr, uid, res_model, res_id, context=None):
+ '''
+ Function called by the js, when no google doc are yet associated with a record, with the aim to create one. It
+ will first seek for a google.docs.config associated with the model `res_model` to find out what's the template
+ of google doc to copy (this is usefull if you want to start with a non-empty document, a type or a name
+ different than the default values). If no config is associated with the `res_model`, then a blank text document
+ with a default name is created.
+ :param res_model: the object for which the google doc is created
+ :param ids: the list of ids of the objects for which the google doc is created. This list is supposed to have
+ a length of 1 element only (batch processing is not supported in the code, though nothing really prevent it)
+ :return: the config id and config name
+ '''
+ if not res_id:
+ raise osv.except_osv(_('Google Drive Error!'), _("Creating google drive may only be done by one at a time."))
+ # check if a model is configured with a template
+ config_ids = self.search(cr, uid, [('model_id', '=', res_model)], context=context)
+ configs = []
+ for config in self.browse(cr, uid, config_ids, context=context):
+ if config.filter_id:
+ if (config.filter_id.user_id and config.filter_id.user_id.id != uid):
+ #Private
+ continue
+ domain = [('id', 'in', [res_id])] + eval(config.filter_id.domain)
+ local_context = context and context.copy() or {}
+ local_context.update(eval(config.filter_id.context))
+ google_doc_configs = self.pool.get(config.filter_id.model_id).search(cr, uid, domain, context=local_context)
+ if google_doc_configs:
+ configs.append({'id': config.id, 'name': config.name})
+ else:
+ configs.append({'id': config.id, 'name': config.name})
+ return configs
+
+ def _resource_get(self, cr, uid, ids, name, arg, context=None):
+ result = {}
+ for data in self.browse(cr, uid, ids, context):
+ mo = re.search("(key=|/d/)([A-Za-z0-9-_]+)", data.google_drive_template_url)
+ if mo:
+ result[data.id] = mo.group(2)
+ else:
+ raise osv.except_osv(_('Incorrect URL!'), _("Please enter a valid Google Document URL."))
+ return result
+
+ def _client_id_get(self, cr, uid, ids, name, arg, context=None):
+ result = {}
+ client_id = self.pool['ir.config_parameter'].get_param(cr, SUPERUSER_ID, 'google_drive_client_id')
+ for config_id in ids:
+ result[config_id] = client_id
+ return result
+
+ _columns = {
+ 'name': fields.char('Template Name', required=True, size=1024),
+ 'model_id': fields.many2one('ir.model', 'Model', ondelete='set null', required=True),
+ 'model': fields.related('model_id', 'model', type='char', string='Model', readonly=True),
+ 'filter_id': fields.many2one('ir.filters', 'Filter', domain="[('model_id', '=', model)]"),
+ 'google_drive_template_url': fields.char('Template URL', required=True, size=1024),
+ 'google_drive_resource_id': fields.function(_resource_get, type="char", string='Resource Id'),
+ 'google_drive_client_id': fields.function(_client_id_get, type="char", string='Google Client '),
+ 'name_template': fields.char('Google Drive Name Pattern', size=64, help='Choose how the new google drive will be named, on google side. Eg. gdoc_%(field_name)s', required=True),
+ }
+
+ def onchange_model_id(self, cr, uid, ids, model_id, context=None):
+ res = {}
+ if model_id:
+ model = self.pool['ir.model'].browse(cr, uid, model_id, context=context)
+ res['value'] = {'model': model.model}
+ else:
+ res['value'] = {'filter_id': False, 'model': False}
+ return res
+
+ _defaults = {
+ 'name_template': 'Document %(name)s',
+ }
+
+ def _check_model_id(self, cr, uid, ids, context=None):
+ config_id = self.browse(cr, uid, ids[0], context=context)
+ if config_id.filter_id and config_id.model_id.model != config_id.filter_id.model_id:
+ return False
+ return True
+
+ _constraints = [
+ (_check_model_id, 'Model of selected filter is not matching with model of current template.', ['model_id', 'filter_id']),
+ ]
+
+config()
+
+
+class base_config_settings(osv.osv):
+ _inherit = "base.config.settings"
+
+ _columns = {
+ 'google_drive_authorization_code': fields.char('Authorization Code', size=124),
+ 'google_drive_uri': fields.char('URI', readonly=True, help="The URL to generate the authorization code from Google"),
+ }
+ _defaults = {
+ 'google_drive_uri': lambda s, cr, uid, c: s.pool['google.service']._get_google_token_uri(cr, uid, 'drive', context=c),
+ }
+
+ def set_google_authorization_code(self, cr, uid, ids, context=None):
+ config = self.browse(cr, uid, ids[0], context)
+ refresh_token = self.pool['google.service'].generate_refresh_token(cr, uid, 'drive', config.google_drive_authorization_code, context=context)
+ self.pool['ir.config_parameter'].set_param(cr, uid, 'google_drive_refresh_token', refresh_token)
diff --git a/addons/google_drive/google_drive_data.xml b/addons/google_drive/google_drive_data.xml
new file mode 100644
index 00000000000..c9266547969
--- /dev/null
+++ b/addons/google_drive/google_drive_data.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ google_drive_client_id
+ 39623646228-eg3ggo3mk6o40m7rguobi3rkl9frh4tb.apps.googleusercontent.com
+
+
+
+ google_drive_client_secret
+ Ul-PtmnSWs3euWs20fdono0e
+
+
+
+
\ No newline at end of file
diff --git a/addons/google_drive/google_drive_demo.xml b/addons/google_drive/google_drive_demo.xml
new file mode 100644
index 00000000000..ebe73f40ec2
--- /dev/null
+++ b/addons/google_drive/google_drive_demo.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ Customer
+ res.partner
+ [['customer', '=', 1]]
+
+
+
+
+
+ Partner Review
+
+
+ https://docs.google.com/spreadsheet/ccc?key=0Ah2qnrLAoZmUdGRvdVdmS1VoSDctWk1kd18taGZ4ckE#gid=0
+ Partner Review %(name)s
+
+
+
+
+
diff --git a/addons/google_docs/i18n/ar.po b/addons/google_drive/i18n/ar.po
similarity index 100%
rename from addons/google_docs/i18n/ar.po
rename to addons/google_drive/i18n/ar.po
diff --git a/addons/google_docs/i18n/cs.po b/addons/google_drive/i18n/cs.po
similarity index 100%
rename from addons/google_docs/i18n/cs.po
rename to addons/google_drive/i18n/cs.po
diff --git a/addons/google_docs/i18n/de.po b/addons/google_drive/i18n/de.po
similarity index 100%
rename from addons/google_docs/i18n/de.po
rename to addons/google_drive/i18n/de.po
diff --git a/addons/google_docs/i18n/es.po b/addons/google_drive/i18n/es.po
similarity index 100%
rename from addons/google_docs/i18n/es.po
rename to addons/google_drive/i18n/es.po
diff --git a/addons/google_docs/i18n/fr.po b/addons/google_drive/i18n/fr.po
similarity index 100%
rename from addons/google_docs/i18n/fr.po
rename to addons/google_drive/i18n/fr.po
diff --git a/addons/google_drive/i18n/google_drive.pot b/addons/google_drive/i18n/google_drive.pot
new file mode 100644
index 00000000000..4472e9c0ed1
--- /dev/null
+++ b/addons/google_drive/i18n/google_drive.pot
@@ -0,0 +1,227 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * google_drive
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 8.0alpha1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-06-27 16:03+0000\n"
+"PO-Revision-Date: 2013-06-27 16:03+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: google_drive
+#: model:ir.ui.menu,name:google_drive.menu_google_drive_config
+msgid "Google Drive configuration"
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:48
+#, python-format
+msgid "Key Error!"
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "The name of the attached document can use fixed or variable data. To distinguish between documents in\n"
+" Google Drive, use fixed words and fields. For instance, in the example above, if you wrote Agrolait_%(name)s_Sales\n"
+" in the Google Drive name field, the document in your Google Drive and in OpenERP attachment will be named\n"
+" 'Agrolait_SO0001_Sales'."
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "- If filter is not specified, link of google document will appear in \"More\" option for all users for all opportunities."
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "To create a new filter:"
+msgstr ""
+
+#. module: google_drive
+#: model:ir.model,name:google_drive.model_base_config_settings
+msgid "base.config.settings"
+msgstr ""
+
+#. module: google_drive
+#: model:ir.actions.act_window,help:google_drive.action_google_drive_users_config
+msgid "
\n"
+" Click to add a new template.\n"
+"
\n"
+"
\n"
+" Link your own google drive templates to any record of OpenERP. If you have really specific documents you want your collaborator fill in, e.g. Use a spreadsheet to control the quality of your product or review the delivery checklist for each order in a foreign country, ... Its very easy to manage them, link them to OpenERP and use them to collaborate with your employees.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:150
+#, python-format
+msgid "Incorrect URL!"
+msgstr ""
+
+#. module: google_drive
+#: view:base.config.settings:0
+msgid "Configure your templates"
+msgstr ""
+
+#. module: google_drive
+#: help:google.drive.config,name_template:0
+msgid "Choose how the new google drive will be named, on google side. Eg. gdoc_%(field_name)s"
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "- Go to the OpenERP document you want to filter. For instance, go to Opportunities and search on Sales Department."
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "- In this \"Search\" view, select the option \"Save Current Filter\", enter the name (Ex: Sales Department)"
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "- If you select \"Share with all users\", link of google document in \"More\" options will appear for all users in opportunities of Sales Department."
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "- If you don't select \"Share with all users\", link of google document in \"More\" options will not appear for other users in opportunities of Sales Department."
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:48
+#, python-format
+msgid "At least one key cannot be found in your Google Drive name pattern"
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:150
+#, python-format
+msgid "Please enter a valid Google Document URL."
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,google_drive_client_id:0
+msgid "Google Client "
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "https://docs.google.com/document/d/1vOtpJK9scIQz6taD9tJRIETWbEw3fSiaQHArsJYcua4/edit"
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,filter_id:0
+msgid "Filter"
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,name_template:0
+msgid "Google Drive Name Pattern"
+msgstr ""
+
+#. module: google_drive
+#: help:base.config.settings,google_drive_uri:0
+msgid "The URL to generate the authorization code from Google"
+msgstr ""
+
+#. module: google_drive
+#: model:ir.filters,name:google_drive.filter_partner
+msgid "Customer"
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,google_drive_resource_id:0
+msgid "Resource Id"
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:91
+#, python-format
+msgid "The Google Template cannot be found. Maybe it has been deleted."
+msgstr ""
+
+#. module: google_drive
+#: model:ir.actions.act_window,name:google_drive.action_google_drive_users_config
+#: model:ir.ui.menu,name:google_drive.menu_google_drive_model_config
+msgid "Google Drive Templates"
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:81
+#, python-format
+msgid "Something went wrong during the token generation. Please request again an authorization code in %(menu:base_setup.menu_general_configuration)s."
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:124
+#, python-format
+msgid "Google Drive Error!"
+msgstr ""
+
+#. module: google_drive
+#: field:base.config.settings,google_drive_uri:0
+msgid "URI"
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:124
+#, python-format
+msgid "Creating google drive may only be done by one at a time."
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,model:0
+#: field:google.drive.config,model_id:0
+msgid "Model"
+msgstr ""
+
+#. module: google_drive
+#: view:google.drive.config:0
+msgid "Google Drive Configuration"
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,name:0
+msgid "Template Name"
+msgstr ""
+
+#. module: google_drive
+#: constraint:google.drive.config:0
+msgid "Model of selected filter is not matching with model of current template."
+msgstr ""
+
+#. module: google_drive
+#: field:google.drive.config,google_drive_template_url:0
+msgid "Template URL"
+msgstr ""
+
+#. module: google_drive
+#: view:base.config.settings:0
+msgid "and paste it here"
+msgstr ""
+
+#. module: google_drive
+#: field:base.config.settings,google_drive_authorization_code:0
+msgid "Authorization Code"
+msgstr ""
+
+#. module: google_drive
+#: model:ir.model,name:google_drive.model_google_drive_config
+msgid "Google Drive templates config"
+msgstr ""
+
+#. module: google_drive
+#: code:addons/google_drive/google_drive.py:64
+#, python-format
+msgid "You haven't configured 'Authorization Code' generated from google, Please generate and configure it in %(menu:base_setup.menu_general_configuration)s."
+msgstr ""
+
diff --git a/addons/google_docs/i18n/hr.po b/addons/google_drive/i18n/hr.po
similarity index 100%
rename from addons/google_docs/i18n/hr.po
rename to addons/google_drive/i18n/hr.po
diff --git a/addons/google_docs/i18n/hu.po b/addons/google_drive/i18n/hu.po
similarity index 100%
rename from addons/google_docs/i18n/hu.po
rename to addons/google_drive/i18n/hu.po
diff --git a/addons/google_docs/i18n/it.po b/addons/google_drive/i18n/it.po
similarity index 100%
rename from addons/google_docs/i18n/it.po
rename to addons/google_drive/i18n/it.po
diff --git a/addons/google_docs/i18n/ln.po b/addons/google_drive/i18n/ln.po
similarity index 100%
rename from addons/google_docs/i18n/ln.po
rename to addons/google_drive/i18n/ln.po
diff --git a/addons/google_docs/i18n/mk.po b/addons/google_drive/i18n/mk.po
similarity index 100%
rename from addons/google_docs/i18n/mk.po
rename to addons/google_drive/i18n/mk.po
diff --git a/addons/google_docs/i18n/mn.po b/addons/google_drive/i18n/mn.po
similarity index 100%
rename from addons/google_docs/i18n/mn.po
rename to addons/google_drive/i18n/mn.po
diff --git a/addons/google_docs/i18n/nl.po b/addons/google_drive/i18n/nl.po
similarity index 100%
rename from addons/google_docs/i18n/nl.po
rename to addons/google_drive/i18n/nl.po
diff --git a/addons/google_docs/i18n/pl.po b/addons/google_drive/i18n/pl.po
similarity index 100%
rename from addons/google_docs/i18n/pl.po
rename to addons/google_drive/i18n/pl.po
diff --git a/addons/google_docs/i18n/pt.po b/addons/google_drive/i18n/pt.po
similarity index 100%
rename from addons/google_docs/i18n/pt.po
rename to addons/google_drive/i18n/pt.po
diff --git a/addons/google_docs/i18n/pt_BR.po b/addons/google_drive/i18n/pt_BR.po
similarity index 100%
rename from addons/google_docs/i18n/pt_BR.po
rename to addons/google_drive/i18n/pt_BR.po
diff --git a/addons/google_docs/i18n/ro.po b/addons/google_drive/i18n/ro.po
similarity index 100%
rename from addons/google_docs/i18n/ro.po
rename to addons/google_drive/i18n/ro.po
diff --git a/addons/google_docs/i18n/ru.po b/addons/google_drive/i18n/ru.po
similarity index 100%
rename from addons/google_docs/i18n/ru.po
rename to addons/google_drive/i18n/ru.po
diff --git a/addons/google_docs/i18n/sl.po b/addons/google_drive/i18n/sl.po
similarity index 100%
rename from addons/google_docs/i18n/sl.po
rename to addons/google_drive/i18n/sl.po
diff --git a/addons/google_docs/i18n/sv.po b/addons/google_drive/i18n/sv.po
similarity index 100%
rename from addons/google_docs/i18n/sv.po
rename to addons/google_drive/i18n/sv.po
diff --git a/addons/google_docs/i18n/tr.po b/addons/google_drive/i18n/tr.po
similarity index 100%
rename from addons/google_docs/i18n/tr.po
rename to addons/google_drive/i18n/tr.po
diff --git a/addons/google_docs/i18n/zh_CN.po b/addons/google_drive/i18n/zh_CN.po
similarity index 100%
rename from addons/google_docs/i18n/zh_CN.po
rename to addons/google_drive/i18n/zh_CN.po
diff --git a/addons/google_drive/res_config_user_view.xml b/addons/google_drive/res_config_user_view.xml
new file mode 100644
index 00000000000..728ef03c5dd
--- /dev/null
+++ b/addons/google_drive/res_config_user_view.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+ google_drive.config.tree
+ google.drive.config
+
+
+
+
+
+
+
+
+
+ google_drive.config.form
+ google.drive.config
+
+
+
+
+
+
+ Google Drive Templates
+ google.drive.config
+ ir.actions.act_window
+ form
+
+
+
+ Click to add a new template.
+
+
+ Link your own google drive templates to any record of OpenERP. If you have really specific documents you want your collaborator fill in, e.g. Use a spreadsheet to control the quality of your product or review the delivery checklist for each order in a foreign country, ... Its very easy to manage them, link them to OpenERP and use them to collaborate with your employees.
+
+
+
+
+
+
+
+
+
diff --git a/addons/google_drive/security/ir.model.access.csv b/addons/google_drive/security/ir.model.access.csv
new file mode 100644
index 00000000000..ae98cb36976
--- /dev/null
+++ b/addons/google_drive/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_google_drive_all,google.drive.config,model_google_drive_config,,1,0,0,0
+access_google_drive,google.drive.config,model_google_drive_config,base.group_system,1,1,1,1
\ No newline at end of file
diff --git a/addons/google_drive/static/lib/gapi/client.js b/addons/google_drive/static/lib/gapi/client.js
new file mode 100644
index 00000000000..7f40ec55ef9
--- /dev/null
+++ b/addons/google_drive/static/lib/gapi/client.js
@@ -0,0 +1,7 @@
+var gapi=window.gapi=window.gapi||{};gapi._bs=new Date().getTime();(function(){var f=null,g=encodeURIComponent,k=window,m=decodeURIComponent,n="push",r="test",t="shift",u="replace",y="length",B="split",C="join";var D=k,E=document,aa=D.location,ba=function(){},ca=/\[native code\]/,G=function(a,b,c){return a[b]=a[b]||c},da=function(a){for(var b=0;bda.call(b,e)&&c[n](e)}return c},sa=function(a){"loading"!=E.readyState?Z(a):E.write("<"+X+' src="'+encodeURI(a)+'">'+X+">")},Z=function(a){var b=E.createElement(X);b.setAttribute("src",a);b.async="true";(a=E.getElementsByTagName(X)[0])?a.parentNode.insertBefore(b,a):(E.head||E.body||E.documentElement).appendChild(b)},ta=function(a,b){var c=b&&b._c;if(c)for(var d=0;d',
+ config_id: res.id,
+ res_id: res_id,
+ res_model: view.dataset.model,
+ callback: self.on_google_doc,
+ classname: 'oe_share_gdoc'
+ },
+ ]);
+ })
+ }
+ });
+ });
+ }
+ },
+
+ fetch: function (model, fields, domain, ctx) {
+ return new instance.web.Model(model).query(fields).filter(domain).context(ctx).all()
+ },
+
+ on_google_doc: function (doc_item) {
+ var self = this;
+ self.config = doc_item;
+ var loaded = self.fetch('google.drive.config', ['google_drive_resource_id', 'google_drive_client_id'], [['id', '=', doc_item.config_id]])
+ .then(function (configs) {
+ var ds = new instance.web.DataSet(self, 'google.drive.config');
+ ds.call('get_google_drive_url', [doc_item.config_id, doc_item.res_id,configs[0].google_drive_resource_id]).done(function (url) {
+ if (url){
+ window.open(url, '_blank');
+ }
+ });
+ });
+ },
+
+ });
+};
\ No newline at end of file
diff --git a/addons/google_docs/static/src/xml/gdocs.xml b/addons/google_drive/static/src/xml/gdocs.xml
similarity index 100%
rename from addons/google_docs/static/src/xml/gdocs.xml
rename to addons/google_drive/static/src/xml/gdocs.xml
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 19a6d70839f..eb1bbe451b4 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -348,12 +348,10 @@
-
+
-
-
diff --git a/addons/hr_attendance/i18n/th.po b/addons/hr_attendance/i18n/th.po
new file mode 100644
index 00000000000..673d5e7ddd1
--- /dev/null
+++ b/addons/hr_attendance/i18n/th.po
@@ -0,0 +1,466 @@
+# Thai 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-06-20 01:48+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
\n"
+" OpenERP will ensure the whole process is followed; the "
+"expense\n"
+" sheet is validated by manager(s), the employee is "
+"reimbursed\n"
+" from his expenses, some expenses must be re-invoiced to the\n"
+" customers.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Generate Accounting Entries"
+msgstr ""
+
+#. module: hr_expense
+#: selection:hr.expense.report,month:0
+msgid "January"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+msgid "HR Expenses"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.expense,message_summary:0
+msgid "Summary"
+msgstr ""
+
+#. module: hr_expense
+#: model:product.template,name:hr_expense.car_travel_product_template
+msgid "Car Travel Expenses"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Submit to Manager"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.report:0
+msgid "Done Expenses"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.node,note:hr_expense.process_node_confirmedexpenses0
+msgid "The employee validates his expense sheet"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Expenses to Invoice"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.node,name:hr_expense.process_node_supplierinvoice0
+#: model:process.transition,name:hr_expense.process_transition_approveinvoice0
+msgid "Supplier Invoice"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Expenses Sheet"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.report,voucher_id:0
+msgid "Receipt"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.report:0
+msgid "Approved Expenses"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+#: field:hr.expense.line,unit_amount:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.report:0
+#: selection:hr.expense.report,state:0
+msgid "Done"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition.action,name:hr_expense.process_transition_action_supplierinvoice0
+msgid "Invoice"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.report:0
+#: field:hr.expense.report,year:0
+msgid "Year"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition,name:hr_expense.process_transition_reimbursereinvoice0
+msgid "Reinvoice"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Expense Date"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.expense,user_valid:0
+msgid "Validation By"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+#: model:process.transition.action,name:hr_expense.process_transition_action_refuse0
+msgid "Refuse"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition,name:hr_expense.process_transition_confirmexpense0
+msgid "Confirm expense"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition,name:hr_expense.process_transition_approveexpense0
+msgid "Approve expense"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition.action,name:hr_expense.process_transition_action_accept0
+msgid "Accept"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+msgid "This document must be dated and signed for reimbursement"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition,note:hr_expense.process_transition_refuseexpense0
+msgid "Expense is refused."
+msgstr ""
+
+#. module: hr_expense
+#: model:ir.actions.act_window,help:hr_expense.product_normal_form_view_installer
+msgid ""
+"Define one product for each expense type allowed for an employee (travel by "
+"car, hostel, restaurant, etc). If you reimburse the employees at a fixed "
+"rate, set a cost and a unit of measure on the product. If you reimburse "
+"based on real costs, set the cost at 0.00. The user will set the real price "
+"when recording his expense sheet."
+msgstr ""
+
+#. module: hr_expense
+#: selection:hr.expense.expense,state:0
+#: view:hr.expense.report:0
+#: model:mail.message.subtype,name:hr_expense.mt_expense_approved
+#: model:process.node,name:hr_expense.process_node_approved0
+msgid "Approved"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.line,product_id:0
+#: view:hr.expense.report:0
+#: field:hr.expense.report,product_id:0
+#: model:ir.model,name:hr_expense.model_product_product
+msgid "Product"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+#: view:hr.expense.expense:0
+#: field:hr.expense.expense,name:0
+#: field:hr.expense.line,description:0
+msgid "Description"
+msgstr ""
+
+#. module: hr_expense
+#: selection:hr.expense.report,month:0
+msgid "May"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.line,unit_quantity:0
+msgid "Quantities"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+msgid "Price"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.report,no_of_account:0
+msgid "# of Accounts"
+msgstr ""
+
+#. module: hr_expense
+#: selection:hr.expense.expense,state:0
+#: model:mail.message.subtype,name:hr_expense.mt_expense_refused
+#: model:process.node,name:hr_expense.process_node_refused0
+msgid "Refused"
+msgstr ""
+
+#. module: hr_expense
+#: field:product.product,hr_expense_ok:0
+msgid "Can be Expensed"
+msgstr ""
+
+#. module: hr_expense
+#: model:mail.message.subtype,description:hr_expense.mt_expense_confirmed
+msgid "Expense confirmed, waiting confirmation"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+msgid "Ref."
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.report,employee_id:0
+msgid "Employee's Name"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.report:0
+#: field:hr.expense.report,user_id:0
+msgid "Validation User"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Accounting Data"
+msgstr ""
+
+#. module: hr_expense
+#: selection:hr.expense.report,month:0
+msgid "February"
+msgstr ""
+
+#. module: hr_expense
+#: report:hr.expense:0
+msgid "Name"
+msgstr ""
+
+#. module: hr_expense
+#: code:addons/hr_expense/hr_expense.py:121
+#, python-format
+msgid "You can only delete draft expenses!"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.expense,account_move_id:0
+msgid "Ledger Posting"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition,note:hr_expense.process_transition_approveinvoice0
+msgid "Creates supplier invoice."
+msgstr ""
+
+#. module: hr_expense
+#: model:product.template,name:hr_expense.hotel_rent_product_template
+msgid "Hotel Accommodation"
+msgstr ""
+
+#. module: hr_expense
+#: selection:hr.expense.report,month:0
+msgid "April"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.line,name:0
+msgid "Expense Note"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Approve"
+msgstr ""
+
+#. module: hr_expense
+#: help:hr.expense.expense,message_ids:0
+msgid "Messages and communication history"
+msgstr ""
+
+#. module: hr_expense
+#: field:hr.expense.line,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.transition,note:hr_expense.process_transition_confirmexpense0
+msgid "Expense is confirmed."
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+#: model:ir.actions.act_window,name:hr_expense.expense_all
+#: model:ir.ui.menu,name:hr_expense.menu_expense_all
+#: model:ir.ui.menu,name:hr_expense.next_id_49
+#: model:product.category,name:hr_expense.cat_expense
+msgid "Expenses"
+msgstr ""
+
+#. module: hr_expense
+#: help:product.product,hr_expense_ok:0
+msgid "Specify if the product can be selected in an HR expense line."
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+msgid "Accounting"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+#: model:mail.message.subtype,name:hr_expense.mt_expense_confirmed
+msgid "To Approve"
+msgstr ""
+
+#. module: hr_expense
+#: view:hr.expense.expense:0
+#: view:hr.expense.line:0
+#: field:hr.expense.line,total_amount:0
+msgid "Total"
+msgstr ""
+
+#. module: hr_expense
+#: model:process.node,name:hr_expense.process_node_reinvoicing0
+msgid "Reinvoicing"
+msgstr ""
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 0eb3c0cbf16..f2be4844d27 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -110,9 +110,9 @@ class hr_holidays(osv.osv):
_inherit = ['mail.thread', 'ir.needaction_mixin']
_track = {
'state': {
- 'hr_holidays.mt_holidays_approved': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'validate',
- 'hr_holidays.mt_holidays_refused': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'refuse',
- 'hr_holidays.mt_holidays_confirmed': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'confirm',
+ 'hr_holidays.mt_holidays_approved': lambda self, cr, uid, obj, ctx=None: obj.state == 'validate',
+ 'hr_holidays.mt_holidays_refused': lambda self, cr, uid, obj, ctx=None: obj.state == 'refuse',
+ 'hr_holidays.mt_holidays_confirmed': lambda self, cr, uid, obj, ctx=None: obj.state == 'confirm',
},
}
diff --git a/addons/hr_holidays/i18n/pl.po b/addons/hr_holidays/i18n/pl.po
index ebc13bc02d4..ad5730d2268 100644
--- a/addons/hr_holidays/i18n/pl.po
+++ b/addons/hr_holidays/i18n/pl.po
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
-"PO-Revision-Date: 2012-12-14 12:51+0000\n"
-"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) \n"
+"PO-Revision-Date: 2013-06-22 10:54+0000\n"
+"Last-Translator: Dariusz Kubiak \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2013-03-16 05:30+0000\n"
-"X-Generator: Launchpad (build 16532)\n"
+"X-Launchpad-Export-Date: 2013-06-23 05:13+0000\n"
+"X-Generator: Launchpad (build 16677)\n"
#. module: hr_holidays
#: selection:hr.holidays.status,color_name:0
@@ -32,7 +32,7 @@ msgid "Waiting Second Approval"
msgstr "Oczekuje na drugą aprobatę"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:298
+#: code:addons/hr_holidays/hr_holidays.py:309
#, python-format
msgid ""
"You cannot modify a leave request that has been approved. Contact a human "
@@ -109,11 +109,13 @@ msgid ""
"The default duration interval between the start date and the end date is 8 "
"hours. Feel free to adapt it to your needs."
msgstr ""
+"Domyślny odstęp między datą rozpoczęcia i data zakończenia jest 8 godzin. "
+"Zapraszam do dostosowania go do swoich potrzeb."
#. module: hr_holidays
#: model:mail.message.subtype,description:hr_holidays.mt_holidays_refused
msgid "Request refused"
-msgstr ""
+msgstr "Wniosek odrzucony"
#. module: hr_holidays
#: field:hr.holidays,number_of_days_temp:0
@@ -274,12 +276,12 @@ msgid ""
msgstr ""
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:238
#: code:addons/hr_holidays/hr_holidays.py:249
-#: code:addons/hr_holidays/hr_holidays.py:274
-#: code:addons/hr_holidays/hr_holidays.py:298
-#: code:addons/hr_holidays/hr_holidays.py:421
-#: code:addons/hr_holidays/hr_holidays.py:471
+#: code:addons/hr_holidays/hr_holidays.py:260
+#: code:addons/hr_holidays/hr_holidays.py:285
+#: code:addons/hr_holidays/hr_holidays.py:309
+#: code:addons/hr_holidays/hr_holidays.py:432
+#: code:addons/hr_holidays/hr_holidays.py:482
#, python-format
msgid "Warning!"
msgstr "Ostrzeżenie !"
@@ -317,7 +319,7 @@ msgid "Sick Leaves"
msgstr "Zwolnienie lekarskie"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:478
+#: code:addons/hr_holidays/hr_holidays.py:489
#, python-format
msgid "Leave Request for %s"
msgstr "Wniosek urlopowy dla %s"
@@ -341,7 +343,7 @@ msgstr "Pozostało dni urlopu"
#. module: hr_holidays
#: field:hr.holidays,message_follower_ids:0
msgid "Followers"
-msgstr ""
+msgstr "Obserwatorzy"
#. module: hr_holidays
#: model:ir.model,name:hr_holidays.model_hr_holidays_remaining_leaves_user
@@ -388,7 +390,7 @@ msgid "Wheat"
msgstr "Pszenny"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:476
+#: code:addons/hr_holidays/hr_holidays.py:487
#, python-format
msgid "Allocation for %s"
msgstr "Przydział dla %s"
@@ -412,7 +414,7 @@ msgid "Number of Days"
msgstr "Liczba dni"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:471
+#: code:addons/hr_holidays/hr_holidays.py:482
#, python-format
msgid ""
"The feature behind the field 'Remaining Legal Leaves' can only be used when "
@@ -516,7 +518,7 @@ msgid "Start Date"
msgstr "Data początkowa"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:421
+#: code:addons/hr_holidays/hr_holidays.py:432
#, python-format
msgid ""
"There are not enough %s allocated for employee %s; please create an "
@@ -678,7 +680,7 @@ msgstr "Podsumowanie"
#. module: hr_holidays
#: model:hr.holidays.status,name:hr_holidays.holiday_status_unpaid
msgid "Unpaid"
-msgstr "Niezapłacone"
+msgstr "Bezpłatny"
#. module: hr_holidays
#: xsl:holidays.summary:0
@@ -741,7 +743,7 @@ msgstr "Różne"
#. module: hr_holidays
#: model:hr.holidays.status,name:hr_holidays.holiday_status_comp
msgid "Compensatory Days"
-msgstr ""
+msgstr "Urlop wyrównawczy"
#. module: hr_holidays
#: selection:hr.holidays.status,color_name:0
@@ -766,7 +768,7 @@ msgid "Validated"
msgstr "Zatwierdzony"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:238
+#: code:addons/hr_holidays/hr_holidays.py:249
#, python-format
msgid "You cannot delete a leave which is in %s state."
msgstr "Nie możesz usunąć nieobecności, która jest w stanie %s."
@@ -830,7 +832,7 @@ msgid "To Submit"
msgstr "Do wysłania"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:343
+#: code:addons/hr_holidays/hr_holidays.py:354
#: view:hr.holidays:0
#: selection:hr.holidays,type:0
#: field:resource.calendar.leaves,holiday_id:0
@@ -930,8 +932,8 @@ msgid "Messages and communication history"
msgstr "Wiadomości i historia komunikacji"
#. module: hr_holidays
-#: code:addons/hr_holidays/hr_holidays.py:249
-#: code:addons/hr_holidays/hr_holidays.py:274
+#: code:addons/hr_holidays/hr_holidays.py:260
+#: code:addons/hr_holidays/hr_holidays.py:285
#: sql_constraint:hr.holidays:0
#, python-format
msgid "The start date must be anterior to the end date."
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index e26c96d41d9..d8c00c40a31 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -94,11 +94,11 @@ class hr_applicant(base_stage, osv.Model):
_inherit = ['mail.thread', 'ir.needaction_mixin']
_track = {
'state': {
- 'hr_recruitment.mt_applicant_hired': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
- 'hr_recruitment.mt_applicant_refused': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'cancel',
+ 'hr_recruitment.mt_applicant_hired': lambda self, cr, uid, obj, ctx=None: obj.state == 'done',
+ 'hr_recruitment.mt_applicant_refused': lambda self, cr, uid, obj, ctx=None: obj.state == 'cancel',
},
'stage_id': {
- 'hr_recruitment.mt_stage_changed': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['done', 'cancel'],
+ 'hr_recruitment.mt_stage_changed': lambda self, cr, uid, obj, ctx=None: obj.state not in ['done', 'cancel'],
},
}
@@ -506,33 +506,18 @@ class hr_job(osv.osv):
help="Email alias for this job position. New emails will automatically "
"create new applicants for this job position."),
}
- _defaults = {
- 'alias_domain': False, # always hide alias during creation
- }
def _auto_init(self, cr, context=None):
"""Installation hook to create aliases for all jobs and avoid constraint errors."""
- if context is None:
- context = {}
- alias_context = dict(context, alias_model_name='hr.applicant')
- res = self.pool.get('mail.alias').migrate_to_alias(cr, self._name, self._table, super(hr_job, self)._auto_init,
- self._columns['alias_id'], 'name', alias_prefix='job+', alias_defaults={'job_id': 'id'}, context=alias_context)
- return res
+ return self.pool.get('mail.alias').migrate_to_alias(cr, self._name, self._table, super(hr_job, self)._auto_init,
+ 'hr.applicant', self._columns['alias_id'], 'name', alias_prefix='job+', alias_defaults={'job_id': 'id'}, context=context)
def create(self, cr, uid, vals, context=None):
- mail_alias = self.pool.get('mail.alias')
- if not vals.get('alias_id'):
- vals.pop('alias_name', None) # prevent errors during copy()
- alias_id = mail_alias.create_unique_alias(cr, uid,
- # Using '+' allows using subaddressing for those who don't
- # have a catchall domain setup.
- {'alias_name': 'jobs+'+vals['name']},
- model_name="hr.applicant",
- context=context)
- vals['alias_id'] = alias_id
- res = super(hr_job, self).create(cr, uid, vals, context)
- mail_alias.write(cr, uid, [vals['alias_id']], {"alias_defaults": {'job_id': res}}, context)
- return res
+ alias_context = dict(context, alias_model_name='hr.applicant', alias_parent_model_name=self._name)
+ job_id = super(hr_job, self).create(cr, uid, vals, context=alias_context)
+ job = self.browse(cr, uid, job_id, context=context)
+ self.pool.get('mail.alias').write(cr, uid, [job.alias_id.id], {'alias_parent_thread_id': job_id, "alias_defaults": {'job_id': job_id}}, context)
+ return job_id
def unlink(self, cr, uid, ids, context=None):
# Cascade-delete mail aliases as well, as they should not exist without the job position.
@@ -550,15 +535,16 @@ class hr_job(osv.osv):
if record.survey_id:
datas['ids'] = [record.survey_id.id]
datas['model'] = 'survey.print'
- context.update({'response_id': [0], 'response_no': 0,})
+ context.update({'response_id': [0], 'response_no': 0})
return {
'type': 'ir.actions.report.xml',
'report_name': 'survey.form',
'datas': datas,
- 'context' : context,
- 'nodestroy':True,
+ 'context': context,
+ 'nodestroy': True,
}
+
class applicant_category(osv.osv):
""" Category of applicant """
_name = "hr.applicant_category"
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index f6fb202252c..9cbfd4560e7 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -316,18 +316,19 @@
attrs="{'invisible':[('survey_id','=',False)]}"/>
-
-
+
-
-
-
-
- @
-
-
-
+
+
+
+
+ @
+
+
+
+
diff --git a/addons/hr_recruitment/i18n/th.po b/addons/hr_recruitment/i18n/th.po
new file mode 100644
index 00000000000..fb80cbf4ca7
--- /dev/null
+++ b/addons/hr_recruitment/i18n/th.po
@@ -0,0 +1,1261 @@
+# Thai 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-06-20 01:58+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-06-21 05:36+0000\n"
+"X-Generator: Launchpad (build 16677)\n"
+
+#. module: hr_recruitment
+#: help:hr.applicant,active:0
+msgid ""
+"If the active field is set to false, it will allow you to hide the case "
+"without removing it."
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.recruitment.stage:0
+#: field:hr.recruitment.stage,requirements:0
+msgid "Requirements"
+msgstr "ความต้องการ"
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Application Summary"
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Start Interview"
+msgstr "เริ่มสัมภาษณ์"
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Mobile:"
+msgstr "มือถือ:"
+
+#. module: hr_recruitment
+#: help:hr.recruitment.stage,fold:0
+msgid ""
+"This stage is not visible, for example in status bar or kanban view, when "
+"there are no records in that stage to display."
+msgstr ""
+
+#. module: hr_recruitment
+#: model:hr.recruitment.degree,name:hr_recruitment.degree_graduate
+msgid "Graduate"
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Group By..."
+msgstr "จัดกลุ่มตาม..."
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Filter and view on next actions and date"
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+#: field:hr.applicant,department_id:0
+#: view:hr.recruitment.report:0
+#: field:hr.recruitment.report,department_id:0
+msgid "Department"
+msgstr "แผนก"
+
+#. module: hr_recruitment
+#: field:hr.applicant,date_action:0
+msgid "Next Action Date"
+msgstr ""
+
+#. module: hr_recruitment
+#: field:hr.applicant,salary_expected_extra:0
+msgid "Expected Salary Extra"
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.recruitment.report:0
+msgid "Jobs"
+msgstr "งาน"
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Pending Jobs"
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+#: field:hr.applicant,message_unread:0
+msgid "Unread Messages"
+msgstr "ข้อความที่ไม่ได้อ่าน"
+
+#. module: hr_recruitment
+#: field:hr.applicant,company_id:0
+#: view:hr.recruitment.report:0
+#: field:hr.recruitment.report,company_id:0
+msgid "Company"
+msgstr "บริษัท"
+
+#. module: hr_recruitment
+#: view:hr.recruitment.source:0
+#: model:ir.actions.act_window,name:hr_recruitment.hr_recruitment_source_action
+#: model:ir.ui.menu,name:hr_recruitment.menu_hr_recruitment_source
+msgid "Sources of Applicants"
+msgstr ""
+
+#. module: hr_recruitment
+#: code:addons/hr_recruitment/hr_recruitment.py:445
+#, python-format
+msgid "You must define Applied Job for this applicant."
+msgstr ""
+
+#. module: hr_recruitment
+#: view:hr.applicant:0
+msgid "Job"
+msgstr "งาน"
+
+#. module: hr_recruitment
+#: field:hr.recruitment.partner.create,close:0
+msgid "Close job request"
+msgstr ""
+
+#. module: hr_recruitment
+#: model:ir.actions.act_window,help:hr_recruitment.crm_case_categ0_act_job
+msgid ""
+"
\n"
+" Click to add a new job applicant.\n"
+"
\n"
+" OpenERP helps you track applicants in the recruitment\n"
+" process and follow up all operations: meetings, interviews, "
+"etc.\n"
+"
\n"
+" If you setup the email gateway, applicants and their "
+"attached\n"
+" CV are created automatically when an email is sent to\n"
+" jobs@yourcompany.com. If you install the document "
+"management\n"
+" modules, all resumes are indexed automatically, so that you "
+"can\n"
+" easily search through their content.\n"
+"
\n"
+" Click to add a new stage in the recruitment process.\n"
+"
\n"
+" Define here your stages of the recruitment process, for "
+"example:\n"
+" qualification call, first interview, second interview, refused,\n"
+" hired.\n"
+"
\n"
+" In OpenERP, contracts and projects are implemented using\n"
+" analytic account. So, you can track costs and revenues to "
+"analyse\n"
+" your margins easily.\n"
+"
\n"
+" Costs will be created automatically when you register "
+"supplier\n"
+" invoices, expenses or timesheets.\n"
+"
\n"
+" Revenues will be created automatically when you create "
+"customer\n"
+" invoices. Customer invoices can be created based on sale "
+"orders\n"
+" (fixed price invoices), on timesheets (based on the work "
+"done) or\n"
+" on expenses (e.g. reinvoicing of travel costs).\n"
+"
\n"
+" You can register and track your workings hours by project "
+"every\n"
+" day. Every time spent on a project will become a cost in "
+"the\n"
+" analytic accounting/contract and can be re-invoiced to\n"
+" customers if required.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: hr_timesheet
+#: view:hr.analytical.timesheet.employee:0
+#: view:hr.analytical.timesheet.users:0
+msgid "Print"
+msgstr "พิมพ์"
+
+#. module: hr_timesheet
+#: help:account.analytic.account,use_timesheets:0
+msgid "Check this field if this project manages timesheets"
+msgstr ""
+
+#. module: hr_timesheet
+#: view:hr.analytical.timesheet.users:0
+msgid "Monthly Employees Timesheet"
+msgstr ""
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "July"
+msgstr "กรกฎาคม"
+
+#. module: hr_timesheet
+#: field:hr.sign.in.project,date:0
+#: field:hr.sign.out.project,date_start:0
+msgid "Starting Date"
+msgstr "วันที่เริ่ม"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77
+#, python-format
+msgid "Please define cost unit for this employee."
+msgstr ""
+
+#. module: hr_timesheet
+#: help:hr.employee,product_id:0
+msgid "Specifies employee's designation as a product with type 'service'."
+msgstr ""
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/hr_timesheet.py:188
+#, python-format
+msgid ""
+"No analytic account is defined on the project.\n"
+"Please set one or we cannot automatically fill the timesheet."
+msgstr ""
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Total cost"
+msgstr "รวมค่าใช้จ่าย"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/hr_timesheet.py:186
+#, python-format
+msgid ""
+"No 'Analytic Journal' is defined for employee %s \n"
+"Define an employee for the selected user and assign an 'Analytic Journal'!"
+msgstr ""
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "September"
+msgstr "กันยายน"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "December"
+msgstr "ธันวาคม"
+
+#. module: hr_timesheet
+#: field:hr.analytical.timesheet.users,employee_ids:0
+msgid "employees"
+msgstr "พนักงาน"
+
+#. module: hr_timesheet
+#: field:hr.analytical.timesheet.employee,month:0
+#: field:hr.analytical.timesheet.users,month:0
+msgid "Month"
+msgstr "เดือน"
+
+#. module: hr_timesheet
+#: field:hr.sign.out.project,info:0
+msgid "Work Description"
+msgstr "รายละเอียดการทำงาน"
+
+#. module: hr_timesheet
+#: view:hr.analytical.timesheet.employee:0
+#: view:hr.analytical.timesheet.users:0
+#: view:hr.sign.in.project:0
+#: view:hr.sign.out.project:0
+msgid "or"
+msgstr "หรือ"
+
+#. module: hr_timesheet
+#: xsl:hr.analytical.timesheet:0
+msgid "Timesheet by Employee"
+msgstr "บันทึกเวลา โดยพนักงาน"
+
+#. module: hr_timesheet
+#: model:ir.actions.report.xml,name:hr_timesheet.report_user_timesheet
+msgid "Employee timesheet"
+msgstr "บันทึกเวลาของพนักงาน"
+
+#. module: hr_timesheet
+#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_sign_in
+#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_sign_out
+msgid "Sign in / Sign out by project"
+msgstr "เข้าสู่ระบบ / ออกจากระบบ โดยโครงการ"
+
+#. module: hr_timesheet
+#: model:ir.actions.act_window,name:hr_timesheet.action_define_analytic_structure
+msgid "Define your Analytic Structure"
+msgstr ""
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:146
+#: view:hr.sign.in.project:0
+#, python-format
+msgid "Sign in / Sign out"
+msgstr "เข้าสู่ระบบ / ออกจากระบบ"
+
+#. module: hr_timesheet
+#: view:hr.sign.in.project:0
+msgid "(Keep empty for current time)"
+msgstr ""
+
+#. module: hr_timesheet
+#: field:account.analytic.account,use_timesheets:0
+#: view:hr.employee:0
+msgid "Timesheets"
+msgstr "ตารางเวลา"
+
+#. module: hr_timesheet
+#: model:ir.actions.act_window,help:hr_timesheet.action_define_analytic_structure
+msgid ""
+"You should create an analytic account structure depending on your needs to "
+"analyse costs and revenues. In OpenERP, analytic accounts are also used to "
+"track customer contracts."
+msgstr ""
+
+#. module: hr_timesheet
+#: field:hr.analytic.timesheet,line_id:0
+msgid "Analytic Line"
+msgstr ""
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "August"
+msgstr "สิงหาคม"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/hr_timesheet.py:155
+#, python-format
+msgid ""
+"No analytic journal defined for '%s'.\n"
+"You should assign an analytic journal on the employee form."
+msgstr ""
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "June"
+msgstr "มิถุนายน"
+
+#. module: hr_timesheet
+#: field:hr.sign.in.project,state:0
+#: field:hr.sign.out.project,state:0
+msgid "Current Status"
+msgstr "สถานะปัจจุบัน"
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Date"
+msgstr "วันที่"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "November"
+msgstr "พฤศจิกายน"
+
+#. module: hr_timesheet
+#: field:hr.sign.out.project,date:0
+msgid "Closing Date"
+msgstr "ปิดวันที่"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "October"
+msgstr "ตุลาคม"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "January"
+msgstr "มกราคม"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:44
+#: code:addons/hr_timesheet/report/users_timesheet.py:77
+#, python-format
+msgid "Thu"
+msgstr "พฤหัสบดี"
+
+#. module: hr_timesheet
+#: view:hr.sign.in.project:0
+#: view:hr.sign.out.project:0
+msgid "Sign In/Out by Project"
+msgstr "ลงซื่อ เข้า/ออก ตามโครงการ"
+
+#. module: hr_timesheet
+#: model:ir.model,name:hr_timesheet.model_hr_analytical_timesheet_employee
+msgid "Print Employee Timesheet & Print My Timesheet"
+msgstr ""
+
+#. module: hr_timesheet
+#: field:hr.sign.in.project,emp_id:0
+#: field:hr.sign.out.project,emp_id:0
+msgid "Employee ID"
+msgstr "หมายเลข พนักงาน"
+
+#. module: hr_timesheet
+#: view:hr.analytical.timesheet.users:0
+msgid "Period"
+msgstr "คาบ"
+
+#. module: hr_timesheet
+#: view:hr.sign.out.project:0
+msgid "General Information"
+msgstr "ข้อมูลทั่วไป"
+
+#. module: hr_timesheet
+#: view:hr.analytical.timesheet.employee:0
+#: view:hr.analytical.timesheet.users:0
+#: view:hr.sign.in.project:0
+#: view:hr.sign.out.project:0
+msgid "Cancel"
+msgstr "ยกเลิก"
+
+#. module: hr_timesheet
+#: xsl:hr.analytical.timesheet_users:0
+#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_users
+#: model:ir.actions.report.xml,name:hr_timesheet.report_users_timesheet
+#: model:ir.ui.menu,name:hr_timesheet.menu_hr_timesheet_users
+msgid "Employees Timesheet"
+msgstr "เวลาทำงาน พนักงาน"
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Information"
+msgstr "รายละเอียด"
+
+#. module: hr_timesheet
+#: field:hr.analytical.timesheet.employee,employee_id:0
+#: model:ir.model,name:hr_timesheet.model_hr_employee
+msgid "Employee"
+msgstr "พนักงาน"
+
+#. module: hr_timesheet
+#: view:hr.sign.in.project:0
+msgid ""
+"Employees can encode their time spent on the different projects they are "
+"assigned on. A project is an analytic account and the time spent on a "
+"project generates costs on the analytic account. This feature allows to "
+"record at the same time the attendance and the timesheet."
+msgstr ""
+
+#. module: hr_timesheet
+#: field:hr.sign.in.project,server_date:0
+#: field:hr.sign.out.project,server_date:0
+msgid "Current Date"
+msgstr "วันที่ปัจจุบัน"
+
+#. module: hr_timesheet
+#: model:ir.model,name:hr_timesheet.model_hr_analytic_timesheet
+msgid "Timesheet Line"
+msgstr ""
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+#: field:hr.employee,product_id:0
+msgid "Product"
+msgstr "ผลิตภัณฑ์"
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Users"
+msgstr "ผู้ใช้"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "May"
+msgstr "พฤษภาคม"
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Total time"
+msgstr "เวลารวม"
+
+#. module: hr_timesheet
+#: view:hr.sign.in.project:0
+msgid "(local time on the server side)"
+msgstr ""
+
+#. module: hr_timesheet
+#: model:ir.model,name:hr_timesheet.model_hr_sign_in_project
+msgid "Sign In By Project"
+msgstr "เข้าสู่ระบบตามโครงการ"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "February"
+msgstr "กุมภาพันธ์"
+
+#. module: hr_timesheet
+#: model:ir.model,name:hr_timesheet.model_hr_sign_out_project
+msgid "Sign Out By Project"
+msgstr "ลงชื่อออก ตามโครงการ"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/hr_timesheet.py:150
+#, python-format
+msgid ""
+"Please create an employee for this user, using the menu: Human Resources > "
+"Employees."
+msgstr ""
+
+#. module: hr_timesheet
+#: view:hr.analytical.timesheet.users:0
+msgid "Employees"
+msgstr "พนักงาน"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "March"
+msgstr "มีนาคม"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/report/user_timesheet.py:41
+#: code:addons/hr_timesheet/report/users_timesheet.py:73
+#: selection:hr.analytical.timesheet.employee,month:0
+#: selection:hr.analytical.timesheet.users,month:0
+#, python-format
+msgid "April"
+msgstr "เมษายน"
+
+#. module: hr_timesheet
+#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:77
+#: code:addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py:132
+#, python-format
+msgid "User Error!"
+msgstr ""
+
+#. module: hr_timesheet
+#: view:hr.sign.in.project:0
+msgid "Start Working"
+msgstr "เริ่มทำงาน"
+
+#. module: hr_timesheet
+#: field:hr.analytical.timesheet.employee,year:0
+#: field:hr.analytical.timesheet.users,year:0
+msgid "Year"
+msgstr "ปี"
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Duration"
+msgstr "ระยะเวลา"
+
+#. module: hr_timesheet
+#: view:hr.analytic.timesheet:0
+msgid "Accounting"
+msgstr "บัญชี"
+
+#. module: hr_timesheet
+#: xsl:hr.analytical.timesheet:0
+#: xsl:hr.analytical.timesheet_users:0
+msgid "Total"
+msgstr "รวม"
+
+#. module: hr_timesheet
+#: view:hr.sign.out.project:0
+msgid "Change Work"
+msgstr "เปลี่ยนงาน"
diff --git a/addons/hr_timesheet_sheet/i18n/th.po b/addons/hr_timesheet_sheet/i18n/th.po
new file mode 100644
index 00000000000..374870990b1
--- /dev/null
+++ b/addons/hr_timesheet_sheet/i18n/th.po
@@ -0,0 +1,1151 @@
+# Thai 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-06-17 06:47+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Thai
\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-06-18 05:46+0000\n"
+"X-Generator: Launchpad (build 16673)\n"
+
+#. module: hr_timesheet_sheet
+#: field:hr.analytic.timesheet,sheet_id:0
+#: field:hr.attendance,sheet_id:0
+#: field:hr_timesheet_sheet.sheet.account,sheet_id:0
+#: field:hr_timesheet_sheet.sheet.day,sheet_id:0
+msgid "Sheet"
+msgstr "แผ่นงาน"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,name:hr_timesheet_sheet.process_transition_timesheetdraft0
+msgid "Service"
+msgstr "บริการ"
+
+#. module: hr_timesheet_sheet
+#: field:hr.timesheet.report,quantity:0
+#: field:timesheet.report,quantity:0
+msgid "Time"
+msgstr "เวลา"
+
+#. module: hr_timesheet_sheet
+#: help:hr.config.settings,timesheet_max_difference:0
+msgid ""
+"Allowed difference in hours between the sign in/out and the timesheet\n"
+" computation for one sheet. Set this to 0 if you do not want "
+"any control."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: view:hr_timesheet_sheet.sheet:0
+#: view:timesheet.report:0
+msgid "Group By..."
+msgstr "จัดกลุ่มตาม..."
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,total_attendance:0
+msgid "Total Attendance"
+msgstr "รวม การทำงาน"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+#: field:hr_timesheet_sheet.sheet,department_id:0
+#: view:timesheet.report:0
+#: field:timesheet.report,department_id:0
+msgid "Department"
+msgstr "แผนก"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,name:hr_timesheet_sheet.process_transition_tasktimesheet0
+msgid "Task timesheet"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:73
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:86
+#, python-format
+msgid ""
+"In order to create a timesheet for this employee, you must assign an "
+"analytic journal to the employee, like 'Timesheet Journal'."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: selection:hr.timesheet.report,month:0
+#: selection:timesheet.report,month:0
+msgid "March"
+msgstr "มีนาคม"
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+#: field:timesheet.report,cost:0
+msgid "#Cost"
+msgstr "#ต้นทุน"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,message_unread:0
+msgid "Unread Messages"
+msgstr "ข้อความที่ไม่ได้อ่าน"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: field:hr.timesheet.report,company_id:0
+#: field:hr_timesheet_sheet.sheet,company_id:0
+#: view:timesheet.report:0
+#: field:timesheet.report,company_id:0
+msgid "Company"
+msgstr "บริษัท"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: view:hr_timesheet_sheet.sheet:0
+#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_report
+#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_sheet_sheet
+#: model:ir.model,name:hr_timesheet_sheet.model_timesheet_report
+#: model:process.node,name:hr_timesheet_sheet.process_node_timesheet0
+#: view:timesheet.report:0
+msgid "Timesheet"
+msgstr "เวลาทำงาน"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Set to Draft"
+msgstr "กำหนดให้เป็นแบบร่าง"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Timesheet Period"
+msgstr "ระยะเวลาทำงาน"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,date_to:0
+#: field:timesheet.report,date_to:0
+msgid "Date to"
+msgstr "ถึงวันที่"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "to"
+msgstr "ถึง"
+
+#. module: hr_timesheet_sheet
+#: model:process.node,note:hr_timesheet_sheet.process_node_invoiceonwork0
+msgid "Based on the timesheet"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:327
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:398
+#, python-format
+msgid "You cannot modify an entry in a confirmed timesheet."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: view:timesheet.report:0
+msgid "Group by day of date"
+msgstr "กลุ่มโดย วัน ของวันที่"
+
+#. module: hr_timesheet_sheet
+#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current
+msgid "My Current Timesheet"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.transition.action,name:hr_timesheet_sheet.process_transition_action_validatetimesheet0
+msgid "Validate"
+msgstr "ตรวจสอบ"
+
+#. module: hr_timesheet_sheet
+#: selection:hr_timesheet_sheet.sheet,state:0
+msgid "Approved"
+msgstr "อนุมัติแล้ว"
+
+#. module: hr_timesheet_sheet
+#: selection:hr_timesheet_sheet.sheet,state_attendance:0
+msgid "Present"
+msgstr "นำเสนอ"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+msgid "Total Cost"
+msgstr "ค่าใช้จ่ายทั้งหมด"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+#: model:process.transition.action,name:hr_timesheet_sheet.process_transition_action_refusetimesheet0
+msgid "Refuse"
+msgstr "ปฏิเสธ"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet
+msgid "Timesheet Activities"
+msgstr "กิจกรรม เวลาทำงาน"
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py:38
+#, python-format
+msgid "Please create an employee and associate it with this user."
+msgstr "โปรดสร้างพนักงานและเชื่อมโยงกับผู้ใช้นี้"
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:402
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:422
+#, python-format
+msgid ""
+"You cannot enter an attendance date outside the current timesheet dates."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:205
+#, python-format
+msgid "Week "
+msgstr "สัปดาห์ "
+
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,help:hr_timesheet_sheet.action_hr_timesheet_current_open
+msgid ""
+"My Timesheet opens your timesheet so that you can book your activities into "
+"the system. From the same form, you can register your attendances (Sign "
+"In/Out) and describe the working hours made on the different projects. At "
+"the end of the period defined in the company, the timesheet is confirmed by "
+"the user and can be validated by his manager. If required, as defined on the "
+"project, you can generate the invoices based on the timesheet."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,message_ids:0
+msgid "Messages"
+msgstr "ข้อความ"
+
+#. module: hr_timesheet_sheet
+#: help:hr_timesheet_sheet.sheet,state:0
+msgid ""
+" * The 'Draft' status is used when a user is encoding a new and unconfirmed "
+"timesheet. \n"
+"* The 'Confirmed' status is used for to confirm the timesheet by user. "
+" \n"
+"* The 'Done' status is used when users timesheet is accepted by his/her "
+"senior."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:64
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:69
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:71
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:80
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:82
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:84
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:327
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:398
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:429
+#: code:addons/hr_timesheet_sheet/wizard/hr_timesheet_current.py:38
+#, python-format
+msgid "Error!"
+msgstr "ผิดพลาด!"
+
+#. module: hr_timesheet_sheet
+#: field:hr.config.settings,timesheet_max_difference:0
+msgid ""
+"Allow a difference of time between timesheets and attendances of (in hours)"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:99
+#, python-format
+msgid ""
+"Please verify that the total difference of the sheet is lower than %.2f."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.action_timesheet_report_stat_all
+#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_timesheet_report_all
+msgid "Timesheet Sheet Analysis"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet.account,name:0
+msgid "Project / Analytic Account"
+msgstr "โครงการ / วิเคราะห์ บัญชี"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,name:hr_timesheet_sheet.process_transition_validatetimesheet0
+msgid "Validation"
+msgstr "การรับรอง ความถูกต้อง"
+
+#. module: hr_timesheet_sheet
+#: help:hr_timesheet_sheet.sheet,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:69
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:80
+#, python-format
+msgid ""
+"In order to create a timesheet for this employee, you must assign it to a "
+"user."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.node,note:hr_timesheet_sheet.process_node_attendance0
+msgid "Employee's timesheet entry"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:213
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:215
+#, python-format
+msgid "Invalid Action!"
+msgstr "การกระทำไม่ถูกต้อง!"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: field:hr.timesheet.report,account_id:0
+#: view:timesheet.report:0
+#: field:timesheet.report,account_id:0
+msgid "Analytic Account"
+msgstr "วิเคราะห์บัญชี"
+
+#. module: hr_timesheet_sheet
+#: help:hr_timesheet_sheet.sheet,message_summary:0
+msgid ""
+"Holds the Chatter summary (number of messages, ...). This summary is "
+"directly in html format in order to be inserted in kanban views."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:timesheet.report,nbr:0
+msgid "#Nbr"
+msgstr "#Nbr"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,date_from:0
+#: field:timesheet.report,date_from:0
+msgid "Date from"
+msgstr "จากวันที่"
+
+#. module: hr_timesheet_sheet
+#: view:hr.employee:0
+#: view:hr_timesheet_sheet.sheet:0
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_employee_2_hr_timesheet
+#: view:res.company:0
+msgid "Timesheets"
+msgstr "เวลาทำงาน"
+
+#. module: hr_timesheet_sheet
+#: model:process.node,name:hr_timesheet_sheet.process_node_confirmedtimesheet0
+#: view:timesheet.report:0
+#: selection:timesheet.report,state:0
+msgid "Confirmed"
+msgstr "ยืนยันแล้ว"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet.day,total_attendance:0
+#: model:ir.model,name:hr_timesheet_sheet.model_hr_attendance
+#: model:process.node,name:hr_timesheet_sheet.process_node_attendance0
+msgid "Attendance"
+msgstr "เวลาเข้าออกงาน"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition.action,name:hr_timesheet_sheet.process_transition_action_draftconfirmtimesheet0
+msgid "Confirm"
+msgstr "ยืนยัน"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,timesheet_ids:0
+msgid "Timesheet lines"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,message_follower_ids:0
+msgid "Followers"
+msgstr "ติดตาม"
+
+#. module: hr_timesheet_sheet
+#: model:process.node,note:hr_timesheet_sheet.process_node_confirmedtimesheet0
+msgid "State is 'confirmed'."
+msgstr "สถานะคือ 'ยืนยัน'"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,employee_id:0
+msgid "Employee"
+msgstr "พนักงาน"
+
+#. module: hr_timesheet_sheet
+#: selection:hr_timesheet_sheet.sheet,state:0
+#: selection:timesheet.report,state:0
+msgid "New"
+msgstr "สร้างใหม่"
+
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.action_week_attendance_graph
+msgid "My Total Attendances By Week"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet.account,total:0
+msgid "Total Time"
+msgstr "เวลารวม"
+
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_form
+#: model:ir.ui.menu,name:hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form
+msgid "Timesheets to Validate"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Hours"
+msgstr "ชั่วโมง"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: view:timesheet.report:0
+msgid "Group by month of date"
+msgstr "กลุ่ม โดย วันที่ของเดือน"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,note:hr_timesheet_sheet.process_transition_validatetimesheet0
+msgid "The project manager validates the timesheets."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: selection:hr.timesheet.report,month:0
+#: selection:timesheet.report,month:0
+msgid "July"
+msgstr "กรกฎาคม"
+
+#. module: hr_timesheet_sheet
+#: field:hr.config.settings,timesheet_range:0
+msgid "Validate timesheets every"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:73
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:86
+#, python-format
+msgid "Configuration Error!"
+msgstr "การตั้งค่าผิดพลาด"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,state:0
+#: view:timesheet.report:0
+#: field:timesheet.report,state:0
+msgid "Status"
+msgstr "สถานะ"
+
+#. module: hr_timesheet_sheet
+#: model:process.node,name:hr_timesheet_sheet.process_node_workontask0
+msgid "Work on Task"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: selection:hr_timesheet_sheet.sheet,state:0
+msgid "Waiting Approval"
+msgstr "กำลังรอการอนุมัติ"
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+msgid "#Quantity"
+msgstr "#ปริมาณ"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,total_timesheet:0
+#: view:hr_timesheet_sheet.sheet.day:0
+#: field:hr_timesheet_sheet.sheet.day,total_timesheet:0
+msgid "Total Timesheet"
+msgstr "รวมเวลาทำงาน"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Available Attendance"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Sign In"
+msgstr "เข้าสู่ระบบ"
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+#: field:timesheet.report,total_timesheet:0
+msgid "#Total Timesheet"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:ir.model,name:hr_timesheet_sheet.model_hr_timesheet_current_open
+msgid "hr.timesheet.current.open"
+msgstr "hr.timesheet.current.open"
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:71
+#, python-format
+msgid ""
+"In order to create a timesheet for this employee, you must link the employee "
+"to a product, like 'Consultant'."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: selection:hr.timesheet.report,month:0
+#: selection:timesheet.report,month:0
+msgid "September"
+msgstr "กันยายน"
+
+#. module: hr_timesheet_sheet
+#: selection:hr.timesheet.report,month:0
+#: selection:timesheet.report,month:0
+msgid "December"
+msgstr "ธันวาคม"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.current.open:0
+msgid "It will open your current timesheet"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: selection:hr.config.settings,timesheet_range:0
+#: view:hr.timesheet.report:0
+#: field:hr.timesheet.report,month:0
+#: selection:res.company,timesheet_range:0
+#: view:timesheet.report:0
+#: field:timesheet.report,month:0
+msgid "Month"
+msgstr "เดือน"
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+#: field:timesheet.report,total_diff:0
+msgid "#Total Diff"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "In Draft"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,name:hr_timesheet_sheet.process_transition_attendancetimesheet0
+msgid "Sign in/out"
+msgstr "ลงชื่อ เข้า/ออก"
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:84
+#, python-format
+msgid ""
+"In order to create a timesheet for this employee, you must link the employee "
+"to a product."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#. openerp-web
+#: code:addons/hr_timesheet_sheet/static/src/xml/timesheet.xml:58
+#, python-format
+msgid ""
+"You will be able to register your working hours and\n"
+" activities."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.current.open:0
+msgid "or"
+msgstr "หรือ"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,name:hr_timesheet_sheet.process_transition_invoiceontimesheet0
+msgid "Billing"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,note:hr_timesheet_sheet.process_transition_timesheetdraft0
+msgid ""
+"The timesheet line represents the time spent by the employee on a specific "
+"service provided."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,name:0
+msgid "Note"
+msgstr "บันทึกย่อ"
+
+#. module: hr_timesheet_sheet
+#. openerp-web
+#: code:addons/hr_timesheet_sheet/static/src/xml/timesheet.xml:33
+#, python-format
+msgid "Add"
+msgstr "เพิ่ม"
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+#: selection:timesheet.report,state:0
+msgid "Draft"
+msgstr "ฉบับร่าง"
+
+#. module: hr_timesheet_sheet
+#: field:res.company,timesheet_max_difference:0
+msgid "Timesheet allowed difference(Hours)"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,note:hr_timesheet_sheet.process_transition_invoiceontimesheet0
+msgid "The invoice is created based on the timesheet."
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.node,name:hr_timesheet_sheet.process_node_drafttimesheetsheet0
+msgid "Draft Timesheet"
+msgstr "แบบร่าง บันทึกเวลา"
+
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,help:hr_timesheet_sheet.act_hr_timesheet_sheet_form
+msgid ""
+"
\n"
+" New timesheet to approve.\n"
+"
\n"
+" You must record timesheets every day and confirm at the end\n"
+" of the week. Once the timesheet is confirmed, it should be\n"
+" validated by a manager.\n"
+"
\n"
+" Timesheets can also be invoiced to customers, depending on "
+"the\n"
+" configuration of each project's related contract.\n"
+"
\n"
+" This report performs analysis on timesheets created by your\n"
+" human resources in the system. It allows you to have a full\n"
+" overview of entries done by your employees. You can group "
+"them\n"
+" by specific selection criteria thanks to the search tool.\n"
+"
\n"
+" "
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Employees"
+msgstr "พนักงาน"
+
+#. module: hr_timesheet_sheet
+#: constraint:hr.analytic.timesheet:0
+msgid "You cannot modify an entry in a Confirmed/Done timesheet !"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:process.node,note:hr_timesheet_sheet.process_node_timesheet0
+msgid "Information of time spent on a service"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: selection:hr.timesheet.report,month:0
+#: selection:timesheet.report,month:0
+msgid "April"
+msgstr "เมษายน"
+
+#. module: hr_timesheet_sheet
+#: model:process.transition,name:hr_timesheet_sheet.process_transition_confirmtimesheet0
+msgid "Confirmation"
+msgstr "ยืนยัน"
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:99
+#, python-format
+msgid "Warning!"
+msgstr "คำเตือน!"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet.account,invoice_rate:0
+msgid "Invoice rate"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:402
+#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:422
+#, python-format
+msgid "User Error!"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet.day:0
+msgid "Total Difference"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "Approve"
+msgstr "อนุมัติ"
+
+#. module: hr_timesheet_sheet
+#: help:hr_timesheet_sheet.sheet,message_ids:0
+msgid "Messages and communication history"
+msgstr "ข้อความและประวัติการสื่อสาร"
+
+#. module: hr_timesheet_sheet
+#: field:hr_timesheet_sheet.sheet,account_ids:0
+msgid "Analytic accounts"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+#: field:timesheet.report,to_invoice:0
+msgid "Type of Invoicing"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: view:timesheet.report:0
+#: field:timesheet.report,total_attendance:0
+msgid "#Total Attendance"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: field:hr.timesheet.report,cost:0
+msgid "Cost"
+msgstr "ต้นทุน"
+
+#. module: hr_timesheet_sheet
+#: field:timesheet.report,date_current:0
+msgid "Current date"
+msgstr "วันที่ปัจจุบัน"
+
+#. module: hr_timesheet_sheet
+#: model:process.process,name:hr_timesheet_sheet.process_process_hrtimesheetprocess0
+msgid "Hr Timesheet"
+msgstr "บันทึกเวลา Hr"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.report:0
+#: field:hr.timesheet.report,year:0
+#: view:timesheet.report:0
+#: field:timesheet.report,year:0
+msgid "Year"
+msgstr "ปี"
+
+#. module: hr_timesheet_sheet
+#: view:hr.timesheet.current.open:0
+#: selection:hr_timesheet_sheet.sheet,state:0
+msgid "Open"
+msgstr "เปิด"
+
+#. module: hr_timesheet_sheet
+#: view:hr_timesheet_sheet.sheet:0
+msgid "To Approve"
+msgstr "ให้การอนุมัติ"
+
+#. module: hr_timesheet_sheet
+#. openerp-web
+#: code:addons/hr_timesheet_sheet/static/src/xml/timesheet.xml:15
+#: code:addons/hr_timesheet_sheet/static/src/xml/timesheet.xml:40
+#: view:hr_timesheet_sheet.sheet.account:0
+#, python-format
+msgid "Total"
+msgstr "รวม"
+
+#. module: hr_timesheet_sheet
+#: field:hr.timesheet.report,journal_id:0
+msgid "Journal"
+msgstr ""
+
+#. module: hr_timesheet_sheet
+#: model:ir.actions.act_window,name:hr_timesheet_sheet.act_hr_timesheet_sheet_sheet_by_day
+msgid "Timesheet by Day"
+msgstr ""
diff --git a/addons/idea/__init__.py b/addons/idea/__init__.py
index e6f7333e055..2b8966f9e7a 100644
--- a/addons/idea/__init__.py
+++ b/addons/idea/__init__.py
@@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
+# Copyright (C) 2004-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
@@ -19,5 +19,4 @@
#
##############################################################################
-import idea
-
+import models
diff --git a/addons/idea/__openerp__.py b/addons/idea/__openerp__.py
index 8f32e1e91c4..7d8560a2cf4 100644
--- a/addons/idea/__openerp__.py
+++ b/addons/idea/__openerp__.py
@@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
+# Copyright (C) 2004-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
@@ -22,29 +22,39 @@
{
'name': 'Ideas',
- 'version': '0.1',
+ 'summary': 'Share and Discuss your Ideas',
+ 'version': '1.0',
'category': 'Tools',
'description': """
-This module allows user to easily and efficiently participate in enterprise innovation.
-=======================================================================================
+Share your ideas and participate in enterprise innovation
+=========================================================
-It allows everybody to express ideas about different subjects.
-Then, other users can comment on these ideas and vote for particular ideas.
-Each idea has a score based on the different votes.
+The Ideas module give users a way to express and discuss ideas, allowing everybody
+to participate in enterprise innovation. Every user can suggest, comment ideas.
The managers can obtain an easy view of best ideas from all the users.
Once installed, check the menu 'Ideas' in the 'Tools' main menu.""",
'author': 'OpenERP SA',
- 'website': 'http://openerp.com',
+ 'website': 'http://www.openerp.com',
'depends': ['mail'],
'data': [
- 'security/idea_security.xml',
+ 'security/idea.xml',
'security/ir.model.access.csv',
- 'idea_view.xml',
- 'idea_workflow.xml',
+ 'views/idea.xml',
+ 'views/category.xml',
+ 'data/idea.xml',
+ 'data/idea_workflow.xml',
+ ],
+ 'demo': [
+ 'demo/idea.xml',
],
- 'demo': ['idea_data.xml'],
- 'test':[],
'installable': True,
+ 'application': True,
'images': [],
+ 'css': [
+ 'static/src/css/idea_idea.css',
+ ],
+ 'js': [],
+ 'qweb': [],
}
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/idea/data/idea.xml b/addons/idea/data/idea.xml
new file mode 100644
index 00000000000..c057868d6de
--- /dev/null
+++ b/addons/idea/data/idea.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/idea/data/idea_workflow.xml b/addons/idea/data/idea_workflow.xml
new file mode 100644
index 00000000000..b460c73a6ed
--- /dev/null
+++ b/addons/idea/data/idea_workflow.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ idea.wkf
+ idea.idea
+ True
+
+
+
+
+ True
+ normal
+ function
+ idea_set_normal_priority()
+
+
+
+
+ low
+ function
+ idea_set_low_priority()
+
+
+
+
+ high
+ function
+ idea_set_high_priority()
+
+
+
+
+
+ idea_set_low_priority
+
+
+
+
+
+ idea_set_normal_priority
+
+
+
+
+
+ idea_set_high_priority
+
+
+
+
+
+ idea_set_normal_priority
+
+
+
+
diff --git a/addons/idea/demo/idea.xml b/addons/idea/demo/idea.xml
new file mode 100644
index 00000000000..2b4ff58b973
--- /dev/null
+++ b/addons/idea/demo/idea.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Sales
+
+
+ Organization
+
+
+ Technical
+
+
+
+ Docking station along with tablet PC
+ When you sell a tablet PC, maybe we could propose a docking station with it. I offer 20% on the docking stating (not the tablet).
+
+
+
+
+
+ Communicate using emails
+ I start communicating with prospects more by email than phonecalls. I send an email to create a sense of emergency, like "can I call you this week about our quote?" and I call only those that answer this email.
+
+ open
+
+
+
+
+
+ Use a two-stages testing phase
+ We should perform testing using two levels of validation.
+
+ open
+
+
+
+
+
+ Write some functional documentation about procurements
+ We receive many questions about OpenChatter. Maybe some functional doc could save us some time.
+
+ open
+
+
+
+
+ Better management of smtp errors
+ There should be away to store the reason why some emails are not sent.
+
+ close
+
+
+
+
+
+ Kitten mode enabled by default
+ As this is the most loved feature, the kitten mode should be enabled by default. And maybe even impossible to remove.
+
+ cancel
+
+
+
+
+
+
+
diff --git a/addons/idea/idea.py b/addons/idea/idea.py
deleted file mode 100644
index d1e250ce9a5..00000000000
--- a/addons/idea/idea.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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.osv import osv
-from openerp.osv import fields
-from openerp.tools.translate import _
-import time
-
-VoteValues = [('-1', 'Not Voted'), ('0', 'Very Bad'), ('25', 'Bad'), \
- ('50', 'Normal'), ('75', 'Good'), ('100', 'Very Good') ]
-DefaultVoteValue = '50'
-
-class idea_category(osv.osv):
- """ Category of Idea """
- _name = "idea.category"
- _description = "Idea Category"
- _columns = {
- 'name': fields.char('Category Name', size=64, required=True),
- }
- _sql_constraints = [
- ('name', 'unique(name)', 'The name of the category must be unique')
- ]
- _order = 'name asc'
-
-
-class idea_idea(osv.osv):
- """ Idea """
- _name = 'idea.idea'
- _inherit = ['mail.thread']
- _columns = {
- 'create_uid': fields.many2one('res.users', 'Creator', required=True, readonly=True),
- 'name': fields.char('Idea Summary', size=64, required=True, readonly=True, oldname='title', states={'draft': [('readonly', False)]}),
- 'description': fields.text('Description', help='Content of the idea', readonly=True, states={'draft': [('readonly', False)]}),
- 'category_ids': fields.many2many('idea.category', string='Tags', readonly=True, states={'draft': [('readonly', False)]}),
- 'state': fields.selection([('draft', 'New'),
- ('open', 'Accepted'),
- ('cancel', 'Refused'),
- ('close', 'Done')],
- 'Status', readonly=True, track_visibility='onchange',
- )
- }
- _sql_constraints = [
- ('name', 'unique(name)', 'The name of the idea must be unique')
- ]
- _defaults = {
- 'state': lambda *a: 'draft',
- }
- _order = 'name asc'
-
- def idea_cancel(self, cr, uid, ids, context=None):
- return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
-
- def idea_open(self, cr, uid, ids, context={}):
- return self.write(cr, uid, ids, {'state': 'open'}, context=context)
-
- def idea_close(self, cr, uid, ids, context={}):
- return self.write(cr, uid, ids, {'state': 'close'}, context=context)
-
- def idea_draft(self, cr, uid, ids, context={}):
- return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
diff --git a/addons/idea/idea_data.xml b/addons/idea/idea_data.xml
deleted file mode 100644
index 421cb6a9eef..00000000000
--- a/addons/idea/idea_data.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
- Sales
-
-
- Organization
-
-
- Technical
-
-
-
-
-
-
-
-
-
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
deleted file mode 100644
index 53734d53919..00000000000
--- a/addons/idea/idea_view.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
- idea.category.search
- idea.category
-
-
-
-
-
-
-
-
-
- idea.category.form
- idea.category
-
-
-
-
-
-
-
- idea.category.tree
- idea.category
-
-
-
-
-
-
-
-
-
-
-
- Categories
- idea.category
- form
- tree,form
-
-
-
-
-
-
-
-
-
-
-
-
-
- idea.idea.form
- idea.idea
-
-
-
-
-
-
-
-
- idea.idea.tree
- idea.idea
-
-
-
-
-
-
-
-
-
-
-
-
- idea.idea.search
- idea.idea
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Ideas
- idea.idea
- form
- tree,form
-
-
-
-
-
-
-
diff --git a/addons/idea/idea_workflow.xml b/addons/idea/idea_workflow.xml
deleted file mode 100644
index 649541ae349..00000000000
--- a/addons/idea/idea_workflow.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- idea.wkf
- idea.idea
- True
-
-
-
-
- True
- draft
- function
- idea_draft()
-
-
-
-
- open
- function
- idea_open()
-
-
-
-
- close
- function
- idea_close()
- True
-
-
-
-
- cancel
- function
- idea_cancel()
- True
-
-
-
-
-
- idea_open
-
-
-
-
-
- idea_close
-
-
-
-
-
- idea_cancel
-
-
-
-
diff --git a/addons/idea/models/__init__.py b/addons/idea/models/__init__.py
new file mode 100644
index 00000000000..e8a48771771
--- /dev/null
+++ b/addons/idea/models/__init__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2013-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 .
+#
+##############################################################################
+
+import idea
diff --git a/addons/idea/models/idea.py b/addons/idea/models/idea.py
new file mode 100644
index 00000000000..61934cfc3b2
--- /dev/null
+++ b/addons/idea/models/idea.py
@@ -0,0 +1,130 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-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.osv import osv
+from openerp.osv import fields
+
+
+class IdeaCategory(osv.Model):
+ """ Category of Idea """
+ _name = "idea.category"
+ _description = "Idea Category"
+
+ _order = 'name asc'
+
+ _columns = {
+ 'name': fields.char('Category Name', size=64, required=True),
+ }
+
+ _sql_constraints = [
+ ('name', 'unique(name)', 'The name of the category must be unique')
+ ]
+
+
+class IdeaIdea(osv.Model):
+ """ Model of an Idea """
+ _name = 'idea.idea'
+ _description = 'Propose and Share your Ideas'
+
+ _rec_name = 'name'
+ _order = 'name asc'
+
+ def _get_state_list(self, cr, uid, context=None):
+ return [('draft', 'New'),
+ ('open', 'In discussion'),
+ ('close', 'Accepted'),
+ ('cancel', 'Refused')]
+
+ def _get_color(self, cr, uid, ids, fields, args, context=None):
+ res = dict.fromkeys(ids, 3)
+ for idea in self.browse(cr, uid, ids, context=context):
+ if idea.priority == 'low':
+ res[idea.id] = 0
+ elif idea.priority == 'high':
+ res[idea.id] = 7
+ return res
+
+ _columns = {
+ 'user_id': fields.many2one('res.users', 'Responsible', required=True),
+ 'name': fields.char('Summary', required=True, readonly=True,
+ states={'draft': [('readonly', False)]},
+ oldname='title'),
+ 'description': fields.text('Description', required=True,
+ states={'draft': [('readonly', False)]},
+ help='Content of the idea'),
+ 'category_ids': fields.many2many('idea.category', string='Tags'),
+ 'state': fields.selection(_get_state_list, string='Status', required=True),
+ 'priority': fields.selection([('low', 'Low'), ('normal', 'Normal'), ('high', 'High')],
+ string='Priority', required=True),
+ 'color': fields.function(_get_color, type='integer', string='Color Index'),
+ }
+
+ _sql_constraints = [
+ ('name', 'unique(name)', 'The name of the idea must be unique')
+ ]
+
+ _defaults = {
+ 'user_id': lambda self, cr, uid, ctx=None: uid,
+ 'state': lambda self, cr, uid, ctx=None: self._get_state_list(cr, uid, ctx)[0][0],
+ 'priority': 'normal',
+ }
+
+ #------------------------------------------------------
+ # Technical stuff
+ #------------------------------------------------------
+
+ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
+ """ Override read_group to always display all states. """
+ if groupby and groupby[0] == "state":
+ # Default result structure
+ states = self._get_state_list(cr, uid, context=context)
+ read_group_all_states = [{
+ '__context': {'group_by': groupby[1:]},
+ '__domain': domain + [('state', '=', state_value)],
+ 'state': state_value,
+ 'state_count': 0,
+ } for state_value, state_name in states]
+ # Get standard results
+ read_group_res = super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
+ # Update standard results with default results
+ result = []
+ for state_value, state_name in states:
+ res = filter(lambda x: x['state'] == state_value, read_group_res)
+ if not res:
+ res = filter(lambda x: x['state'] == state_value, read_group_all_states)
+ res[0]['state'] = [state_value, state_name]
+ result.append(res[0])
+ return result
+ else:
+ return super(IdeaIdea, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
+
+ #------------------------------------------------------
+ # Workflow / Actions
+ #------------------------------------------------------
+
+ def idea_set_low_priority(self, cr, uid, ids, context=None):
+ return self.write(cr, uid, ids, {'priority': 'low'}, context=context)
+
+ def idea_set_normal_priority(self, cr, uid, ids, context={}):
+ return self.write(cr, uid, ids, {'priority': 'normal'}, context=context)
+
+ def idea_set_high_priority(self, cr, uid, ids, context={}):
+ return self.write(cr, uid, ids, {'priority': 'high'}, context=context)
diff --git a/addons/idea/security/idea.xml b/addons/idea/security/idea.xml
new file mode 100644
index 00000000000..e7a0d800187
--- /dev/null
+++ b/addons/idea/security/idea.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/addons/idea/security/idea_security.xml b/addons/idea/security/idea_security.xml
deleted file mode 100644
index 8743252c9e5..00000000000
--- a/addons/idea/security/idea_security.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
- User
-
-
-
-
-
-
diff --git a/addons/idea/security/ir.model.access.csv b/addons/idea/security/ir.model.access.csv
index 78b8deeaf57..761ada8132c 100644
--- a/addons/idea/security/ir.model.access.csv
+++ b/addons/idea/security/ir.model.access.csv
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_idea_category_user,idea.category user,model_idea_category,base.group_tool_user,1,1,1,1
-access_idea_idea_user,idea.idea user,model_idea_idea,base.group_tool_user,1,1,1,1
+access_idea_category_user,idea.category.user,model_idea_category,base.group_user,1,1,1,1
+access_idea_idea_user,idea.idea.user,model_idea_idea,base.group_user,1,1,1,1
diff --git a/addons/idea/static/src/css/idea_idea.css b/addons/idea/static/src/css/idea_idea.css
new file mode 100644
index 00000000000..08daffd902a
--- /dev/null
+++ b/addons/idea/static/src/css/idea_idea.css
@@ -0,0 +1,21 @@
+.openerp .oe_kanban_view .oe_kanban_idea_idea {
+ width: 200px;
+}
+
+.openerp .oe_kanban_view .oe_kanban_idea_idea .oe_avatars {
+ text-align: right;
+ margin: -5px 0 -10px 0;
+}
+
+.openerp .oe_kanban_view .oe_kanban_idea_idea .oe_avatars img {
+ width: 30px;
+ height: 30px;
+ padding-left: 0px;
+ margin-top: 3px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
+ -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
+}
diff --git a/addons/idea/static/src/img/icon.png b/addons/idea/static/src/img/icon.png
new file mode 100644
index 00000000000..1f0cba223bb
Binary files /dev/null and b/addons/idea/static/src/img/icon.png differ
diff --git a/addons/google_base_account/wizard/__init__.py b/addons/idea/tests/__init__.py
similarity index 82%
rename from addons/google_base_account/wizard/__init__.py
rename to addons/idea/tests/__init__.py
index a6b9c644a1e..a53567a380b 100644
--- a/addons/google_base_account/wizard/__init__.py
+++ b/addons/idea/tests/__init__.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2013-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
@@ -15,11 +15,14 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
-import google_login
+from openerp.addons.idea.tests import test_idea
+
+checks = [
+ test_idea,
+]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/portal_event/event.py b/addons/idea/tests/test_idea.py
similarity index 54%
rename from addons/portal_event/event.py
rename to addons/idea/tests/test_idea.py
index 45026da4eba..4ca9bb9dcb9 100644
--- a/addons/portal_event/event.py
+++ b/addons/idea/tests/test_idea.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
+# OpenERP, Open Source Business Applications
+# Copyright (c) 2013-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
@@ -19,21 +19,21 @@
#
##############################################################################
-from openerp.osv import fields, osv
+from openerp.tests import common
-class event_event(osv.osv):
- _description = 'Portal event'
- _inherit = 'event.event'
- """
- ``visibility``: defines if the event appears on the portal's event page
- - 'public' means the event will appear for everyone (anonymous)
- - 'private' means the event won't appear
- """
- _columns = {
- 'visibility': fields.selection([('public', 'Public'),('private', 'Private')],
- string='Visibility', help='Event\'s visibility in the portal\'s contact page'),
- }
- _defaults = {
- 'visibility': 'private',
- }
+class TestIdeaBase(common.TransactionCase):
+
+ def setUp(self):
+ super(TestIdeaBase, self).setUp()
+ cr, uid = self.cr, self.uid
+
+ # Usefull models
+ self.idea_category = self.registry('idea.category')
+ self.idea_idea = self.registry('idea.idea')
+
+ def tearDown(self):
+ super(TestIdeaBase, self).tearDown()
+
+ def test_OO(self):
+ pass
diff --git a/addons/idea/views/category.xml b/addons/idea/views/category.xml
new file mode 100644
index 00000000000..79725fad73f
--- /dev/null
+++ b/addons/idea/views/category.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ idea.category.search
+ idea.category
+
+
+
+
+
+
+
+
+ idea.category.form
+ idea.category
+
+
+
+
+
+
+ idea.category.tree
+ idea.category
+
+
+
+
+
+
+
+
+
+ Categories
+ idea.category
+ form
+ tree,form
+
+
+
+
+
+
+
+
+
diff --git a/addons/idea/views/idea.xml b/addons/idea/views/idea.xml
new file mode 100644
index 00000000000..b228af2da45
--- /dev/null
+++ b/addons/idea/views/idea.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+ idea.idea.kanban
+ idea.idea
+
+
+
+
+
+
+