bzr revid: uco@tinyerp.com-20101004072025-a7q010hoy7qtttdv
This commit is contained in:
uco (Open ERP) 2010-10-04 12:50:25 +05:30
commit 268ef5ab62
115 changed files with 2733 additions and 1130 deletions

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-09-29 08:13+0000\n"
"PO-Revision-Date: 2010-10-03 09:42+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-30 04:41+0000\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -2116,7 +2116,7 @@ msgstr "дней"
#. module: account
#: selection:account.aged.trial.balance,init,direction_selection:0
msgid "Past"
msgstr ""
msgstr "Прошлые"
#. module: account
#: field:account.analytic.account,company_currency_id:0
@ -2267,7 +2267,7 @@ msgstr "Создать проводки подписки"
#. module: account
#: wizard_field:account.fiscalyear.close,init,journal_id:0
msgid "Opening Entries Journal"
msgstr ""
msgstr "Открытие журнала проводок"
#. module: account
#: view:account.config.wizard:0
@ -3839,7 +3839,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_wizard_company_setup_form
#: view:wizard.company.setup:0
msgid "Overdue Payment Report Message"
msgstr ""
msgstr "Сообщение о просроченном платеже"
#. module: account
#: selection:account.tax,tax_group:0
@ -3894,12 +3894,12 @@ msgstr "Финансовые журналы"
#: selection:account.partner.balance.report,init,state:0
#: selection:account.third_party_ledger.report,init,state:0
msgid "By Period"
msgstr ""
msgstr "По периоду"
#. module: account
#: help:account.invoice,date_invoice:0
msgid "Keep empty to use the current date"
msgstr ""
msgstr "Оставьте пустым для текущей даты"
#. module: account
#: rml:account.overdue:0
@ -3909,7 +3909,7 @@ msgstr "."
#. module: account
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr ""
msgstr "Максимальное количество"
#. module: account
#: field:account.period,name:0
@ -3932,7 +3932,7 @@ msgstr "Группы"
#. module: account
#: rml:account.analytic.account.quantity_cost_ledger:0
msgid "Code/Date"
msgstr ""
msgstr "Код/Дата"
#. module: account
#: field:account.account,active:0
@ -3953,7 +3953,7 @@ msgstr ""
#. module: account
#: view:account.chart.template:0
msgid "Properties"
msgstr ""
msgstr "Параметры"
#. module: account
#: view:res.partner:0
@ -3973,7 +3973,7 @@ msgstr ""
#. module: account
#: wizard_field:account.vat.declaration,init,based_on:0
msgid "Base on"
msgstr ""
msgstr "Основан на"
#. module: account
#: selection:account.move,type:0
@ -4365,7 +4365,7 @@ msgstr ""
#: field:account.config.wizard,date2:0
#: field:account.fiscalyear,date_stop:0
msgid "End Date"
msgstr ""
msgstr "Дата окончания"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_open_closed_fiscalyear
@ -4381,7 +4381,7 @@ msgstr ""
#. module: account
#: field:account.payment.term.line,days2:0
msgid "Day of the Month"
msgstr ""
msgstr "День месяца"
#. module: account
#: field:account.analytic.journal,line_ids:0
@ -4542,7 +4542,7 @@ msgstr "Разрегить сверку"
#: selection:account.partner.balance.report,init,state:0
#: selection:account.third_party_ledger.report,init,state:0
msgid "By Date"
msgstr ""
msgstr "По дате"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree4
@ -4558,7 +4558,7 @@ msgstr "Дата сгенерированных проводок"
#. module: account
#: wizard_button:account.invoice.refund,init,modify_invoice:0
msgid "Modify Invoice"
msgstr ""
msgstr "Изменить счет"
#. module: account
#: view:res.partner:0
@ -4568,7 +4568,7 @@ msgstr "Настройки бухгалтерского учета для кон
#. module: account
#: view:account.analytic.account:0
msgid "Analytic Account Statistics"
msgstr ""
msgstr "Статистика счета аналитики"
#. module: account
#: view:wizard.multi.charts.accounts:0
@ -4598,12 +4598,12 @@ msgstr ""
#. module: account
#: wizard_field:account.aged.trial.balance,init,result_selection:0
msgid "Filter on Partners"
msgstr ""
msgstr "Фильтр по партнерам"
#. module: account
#: field:account.tax,price_include:0
msgid "Tax Included in Price"
msgstr ""
msgstr "Налог включен в цену"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_journal_tree2
@ -4684,7 +4684,7 @@ msgstr "Учетные годы"
#. module: account
#: model:process.node,note:account.process_node_importinvoice0
msgid "Import from invoices or payments"
msgstr ""
msgstr "Импорт из счетов или платежей"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_reconcile_select
@ -4741,7 +4741,7 @@ msgstr "Адрес выставления счета"
#. module: account
#: rml:account.analytic.account.analytic.check:0
msgid "General Credit"
msgstr ""
msgstr "Общий кредит"
#. module: account
#: help:account.journal,centralisation:0
@ -4754,7 +4754,7 @@ msgstr ""
#. module: account
#: selection:account.invoice,state:0
msgid "Cancelled"
msgstr ""
msgstr "Отменено"
#. module: account
#: model:ir.actions.act_window,name:account.action_bank_statement_draft_tree
@ -4765,7 +4765,7 @@ msgstr "Черновые выписки"
#. module: account
#: wizard_field:populate_statement_from_inv,init,date:0
msgid "Date payment"
msgstr ""
msgstr "Дата оплаты"
#. module: account
#: rml:account.journal.period.print:0
@ -4782,7 +4782,7 @@ msgstr "Расходы и доходы по журналам (текущий м
#: selection:account.partner.balance.report,init,result_selection:0
#: selection:account.third_party_ledger.report,init,result_selection:0
msgid "Receivable Accounts"
msgstr ""
msgstr "Счета к получению"
#. module: account
#: wizard_button:account.move.line.unreconcile.select,init,open:0
@ -4838,7 +4838,7 @@ msgstr "НДС:"
#: rml:account.general.journal:0
#: rml:account.invoice:0
msgid "Total:"
msgstr ""
msgstr "Всего:"
#. module: account
#: model:ir.model,name:account.model_account_analytic_journal
@ -4893,7 +4893,7 @@ msgstr ""
#: field:account.bank.statement.reconcile,total_amount:0
#: field:account.bank.statement.reconcile,total_second_amount:0
msgid "Payment amount"
msgstr ""
msgstr "Сумма оплаты"
#. module: account
#: view:account.analytic.account:0
@ -4940,7 +4940,7 @@ msgstr "Все месяцы"
#. module: account
#: wizard_field:account.invoice.refund,init,date:0
msgid "Operation date"
msgstr ""
msgstr "Дата операции"
#. module: account
#: field:account.invoice,invoice_line:0
@ -4950,7 +4950,7 @@ msgstr "Позиции счета"
#. module: account
#: field:account.period,date_start:0
msgid "Start of Period"
msgstr ""
msgstr "Начало периода"
#. module: account
#: wizard_field:account.fiscalyear.close,init,report_name:0
@ -5008,12 +5008,12 @@ msgstr ""
#. module: account
#: rml:account.account.balance:0
msgid "Account Balance -"
msgstr ""
msgstr "Баланс по счету -"
#. module: account
#: field:account.journal,group_invoice_lines:0
msgid "Group invoice lines"
msgstr ""
msgstr "Группировать позиции счета"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_configuration
@ -5058,7 +5058,7 @@ msgstr ""
#: wizard_view:account.partner.balance.report,init:0
#: wizard_view:account.third_party_ledger.report,init:0
msgid "Select Date-Period"
msgstr ""
msgstr "Выбор даты-периода"
#. module: account
#: rml:account.analytic.account.inverted.balance:0
@ -5069,7 +5069,7 @@ msgstr ""
#: model:process.node,name:account.process_node_paidinvoice0
#: model:process.node,name:account.process_node_supplierpaidinvoice0
msgid "Paid invoice"
msgstr ""
msgstr "Оплаченный счет"
#. module: account
#: view:account.tax:0
@ -5099,7 +5099,7 @@ msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.wizard_populate_statement_from_inv
msgid "Import invoices"
msgstr ""
msgstr "Импорт счетов"
#. module: account
#: wizard_view:account.move.line.unreconcile,init:0
@ -5143,7 +5143,7 @@ msgstr "Периоды подписки"
#. module: account
#: model:process.node,name:account.process_node_manually0
msgid "Manually"
msgstr ""
msgstr "Вручную"
#. module: account
#: view:account.invoice:0
@ -5162,7 +5162,7 @@ msgstr "Счета"
#: selection:account.partner.balance.report,init,result_selection:0
#: selection:account.third_party_ledger.report,init,result_selection:0
msgid "Payable Accounts"
msgstr ""
msgstr "Кредиторская задолженность"
#. module: account
#: view:account.invoice.line:0
@ -5183,12 +5183,12 @@ msgstr "Полный платеж"
#. module: account
#: selection:account.move,type:0
msgid "Journal Purchase"
msgstr ""
msgstr "Журнал покупок"
#. module: account
#: selection:account.move,type:0
msgid "Cash Receipt"
msgstr ""
msgstr "Денежное поступление"
#. module: account
#: field:account.fiscal.position.tax,tax_dest_id:0
@ -5254,12 +5254,12 @@ msgstr ""
#: wizard_view:account.partner.balance.report,init:0
#: wizard_view:account.third_party_ledger.report,init:0
msgid "Date Filter"
msgstr ""
msgstr "Фильтр дат"
#. module: account
#: wizard_view:populate_statement_from_inv,init:0
msgid "Choose Journal and Payment Date"
msgstr ""
msgstr "Выбрать журнал и дату платежа"
#. module: account
#: selection:account.analytic.account,state:0
@ -5288,7 +5288,7 @@ msgstr "Невыплаченные возвраты клиентам"
#. module: account
#: help:account.invoice,residual:0
msgid "Remaining amount due."
msgstr ""
msgstr "Оставшиеся суммы"
#. module: account
#: wizard_view:account.period.close,init:0
@ -5304,7 +5304,7 @@ msgstr "Проформа"
#. module: account
#: field:account.move.reconcile,line_partial_ids:0
msgid "Partial Entry lines"
msgstr ""
msgstr "Частичная проводка"
#. module: account
#: help:account.move.line,statement_id:0
@ -5319,7 +5319,7 @@ msgstr "Отчетный год"
#. module: account
#: wizard_button:account.analytic.line,init,open:0
msgid "Open Entries"
msgstr ""
msgstr "Открытые проводки"
#. module: account
#: selection:account.analytic.account,type:0
@ -5344,7 +5344,7 @@ msgstr ""
#: rml:account.third_party_ledger_other:0
#: rml:account.vat.declaration:0
msgid "Page"
msgstr ""
msgstr "Страница"
#. module: account
#: view:account.move:0
@ -5377,7 +5377,7 @@ msgstr "Сверенная сумма"
#. module: account
#: selection:account.account,currency_mode:0
msgid "At Date"
msgstr ""
msgstr "На дату"
#. module: account
#: help:account.move.line,tax_amount:0
@ -5419,7 +5419,7 @@ msgstr ""
#. module: account
#: field:account.subscription,period_total:0
msgid "Number of Periods"
msgstr ""
msgstr "Количество периодов"
#. module: account
#: wizard_field:account.analytic.account.analytic.check.report,init,date2:0
@ -5488,7 +5488,7 @@ msgstr ""
#. module: account
#: field:wizard.multi.charts.accounts,bank_accounts_id:0
msgid "Bank Accounts"
msgstr ""
msgstr "Банковские счета"
#. module: account
#: constraint:account.period:0
@ -5500,7 +5500,7 @@ msgstr ""
#. module: account
#: help:account.journal,invoice_sequence_id:0
msgid "The sequence used for invoice numbers in this journal."
msgstr ""
msgstr "Последовательность используемая для нумерации счетов в этом журнале"
#. module: account
#: view:account.account:0
@ -5549,7 +5549,7 @@ msgstr "Список счетов"
#: view:product.product:0
#: view:product.template:0
msgid "Sales Properties"
msgstr ""
msgstr "Свойства продаж"
#. module: account
#: rml:account.general.journal:0
@ -5565,12 +5565,12 @@ msgstr "Книга расходов (только количество)"
#. module: account
#: wizard_view:account.move.validate,init:0
msgid "Validate Account Entries"
msgstr ""
msgstr "Утвердить проводки"
#. module: account
#: selection:account.print.journal.report,init,sort_selection:0
msgid "Reference Number"
msgstr ""
msgstr "Ссылка"
#. module: account
#: rml:account.overdue:0
@ -5586,7 +5586,7 @@ msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_journal_open_form
msgid "Entries of Open Analytic Journals"
msgstr ""
msgstr "Проводки открытых журналов аналитики"
#. module: account
#: view:account.invoice.tax:0
@ -5601,7 +5601,7 @@ msgstr "Текущая дата"
#. module: account
#: selection:account.move,type:0
msgid "Journal Sale"
msgstr ""
msgstr "Журнал продаж"
#. module: account
#: wizard_field:account.fiscalyear.close,init,fy_id:0
@ -5624,12 +5624,12 @@ msgstr "Начало периода"
#. module: account
#: model:ir.ui.menu,name:account.account_template_folder
msgid "Templates"
msgstr ""
msgstr "Шаблоны"
#. module: account
#: wizard_button:account.vat.declaration,init,report:0
msgid "Print VAT Decl."
msgstr ""
msgstr "Печать декл. НДС"
#. module: account
#: model:ir.actions.report.xml,name:account.account_intracom
@ -5682,7 +5682,7 @@ msgstr "Шаблоны для плана счетов"
#. module: account
#: view:account.config.wizard:0
msgid "Account Configure"
msgstr ""
msgstr "Настройка счета"
#. module: account
#: help:res.partner,property_account_payable:0

View File

@ -343,7 +343,6 @@ class account_invoice(osv.osv):
def _get_analytic_lines(self, cr, uid, id):
inv = self.browse(cr, uid, [id])[0]
cur_obj = self.pool.get('res.currency')
company_currency = inv.company_id.currency_id.id
if inv.type in ('out_invoice', 'in_refund'):
sign = 1
@ -354,7 +353,7 @@ class account_invoice(osv.osv):
acct_ins_obj = self.pool.get('account.analytic.plan.instance')
for il in iml:
if il['analytics_id']:
if il.get('analytics_id', False):
if inv.type in ('in_invoice', 'in_refund'):
ref = inv.reference
@ -363,7 +362,7 @@ class account_invoice(osv.osv):
obj_move_line = acct_ins_obj.browse(cr, uid, il['analytics_id'])
amount_calc = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, il['price'], context={'date': inv.date_invoice}) * sign
qty = il['quantity']
il['analytic_lines']=[]
il['analytic_lines'] = []
for line2 in obj_move_line.account_ids:
amt = amount_calc * (line2.rate/100)
qtty = qty* (line2.rate/100)
@ -419,5 +418,4 @@ class sale_order_line(osv.osv):
sale_order_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-09-30 13:07+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"PO-Revision-Date: 2010-10-01 11:48+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 12:50+0000\n"
"PO-Revision-Date: 2010-09-30 13:20+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"PO-Revision-Date: 2010-10-01 11:59+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_anglo_saxon

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 13:11+0000\n"
"PO-Revision-Date: 2010-10-01 06:44+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"PO-Revision-Date: 2010-10-01 11:59+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_coda

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
"PO-Revision-Date: 2010-10-01 07:53+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"PO-Revision-Date: 2010-10-01 11:59+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-19 12:20+0000\n"
"PO-Revision-Date: 2010-10-01 08:47+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"PO-Revision-Date: 2010-10-02 08:12+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-01 08:48+0000\n"
"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_action_rule
@ -185,42 +185,42 @@ msgstr "Laatste actiedatum"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Hours"
msgstr ""
msgstr "Uren"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_id)s = Object ID"
msgstr ""
msgstr "%(object_id)s = Object ID"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Delay After Trigger Date"
msgstr ""
msgstr "Vertraging na Activeerdatum"
#. module: base_action_rule
#: field:base.action.rule,act_remind_attach:0
msgid "Remind with Attachment"
msgstr ""
msgstr "Herinneren met bijlage"
#. module: base_action_rule
#: constraint:ir.cron:0
msgid "Invalid arguments"
msgstr ""
msgstr "Ongeldige argumenten"
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible to"
msgstr ""
msgstr "Zet verantwoordelijke op"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "None"
msgstr ""
msgstr "Geen"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_phone)s = Responsible phone"
msgstr ""
msgstr "%(object_user_phone)s = Telefoon verantwoordelijke"
#. module: base_action_rule
#: view:base.action.rule:0
@ -228,11 +228,14 @@ msgid ""
"The rule uses the AND operator. The model must match all non-empty fields so "
"that the rule executes the action described in the 'Actions' tab."
msgstr ""
"De regel gebruikt een EN bewerking. Het model moet met alle niet-lege velden "
"overeenkomen om de regel de in de 'Acties' tab beschreven actie te laten "
"uitvoeren."
#. module: base_action_rule
#: field:base.action.rule,trg_date_range_type:0
msgid "Delay type"
msgstr ""
msgstr "Soort vertraging"
#. module: base_action_rule
#: help:base.action.rule,regex_name:0
@ -242,11 +245,15 @@ msgid ""
"string 'urgent'\n"
"Note: This is case sensitive search."
msgstr ""
"Reguliere expressie voor overeenkomende naam van de bron; \n"
"i.e.: 'urgent.*' zal zoeken naar records met de naam beginnend met de tekst "
"'urgent'\n"
"Opmerking: dit zoeken is hoofdletter gevoelig."
#. module: base_action_rule
#: field:base.action.rule,act_method:0
msgid "Call Object Method"
msgstr ""
msgstr "Object-methode aanroepen"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_watchers:0
@ -254,31 +261,33 @@ msgid ""
"Check this if you want the rule to mark CC(mail to any other person defined "
"in actions)."
msgstr ""
"Vink aan als u wilt dat de regel CC markeert (mail naar een andere in de "
"acties gedefinieerde persoon)."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner)s = Partner name"
msgstr ""
msgstr "%(partner)s = Naam relatie"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Note"
msgstr ""
msgstr "Notitie"
#. module: base_action_rule
#: constraint:ir.ui.menu:0
msgid "Error ! You can not create recursive Menu."
msgstr ""
msgstr "Fout ! U kunt geen recursief menu maken."
#. module: base_action_rule
#: field:base.action.rule,trg_date_range:0
msgid "Delay after trigger date"
msgstr ""
msgstr "Vertraging na activeerdatum"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions"
msgstr ""
msgstr "Voorwaarden"
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
@ -287,47 +296,50 @@ msgid ""
"need a delay before the trigger date, like sending a reminder 15 minutes "
"before a meeting."
msgstr ""
"Vertraging na activeerdatum, specificeert dat u een negatief getal kunt "
"invoeren als u vertraging vóór de activeerdatum wilt, zoals een herinnering "
"15 minuten voor een vergadering versturen."
#. module: base_action_rule
#: field:base.action.rule,active:0
msgid "Active"
msgstr ""
msgstr "Actief"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:0
#, python-format
msgid "No E-Mail ID Found for your Company address!"
msgstr ""
msgstr "Geen email-ID gevonden bij uw bedrijfsadres!"
#. module: base_action_rule
#: field:base.action.rule,act_remind_user:0
msgid "Remind Responsible"
msgstr ""
msgstr "Herinneren verantwoordelijke"
#. module: base_action_rule
#: model:ir.module.module,description:base_action_rule.module_meta_information
msgid "This module allows to implement action rules for any object."
msgstr ""
msgstr "Deze module laat u actieregels voor elk object implementeren."
#. module: base_action_rule
#: help:base.action.rule,sequence:0
msgid "Gives the sequence order when displaying a list of rules."
msgstr ""
msgstr "Geeft de volgorde aan waarin de lijst van regels wordt weergegeven."
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Months"
msgstr ""
msgstr "Maanden"
#. module: base_action_rule
#: field:base.action.rule,filter_id:0
msgid "Filter"
msgstr ""
msgstr "Filter"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Date"
msgstr ""
msgstr "Datum"
#. module: base_action_rule
#: help:base.action.rule,server_action_id:0
@ -335,108 +347,111 @@ msgid ""
"Describes the action name.\n"
"eg:on which object which action to be taken on basis of which condition"
msgstr ""
"Beschrijft de actie naam.\n"
"ie: op welk object welke actie wordt uitgevoerd onder welke conditie"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_ir_cron
msgid "ir.cron"
msgstr ""
msgstr "ir.cron"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_description)s = Object description"
msgstr ""
msgstr "%(object_description)s = Object omschrijving"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Actions"
msgstr ""
msgstr "Email acties"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Information"
msgstr ""
msgstr "Email Informatie"
#. module: base_action_rule
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule
msgid "Action Rules"
msgstr ""
msgstr "Actieregels"
#. module: base_action_rule
#: help:base.action.rule,act_mail_body:0
msgid "Content of mail"
msgstr ""
msgstr "Inhoud van mail"
#. module: base_action_rule
#: field:base.action.rule,trg_user_id:0
msgid "Responsible"
msgstr ""
msgstr "Verantwoordelijke"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner_email)s = Partner Email"
msgstr ""
msgstr "%(partner_email)s = Relatie email"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_date)s = Creation date"
msgstr ""
msgstr "%(object_date)s = Aanmaakdatum"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_email)s = Responsible Email"
msgstr ""
msgstr "%(object_user_email)s = Verantwoordelijke email"
#. module: base_action_rule
#: field:base.action.rule,act_mail_body:0
msgid "Mail body"
msgstr ""
msgstr "E-mail berichttekst"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_watchers:0
msgid "Mail to Watchers (CC)"
msgstr ""
msgstr "E-mail naar toeschouwers (CC)"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server Action to be Triggered"
msgstr ""
msgstr "Server actie om te activeren"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_user:0
msgid "Mail to Responsible"
msgstr ""
msgstr "E-mail naar verantwoordelijke"
#. module: base_action_rule
#: field:base.action.rule,act_email_cc:0
msgid "Add Watchers (Cc)"
msgstr ""
msgstr "Toevoegen toeschouwers (Cc)"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Fields"
msgstr ""
msgstr "Voorwaarden op Model velden"
#. module: base_action_rule
#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act
#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form
msgid "Automated Actions"
msgstr ""
msgstr "Geautomatiseerde acties"
#. module: base_action_rule
#: field:base.action.rule,server_action_id:0
msgid "Server Action"
msgstr ""
msgstr "Server-actie"
#. module: base_action_rule
#: field:base.action.rule,regex_name:0
msgid "Regex on Resource Name"
msgstr ""
msgstr "Regex op bronnaam"
#. module: base_action_rule
#: help:base.action.rule,act_remind_attach:0
@ -444,21 +459,23 @@ msgid ""
"Check this if you want that all documents attached to the object be attached "
"to the reminder email sent."
msgstr ""
"Vink dit aan als u wilt dat alle bij het object gevoegde documenten worden "
"bijgevoegd bij de verstuurde herinnering."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Timing"
msgstr ""
msgstr "Voorwaarden op timing"
#. module: base_action_rule
#: field:base.action.rule,sequence:0
msgid "Sequence"
msgstr ""
msgstr "Volgnummer"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Actions"
msgstr ""
msgstr "Acties"
#. module: base_action_rule
#: help:base.action.rule,active:0
@ -466,23 +483,25 @@ msgid ""
"If the active field is set to False, it will allow you to hide the rule "
"without removing it."
msgstr ""
"Als het actief veld uitzet, kunt u de regel verbergen zonder haar te "
"verwijderen."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user)s = Responsible name"
msgstr ""
msgstr "%(object_user)s = Naam verantwoordelijke"
#. module: base_action_rule
#: field:base.action.rule,create_date:0
msgid "Create Date"
msgstr ""
msgstr "Aanmaakdatum"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on States"
msgstr ""
msgstr "Voorwaarden op status"
#. module: base_action_rule
#: field:base.action.rule,trg_date_type:0
msgid "Trigger Date"
msgstr ""
msgstr "Activeerdatum"

View File

@ -122,7 +122,7 @@
separator="1" help="Delegated Invitations" />
<separator orientation="vertical"/>
<field name="email" select='1'/>
<field name="user_id" select="1"/>
<field name="user_id" select="1" string="Responsible"/>
<separator orientation="vertical"/>
<field name="cutype" string="Invitation type" select="1"/>
<field name="event_date" select="1"/>

View File

@ -8,32 +8,32 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-19 12:50+0000\n"
"PO-Revision-Date: 2010-09-16 12:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2010-10-03 20:01+0000\n"
"Last-Translator: Wouter Schrijvers <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_calendar
#: selection:calendar.alarm,trigger_related:0
#: selection:res.alarm,trigger_related:0
msgid "The event starts"
msgstr ""
msgstr "De activiteit begint"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
#: selection:calendar.event,freq:0
#: selection:calendar.todo,freq:0
msgid "Hourly"
msgstr ""
msgstr "Ieder uur"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Required to Join"
msgstr ""
msgstr "Deelname vereist"
#. module: base_calendar
#: help:calendar.event,exdate:0
@ -42,11 +42,13 @@ msgid ""
"This property defines the list of date/time exceptions for a recurring "
"calendar component."
msgstr ""
"Hiermee bepaalt u de datum/tijd-uitzonderingslijst voor een terugkerend "
"kalender-item"
#. module: base_calendar
#: field:calendar.event.edit.all,name:0
msgid "Title"
msgstr ""
msgstr "Titel"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
@ -55,50 +57,50 @@ msgstr ""
#: selection:calendar.todo,freq:0
#: selection:calendar.todo,rrule_type:0
msgid "Monthly"
msgstr ""
msgstr "Maandelijks"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Invited User"
msgstr ""
msgstr "Uitgenodigde gebruikers"
#. module: base_calendar
#: model:ir.actions.act_window,name:base_calendar.action_res_alarm_view
#: model:ir.ui.menu,name:base_calendar.menu_crm_meeting_avail_alarm
msgid "Alarms"
msgstr ""
msgstr "Herinneringen"
#. module: base_calendar
#: selection:base.calendar.set.exrule,week_list:0
#: selection:calendar.event,week_list:0
#: selection:calendar.todo,week_list:0
msgid "Sunday"
msgstr ""
msgstr "zondag"
#. module: base_calendar
#: view:calendar.attendee:0
#: field:calendar.attendee,role:0
msgid "Role"
msgstr ""
msgstr "Functie"
#. module: base_calendar
#: view:calendar.attendee:0
#: view:calendar.event:0
msgid "Invitation details"
msgstr ""
msgstr "Details uitnodiging"
#. module: base_calendar
#: selection:base.calendar.set.exrule,byday:0
#: selection:calendar.event,byday:0
#: selection:calendar.todo,byday:0
msgid "Fourth"
msgstr ""
msgstr "vierde"
#. module: base_calendar
#: field:calendar.event,show_as:0
#: field:calendar.todo,show_as:0
msgid "Show as"
msgstr ""
msgstr "Weergeven als"
#. module: base_calendar
#: field:base.calendar.set.exrule,day:0
@ -108,52 +110,52 @@ msgstr ""
#: field:calendar.todo,day:0
#: selection:calendar.todo,select1:0
msgid "Date of month"
msgstr ""
msgstr "Dag van de maand"
#. module: base_calendar
#: selection:calendar.event,class:0
#: selection:calendar.todo,class:0
msgid "Public"
msgstr ""
msgstr "Openbaar"
#. module: base_calendar
#: selection:calendar.alarm,trigger_interval:0
#: selection:res.alarm,trigger_interval:0
msgid "Hours"
msgstr ""
msgstr "Uren"
#. module: base_calendar
#: selection:base.calendar.set.exrule,month_list:0
#: selection:calendar.event,month_list:0
#: selection:calendar.todo,month_list:0
msgid "March"
msgstr ""
msgstr "maart"
#. module: base_calendar
#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:0
#, python-format
msgid "Warning !"
msgstr ""
msgstr "Waarschuwing !"
#. module: base_calendar
#: selection:base.calendar.set.exrule,week_list:0
#: selection:calendar.event,week_list:0
#: selection:calendar.todo,week_list:0
msgid "Friday"
msgstr ""
msgstr "vrijdag"
#. module: base_calendar
#: field:calendar.event,allday:0
#: field:calendar.todo,allday:0
msgid "All Day"
msgstr ""
msgstr "Hele dag"
#. module: base_calendar
#: field:base.calendar.set.exrule,select1:0
#: field:calendar.event,select1:0
#: field:calendar.todo,select1:0
msgid "Option"
msgstr ""
msgstr "Optie"
#. module: base_calendar
#: selection:calendar.attendee,availability:0
@ -161,12 +163,12 @@ msgstr ""
#: selection:calendar.todo,show_as:0
#: selection:res.users,availability:0
msgid "Free"
msgstr ""
msgstr "Vrij"
#. module: base_calendar
#: help:calendar.attendee,rsvp:0
msgid "Indicats whether the favor of a reply is requested"
msgstr ""
msgstr "Geeft aan of een antwoordverzoek gevraagd wordt"
#. module: base_calendar
#: model:ir.model,name:base_calendar.model_ir_attachment
@ -176,32 +178,32 @@ msgstr ""
#. module: base_calendar
#: help:calendar.attendee,delegated_to:0
msgid "The users that the original request was delegated to"
msgstr ""
msgstr "De gebruikers aan wie het oorspronkelijke verzoek toegewezen was"
#. module: base_calendar
#: view:calendar.attendee:0
#: field:calendar.attendee,delegated_to:0
msgid "Delegated To"
msgstr ""
msgstr "Toegewezen aan"
#. module: base_calendar
#: field:base.calendar.set.exrule,we:0
#: field:calendar.event,we:0
#: field:calendar.todo,we:0
msgid "Wed"
msgstr ""
msgstr "woe"
#. module: base_calendar
#: view:calendar.event:0
msgid "Show time as"
msgstr ""
msgstr "Tijd weergeven als"
#. module: base_calendar
#: field:base.calendar.set.exrule,tu:0
#: field:calendar.event,tu:0
#: field:calendar.todo,tu:0
msgid "Tue"
msgstr ""
msgstr "din"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
@ -210,43 +212,43 @@ msgstr ""
#: selection:calendar.todo,freq:0
#: selection:calendar.todo,rrule_type:0
msgid "Yearly"
msgstr ""
msgstr "Jaarlijks"
#. module: base_calendar
#: selection:calendar.alarm,trigger_related:0
#: selection:res.alarm,trigger_related:0
msgid "The event ends"
msgstr ""
msgstr "De activiteit eindigt"
#. module: base_calendar
#: selection:base.calendar.set.exrule,byday:0
#: selection:calendar.event,byday:0
#: selection:calendar.todo,byday:0
msgid "Last"
msgstr ""
msgstr "Laatste"
#. module: base_calendar
#: help:calendar.attendee,state:0
msgid "Status of the attendee's participation"
msgstr ""
msgstr "Deelnamestatus genodigde"
#. module: base_calendar
#: selection:calendar.attendee,cutype:0
msgid "Room"
msgstr ""
msgstr "Zaal"
#. module: base_calendar
#: selection:calendar.alarm,trigger_interval:0
#: selection:res.alarm,trigger_interval:0
msgid "Days"
msgstr ""
msgstr "dagen"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
#: selection:calendar.event,freq:0
#: selection:calendar.todo,freq:0
msgid "No Repeat"
msgstr ""
msgstr "Niet terugkerend"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
@ -254,74 +256,74 @@ msgstr ""
#: code:addons/base_calendar/wizard/base_calendar_set_exrule.py:0
#, python-format
msgid "Error!"
msgstr ""
msgstr "Fout!"
#. module: base_calendar
#: selection:calendar.attendee,role:0
msgid "Chair Person"
msgstr ""
msgstr "Voorzitter"
#. module: base_calendar
#: selection:calendar.alarm,action:0
msgid "Procedure"
msgstr ""
msgstr "Werkwijze"
#. module: base_calendar
#: view:calendar.event:0
msgid "Select data for Custom Rule"
msgstr ""
msgstr "Selecteer gegevens voor aangepaste regel"
#. module: base_calendar
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Cancelled"
msgstr ""
msgstr "Geannuleerd"
#. module: base_calendar
#: selection:calendar.alarm,trigger_interval:0
#: selection:res.alarm,trigger_interval:0
msgid "Minutes"
msgstr ""
msgstr "Minuten"
#. module: base_calendar
#: selection:calendar.alarm,action:0
msgid "Display"
msgstr ""
msgstr "Weergave"
#. module: base_calendar
#: view:calendar.event.edit.all:0
msgid "Edit all Occurrences"
msgstr ""
msgstr "Reeks bewerken"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Invitation type"
msgstr ""
msgstr "Soort uitnodiging"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
#: selection:calendar.event,freq:0
#: selection:calendar.todo,freq:0
msgid "Secondly"
msgstr ""
msgstr "Per seconde"
#. module: base_calendar
#: field:calendar.alarm,event_date:0
#: field:calendar.attendee,event_date:0
#: view:calendar.event:0
msgid "Event Date"
msgstr ""
msgstr "Datum activiteit"
#. module: base_calendar
#: view:calendar.attendee:0
#: view:calendar.event:0
msgid "Group By..."
msgstr ""
msgstr "Groepeer op.."
#. module: base_calendar
#: help:calendar.attendee,partner_id:0
msgid "Partner related to contact"
msgstr ""
msgstr "Relatie gekoppeld aan contactpersoon"
#. module: base_calendar
#: help:calendar.attendee,cutype:0
@ -339,34 +341,34 @@ msgstr ""
#: field:calendar.alarm,event_end_date:0
#: field:calendar.attendee,event_end_date:0
msgid "Event End Date"
msgstr ""
msgstr "Einddatum activiteit"
#. module: base_calendar
#: selection:calendar.attendee,role:0
msgid "Optional Participation"
msgstr ""
msgstr "Deelname optioneel"
#. module: base_calendar
#: field:calendar.event,date_deadline:0
#: field:calendar.todo,date_deadline:0
msgid "Deadline"
msgstr ""
msgstr "Uiterste datum"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
#, python-format
msgid "Warning!"
msgstr ""
msgstr "Waarschuwing!"
#. module: base_calendar
#: view:base.calendar.set.exrule:0
msgid "_Cancel"
msgstr ""
msgstr "_Annuleren"
#. module: base_calendar
#: model:ir.module.module,shortdesc:base_calendar.module_meta_information
msgid "Basic Calendar Functionality"
msgstr ""
msgstr "Basis kalender functionaliteit"
#. module: base_calendar
#: field:calendar.event,organizer:0
@ -374,7 +376,7 @@ msgstr ""
#: field:calendar.todo,organizer:0
#: field:calendar.todo,organizer_id:0
msgid "Organizer"
msgstr ""
msgstr "Organisator"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
@ -382,76 +384,76 @@ msgstr ""
#: model:res.request.link,name:base_calendar.request_link_meeting
#, python-format
msgid "Event"
msgstr ""
msgstr "Activiteit"
#. module: base_calendar
#: selection:calendar.alarm,trigger_occurs:0
#: selection:res.alarm,trigger_occurs:0
msgid "Before"
msgstr ""
msgstr "Vóór"
#. module: base_calendar
#: view:calendar.event:0
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Confirmed"
msgstr ""
msgstr "Bevestigd"
#. module: base_calendar
#: model:ir.actions.act_window,name:base_calendar.action_calendar_event_edit_all
msgid "Edit all events"
msgstr ""
msgstr "Reeks bewerken"
#. module: base_calendar
#: field:calendar.alarm,attendee_ids:0
#: field:calendar.event,attendee_ids:0
#: field:calendar.todo,attendee_ids:0
msgid "Attendees"
msgstr ""
msgstr "Deelnemers"
#. module: base_calendar
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Ongeldige modelnaam in de actie-definiëring."
#. module: base_calendar
#: view:calendar.event:0
msgid "Confirm"
msgstr ""
msgstr "Bevestigen"
#. module: base_calendar
#: model:ir.model,name:base_calendar.model_calendar_todo
msgid "Calendar Task"
msgstr ""
msgstr "Kalender-taak"
#. module: base_calendar
#: field:base.calendar.set.exrule,su:0
#: field:calendar.event,su:0
#: field:calendar.todo,su:0
msgid "Sun"
msgstr ""
msgstr "zon"
#. module: base_calendar
#: field:calendar.attendee,cutype:0
msgid "Invite Type"
msgstr ""
msgstr "Type uitnodiging"
#. module: base_calendar
#: view:res.alarm:0
msgid "Reminder details"
msgstr ""
msgstr "Details herinnering"
#. module: base_calendar
#: field:calendar.attendee,parent_ids:0
msgid "Delegrated From"
msgstr ""
msgstr "Toegewezen door"
#. module: base_calendar
#: selection:base.calendar.set.exrule,select1:0
#: selection:calendar.event,select1:0
#: selection:calendar.todo,select1:0
msgid "Day of month"
msgstr ""
msgstr "Dag van de maand"
#. module: base_calendar
#: view:calendar.event:0
@ -459,94 +461,94 @@ msgstr ""
#: field:calendar.event.edit.all,location:0
#: field:calendar.todo,location:0
msgid "Location"
msgstr ""
msgstr "Plaats"
#. module: base_calendar
#: field:base_calendar.invite.attendee,send_mail:0
msgid "Send mail?"
msgstr ""
msgstr "E-mail sturen?"
#. module: base_calendar
#: field:base_calendar.invite.attendee,email:0
#: selection:calendar.alarm,action:0
#: field:calendar.attendee,email:0
msgid "Email"
msgstr ""
msgstr "E-mail"
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Event Detail"
msgstr ""
msgstr "Detail activiteit"
#. module: base_calendar
#: selection:calendar.alarm,state:0
msgid "Run"
msgstr ""
msgstr "Uitvoeren"
#. module: base_calendar
#: model:ir.model,name:base_calendar.model_calendar_alarm
msgid "Event alarm information"
msgstr ""
msgstr "Informatie herinnering activiteit"
#. module: base_calendar
#: selection:calendar.event,class:0
#: selection:calendar.todo,class:0
msgid "Confidential"
msgstr ""
msgstr "Vertrouwelijk"
#. module: base_calendar
#: field:base.calendar.set.exrule,end_date:0
#: field:calendar.event,end_date:0
#: field:calendar.todo,end_date:0
msgid "Repeat Until"
msgstr ""
msgstr "Herhaal tot"
#. module: base_calendar
#: view:calendar.event:0
msgid "Visibility"
msgstr ""
msgstr "Zichtbaarheid"
#. module: base_calendar
#: field:calendar.attendee,rsvp:0
msgid "Required Reply?"
msgstr ""
msgstr "Antwoord vereist?"
#. module: base_calendar
#: field:calendar.event,base_calendar_url:0
#: field:calendar.todo,base_calendar_url:0
msgid "Caldav URL"
msgstr ""
msgstr "Caldav URL"
#. module: base_calendar
#: field:calendar.event,recurrent_uid:0
#: field:calendar.todo,recurrent_uid:0
msgid "Recurrent ID"
msgstr ""
msgstr "Terugkerend ID"
#. module: base_calendar
#: selection:base.calendar.set.exrule,month_list:0
#: selection:calendar.event,month_list:0
#: selection:calendar.todo,month_list:0
msgid "July"
msgstr ""
msgstr "juli"
#. module: base_calendar
#: view:calendar.attendee:0
#: selection:calendar.attendee,state:0
msgid "Accepted"
msgstr ""
msgstr "Geaccepteerd"
#. module: base_calendar
#: field:base.calendar.set.exrule,th:0
#: field:calendar.event,th:0
#: field:calendar.todo,th:0
msgid "Thu"
msgstr ""
msgstr "don"
#. module: base_calendar
#: field:calendar.attendee,child_ids:0
msgid "Delegrated To"
msgstr ""
msgstr "Toegewezen aan"
#. module: base_calendar
#: constraint:ir.cron:0
@ -556,29 +558,29 @@ msgstr ""
#. module: base_calendar
#: view:calendar.attendee:0
msgid "Required Reply"
msgstr ""
msgstr "Antwoord vereist"
#. module: base_calendar
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Ongeldige XML, kan overzicht niet weergeven!"
#. module: base_calendar
#: selection:calendar.attendee,role:0
msgid "Participation required"
msgstr ""
msgstr "Deelname vereist"
#. module: base_calendar
#: field:calendar.event,create_date:0
#: field:calendar.todo,create_date:0
msgid "Created"
msgstr ""
msgstr "Aangemaakt"
#. module: base_calendar
#: selection:calendar.event,class:0
#: selection:calendar.todo,class:0
msgid "Private"
msgstr ""
msgstr "Privé"
#. module: base_calendar
#: selection:base.calendar.set.exrule,freq:0
@ -587,43 +589,43 @@ msgstr ""
#: selection:calendar.todo,freq:0
#: selection:calendar.todo,rrule_type:0
msgid "Daily"
msgstr ""
msgstr "Dagelijks"
#. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:0
#, python-format
msgid "Can not Duplicate"
msgstr ""
msgstr "Kopiëren niet mogelijk"
#. module: base_calendar
#: field:calendar.event,class:0
#: field:calendar.todo,class:0
msgid "Mark as"
msgstr ""
msgstr "Markeren als"
#. module: base_calendar
#: view:calendar.attendee:0
#: field:calendar.attendee,partner_address_id:0
msgid "Contact"
msgstr ""
msgstr "Contactpersoon"
#. module: base_calendar
#: view:calendar.attendee:0
#: view:calendar.event:0
msgid "Delegate"
msgstr ""
msgstr "Toewijzen"
#. module: base_calendar
#: field:base_calendar.invite.attendee,partner_id:0
#: view:calendar.attendee:0
#: field:calendar.attendee,partner_id:0
msgid "Partner"
msgstr ""
msgstr "Partner"
#. module: base_calendar
#: view:base.calendar.set.exrule:0
msgid "Select data for ExRule"
msgstr ""
msgstr "Selecteer gegevens voor uitzondering regel"
#. module: base_calendar
#: view:base_calendar.invite.attendee:0

View File

@ -143,34 +143,9 @@
<menuitem
name="Custom Reports" id="base.menu_custom_reports"
groups="base.group_extended"
action="base_report_creator_action" parent="base.reporting_menu" sequence="1"/>
<menuitem
parent="base.next_id_50"
id="menu_base_report_creator_action_config"
action="base_report_creator_action"/>
<record model="ir.ui.view" id="base_report_creator_tree_simple">
<field name="name">base_report_creator.report.simple.tree</field>
<field name="model">base_report_creator.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Reports">
<field name="name"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="base_report_creator_action_tree">
<field name="res_model">base_report_creator.report</field>
<field name="view_type">tree</field>
</record>
<menuitem
name="Custom Reports" parent="base.menu_custom_reports"
id="menu_base_report_creator_action"
action="base_report_creator_action_tree"/>
</data>
</openerp>

View File

@ -72,21 +72,10 @@
<field name="context">{'menu':True}</field>
</record>
<menuitem icon="terp-graph" id="base.reporting_menu"
name="Reporting" sequence="30" />
<menuitem id="base.next_id_50" name="Configuration"
parent="base.reporting_menu" sequence="3" />
<menuitem parent="base.next_id_50" name="Report Designer"
<menuitem parent="base.reporting_menu" name="Report Designer"
action="action_report_designer_wizard"
id="menu_action_report_designer_wizard" sequence="70" />
<menuitem parent="base.next_id_50" name="Modify an existing report"
action="action_view_base_report_sxw"
id="menu_wizard_report_designer_modify" sequence="70" groups="base.group_extended"/>
</data>
</openerp>

View File

@ -60,25 +60,15 @@ class base_setup_config_choice(osv.osv_memory):
'config_logo' : _get_image
}
def set_default_menu(self, cr, uid, menu, context=None):
user = self.pool.get('res.users')\
.browse(cr, uid, uid, context=context)
user.write({'action_id': menu.id,
'menu_id': menu.id})
def get_default_menu(self, cr, uid, context=None):
actions = self.pool.get('ir.actions.act_window')
current_menu_id = actions.search(cr, uid, [('name','=','Menu')],
context=context)
assert len(current_menu_id) == 1,\
'A given user should only have one menu item'
return actions.browse(cr, uid, current_menu_id[0], context=context)
def reset_menu(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
menu_id = user._get_menu()
user.write({'action_id': False,
'menu_id': menu_id})
return self.pool.get('ir.actions.act_window').browse(cr, uid, menu_id, context=context)
def menu(self, cr, uid, ids, context=None):
menu = self.get_default_menu(cr, uid, context=context)
self.set_default_menu(cr, uid, menu, context=context)
menu = self.reset_menu(cr, uid, context=context)
if menu.view_id.id:
view_id = (menu.view_id.id, menu.view_id.name)
@ -98,9 +88,7 @@ class base_setup_config_choice(osv.osv_memory):
}
def config(self, cr, uid, ids, context=None):
menu = self.get_default_menu(cr, uid, context=context)
self.set_default_menu(cr, uid, menu, context=context)
self.reset_menu(cr, uid, context=context)
return self.pool.get('res.config').next(cr, uid, [], context=context)
base_setup_config_choice()

View File

@ -24,9 +24,12 @@
"version":"0.1",
"author":"Tiny",
"category":"Generic Modules/Base",
"description": """Synchronization with all objects.""",
"depends":["base"],
"demo_xml":[],
"update_xml":["base_synchro_wizard.xml","base_synchro_view.xml"],
"update_xml":[ "wizard/base_synchro_view.xml",
"base_synchro_view.xml",
"security/ir.model.access.csv",],
"active":False,
"installable":True,
}

View File

@ -42,7 +42,7 @@ class base_synchro_server(osv.osv):
base_synchro_server()
class base_synchro_obj(osv.osv):
'''Class to store the operations done by wizart'''
'''Class to store the operations done by wizard'''
_name = "base.synchro.obj"
_description = "Register Class"
_columns = {
@ -66,6 +66,10 @@ class base_synchro_obj(osv.osv):
#
# Return a list of changes: [ (date, id) ]
#
def get_ids(self, cr, uid, object, dt, domain=[], context={}):
return self._get_ids(cr, uid, object, dt, domain, context)
def _get_ids(self, cr, uid, object, dt, domain=[], context={}):
result = []
if dt:

View File

@ -30,6 +30,37 @@
</field>
</record>
<record id="ir_filters_transfer_line_form" model="ir.ui.view">
<field name="name">base.synchro.obj.line.form</field>
<field name="model">base.synchro.obj.line</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Transfered Ids Details">
<group colspan="4" col="10">
<field name="name"/>
<field name="obj_id"/>
</group>
<newline/>
<group expand="0" string="Group By" colspan="4">
<filter string="Object" icon="terp-stage" domain="[]" context="{'group_by':'obj_id'}"/>
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'name'}"/>
</group>
</search>
</field>
</record>
<!-- Filters action-->
<record id="actions_transfer_line_form" model="ir.actions.act_window">
<field name="name">Filters</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.synchro.obj.line</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_transfer_line_tree"/>
<field name="search_view_id" ref="ir_filters_transfer_line_form"/>
</record>
<record id="action_base_synchro_obj_line_tree" model="ir.actions.act_window">
<field name="name">Synchronized instances</field>
@ -56,7 +87,7 @@
<field colspan="4" name="domain"/>
<field name="synchronize_date"/>
<newline/>
<field name="avoid_ids" colspan="4">
<field name="avoid_ids" colspan="4" nolabel="1">
<tree string="Fields" editable="bottom">
<field name="name"/>
</tree>
@ -81,6 +112,37 @@
</field>
</record>
<record id="ir_filters_regclass_tree" model="ir.ui.view">
<field name="name">base.synchro.obj.line.form</field>
<field name="model">base.synchro.obj</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Synchronized objects">
<group colspan="4" col="10">
<field name="model_id"/>
<field name="synchronize_date"/>
</group>
<newline/>
<group expand="0" string="Group By" colspan="4">
<filter string="Object to synchronize" icon="terp-stage" domain="[]" context="{'group_by':'model_id'}"/>
<separator orientation="vertical"/>
<filter string="Latest synchronization" icon="terp-go-month" domain="[]" context="{'group_by':'synchronize_date'}"/>
</group>
</search>
</field>
</record>
<!-- Filters action-->
<record id="actions_regclass_tree" model="ir.actions.act_window">
<field name="name">Filters</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.synchro.obj</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_regclass_tree"/>
<field name="search_view_id" ref="ir_filters_regclass_tree"/>
</record>
<record id="action_transfer_tree" model="ir.actions.act_window">
<field name="name">Synchronized objects</field>
<field name="type">ir.actions.act_window</field>
@ -115,15 +177,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Synchronized server">
<field name="name" select="1"/>
<newline/>
<field name="server_url" select="2"/>
<newline/>
<field name="server_port"/>
<field name="server_db"/>
<newline/>
<field name="login" select="1"/>
<field name="password"/>
<group colspan="4" col="6">
<field name="name"/>
<field name="login"/>
<field name="password" password="True"/>
<field name="server_url"/>
<field name="server_port"/>
<field name="server_db"/>
</group>
</form>
</field>
</record>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard id="wizard_cost_account_synchro" model="account.analytic.account" name="account.analytic.account.transfer" string="Synchronize objects"/>
<menuitem id="next_id_62" name="Synchronization" parent="base.menu_administration"/><menuitem action="wizard_cost_account_synchro" id="menu_wizard_cost_account_synchro" parent="base_synchro.next_id_62" type="wizard"/>
</data>
</openerp>

View File

@ -0,0 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"base_synchro_server","base.synchro.server","model_base_synchro_server","base.group_system",1,1,1,1
" base_synchro_obj"," base.synchro.obj","model_base_synchro_obj","base.group_system",1,1,1,1
"base_synchro_obj_avoid","base.synchro.obj.avoid","model_base_synchro_obj_avoid","base.group_system",1,1,1,1
"base_synchro_obj_line","base.synchro.obj.line","model_base_synchro_obj_line","base.group_system",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 base_synchro_server base.synchro.server model_base_synchro_server base.group_system 1 1 1 1
3 base_synchro_obj base.synchro.obj model_base_synchro_obj base.group_system 1 1 1 1
4 base_synchro_obj_avoid base.synchro.obj.avoid model_base_synchro_obj_avoid base.group_system 1 1 1 1
5 base_synchro_obj_line base.synchro.obj.line model_base_synchro_obj_line base.group_system 1 1 1 1

View File

@ -19,4 +19,5 @@
#
##############################################################################
import base_synchro
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
## -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import osv
from datetime import date
import time
@ -27,26 +26,7 @@ import xmlrpclib
import re
import tools
import threading
acc_synchro_form = '''<?xml version="1.0"?>
<form string="Transfer Data To Server">
<field name="server_url" colspan="4"/>
<newline/>
<separator string="Control" colspan="4"/>
<field name="user_id"/>
<newline/>
</form>'''
acc_synchro_fields = {
'server_url': {'string':'Server URL', 'type':'many2one', 'relation':'base.synchro.server','required':True},
'user_id': {'string':'Send Result To', 'type':'many2one', 'relation':'res.users', 'default': lambda uid,data,state: uid},
}
finish_form ='''<?xml version="1.0"?>
<form string="Synchronization Complited!">
<label string="The synchronisation has been started.\nYou will receive a request when it's done." colspan="4"/>
</form>
'''
from osv import osv, fields
class RPCProxyOne(object):
def __init__(self, server, ressource):
@ -66,13 +46,26 @@ class RPCProxy(object):
def get(self, ressource):
return RPCProxyOne(self.server, ressource)
class wizard_cost_account_synchro(wizard.interface):
class base_synchro(osv.osv_memory):
"""Base Synchronization """
_name = 'base.synchro'
_columns = {
'server_url': fields.many2one('base.synchro.server', "Server URL", required=True),
'user_id': fields.many2one('res.users', "Send Result To",),
}
_defaults = {
'user_id': lambda self,cr,uid,context: uid,
}
start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
report = []
report_total = 0
report_create = 0
report_write = 0
def _synchronize(self, cr, uid, server, object, context):
def synchronize(self, cr, uid, server, object, context):
pool = pooler.get_pool(cr.dbname)
self.meta = {}
ids = []
@ -80,14 +73,14 @@ class wizard_cost_account_synchro(wizard.interface):
pool2 = pool
#try:
if object.action in ('d','b'):
ids = pool1.get('base.synchro.obj')._get_ids(cr, uid,
ids = pool1.get('base.synchro.obj').get_ids(cr, uid,
object.model_id.model,
object.synchronize_date,
eval(object.domain),
{'action':'d'}
)
if object.action in ('u','b'):
ids += pool2.get('base.synchro.obj')._get_ids(cr, uid,
ids += pool2.get('base.synchro.obj').get_ids(cr, uid,
object.model_id.model,
object.synchronize_date,
eval(object.domain),
@ -109,7 +102,7 @@ class wizard_cost_account_synchro(wizard.interface):
if object.model_id.model=='crm.case.history':
fields = ['email','description','log_id']
value = pool_src.get(object.model_id.model).read(cr, uid, [id], fields)[0]
value = self._data_transform(cr, uid, pool_src, pool_dest, object.model_id.model, value, action)
value = self.data_transform(cr, uid, pool_src, pool_dest, object.model_id.model, value, action)
id2 = self.get_id(cr, uid, object.id, id, action, context)
#
# Transform value
@ -133,7 +126,7 @@ class wizard_cost_account_synchro(wizard.interface):
else:
print value
idnew = pool_dest.get(object.model_id.model).create(cr, uid, value)
synid = pool.get('base.synchro.obj.line').create(cr, uid, {
synid = self.pool.get('base.synchro.obj.line').create(cr, uid, {
'obj_id': object.id,
'local_id': (action=='u') and id or idnew,
'remote_id': (action=='d') and id or idnew
@ -141,25 +134,20 @@ class wizard_cost_account_synchro(wizard.interface):
self.report_total+=1
self.report_create+=1
self.meta = {}
return 'finish'
return True
#
# IN: object and ID
# OUT: ID of the remote object computed:
# If object is synchronised, read the sync database
# Otherwise, use the name_search method
#
def get_id(self, cr, uid, object_id, id, action, context={}):
pool = pooler.get_pool(cr.dbname)
line_pool = pool.get('base.synchro.obj.line')
field_src = (action=='u') and 'local_id' or 'remote_id'
field_dest = (action=='d') and 'local_id' or 'remote_id'
rid = pool.get('base.synchro.obj.line').search(cr, uid, [('obj_id','=',object_id), (field_src,'=',id)], context=context)
rid = line_pool.search(cr, uid, [('obj_id','=',object_id), (field_src,'=',id)], context=context)
result = False
if rid:
result = pool.get('base.synchro.obj.line').read(cr, uid, rid, [field_dest], context=context)[0][field_dest]
result = line_pool.read(cr, uid, rid, [field_dest], context=context)[0][field_dest]
return result
def _relation_transform(self, cr, uid, pool_src, pool_dest, object, id, action, context={}):
def relation_transform(self, cr, uid, pool_src, pool_dest, object, id, action, context={}):
if not id:
return False
pool = pooler.get_pool(cr.dbname)
@ -186,7 +174,14 @@ class wizard_cost_account_synchro(wizard.interface):
print self.report.append('WARNING: Record "%s" on relation %s not found, set to null.' % (names,object))
return result
def _data_transform(self, cr, uid, pool_src, pool_dest, object, data, action='u', context={}):
#
# IN: object and ID
# OUT: ID of the remote object computed:
# If object is synchronised, read the sync database
# Otherwise, use the name_search method
#
def data_transform(self, cr, uid, pool_src, pool_dest, object, data, action='u', context={}):
self.meta.setdefault(pool_src, {})
if not object in self.meta[pool_src]:
self.meta[pool_src][object] = pool_src.get(object).fields_get(cr, uid, context)
@ -201,12 +196,12 @@ class wizard_cost_account_synchro(wizard.interface):
del data[f]
elif ftype == 'many2one':
if data[f]:
df = self._relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], data[f][0], action, context)
df = self.relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], data[f][0], action, context)
data[f] = df
if not data[f]:
del data[f]
elif ftype == 'many2many':
res = map(lambda x: self._relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], x, action, context), data[f])
res = map(lambda x: self.relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], x, action, context), data[f])
data[f] = [(6, 0, res)]
del data['id']
return data
@ -215,21 +210,22 @@ class wizard_cost_account_synchro(wizard.interface):
# Find all objects that are created or modified after the synchronize_date
# Synchronize these obejcts
#
def _upload_download(self, db_name, uid, data, context):
cr = pooler.get_db(db_name).cursor()
def upload_download(self, cr, uid, ids, context):
start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
syn_obj = self.browse(cr, uid, ids)[0]
pool = pooler.get_pool(cr.dbname)
server = pool.get('base.synchro.server').browse(cr, uid, data['form']['server_url'], context)
server = pool.get('base.synchro.server').browse(cr, uid, ids, context)[0]
for object in server.obj_ids:
dt = time.strftime('%Y-%m-%d %H:%M:%S')
self._synchronize(cr, uid, server, object, context)
self.synchronize(cr, uid, server, object, context)
if object.action=='b':
time.sleep(1)
dt = time.strftime('%Y-%m-%d %H:%M:%S')
pool.get('base.synchro.obj').write(cr, uid, [object.id], {'synchronize_date': dt})
cr.commit()
self.pool.get('base.synchro.obj').write(cr, uid, [object.id], {'synchronize_date': dt})
end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss')
if 'user_id' in data['form'] and data['form']['user_id']:
if 'user_id' in syn_obj.user_id:
request = pooler.get_pool(cr.dbname).get('res.request')
if not self.report:
self.report.append('No exception.')
@ -248,32 +244,26 @@ Exceptions:
request.create(cr, uid, {
'name' : "Synchronization report",
'act_from' : uid,
'act_to' : data['form']['user_id'],
'act_to' : syn_obj.user_id,
'body': summary,
})
cr.commit()
cr.close()
return 'finish'
return True
def _upload_download_multi_thread(self, cr, uid, data, context):
threaded_synchronization = threading.Thread(target=self._upload_download, args=(cr.dbname, uid, data, context))
threaded_synchronization.start()
return 'finish'
states = {
'init': {
'actions': [],
'result': {'type':'form', 'arch':acc_synchro_form, 'fields':acc_synchro_fields, 'state':[('end','Cancel'),('upload_download','Synchronize')]}
},
'upload_download': {
'actions': [],
'result':{'type':'choice', 'next_state': _upload_download_multi_thread}
},
'finish': {
'actions': [],
'result':{'type':'form', 'arch':finish_form,'fields':{},'state':[('end','Ok')]}
},
}
wizard_cost_account_synchro('account.analytic.account.transfer')
def upload_download_multi_thread(self, cr, uid, data, context):
threaded_synchronization = threading.Thread(target=self.upload_download, args=(cr, uid, data, context))
threaded_synchronization.run()
data_obj = self.pool.get('ir.model.data')
id2 = data_obj._get_id(cr, uid, 'base_synchro', 'view_base_synchro_finish')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'base.synchro',
'views': [(id2, 'form')],
'view_id': False,
'type': 'ir.actions.act_window',
'target': 'new',
}
base_synchro()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_base_synchro" model="ir.ui.view">
<field name="name">Base Synchronization</field>
<field name="model">base.synchro</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Transfer Data To Server">
<field name="server_url" colspan="4"/>
<field name="user_id" default="uid"/>
<newline/>
<separator string="" colspan="4"/>
<button special="cancel" string="_Close" icon="gtk-cancel"/>
<button name="upload_download_multi_thread" string="_Synchronize" type="object" icon="gtk-ok"/>
</form>
</field>
</record>
<record id="action_view_base_synchro" model="ir.actions.act_window">
<field name="name">Base Synchronization</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.synchro</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="next_id_62" name="Synchronization" parent="base.menu_administration"/>
<record id="view_base_synchro_finish" model="ir.ui.view">
<field name="name">Base Synchronization</field>
<field name="model">base.synchro</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Synchronization Complited!">
<label string="The synchronisation has been started.You will receive a request when it's done." colspan="4"/>
<separator string="" colspan="4"/>
<button special="cancel" string="OK" icon="gtk-ok"/>
</form>
</field>
</record>
<menuitem id="next_id_62" name="Synchronization" parent="base.menu_administration"/>
<menuitem parent="base_synchro.next_id_62" name="Synchronize objects"
action="action_view_base_synchro"
id="menu_action_view_base_synchro" />
</data>
</openerp>

View File

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="base.reporting_menu"
parent="base.menu_custom"
name="Reporting" sequence="30" />
<!--Board Note Search View -->
<record id="view_board_note_search" model="ir.ui.view">
<field name="name">board.note.search</field>
@ -23,7 +20,7 @@
</search>
</field>
</record>
<!--Board Note Tree View -->
<record id="view_board_note_tree" model="ir.ui.view">
@ -33,11 +30,11 @@
<field name="arch" type="xml">
<tree string="Notes">
<field name="name"/>
<field name="user_id"/>
<field name="user_id"/>
</tree>
</field>
</record>
<!--Board Note Form View -->
<record id="view_board_note_form" model="ir.ui.view">
@ -113,7 +110,7 @@
</form>
</field>
</record>
<record id="view_board_search" model="ir.ui.view">
<field name="name">board.board.search</field>
<field name="model">board.board</field>
@ -136,19 +133,13 @@
<field name="search_view_id" ref="view_board_search"/>
</record>
<menuitem
id="base.next_id_50"
name="Configuration"
parent="base.reporting_menu"
groups="base.group_system"
sequence="3"/>
<menuitem
action="action_view_board_list_form"
id="menu_view_board_form"
parent="base.next_id_50" sequence="1"/>
id="menu_view_board_form" parent="base.reporting_menu" sequence="1"/>
<menuitem action="action_view_board_note_form"
id="menu_view_board_note_form" parent="base.next_id_50"
id="menu_view_board_note_form"
parent="base.reporting_menu"
sequence="3" groups="base.group_system" />
<act_window context="{'view': active_id}" id="dashboard_open"

View File

@ -145,53 +145,29 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
stage = False
stage_pool = self.pool.get('crm.case.stage')
model = self._name
for case in self.browse(cr, uid, ids, context):
if section in s:
st = not context.get('force_domain', False) and case.stage_id.id or False
if st in s[section]:
data = {'stage_id': s[section][st]}
stage = s[section][st]
self.write(cr, uid, [case.id], data)
return stage
def get_stage_dict(self, cr, uid, ids, context=None):
"""This function gives dictionary for stage according to stage levels
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
stage_obj = self.pool.get('crm.case.stage')
res = self.read(cr, uid, ids, ['section_id', 'stage_id'], context)[0]
section_id = res['section_id'] and res['section_id'][0] or False
stage_id = res['stage_id'] and res['stage_id'][0] or False
# We select either the stages in the same section as the current stage
# if it a stage that does not have a section, or the stages of the
# current section of the case
if stage_id:
stage_record = stage_obj.browse(cr, uid, stage_id)
if not stage_record.section_id:
section_id = False # only select stages without section
domain = [('object_id.model', '=', self._name), '|', ('section_id', '=', section_id),('section_id','=',False)]
if 'force_domain' in context and context['force_domain']:
domain += context['force_domain']
sid = stage_obj.search(cr, uid, domain, context=context)
s = {}
previous = {}
section = self._name
for stage in stage_obj.browse(cr, uid, sid, context=context):
s.setdefault(section, {})
s[section][previous.get(section, False)] = stage.id
previous[section] = stage.id
return s
next_stage = False
data = {}
domain = [('object_id.model', '=', model)]
if case.section_id and case.section_id.stage_ids:
domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
stages = stage_pool.search(cr, uid, domain, order='sequence')
index = -1
if case.stage_id and case.stage_id.id in stages:
index = stages.index(case.stage_id.id)
if index + 1 == len(stages):
return False
else:
next_stage = stages[index + 1]
if next_stage:
data = {'stage_id': next_stage}
stage = stage_pool.browse(cr, uid, next_stage, context=context)
if stage.on_change:
data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data, context=context)
return next_stage
def stage_previous(self, cr, uid, ids, context=None):
"""This function computes previous stage for case from its current stage
@ -203,21 +179,28 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
stage_pool = self.pool.get('crm.case.stage')
model = self._name
for case in self.browse(cr, uid, ids, context):
if section in s:
st = not context.get('force_domain', False) and case.stage_id.id or False
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
if st in s[section]:
data = {'stage_id': s[section][st]}
if s[section][st]:
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
if stage.on_change:
data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data)
prev_stage = False
data = {}
domain = [('object_id.model', '=', model)]
if case.section_id and case.section_id.stage_ids:
domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids)))
stages = stage_pool.search(cr, uid, domain, order='sequence')
index = 0
if case.stage_id and case.stage_id.id in stages:
index = stages.index(case.stage_id.id)
if index == 0:
return False
else:
prev_stage = stages[index - 1]
if prev_stage:
data = {'stage_id': prev_stage}
stage = stage_pool.browse(cr, uid, prev_stage, context=context)
if stage.on_change:
data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data, context=context)
return True
def onchange_partner_id(self, cr, uid, ids, part, email=False):
@ -492,6 +475,43 @@ class crm_case(object):
return res
class crm_case_stage(osv.osv):
""" Stage of case """
_name = "crm.case.stage"
_description = "Stage of case"
_rec_name = 'name'
_order = "sequence"
_columns = {
'name': fields.char('Stage Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
'object_id': fields.many2one('ir.model', 'Object Name'),
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
'on_change': fields.boolean('Change Probability Automatically', \
help="Change Probability on next and previous stages."),
'requirements': fields.text('Requirements')
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
object_id = context and context.get('object_id', False) or False
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
return ids and ids[0]
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
'object_id' : _find_object_id
}
crm_case_stage()
class crm_case_section(osv.osv):
"""Sales Team"""
@ -517,7 +537,8 @@ class crm_case_section(osv.osv):
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
'note': fields.text('Description'),
'working_hours': fields.float('Working Hours', digits=(16,2 )),
'working_hours': fields.float('Working Hours', digits=(16,2 )),
'stage_ids':fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
}
_defaults = {
@ -619,43 +640,6 @@ class crm_case_resource_type(osv.osv):
crm_case_resource_type()
class crm_case_stage(osv.osv):
""" Stage of case """
_name = "crm.case.stage"
_description = "Stage of case"
_rec_name = 'name'
_order = "sequence"
_columns = {
'name': fields.char('Stage Name', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
'object_id': fields.many2one('ir.model', 'Object Name'),
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
'on_change': fields.boolean('Change Probability Automatically', \
help="Change Probability on next and previous stages."),
'requirements': fields.text('Requirements')
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
object_id = context and context.get('object_id', False) or False
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
return ids and ids[0]
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
'object_id' : _find_object_id
}
crm_case_stage()
def _links_get(self, cr, uid, context=None):
"""Gets links value for reference field
@param self: The object pointer

View File

@ -126,8 +126,8 @@ class crm_lead(crm_case, osv.osv):
'contact_name': fields.char('Contact Name', size=64),
'partner_name': fields.char("Partner Name", size=64),
'optin': fields.boolean('Opt-In'),
'optout': fields.boolean('Opt-Out'),
'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),

View File

@ -8,7 +8,6 @@
<field name="name">New</field>
<field eval="'10'" name="probability"/>
<field eval="'1'" name="sequence"/>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
@ -16,7 +15,6 @@
<field name="name">Qualification</field>
<field eval="'20'" name="probability"/>
<field eval="'2'" name="sequence"/>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
@ -24,7 +22,6 @@
<field name="name">Proposition</field>
<field eval="'40'" name="probability"/>
<field eval="'3'" name="sequence"/>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
@ -32,7 +29,6 @@
<field name="name">Negotiation</field>
<field eval="'60'" name="probability"/>
<field eval="'4'" name="sequence"/>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
@ -40,7 +36,6 @@
<field name="name">Win</field>
<field eval="'100'" name="probability"/>
<field eval="'5'" name="sequence"/>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
@ -48,10 +43,15 @@
<field name="name">Lost</field>
<field eval="'0'" name="probability"/>
<field eval="'6'" name="sequence"/>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.section" id="section_sales_department">
<field name="name">Sales Department</field>
<field name="code">Sales</field>
<field name="stage_ids" eval="[(4, ref('stage_lead1')), (4, ref('stage_lead2')), (4, ref('stage_lead3')), (4, ref('stage_lead4')), (4, ref('stage_lead5')), (4, ref('stage_lead6'))]"/>
</record>
<!-- CASE CATEGORY2(category2_id) -->
<record model="crm.case.resource.type" id="type_lead1">
<field name="name">Telesales</field>

View File

@ -8,9 +8,8 @@
<field name="view_mode">tree,form</field>
<field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="context">{"search_default_user_id":uid,'search_default_current':1}</field>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id':section_id}</field>
<field name="context">{'search_default_current':1, 'default_type': 'lead', 'search_default_section_id': section_id}</field>
<field name="help">A lead is a first, unqualified, contact with a new prospect. Use leads when you import a database of prospects or integrate your website's contact form with OpenERP. After having been qualified, the lead can be converted to a partner and a business opportunity for a further detailed tracking of the related activities.</field>
</record>

View File

@ -55,8 +55,7 @@
<newline />
<field name="section_id" widget="selection" />
<field name="user_id" />
<field name="stage_id"
domain="[('section_id','=',section_id), ('section_id','=',False), ('object_id.model', '=', 'crm.lead')]" />
<field name="stage_id" readonly="1"/>
<group col="2" colspan="1">
<button name="stage_previous" string="Previous"
states="open,pending,draft" type="object"
@ -235,7 +234,7 @@
<field name="referred" invisible="1"/>
<field name="channel_id" invisible="1"/>
<field name="stage_id" />
<field name="stage_id" readonly="1"/>
<button name="stage_previous" string="Previous Stage"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next Stage"
@ -318,7 +317,7 @@
context="{'invisible_section': False}">
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)"/>
<filter icon="terp-personal+"
context="{'invisible_section': False}"
@ -342,8 +341,9 @@
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
<separator orientation="vertical"/>
<filter string="Category" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
<filter string="Campaign" icon="terp-stock_symbol-selection"
@ -351,11 +351,10 @@
<filter string="Channel" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'channel_id'}" />
<separator orientation="vertical"/>
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Creation Month" icon="terp-go-month"
<filter string="Creation" help="Create date" icon="terp-go-month"
domain="[]" context="{'group_by':'create_date'}" />
</group>
</search>

View File

@ -49,7 +49,7 @@
<field name="res_model">crm.meeting</field>
<field name="view_mode">calendar,tree,form,gantt</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="context">{"search_default_user_id":uid}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
<field name="help">The calendar of meetings is shared between sales teams and fully integrated with the others applications like the employee holidays. You can also synchronize meetings with your mobile phone using the caldav interface.</field>
</record>

View File

@ -312,7 +312,7 @@
<field name="partner_id" select="1" />
<field name="section_id" select="1" widget="selection">
<filter icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<field name="user_id" select="1"/>

View File

@ -14,8 +14,9 @@
<label string="Stage:" align="1.0"/>
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
domain="['|',('section_id','=',section_id),('section_id','=',False),('object_id.model', '=', 'crm.lead')]" />
on_change="onchange_stage_id(stage_id)"
domain="[('object_id.model', '=', 'crm.lead')]"
readonly="1" />
<button name="stage_previous"
states="open,pending" type="object"
icon="gtk-go-back" string="" />
@ -211,7 +212,7 @@
<field name="model">crm.lead</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<tree string="Opportunities" colors="blue:state=='pending' and not(date_deadline and (date_deadline &lt; current_date));gray:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="name" string="Opportunity"/>
@ -302,7 +303,7 @@
context="{'invisible_section': False}"
widget="selection">
<filter icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
context="{'invisible_section': False}"
help="My Sales Team(s)" />
<filter icon="terp-personal+"

View File

@ -61,9 +61,6 @@ class crm_phonecall(crm_case, osv.osv):
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
domain="['|',('section_id','=',section_id),('section_id','=',False),\
('object_id.model', '=', 'crm.phonecall')]"),
'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields
'duration': fields.float('Duration', help="Duration in Minutes"),

View File

@ -16,23 +16,5 @@
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
</record>
<!--
Case Stage
-->
<record model="crm.case.stage" id="stage_phone1">
<field name="name">Planned</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_phone2">
<field name="name">Held</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage_phone3">
<field name="name">Not Held</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
</record>
</data>
</openerp>

View File

@ -16,7 +16,6 @@
<field eval="&quot;(726) 782-0636&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone1"/>
<field eval="&quot;(769) 703-274&quot;" name="partner_phone"/>
<field eval="2.3" name="duration"/>
</record>
@ -32,7 +31,6 @@
<field eval="&quot;(392) 895-7917&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone2"/>
<field eval="&quot;(956) 293-2595&quot;" name="partner_phone"/>
<field eval="1.5" name="duration"/>
</record>
@ -48,7 +46,6 @@
<field eval="&quot;(820) 167-3208&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone3"/>
<field eval="&quot;(079) 681-2139&quot;" name="partner_phone"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
<field eval="5.0" name="duration"/>
@ -64,7 +61,6 @@
<field eval="&quot;(077) 582-4035&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone1"/>
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
<field eval="3.45" name="duration"/>
</record>
@ -80,7 +76,6 @@
<field eval="&quot;(333) 715-1450&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone2"/>
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
<field eval="2.08" name="duration"/>
</record>
@ -96,7 +91,6 @@
<field eval="&quot;(468) 017-2684&quot;" name="partner_mobile"/>
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone3"/>
<field eval="&quot;(373) 907-1009&quot;" name="partner_phone"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
<field eval="8.56" name="duration"/>

View File

@ -31,7 +31,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id':section_id}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
@ -67,7 +67,7 @@
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm_case_phone_tree_view"/>
<field name="domain" eval="'[(\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
<field name="context" eval="'{\'set_editable\':True,\'default_state\':\'open\', \'search_default_current\':1,\'search_default_today\':1, \'default_categ_id\': ' + str(ref('categ_phone1')) +'}'"/>
<field name="context" eval="'{\'search_default_section_id\':section_id, \'set_editable\':True,\'default_state\':\'open\', \'search_default_current\':1,\'search_default_today\':1, \'default_categ_id\': ' + str(ref('categ_phone1')) +'}'"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
<field name="help">Trace easily all your Inbound calls. The Inbound menu open a search view in editable mode, so you can easily modify or add a new call record. With the actions buttons convert a lead into an opportunity or plan a meeting.</field>

View File

@ -71,7 +71,7 @@
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
<label colspan="6" string=""/>
<button string="Schedule Other Call"
icon="gtk-redo"
icon="terp-call-start"
name="%(phonecall_to_phonecall_act)d"
type="action" />
@ -150,7 +150,7 @@
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
<label colspan="6" string=""/>
<button string="Schedule Other Call"
icon="gtk-redo"
icon="terp-call-start"
name="%(phonecall_to_phonecall_act)d"
type="action" />
@ -251,7 +251,7 @@
domain="[('state','in', ('draft','open','pending'))]"/>
<filter icon="terp-go-today" string="Today"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),
('date','&gt;=',datetime.strftime('%%Y-%%m-%%d 00:00:00'))]"
('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
name="today"
help="Todays's Phonecalls"
/>
@ -272,7 +272,7 @@
<field name="section_id"
select="1" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My Sales Team(s)" />
</field>
<newline/>

View File

@ -48,6 +48,10 @@
<separator string="Team Members" colspan="4"/>
<field name="member_ids" nolabel="1" colspan="4"/>
</page>
<page string="Stages">
<separator string="Select stages for this Sales Team" colspan="4"/>
<field name="stage_ids" colspan="4" nolabel="1"/>
</page>
<page string="Notes">
<field name="note" select="1" colspan="4" nolabel="1"/>
</page>
@ -97,8 +101,6 @@
<field name="sequence"/>
<field name="name"/>
<field name="probability"/>
<field name="section_id"/>
</tree>
</field>
</record>
@ -113,7 +115,6 @@
<form string="Stage">
<separator string="Stage Definition" colspan="4"/>
<field name="name" select="1"/>
<field name="section_id" select="1"/>
<field name="object_id" invisible="1" />
<field name="sequence"/>
<field name="probability"/>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
"PO-Revision-Date: 2010-09-30 08:13+0000\n"
"PO-Revision-Date: 2010-10-01 11:57+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm

View File

@ -101,9 +101,7 @@ class crm_lead_report(osv.osv):
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="['|',('section_id','=',False),('section_id','=',section_id)]" , readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
domain="['|',('section_id','=',False),('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True, domain="('object_id.model', '=', 'crm.lead')]"),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'opening_date': fields.date('Opening Date', readonly=True),
'creation_date': fields.date('Creation Date', readonly=True),

View File

@ -99,13 +99,13 @@
<field name="section_id"
default="context.get('section_id', False)"
context="{'invisible_section': False}">
<filter icon="terp-crm"
<filter icon="terp-personal+"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My team" />
</field>
<field name="user_id" string="Salesman">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
@ -125,14 +125,16 @@
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="user" icon="terp-personal"
<filter string="Salesman" name="user" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+"
domain="[]"
context="{'group_by':'section_id'}" />
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />
<separator orientation="vertical" />
<filter string="Company" icon="terp-go-home"
domain="[]"
context="{'group_by':'company_id'}" />
<separator orientation="vertical" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
@ -146,10 +148,6 @@
<filter string="State" icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical" />
<filter string="Company" icon="terp-go-home"
domain="[]"
context="{'group_by':'company_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-go-today"
domain="[]" context="{'group_by':'day'}" help="Day on which lead/opportunity is created"/>
<filter string="Month" icon="terp-go-month"

View File

@ -100,9 +100,6 @@ class crm_phonecall_report(osv.osv):
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]"),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]", readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'opening_date': fields.date('Opening Date', readonly=True),
'creation_date': fields.date('Creation Date', readonly=True),
@ -130,7 +127,6 @@ class crm_phonecall_report(osv.osv):
c.section_id,
c.categ_id,
c.partner_id,
c.stage_id,
c.duration,
c.company_id,
c.priority,

View File

@ -14,7 +14,6 @@
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="priority" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
@ -92,14 +91,14 @@
string="Todo"
domain="[('state','in',('draft','open'))]"
help="Phone calls which are in draft and open state"/>
<filter icon="gtk-media-pause"
string="Not Held"
domain="[('state','=','pending')]"
help="Phone calls which are in pending state"/>
<filter icon="terp-camera_test"
string="Held"
domain="[('state','=','done')]"
help="Phone calls which are in closed state"/>
<filter icon="gtk-media-pause"
string="Not Held"
domain="[('state','=','pending')]"
help="Phone calls which are in pending state"/>
<separator orientation="vertical" />
<field name="section_id" string="Sales Team"
default="context.get('section_id', False)"
@ -110,15 +109,15 @@
help="My team" />
</field>
<field name="user_id" string="Salesman" select="1">
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="partner_id"/>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<field name="categ_id" widget="selection" string="Type"
domain="[('object_id.model', '=', 'crm.phonecall')]" />
<separator orientation="vertical"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
@ -128,19 +127,16 @@
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-personal"
<filter string="Salesman" name="Salesman" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
<separator orientation="vertical" />
<filter string="Sales Team" icon="terp-personal+"
domain="[]"
context="{'group_by':'section_id'}" />
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}" />
<separator orientation="vertical" />
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Type" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical" />

View File

@ -10,6 +10,17 @@
<field name="name">Sales / User</field>
</record>
<record id="base.group_sale_salesman_personal" context="{'noadmin':True}" model="res.groups">
<field name="name">Sales / User / See Personal Leads</field>
</record>
<record id="crm_rule_personal_lead" model="ir.rule">
<field name="name">Personal Leads</field>
<field ref="model_crm_lead" name="model_id"/>
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman_personal'))]"/>
</record>
<record model='ir.ui.menu' id='base.menu_base_partner'>
<field name="groups_id" eval="[(4,ref('base.group_sale_manager')),(4,ref('base.group_sale_salesman'))]"/>
</record>

View File

@ -57,6 +57,7 @@ class crm_send_new_email(osv.osv_memory):
'body': fields.text('Message Body', required=True),
'state': fields.selection(AVAILABLE_STATES, string='Set New State To', required=True),
'attachment_ids' : fields.one2many('crm.send.mail.attachment', 'wizard_id'),
'html': fields.boolean('HTML formatting?', help="Select this if you want to send email with HTML formatting."),
}
def action_send(self, cr, uid, ids, context=None):
@ -79,6 +80,7 @@ class crm_send_new_email(osv.osv_memory):
(x.name, base64.decodestring(x.binary)) for x in obj.attachment_ids
]
subtype = 'plain'
message_id = None
ref_id = None
@ -119,6 +121,9 @@ class crm_send_new_email(osv.osv_memory):
if message_id:
x_headers['References'] = "%s" % (message_id)
if obj.html:
subtype = 'html'
flag = tools.email_send(
email_from,
emails,
@ -126,13 +131,14 @@ class crm_send_new_email(osv.osv_memory):
body,
email_cc=email_cc,
attach=attach,
subtype=subtype,
reply_to=obj.reply_to,
openobject_id=str(case.id),
x_headers=x_headers
)
# if not flag:
# raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
if not flag:
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
msg_dict = {'new': 'Send', 'reply': 'Reply', 'forward': 'Forward'}
case_pool.history(cr, uid, [case], _(msg_dict[context.get('mail', 'new')]), history=True, \

View File

@ -16,6 +16,7 @@
<field name="email_to" />
<field name="email_cc"/>
<field name="subject"/>
<field name="html"/>
</group>
<notebook colspan="6">
<page string="Message">

View File

@ -70,7 +70,7 @@ class crm_claim(crm.crm_case, osv.osv):
'partner_name': fields.char("Employee's Name", size=64),
'partner_mobile': fields.char('Mobile', size=32),
'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.case.stage', 'Stage'),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.claim')]"),
'probability': fields.float('Probability (%)'),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\

View File

@ -71,6 +71,11 @@
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/>
</record>
<record model="crm.case.section" id="crm.section_sales_department">
<field name="name">Sales Department</field>
<field name="code">Sales</field>
<field name="stage_ids" eval="[(4, ref('stage_claim1')), (4, ref('stage_claim2')), (4, ref('stage_claim3')), (4, ref('stage_claim4')), (4, ref('stage_claim5'))]"/>
</record>
</data>
</openerp>

View File

@ -14,7 +14,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_claims_tree_view"/>
<field name="context">{"search_default_section_id":section_id,"search_default_current":1,"search_default_user_id":uid}</field>
<field name="context">{'search_default_section_id': section_id, "search_default_current":1,"search_default_user_id":uid}</field>
<field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
<field name="help">Record and trace your customers' claims here. A claim is defined by a client name, several types, a status and a priority level. A claim can also be a preventive or repairing action. A claim can be linked to a reference like a sales order, or a lot. You can send emails with attachments and get the history of the claim treatment (emails send, interventions type, etc.). </field>
</record>

View File

@ -42,7 +42,7 @@
<field name="model">crm.claim</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Claims" colors="blue:state=='pending';black:state=='open';gray:state in ('close', 'cancel');red:date_deadline and (date_deadline &lt; current_date)">
<tree string="Claims" colors="blue:state=='pending' and not(date_deadline and (date_deadline &lt; current_date));gray:state in ('close', 'cancel');red:date_deadline and (date_deadline &lt; current_date)">
<field name="name"/>
<field name="partner_id"/>
<field name="user_id" />
@ -109,9 +109,9 @@
<field name="section_id" widget="selection"/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="3">
<field name="stage_id" nolabel="1"
<field name="stage_id" nolabel="1" readonly="1"
on_change="onchange_stage_id(stage_id)"
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.claim')]" />
domain="[('object_id.model', '=', 'crm.claim')]" />
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
@ -274,7 +274,11 @@
help="Unassigned Claims" />
</field>
<field name="section_id" select="1"
widget="selection"/>
widget="selection">
<filter icon="terp-personal+"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My section" />
</field>
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner"

View File

@ -62,9 +62,7 @@ class crm_claim_report(osv.osv):
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]", readonly=True),

View File

@ -101,7 +101,7 @@
domain="[('state','=','pending')]"/>
<separator orientation="vertical" />
<field name="section_id" string="Sales Team"
<field name="section_id" string="Sales Team"
default="context.get('section_id', False)"
context="{'invisible_section': False}">
@ -118,9 +118,9 @@
help="My company"/>
</field>
<field name="user_id" string="Salesman" select="1">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
<field name="user_id" string="Salesman" select="1">
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
@ -141,7 +141,7 @@
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-personal"
<filter string="Salesman" name="Salesman" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+"
domain="[]"

View File

@ -61,9 +61,7 @@ class crm_fundraising(crm.crm_case, osv.osv):
'partner_name2': fields.char('Employee Email', size=64),
'partner_phone': fields.char('Phone', size=32),
'partner_mobile': fields.char('Mobile', size=32),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.fundraising')]"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.fundraising')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
domain="[('section_id','=',section_id)]"),
'duration': fields.float('Duration'),

View File

@ -13,7 +13,7 @@
<field name="res_model">crm.fundraising</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_fundraising.crm_case_tree_view_fund"/>
<field name="context">{"search_default_user_id":uid,"search_default_current":1}</field>
<field name="context">{"search_default_user_id":uid,"search_default_current":1, 'search_default_section_id': section_id}</field>
<field name="search_view_id" ref="crm_fundraising.view_crm_case_fund_filter"/>
<field name="help">When you wish to support your organization or a campaign, trace here all your activities for collecting money. The menu open a search list where you can find funds description, email, history, probability of success. Several actions buttons allows you to easily modify your different fund status.</field>
</record>

View File

@ -89,7 +89,7 @@
<field name="user_id" string="Responsible"/>
<field name="date"/>
<field name="categ_id" select="1" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
<field name="type_id" string="Payment Mode" select="1" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
<field name="type_id" string="Payment Mode" select="1" widget="selection"/>
</group>
<notebook colspan="4">
<page string="Funds">
@ -274,7 +274,7 @@
</field>
<field name="section_id" select="1" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My section" />
</field>
</group>

View File

@ -118,7 +118,7 @@
</field>
<field name="user_id" select="1" string="Salesman">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
@ -138,7 +138,7 @@
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-personal"
<filter string="Salesman" name="Salesman" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+"

View File

@ -11,7 +11,7 @@
<field name="res_model">crm.helpdesk</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view_helpdesk"/>
<field name="context">{"search_default_user_id":uid}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="search_view_id" ref="view_crm_case_helpdesk_filter"/>
<field name="help">Alike records and processing of claims, Helpdesk and Support is a good tool to trace your interventions. This menu is more adapted to an oral communication, which is not necessarily related to a claim. Select a customer, add notes and categorize your interventions with a channel and a priority level.</field>
</record>

View File

@ -249,7 +249,7 @@
<field name="user_id" select="1" widget="selection"/>
<field name="section_id" select="1" widget="selection" string="Sales Team">
<filter icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="My section" />
</field>
<newline/>

View File

@ -114,23 +114,24 @@
help="My company"/>
</field>
<field name="user_id" string="Salesman">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<filter string="Priority" icon="terp-rating-rated"
domain="[]" context="{'group_by':'priority'}" />
<field name="priority" string="Priority"/>
<field name="categ_id"/>
<field name="date_closed" string="Close Date"/>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" icon="terp-personal"
<filter string="Salesman" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}"
default="1" />
<filter string="Sales Team" icon="terp-personal+"
domain="[]"
context="{'group_by':'section_id'}" />
<filter string="Partner" icon="terp-personal"
<filter string="Partner" icon="terp-partner"
domain="[]"
context="{'group_by':'partner_id'}" />

View File

@ -63,9 +63,7 @@ class crm_lead_report_assign(osv.osv):
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id)]" , readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="('object_id.model', '=', 'crm.lead')]"),
'partner_id': fields.many2one('res.partner', 'Customer' , readonly=True),
'opening_date': fields.date('Opening Date', readonly=True),
'creation_date': fields.date('Creation Date', readonly=True),

View File

@ -45,7 +45,7 @@
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="user" icon="terp-personal"
<filter string="Salesman" name="user" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_assigned_id'}" />
<filter string="Country" icon="terp-go-home" context="{'group_by':'country_id'}" />

View File

@ -24,7 +24,7 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_decimal_precision_form">
<field name="name">Decimal Accuracy Definitions</field>
<field name="name">Decimal Accuracy</field>
<field name="res_model">decimal.precision</field>
</record>
<menuitem

View File

@ -8,46 +8,47 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 05:24+0000\n"
"PO-Revision-Date: 2010-09-12 15:18+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2010-10-03 20:06+0000\n"
"Last-Translator: Wouter Schrijvers <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: decimal_precision
#: field:decimal.precision,digits:0
msgid "Digits"
msgstr ""
msgstr "Cijfers"
#. module: decimal_precision
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Ongeldige XML, kan overzicht niet weergeven!"
#. module: decimal_precision
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"De Objectnaam moet starten met x_ en mag geen speciale tekens bevatten!"
#. module: decimal_precision
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Ongeldige modelnaam in de actie-definiëring."
#. module: decimal_precision
#: view:decimal.precision:0
msgid "Decimal Precision"
msgstr ""
msgstr "Decimale precisie"
#. module: decimal_precision
#: model:ir.actions.act_window,name:decimal_precision.action_decimal_precision_form
#: model:ir.ui.menu,name:decimal_precision.menu_decimal_precision_form
msgid "Decimal Accuracy Definitions"
msgstr ""
msgstr "Decimale nauwkeurigheid definities"
#. module: decimal_precision
#: model:ir.module.module,description:decimal_precision.module_meta_information
@ -63,19 +64,19 @@ msgstr ""
#. module: decimal_precision
#: constraint:ir.ui.menu:0
msgid "Error ! You can not create recursive Menu."
msgstr ""
msgstr "Fout ! U kunt geen recursief Menu maken."
#. module: decimal_precision
#: field:decimal.precision,name:0
msgid "Usage"
msgstr ""
msgstr "Gebruik"
#. module: decimal_precision
#: model:ir.module.module,shortdesc:decimal_precision.module_meta_information
msgid "Decimal Precision Configuration"
msgstr ""
msgstr "Decimale precisie configuratie"
#. module: decimal_precision
#: model:ir.model,name:decimal_precision.model_decimal_precision
msgid "decimal.precision"
msgstr ""
msgstr "decimal.precision"

File diff suppressed because it is too large Load Diff

View File

@ -58,14 +58,6 @@
</search>
</field>
</record>
<record id="open_module_tree_department_tree" model="ir.actions.act_window">
<field name="name">Departments</field>
<field name="res_model">hr.department</field>
<field name="view_type">tree</field>
<field name="domain">[('parent_id','=',False)]</field>
<field name="search_view_id" ref="view_department_filter"/>
</record>
<menuitem action="open_module_tree_department_tree" id="menu_department_tree" parent="base.menu_users"/>
<record id="open_module_tree_department" model="ir.actions.act_window">
<field name="name">Departments</field>
@ -75,10 +67,9 @@
<field name="help">Your Company's Departments Structure is used to manage all documents related to employees by departments: expenses and timesheet validation, leaves management, recruitements, etc.</field>
</record>
<menuitem action="open_module_tree_department" id="menu_department_def" parent="hr.menu_department_tree"/>
<menuitem action="open_module_tree_department" id="menu_hr_department_tree" parent="hr.menu_hr_management" sequence="6"/>
<record model="ir.ui.view" id="view_users_form_inherit">
<record model="ir.ui.view" id="view_users_form_inherit">
<field name="name">res.users.form</field>
<field name="type">form</field>
<field name="model">res.users</field>

View File

@ -9,11 +9,11 @@
<field eval="time.strftime('%Y-%m-%d', time.localtime(time.mktime(time.localtime()[0:2] + (0,)*7)-1))" name="date_to"/>
</record>
<record id="sheet1" model="hr_timesheet_sheet.sheet">
<!-- record id="sheet1" model="hr_timesheet_sheet.sheet">
<field name="name">Sheet 1</field>
<field name="user_id" ref="base.user_root"/>
<field eval="time.strftime('%Y-%m-%d')" name="date_current"/>
</record>
</record-->
</data>
</openerp>

View File

@ -34,6 +34,7 @@
"mail_gateway_view.xml",
"res_partner_view.xml",
'security/ir.model.access.csv'
],
'demo_xml': [],
'installable': True,

View File

@ -179,6 +179,50 @@ class mailgate_message(osv.osv):
'''
Mailgateway Message
'''
def open_document(self, cr, uid, ids, context):
""" To Open Document
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: the ID of messages
@param context: A standard dictionary
"""
action_data = False
if ids:
message_id = ids[0]
mailgate_data = self.browse(cr, uid, message_id)
model = mailgate_data.model
res_id = mailgate_data.res_id
action_pool = self.pool.get('ir.actions.act_window')
action_ids = action_pool.search(cr, uid, [('res_model', '=', model)])
if action_ids:
action_data = action_pool.read(cr, uid, action_ids[0], context=context)
action_data.update({
'res_id': res_id,
'nodestroy': True
})
return action_data
def open_attachment(self, cr, uid, ids, context):
""" To Open attachments
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: the ID of messages
@param context: A standard dictionary
"""
action_data = False
action_pool = self.pool.get('ir.actions.act_window')
action_ids = action_pool.search(cr, uid, [('res_model', '=', 'ir.attachment')])
if action_ids:
action_data = action_pool.read(cr, uid, action_ids[0], context=context)
action_data.update({
'domain': [('res_id','in',ids),('res_model','=',self._name)],
'nodestroy': True
})
return action_data
def truncate_data(self, cr, uid, data, context=None):
data_list = data and data.split('\n') or []
if len(data_list) > 3:
@ -547,3 +591,5 @@ class mailgate_tool(osv.osv_memory):
return res
mailgate_tool()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,11 +2,11 @@
<openerp>
<data>
<record model="ir.ui.view" id="view_mailgate_message_form">
<field name="name">mailgate.message.form</field>
<field name="name">mailgate.message.form</field>
<field name="model">mailgate.message</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="mailgate message">
<form string="mailgate message">
<group colspan="4" col="6">
<field name="name" string="Subject" required="1" select="1" widget="char" size="512"/>
<field name="date" required="1" select="1"/>
@ -24,10 +24,13 @@
</group>
<group col="2" colspan="2">
<separator string="Message Details" colspan="4"/>
<field name="model" readonly="1"/>
<field name="model" readonly="1"/>
<group col="3" colspan="2">
<field name="res_id" readonly="1"/>
<field name="message_id" />
<field name="ref_id" />
<button name="open_document" string="Open Document" type="object" icon="gtk-jump-to"/>
</group>
<field name="message_id" />
<field name="ref_id" />
</group>
<separator string="Description" colspan="4"/>
<field name="description" nolabel="1" colspan="4" />
@ -53,6 +56,8 @@
<field name="user_id" string="Owner"/>
<field name="message_id" string="Message" invisible="1"/>
<field name="partner_id" invisible="1"/>
<button name="open_document" string="Open Document" type="object" icon="gtk-jump-to"/>
<button name="open_attachment" string="Open Attachments" type="object" icon="gtk-jump-to"/>
</tree>
</field>
</record>
@ -66,12 +71,12 @@
<field name="name" string="Subject"/>
<field name="date" />
<field name="user_id" string="Owner" default="uid"/>
<field name="description" />
<field name="partner_id" string="Partner Name"/>
<newline/>
<group expand="0" string="Group By..." groups="base.group_extended">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Owner" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Owner" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Thread" icon="terp-mail-" domain="[]" context="{'group_by':'message_id'}"/>
<separator orientation="vertical"/>
<filter string="Month" help="Creation Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
@ -191,7 +196,6 @@
view_id="view_mailgate_message_tree"
/>
<menuitem name="Emails" id="menu_base_config_mail"
parent="base.menu_base_partner" sequence="5" />
@ -201,6 +205,11 @@
action="mail_gateway.action_view_mailgate_message"
/>
<act_window
id="act_res_partner_open_email" name="Attachments"
res_model="ir.attachment"
src_model="mailgate.message"
domain="[('res_id', '=', res_id),('res_model','=',model)]"/>
</data>
</openerp>

View File

@ -131,6 +131,8 @@ class report_custom(report_rml):
</row>
""" % (_('Component'), _('Component suppliers'), _('Quantity'),_('Cost Price per Uom')+'('+company_currency.code+')', _('Supplier Price per Uom')+'('+company_currency.code+')')
purchase_price_digits = rml_obj.get_digits(dp='Purchase Price')
for product in product_pool.browse(cr, uid, ids, context=context):
bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id)
title = "<title>%s</title>" %(_("Cost Structure"))
@ -150,8 +152,8 @@ class report_custom(report_rml):
<col> """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+ """: </col>
<col/>
<col f='yes'/>
<col t='yes'>"""+ rml_obj.formatLang(total_strd) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
</row></lines>'"""
else:
bom = bom_pool.browse(cr, uid, bom_id, context=context)
@ -177,8 +179,8 @@ class report_custom(report_rml):
<col> """ + _('Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'(' + company_currency.code +')'+ """: </col>
<col/>
<col t='yes'/>
<col t='yes'>"""+ rml_obj.formatLang(total_strd) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total_strd, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
</row></lines>'"""
total2 = 0
@ -195,14 +197,14 @@ class report_custom(report_rml):
<col/>
<col/>
<col/>
<col t='yes'>"""+ rml_obj.formatLang(total2) +' '+ company_currency.symbol +"""</col>
<col t='yes'>"""+ rml_obj.formatLang(total2, digits=purchase_price_digits) +' '+ company_currency.symbol +"""</col>
</row></lines>'"""
xml += """<lines style='total'> <row>
<col> """ + _('Total Cost ') + _('of ') + str(number) +' '+ product.uom_id.name +'('+company_currency.code+')'+ """: </col>
<col/>
<col t='yes'/>
<col t='yes'>"""+ rml_obj.formatLang(total_strd+total2) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total+total2) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total_strd+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
<col t='yes'>"""+ rml_obj.formatLang(total+total2, digits=purchase_price_digits) +' '+ company_currency.symbol + """</col>
</row></lines>'"""
xml = '<?xml version="1.0" ?><report>' + config_start + config_stop + xml + '</report>'

View File

@ -21,10 +21,9 @@
from osv import fields
from osv import osv
import datetime
import netsvc
import time
from mx import DateTime
from datetime import datetime
from tools.translate import _
#----------------------------------------------------------
@ -175,8 +174,8 @@ class mrp_production_workcenter_line(osv.osv):
date_now = time.strftime('%Y-%m-%d %H:%M:%S')
obj_line = self.browse(cr, uid, ids[0])
date_start = datetime.datetime.strptime(obj_line.date_start,'%Y-%m-%d %H:%M:%S')
date_finished = datetime.datetime.strptime(date_now,'%Y-%m-%d %H:%M:%S')
date_start = datetime.strptime(obj_line.date_start,'%Y-%m-%d %H:%M:%S')
date_finished = datetime.strptime(date_now,'%Y-%m-%d %H:%M:%S')
delay += (date_finished-date_start).days * 24
delay += (date_finished-date_start).seconds / float(60*60)
@ -258,9 +257,9 @@ class mrp_production(osv.osv):
""" Computes planned and finished dates for work order.
@return: Calculated date
"""
dt_end = DateTime.now()
dt_end = datetime.now()
for po in self.browse(cr, uid, ids, context=context):
dt_end = DateTime.strptime(po.date_planned, '%Y-%m-%d %H:%M:%S')
dt_end = datetime.strptime(po.date_planned, '%Y-%m-%d %H:%M:%S')
if not po.date_start:
self.write(cr, uid, [po.id], {
'date_start': po.date_planned
@ -286,7 +285,7 @@ class mrp_production(osv.osv):
if i:
dt_end = max(dt_end, i[-1][1])
else:
dt_end = DateTime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')
dt_end = datetime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')
old = wc.sequence or 0
super(mrp_production, self).write(cr, uid, [po.id], {
'date_finnished': dt_end
@ -301,7 +300,7 @@ class mrp_production(osv.osv):
if po.allow_reorder:
continue
todo = po.move_lines
dt = DateTime.strptime(po.date_start,'%Y-%m-%d %H:%M:%S')
dt = datetime.strptime(po.date_start,'%Y-%m-%d %H:%M:%S')
while todo:
l = todo.pop(0)
if l.state in ('done','cancel','draft'):
@ -425,8 +424,8 @@ class mrp_operations_operation(osv.osv):
if not i: continue
if code_lst[i-1] not in ('resume','start'):
continue
a = datetime.datetime.strptime(time_lst[i-1],'%Y-%m-%d %H:%M:%S')
b = datetime.datetime.strptime(time_lst[i],'%Y-%m-%d %H:%M:%S')
a = datetime.strptime(time_lst[i-1],'%Y-%m-%d %H:%M:%S')
b = datetime.strptime(time_lst[i],'%Y-%m-%d %H:%M:%S')
diff += (b-a).days * 24
diff += (b-a).seconds / float(60*60)
return diff
@ -512,7 +511,7 @@ class mrp_operations_operation(osv.osv):
if code.start_stop=='done':
self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':datetime.now().strftime('%Y-%m-%d %H:%M:%S')})
if code.start_stop=='pause':
self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
@ -550,7 +549,7 @@ class mrp_operations_operation(osv.osv):
'order_date': fields.function(_get_order_date,method=True,string='Order Date',type='date',store={'mrp.production':(_order_date_search_production,['date_planned'], 10)}),
}
_defaults={
'date_start': lambda *a:DateTime.now().strftime('%Y-%m-%d %H:%M:%S')
'date_start': lambda *a:datetime.now().strftime('%Y-%m-%d %H:%M:%S')
}
mrp_operations_operation()

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
"PO-Revision-Date: 2010-08-03 08:13+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"PO-Revision-Date: 2010-10-03 15:55+0000\n"
"Last-Translator: Naven <naven@ipv4.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
@ -83,6 +83,9 @@ msgid ""
" the default value for each object\n"
" "
msgstr ""
"Ten moduł daje możliwość łatwego zarządzania \n"
" standardową wartością dla każdego objektu\n"
" "
#. module: multi_company
#: field:multi_company.default,company_id:0

View File

@ -1 +1,2 @@
python addin.py
pause

View File

@ -1 +1,2 @@
python addin.py --unregister
pause

View File

@ -162,7 +162,8 @@ hwndChk_list=[]
global search_text
search_text='search_text'
global partner_ref
partner_ref = ''
global name
name=''
global email
@ -774,13 +775,6 @@ def CreateContact(btnProcessor,*args):
return
partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9])
combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[9])
sel = win32gui.SendMessage(combo, win32con.CB_GETCURSEL)
state_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[10])
state_sel = win32gui.SendMessage(state_combo, win32con.CB_GETCURSEL)
coun_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[11])
country_sel = win32gui.SendMessage(coun_combo, win32con.CB_GETCURSEL)
name = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
email = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1])
office_no = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2])
@ -795,6 +789,7 @@ def CreateContact(btnProcessor,*args):
return
res = {
'partner_id':ustr(partner),
'name':ustr(name),
'email':ustr(email),
'phone':ustr(office_no),
@ -806,37 +801,8 @@ def CreateContact(btnProcessor,*args):
'zip':ustr(zip)
}
fs_id = c_id = -1
if not state_sel == -1 :
try:
temp = NewConn.GetAllState()
i = -1
for t in temp:
i+=1
if i == state_sel:
fs_id = t[0]
break;
res ['state_id'] = fs_id
except Exception, e:
msg = getMessage(e)
win32ui.MessageBox(msg, "New Partner", flag_error)
pass
if not country_sel == -1 :
try:
temp = NewConn.GetAllCountry()
i = -1
for t in temp:
i+=1
if i == country_sel:
c_id = t[0]
break;
res ['country_id'] = c_id
except Exception, e:
msg = getMessage(e)
win32ui.MessageBox(msg, "Open Contact", flag_error)
pass
try:
id = NewConn.CreateContact(sel, str(res))
id = NewConn.CreateContact(str(res))
if not partner:
msg="New contact created."
else:
@ -848,9 +814,6 @@ def CreateContact(btnProcessor,*args):
win32ui.MessageBox(msg, "Create Contact", flag_info)
for i in range(0,9):
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[i], '')
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(state_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(coun_combo, win32con.CB_SETCURSEL, -1 )
win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.id)
def SetAllText(txtProcessor,*args):
@ -929,6 +892,8 @@ def SetDefaultContact(txtProcessor,*args):
global name
global email
global partner_ref
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1],partner_ref)
if txtProcessor.init_done:
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.control_id,name)
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0],email)
@ -941,12 +906,9 @@ def SetDefaultContact(txtProcessor,*args):
except Exception,e:
pass
fs_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[1])
c_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[2])
win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.control_id,name)
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0],email)
txtProcessor.init_done = True
def setCheckList(groupProcessor,*args):
@ -1043,6 +1005,8 @@ def set_search_text(dialogProcessor,*args):
def set_name_email(dialogProcessor,*args):
global name
global email
global partner_ref
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2], ustr(partner_ref))
name = win32gui.GetDlgItemText(dialogProcessor.window.hwnd, dialogProcessor.other_ids[0])
email = win32gui.GetDlgItemText(dialogProcessor.window.hwnd, dialogProcessor.other_ids[1])
@ -1051,6 +1015,8 @@ def GetDefaultEmail(txtProcessor,*args):
from win32com.client import Dispatch
import win32con
b = check()
global partner_ref
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0], ustr(partner_ref))
if not b:
return
#Acquiring control of the text box
@ -1070,96 +1036,67 @@ def GetDefaultEmail(txtProcessor,*args):
win32ui.MessageBox("Error In reading email ID from Email ","Open Contact", flag_error)
pass
win32gui.SendMessage(search_partner_box, win32con.WM_SETTEXT, 0, search_partner_text)
fs_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[10])
c_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[11])
partner_combo = win32gui.GetDlgItem(txtProcessor.window.hwnd, txtProcessor.other_ids[0])
if search_partner_text.strip() == "":
search_partner_text = None
return
vals = []
#Searching the res.partner.address for contact based on Sender Mail ID.
vals = NewConn.SearchPartnerDetail(search_partner_text)
#If no user Found.
if vals == None:
for i in range(1,10):
for i in range(1,12):
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[i], "")
win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 )
win32ui.MessageBox("No matching records found for : "+str(search_partner)+".","Open Contact", flag_excl)
return
else:
#If user Found than Setting the Value for the contact in fields.
for i in range(1,10):
for i in range(1,12):
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[i], "")
win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 )
for val in vals:
if val[0] == 'partner_id':
temp = list (NewConn.GetPartners())
i = -1
for t in temp:
i+=1
if t[1] == val[1][1] :
win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, i )
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[0], ustr(val[1][1]))
if val[0] == 'name' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[1], ustr(val[1]))
if val[0] == 'street' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[2], ustr(val[1]))
if val[0] == 'street2' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[3], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[3], ustr(val[1]))
if val[0] == 'zip' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[9], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[9], ustr(val[1]))
if val[0] == 'city' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[4], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[4], ustr(val[1]))
if val[0] == 'state_id' and val[1] != False :
id = i = -1
temp = list(NewConn.GetAllState())
for t in temp:
i+=1
if str(t[1]) == str(val[1][1]):
id = i
break;
sel = win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, id )
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[10], ustr(val[1][1]))
if val[0] == 'country_id' and val[1] != False :
id = i = -1
temp = list(NewConn.GetAllCountry())
for t in temp:
i+=1
if str(t[1]) == str(val[1][1]):
id = i
break;
sel = win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, id )
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[11], ustr(val[1][1]))
if val[0] == 'phone' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[5], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[5], ustr(val[1]))
if val[0] == 'mobile' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[6], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[6], ustr(val[1]))
if val[0] == 'fax' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[7], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[7], ustr(val[1]))
if val[0] == 'email' and val[1] != False :
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[8], str(val[1]))
win32gui.SetDlgItemText(txtProcessor.window.hwnd, txtProcessor.other_ids[8], ustr(val[1]))
txtProcessor.init_done=True
def SearchPartner(btnProcessor,*args):
b = check()
global partner_ref
if not b:
return
#hwnd For the List box
fs_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[11])
c_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[12])
partner_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[1])
try :
search_partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
if not search_partner:
@ -1170,79 +1107,51 @@ def SearchPartner(btnProcessor,*args):
vals = NewConn.SearchPartnerDetail(search_partner)
#if contact not found resetting all field to blank
if vals == None:
for i in range(2,11):
for i in range(1,13):
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[i], "")
win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 )
win32ui.MessageBox("No matching records found for : "+str(search_partner)+".","Open Contact", flag_excl)
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0], "<enter new search>")
return
#if contact found than setting the values for the contact.
else:
for i in range(2,11):
for i in range(1,13):
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[i], "")
win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, -1 )
win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, -1 )
for val in vals:
if val[0] == 'partner_id':
#Finding the partner index in list and setting it.
temp = list (NewConn.GetPartners())
i = -1
for t in temp:
i+=1
if t[1] == val[1][1] :
win32gui.SendMessage(partner_combo, win32con.CB_SETCURSEL, i )
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1], ustr(val[1][1]))
if val[0] == 'name' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2], ustr(val[1]))
if val[0] == 'street' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3], ustr(val[1]))
if val[0] == 'street2' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[4], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[4], ustr(val[1]))
if val[0] == 'zip' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10], ustr(val[1]))
if val[0] == 'city' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[5], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[5], ustr(val[1]))
if val[0] == 'state_id' and val[1] != False :
#Finding the state index in list and setting it.
id = i = -1
temp = list(NewConn.GetAllState())
for t in temp:
i+=1
if str(t[1]) == str(val[1][1]):
id = i
break;
sel = win32gui.SendMessage(fs_combo, win32con.CB_SETCURSEL, id )
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[11], ustr(val[1][1]))
if val[0] == 'country_id' and val[1] != False :
#Finding the country index in list and setting it.
id = i = -1
temp = list(NewConn.GetAllCountry())
for t in temp:
i+=1
if str(t[1]) == str(val[1][1]):
id = i
break;
sel = win32gui.SendMessage(c_combo, win32con.CB_SETCURSEL, id )
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[12], ustr(val[1][1]))
if val[0] == 'phone' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[6], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[6], ustr(val[1]))
if val[0] == 'mobile' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[7], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[7], ustr(val[1]))
if val[0] == 'fax' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[8], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[8], ustr(val[1]))
if val[0] == 'email' and val[1] != False :
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9], str(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9], ustr(val[1]))
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0], "<Enter new search>")
except Exception,e:
@ -1253,6 +1162,7 @@ def SearchPartner(btnProcessor,*args):
def WritePartner(btnProcessor,*args):
new_vals=[]
#Reading new value of the fields.
partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
contect_name = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[1])
street = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[2])
street2 = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[3])
@ -1262,70 +1172,14 @@ def WritePartner(btnProcessor,*args):
fax = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[9])
email = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[10])
zip = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[11])
country_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[6])
country_sel = win32gui.SendMessage(country_combo, win32con.CB_GETCURSEL)
state_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[5])
state_sel = win32gui.SendMessage(state_combo, win32con.CB_GETCURSEL)
partner_combo = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
partner_sel = win32gui.SendMessage(partner_combo, win32con.CB_GETCURSEL)
#Checking that record not being saved without name or Partner
if contect_name.strip() == "":
win32ui.MessageBox("Please enter partner Contact Name name.", "Open Contact", flag_excl)
return
if partner_sel < 1:
win32ui.MessageBox("Please Select Partner From list.", "Open Contact", flag_excl)
return
fs_id = c_id = p_id = -1
#Finding the partner index in list finding it record ID.
if not partner_sel < 0 :
try:
temp = NewConn.GetPartners()
i = -1
for t in temp:
i+=1
if i == partner_sel:
p_id = t[0]
break;
except Exception, e:
msg = getMessage(e)
win32ui.MessageBox(msg, "Open Contact", flag_error)
pass
#Finding the State index in list finding it record ID.
if not state_sel == -1 :
try:
temp = NewConn.GetAllState()
i = -1
for t in temp:
i+=1
if i == state_sel:
fs_id = t[0]
break;
except Exception, e:
msg = getMessage(e)
win32ui.MessageBox(msg, "Open Contact", flag_error)
pass
#Finding the country index in list finding it record ID.
if not country_sel == -1 :
try:
temp = NewConn.GetAllCountry()
i = -1
for t in temp:
i+=1
if i == country_sel:
c_id = t[0]
break;
except Exception, e:
msg = getMessage(e)
win32ui.MessageBox(msg, "Open Contact", flag_error)
pass
# Creating a list to write the values to the OpenERP
new_vals.append(['partner_id',p_id])
new_vals.append(['partner',partner])
new_vals.append(['name',contect_name])
new_vals.append(['street',street])
new_vals.append(['street2',street2])
new_vals.append(['city',city])
new_vals.append(['state_id',fs_id])
new_vals.append(['country_id',c_id])
new_vals.append(['phone',phone])
new_vals.append(['mobile',mobile])
new_vals.append(['email',email])
@ -1346,6 +1200,80 @@ def WritePartner(btnProcessor,*args):
elif flag == -1:
win32ui.MessageBox("Contact can not be Save.\nFirst select contact using Search.","Open Contact", flag_info)
def SetPartnerNameColumn(listProcessor,*args):
hwndList = listProcessor.GetControl()
child_ex_style = win32gui.SendMessage(hwndList, commctrl.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
child_ex_style |= commctrl.LVS_EX_FULLROWSELECT
win32gui.SendMessage(hwndList, commctrl.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, child_ex_style)
# set header row
lvc = LVCOLUMN(
mask = commctrl.LVCF_FMT | commctrl.LVCF_WIDTH | \
commctrl.LVCF_TEXT | commctrl.LVCF_SUBITEM
)
lvc.fmt = commctrl.LVCFMT_LEFT
lvc.iSubItem = 1
lvc.text = "Partner Name"
lvc.cx = 275
win32gui.SendMessage(hwndList, commctrl.LVM_INSERTCOLUMN, 0, lvc.toparam())
listProcessor.init_done = True
def SelectPartnerFromList(btnProcessor,*args):
hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
sel_count = win32gui.SendMessage(hwndList, commctrl.LVM_GETSELECTEDCOUNT)
sel_text = ''
if sel_count == 1:
sel=-1
for i in range(0,sel_count):
sel = win32gui.SendMessage(hwndList, commctrl.LVM_GETNEXTITEM, sel, commctrl.LVNI_SELECTED)
buf,extra = win32gui_struct.EmptyLVITEM(1, 0)
size = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMTEXT, sel, buf)
sel_text = ''
for n in extra:
nombre = n.tostring()
sel_text = nombre[0:size]
global partner_ref
if str(sel_text).strip() == "":
win32ui.MessageBox("Invalid Partner Selected.","Search Partner")
return
try:
partner_ref = str(sel_text)
except Exception,e:
pass
win32gui.EndDialog(btnProcessor.window.hwnd, btnProcessor.other_ids[1])
return
elif sel_count < 1:
win32ui.MessageBox("You should Select atleast one partner.","Search Partner")
return
else:
win32ui.MessageBox("Multiple Selection is not allowded.","Search Partner")
return
def SearchPartnerList(btnProcessor,*args):
b = check()
if not b:
return
try :
search_partner = win32gui.GetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0])
if not search_partner:
win32ui.MessageBox("Please enter Partner name to search for.", "Search Partner", flag_excl)
return
#Searching the contact.
hwndList = win32gui.GetDlgItem(btnProcessor.window.hwnd, btnProcessor.other_ids[1])
partners = list(NewConn.GetPartners(search_partner))
win32gui.SendMessage(hwndList, commctrl.LVM_DELETEALLITEMS)
if not partners:
win32gui.SetDlgItemText(btnProcessor.window.hwnd, btnProcessor.other_ids[0],"<enter text to search>")
win32ui.MessageBox("No Partner found with name {0}.".format(search_partner),"Search Partner",flag_error)
for partner in partners:
num_items = win32gui.SendMessage(hwndList, commctrl.LVM_GETITEMCOUNT)
item = LVITEM(text=partner[1],iItem = num_items)
win32gui.SendMessage(hwndList, commctrl.LVM_INSERTITEM, 0, item.toparam())
except Exception,e:
msg = getMessage(e)
win32ui.MessageBox(msg, "Search Partner", flag_error)
pass
dialog_map = {
@ -1399,13 +1327,10 @@ dialog_map = {
),
"IDD_NEW_CONTACT_DIALOG" : (
(PartnersComboProcessor, "ID_PARTNER_DROPDOWNLIST", GetConn, ()),
(CountryComboProcessor, "ID_COUNTRY_DROPLIST", GetConn, ()),
(StateComboProcessor, "ID_FED_STATE_DROPLIST", GetConn, ()),
(CloseButtonProcessor, "IDCANCEL"),
(CommandButtonProcessor, "ID_CONTACT_SAVE_BUTTON ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_CONTACT_OFFICE_TEXT ID_CONTACT_MOBILE_TEXT ID_FAX_TEXT ID_STREET_TEXT ID_STREET2_TEXT ID_PARTNER_CITY_TEXT ID_ZIP_TEXT ID_PARTNER_DROPDOWNLIST ID_FED_STATE_DROPLIST ID_COUNTRY_DROPLIST", CreateContact, ()),
(TextProcessor, "ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_FED_STATE_DROPLIST ID_COUNTRY_DROPLIST" , SetDefaultContact, ()),
(DialogCommand, "ID_NEW_PARTNER_BUTTON ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT", "IDD_NEW_PARTNER_DIALOG", set_name_email, ()),
(CommandButtonProcessor, "ID_CONTACT_SAVE_BUTTON ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_CONTACT_OFFICE_TEXT ID_CONTACT_MOBILE_TEXT ID_FAX_TEXT ID_STREET_TEXT ID_STREET2_TEXT ID_PARTNER_CITY_TEXT ID_ZIP_TEXT ID_PARTNER_TEXT", CreateContact, ()),
(TextProcessor, "ID_CONTACT_NAME_TEXT ID_CONTACT_EMAIL_TEXT ID_PARTNER_TEXT" , SetDefaultContact, ()),
(DialogCommand, "ID_NEW_PARTNER_BUTTON", "IDD_SELECT_PARTNER"),
),
"IDD_NEW_PARTNER_DIALOG" : (
@ -1414,14 +1339,18 @@ dialog_map = {
),
"IDD_VIEW_PARTNER_DIALOG" : (
(PartnersComboProcessor, "ID_PARTNER_DROPLIST", GetConn, ()),
(StateComboProcessor, "ID_ALL_STATE_DROPDOWNLIST", GetConn, ()),
(CountryComboProcessor, "ID_ALL_COUNTRY_DROPDOWNLIST", GetConn, ()),
(TextProcessor, "IDET_SEARCH_PARTNER ID_PARTNER_DROPLIST IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP ID_ALL_STATE_DROPDOWNLIST ID_ALL_COUNTRY_DROPDOWNLIST", GetDefaultEmail, ()),
(CommandButtonProcessor, "IDPB_SEARCH_PARTNER IDET_SEARCH_PARTNER ID_PARTNER_DROPLIST IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP ID_ALL_STATE_DROPDOWNLIST ID_ALL_COUNTRY_DROPDOWNLIST", SearchPartner, ()),
(CommandButtonProcessor, "IDPB_WRITE_CHANGES ID_PARTNER_DROPLIST IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY ID_ALL_STATE_DROPDOWNLIST ID_ALL_COUNTRY_DROPDOWNLIST IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP", WritePartner, ()),
(TextProcessor, "IDET_SEARCH_PARTNER IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP IDET_PARTNER_STATE IDET_PARTNER_COUNTRY", GetDefaultEmail, ()),
(CommandButtonProcessor, "IDPB_SEARCH_PARTNER IDET_SEARCH_PARTNER IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP IDET_PARTNER_STATE IDET_PARTNER_COUNTRY", SearchPartner, ()),
(CommandButtonProcessor, "IDPB_WRITE_CHANGES IDET_PARTNER IDET_PARTNER_CONTACT_NAME IDET_PARTNER_STREET IDET_PARTNER_STREET2 IDET_PARTNER_CITY IDET_PARTNER_STATE IDET_PARTNER_COUNTRY IDET_PARTNER_OFFICENO IDET_PARTNER_MOBILENO IDET_PARTNER_EMAIL IDET_PARTNER_FAX IDET_ZIP", WritePartner, ()),
(CloseButtonProcessor, "IDCANCEL"),
(DialogCommand, "ID_NEW_PART_BUTTON", "IDD_NEW_PARTNER_DIALOG" ),
(DialogCommand, "ID_NEW_PART_BUTTON", "IDD_SELECT_PARTNER" ),
(DialogCommand, "IDPB_NEWPARTNER_BUTTON" , "IDD_NEW_CONTACT_DIALOG")
),
"IDD_SELECT_PARTNER" : (
(CloseButtonProcessor, "IDCANCEL"),
(ListBoxProcessor, "IDC_LIST_PARTNER" ,SetPartnerNameColumn, ()),
(CommandButtonProcessor, "IDPB_PARTNER_SEARCH IDET_PARTNER_SEARCH_NAME IDC_LIST_PARTNER", SearchPartnerList,()),
(CommandButtonProcessor, "IDPB_SELECT_PARTNER IDC_LIST_PARTNER IDD_SELECT_PARTNER" , SelectPartnerFromList,()),
(DialogCommand, "IDPB_CREATE_NEW_PARTNER" , "IDD_NEW_PARTNER_DIALOG")
),
}

View File

@ -156,6 +156,9 @@
#define IDPB_WRITE_CHANGES 2059
#define ID_ALL_STATE_DROPDOWNLIST 2060
#define ID_ALL_COUNTRY_DROPDOWNLIST 2061
#define IDET_PARTNER_STATE 2062
#define IDET_PARTNER_COUNTRY 2063
#define IDET_PARTNER 2064
//
#define ID_STREET_TEXT 2062
#define ID_STREET2_TEXT 2063
@ -167,6 +170,13 @@
#define ID_PARTNER_DROPLIST 2069
#define ID_NEW_PART_BUTTON 2070
#define IDPB_NEWPARTNER_BUTTON 2071
#define IDD_SELECT_PARTNER 2073
#define IDC_LIST_PARTNER 2072
#define IDPB_SELECT_PARTNER 2075
#define IDET_PARTNER_SEARCH_NAME 2076
#define IDPB_PARTNER_SEARCH 2077
#define IDPB_CREATE_NEW_PARTNER 2078
#define ID_PARTNER_TEXT 2079
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED

File diff suppressed because one or more lines are too long

View File

@ -111,7 +111,7 @@ EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Push to OpenERP"
FONT 8, "Tahoma", 1000, 0, 0x0
BEGIN
GROUPBOX " Link to an Existing Documents ", IDC_STATIC_GROUP, 8,5,250,290,WS_TABSTOP
GROUPBOX "Link to an Existing Documents ", IDC_STATIC_GROUP, 8,5,250,290,WS_TABSTOP
LTEXT "Search for : ",IDC_STATIC,15,17,40,12
EDITTEXT ID_SEARCH_TEXT,60,15,120,12,ES_AUTOHSCROLL | WS_TABSTOP// left top width height
PUSHBUTTON "Search",ID_SEARCH,187,15,40,14,WS_TABSTOP
@ -131,7 +131,7 @@ BEGIN
PUSHBUTTON "Close",IDCANCEL,385,300,60,14,WS_TABSTOP
END
IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 190
IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 150
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Create a New Contact"
@ -139,26 +139,23 @@ FONT 8, "Tahoma", 1000, 0, 0x0
BEGIN
LTEXT "Select Partner : ",IDC_STATIC,13,20,50,17
COMBOBOX ID_PARTNER_DROPDOWNLIST, 70, 18, 200, 80 ,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "New Partner",ID_NEW_PARTNER_BUTTON,280,17,55,14, WS_TABSTOP
EDITTEXT ID_PARTNER_TEXT, 70, 18, 200, 12 , ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search Partner",ID_NEW_PARTNER_BUTTON,280,17,60,14, WS_TABSTOP
GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,125
GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,90
LTEXT "Contact Name : ",IDC_STATIC, 18, 53, 100, 17
EDITTEXT ID_CONTACT_NAME_TEXT, 76, 52, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Street : ",IDC_STATIC, 18, 67, 40, 17
EDITTEXT ID_STREET_TEXT, 76, 66, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Street2 : ",IDC_STATIC, 18, 81, 40, 17
EDITTEXT ID_STREET2_TEXT, 76, 80, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Zip : ",IDC_STATIC,18, 94, 50, 17
LTEXT "Zip : ",IDC_STATIC, 18, 94, 50, 17
EDITTEXT ID_ZIP_TEXT,76, 93, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "City : ",IDC_STATIC,18,108,50,17
LTEXT "City : ",IDC_STATIC, 18,106, 50, 17
EDITTEXT ID_PARTNER_CITY_TEXT,76,107,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Fed. State : ",IDC_STATIC, 18, 123, 40, 17
COMBOBOX ID_FED_STATE_DROPLIST, 76, 122, 100, 80,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP
LTEXT "Country : ",IDC_STATIC, 18, 137, 40, 17
COMBOBOX ID_COUNTRY_DROPLIST, 76, 136, 100, 80,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP
GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 125
GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 90
LTEXT "Office : ",IDC_STATIC,194, 53, 30, 17
EDITTEXT ID_CONTACT_OFFICE_TEXT, 224, 52, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Mobile : ",IDC_STATIC,194, 67, 30, 17
@ -168,8 +165,8 @@ BEGIN
LTEXT "Email : ",IDC_STATIC, 194, 95, 30, 17
EDITTEXT ID_CONTACT_EMAIL_TEXT, 224, 94, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Cancel",IDCANCEL,290,170,45,14, WS_TABSTOP
PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,170,45,14, WS_TABSTOP
PUSHBUTTON "Cancel",IDCANCEL,290,130,45,14, WS_TABSTOP
PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,130,45,14, WS_TABSTOP
END
IDD_NEW_PARTNER_DIALOG DIALOGEX 0, 0, 140,40
@ -192,11 +189,11 @@ FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Email ID : ",IDC_STATIC,32,17,40,12
EDITTEXT IDET_SEARCH_PARTNER, 70, 15, 200, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Search Partner ",IDPB_SEARCH_PARTNER,280,15,60,14,WS_TABSTOP
PUSHBUTTON "Search Contact ",IDPB_SEARCH_PARTNER,280,15,60,14,WS_TABSTOP
LTEXT "Partner Name : ",IDC_STATIC,13,42,50,17
COMBOBOX ID_PARTNER_DROPLIST, 70, 42, 200, 80 ,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "New Partner",ID_NEW_PART_BUTTON,280,41,60,14, WS_TABSTOP
EDITTEXT IDET_PARTNER,70, 42, 200, 12,ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search Partner",ID_NEW_PART_BUTTON,280,41,60,14, WS_TABSTOP
GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,65,175,125
LTEXT "Contact Name : ",IDC_STATIC,18,83,50,17
@ -210,9 +207,9 @@ BEGIN
LTEXT "City : ",IDC_STATIC,18,140,50,17
EDITTEXT IDET_PARTNER_CITY,76,139,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Fed. State : ",IDC_STATIC,18,154,50,17
COMBOBOX ID_ALL_STATE_DROPDOWNLIST, 76, 153, 100, 50,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP
EDITTEXT IDET_PARTNER_STATE, 76, 153, 100, 12,ES_AUTOHSCROLL |ES_READONLY
LTEXT "Country :",IDC_STATIC, 18, 169, 35, 17
COMBOBOX ID_ALL_COUNTRY_DROPDOWNLIST, 76, 168,100,50,CBS_DROPDOWNLIST |WS_VSCROLL | WS_TABSTOP
EDITTEXT IDET_PARTNER_COUNTRY, 76, 168, 100, 12,ES_AUTOHSCROLL |ES_READONLY
GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 65, 152, 125
LTEXT "Phone : ",IDC_STATIC, 194, 83, 30, 17
@ -228,3 +225,22 @@ BEGIN
PUSHBUTTON "Save", IDPB_WRITE_CHANGES, 213, 195, 60, 14, WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 281, 195, 60, 14, WS_TABSTOP
END
IDD_SELECT_PARTNER DIALOGEX 0, 0, 220, 250
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Search Partner"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17
EDITTEXT IDET_PARTNER_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Search", IDPB_PARTNER_SEARCH, 160, 10, 50, 14, WS_TABSTOP
CONTROL "List1",IDC_LIST_PARTNER,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185
PUSHBUTTON "Create New Partner", IDPB_CREATE_NEW_PARTNER, 10, 230, 100, 14, WS_TABSTOP
PUSHBUTTON "Select", IDPB_SELECT_PARTNER, 130, 230, 40, 14, WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 175, 230, 40, 14, WS_TABSTOP
END

View File

@ -209,12 +209,12 @@ class XMLRpcConn(object):
obj_list = [ustr(item['name']).encode('iso-8859-1') for item in objects]
return obj_list
def GetPartners(self):
def GetPartners(self, search_partner=''):
import win32ui
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids=[]
obj_list=[]
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[])
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','ilike',ustr(search_partner))])
if ids:
ids.sort()
obj_list.append((-999, ustr('')))
@ -302,13 +302,13 @@ class XMLRpcConn(object):
result[obj].update({obj_id: attachment_ids})
return result
def CreateContact(self, sel=None, res=None):
def CreateContact(self, res=None):
import win32ui
res=eval(str(res))
self.partner_id_list=eval(str(self.partner_id_list))
if self.partner_id_list.get(sel,-999) != -999:
res['partner_id'] = self.partner_id_list[sel]
partner = res['partner_id']
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))])
res.update({'partner_id' : partner_id[0]})
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res)
return id
@ -339,12 +339,16 @@ class XMLRpcConn(object):
flag = -1
new_dict = dict(new_vals)
email=new_dict['email']
partner = new_dict['partner']
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))])
address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))])
if not address_id:
return flag
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','state_id','country_id'])
vals_res_address={ 'name' : new_dict['name'],
vals_res_address={
'partner_id' : partner_id[0],
'name' : new_dict['name'],
'street':new_dict['street'],
'street2' : new_dict['street2'],
'city' : new_dict['city'],
@ -353,12 +357,6 @@ class XMLRpcConn(object):
'fax' : new_dict['fax'],
'zip' : new_dict['zip'],
}
if new_dict['partner_id'] != -1:
vals_res_address['partner_id'] = new_dict['partner_id']
if new_dict['state_id'] != -1:
vals_res_address['state_id'] = new_dict['state_id']
if new_dict['country_id'] != -1:
vals_res_address['country_id'] = new_dict['country_id']
temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address)
if temp:
flag=1

View File

@ -4,7 +4,7 @@
<menuitem
id="menu_process"
name="Enterprise Processes"
name="Enterprise Process"
parent="base.menu_custom"
groups="base.group_extended"/>
@ -121,7 +121,7 @@
</record>
<record model="ir.actions.act_window" id="action_process_form">
<field name="name">Process</field>
<field name="name">Processes</field>
<field name="res_model">process.process</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

View File

@ -112,13 +112,14 @@ class product_pricelist(report_sxw.rml_parse):
return res
def _get_price(self,pricelist_id, product_id,qty):
sale_price_digits = self.get_digits(dp='Sale Price')
pool = pooler.get_pool(self.cr.dbname)
price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id,qty)
if price_dict[pricelist_id]:
price = self.formatLang(price_dict[pricelist_id])
price = self.formatLang(price_dict[pricelist_id], digits=sale_price_digits)
else:
res = pool.get('product.product').read(self.cr, self.uid, [product_id])
price = self.formatLang(res[0]['list_price'])
price = self.formatLang(res[0]['list_price'], digits=sale_price_digits)
return price
report_sxw.report_sxw('report.product.pricelist','product.product','addons/product/report/product_pricelist.rml',parser=product_pricelist)

View File

@ -174,10 +174,10 @@ class project(osv.osv):
'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects."),
'effective_hours': fields.function(_progress_rate, multi="progress", method=True, string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects."),
'total_hours': fields.function(_progress_rate, multi="progress", method=True, string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects."),
'progress_rate': fields.function(_progress_rate, multi="progress", method=True, string='Progress', type='float', group_operator="avg", help="Percent of tasks closed according to the total of tasks todo."),
'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.", store=True),
'effective_hours': fields.function(_progress_rate, multi="progress", method=True, string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects.", store=True),
'total_hours': fields.function(_progress_rate, multi="progress", method=True, string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects.", store=True),
'progress_rate': fields.function(_progress_rate, multi="progress", method=True, string='Progress', type='float', group_operator="avg", help="Percent of tasks closed according to the total of tasks todo.", store=True),
'warn_customer': fields.boolean('Warn Partner', help="If you check this, the user will have a popup when closing a task that propose a message to send by email to the customer.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
@ -441,6 +441,7 @@ class task(osv.osv):
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
'manager_id': fields.related('project_id', 'analytic_account_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
'company_id': fields.many2one('res.company', 'Company'),
'id': fields.integer('ID'),
}
_defaults = {

View File

@ -302,7 +302,8 @@
<field name="type">tree</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0 and state in ('pending');red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0 and state in ('pending');red:date_deadline and (date_deadline&gt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="id"/>
<field name="sequence" invisible="not context.get('seq_visible', False)"/>
<field name="name"/>
<field name="project_id" icon="gtk-indent" domain="['|',('user_id','=',uid),('members','=',uid)]"/>

View File

@ -72,7 +72,7 @@ class report_project_task_user(osv.osv):
date_trunc('day',t.date_end) as date_end,
to_date(to_char(t.date_deadline, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_deadline,
-- sum(cast(to_char(date_trunc('day',t.date_end) - date_trunc('day',t.date_start),'DD') as int)) as no_of_days,
(extract('epoch' from (t.date_end-t.date_start)))/(3600*24) as no_of_days,
abs((extract('epoch' from (t.date_end-t.date_start)))/(3600*24)) as no_of_days,
t.user_id,
progress as progress,
t.project_id,

View File

@ -155,7 +155,7 @@
<field name="model">project.vs.hours</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Project and remaining hours" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
<tree string="Remaining Hours Per Project" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
<field name="project"/>
<field name="remaining_hours"/>
<field name="state"/>
@ -177,7 +177,7 @@
</record>
<record id="action_project_vs_remaining_hours_graph" model="ir.actions.act_window">
<field name="name">Project and remaining hours</field>
<field name="name">Remaining Hours Per Project</field>
<field name="res_model">project.vs.hours</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
@ -187,8 +187,8 @@
<record id="open_view_project_vs_remaining_hours_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_project_vs_remaining_hours_tree"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_project_vs_remaining_hours_graph"/>
<field name="act_window_id" ref="action_project_vs_remaining_hours_graph"/>
</record>
<record id="open_view_project_vs_remaining_hours_graph" model="ir.actions.act_window.view">
@ -262,7 +262,7 @@
</record>
<record id="action_project_vs_planned_total_hours_graph" model="ir.actions.act_window">
<field name="name">My projects: Planned Vs Total hours</field>
<field name="name">Projects: Planned Vs Total hours</field>
<field name="res_model">project.vs.hours</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
@ -272,8 +272,8 @@
<record id="open_view_project_vs_planned_total_hours_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_project_vs_planned_total_hours_tree"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_project_vs_planned_total_hours_graph"/>
<field name="act_window_id" ref="action_project_vs_planned_total_hours_graph"/>
</record>
<record id="open_view_project_vs_planned_total_hours_graph" model="ir.actions.act_window.view">

View File

@ -141,7 +141,7 @@ class project_issue(crm.crm_case, osv.osv):
else:
res[issue.id][field] = abs(float(duration))
return res
_columns = {
'id': fields.integer('ID'),
'name': fields.char('Name', size=128, required=True),
@ -185,7 +185,7 @@ class project_issue(crm.crm_case, osv.osv):
method=True, multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True),
'assigned_to': fields.many2one('res.users', 'Assigned to', help='This is the current user to whom the related task have been assigned'),
'assigned_to': fields.related('task_id', 'user_id', string = 'Assigned to', type="many2one", relation="res.users", store=True, help='This is the current user to whom the related task have been assigned'),
'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \
method=True, multi='working_days_open', type="float", store=True),
'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \
@ -193,6 +193,7 @@ class project_issue(crm.crm_case, osv.osv):
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
'date_action_last': fields.datetime('Last Action', readonly=1),
'date_action_next': fields.datetime('Next Action', readonly=1),
'progress': fields.related('task_id', 'progress', string='Progress (%)',group_operator="avg", store=True),
}
def _get_project(self, cr, uid, context):
@ -245,6 +246,7 @@ class project_issue(crm.crm_case, osv.osv):
vals = {
'task_id': new_task_id,
'state':'open'
}
case_obj.write(cr, uid, [bug.id], vals)
@ -286,6 +288,15 @@ class project_issue(crm.crm_case, osv.osv):
if not stage.on_change:
return {'value':{}}
return {'value':{}}
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
if context is None:
context = {}
result = {}
if not task_id:
return {'value':{}}
task = self.pool.get('project.task').browse(cr, uid, task_id, context)
return {'value':{'assigned_to': task.user_id.id,}}
def case_escalate(self, cr, uid, ids, *args):
"""Escalates case to top level
@ -307,6 +318,7 @@ class project_issue(crm.crm_case, osv.osv):
else:
raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
self.write(cr, uid, [case.id], data)
self._history(cr, uid, cases, _('Escalate'))
return True
def message_new(self, cr, uid, msg, context):
@ -358,6 +370,31 @@ class project_issue(crm.crm_case, osv.osv):
return res
def get_stage_dict(self, cr, uid, ids, context=None):
"""This function gives dictionary for stage according to stage levels
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
stage_obj = self.pool.get('crm.case.stage')
domain = [('object_id.model', '=', self._name)]
if 'force_domain' in context and context['force_domain']:
domain += context['force_domain']
sid = stage_obj.search(cr, uid, domain, context=context)
s = {}
previous = {}
section = self._name
for stage in stage_obj.browse(cr, uid, sid, context=context):
s.setdefault(section, {})
s[section][previous.get(section, False)] = stage.id
previous[section] = stage.id
return s
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None):
if context is None:
context = {}
@ -405,6 +442,17 @@ class project_issue(crm.crm_case, osv.osv):
@param **args: Return Dictionary of Keyword Value
"""
return True
def copy(self, cr, uid, id, default=None, context=None):
if not context:
context={}
issue = self.read(cr, uid, id, ['name'], context=context)
if not default:
default = {}
default = default.copy()
default['name'] = issue['name'] + _(' (copy)')
return super(project_issue, self).copy(cr, uid, id, default=default,
context=context)
project_issue()

View File

@ -68,7 +68,7 @@
<field name="user_id"/>
<field name="assigned_to" />
<group colspan="2" col="4">
<field name="stage_id" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'project.issue')]" widget="selection"/>
<field name="stage_id" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'project.issue')]" widget="selection" readonly="1"/>
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
@ -85,9 +85,10 @@
<separator colspan="3" string="Status"/>
<field name="version_id" colspan="3" widget="selection"/>
<field name="priority" colspan="3"/>
<field name="task_id" />
<field name="task_id" on_change="onchange_task_id(task_id)"/>
<button string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"
attrs="{'invisible':[('task_id','!=',False)]}" />
<field name="progress" colspan="3" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
</group>
<separator string= "Description" colspan="4"/>
<field name="description" nolabel="1" colspan="4"/>
@ -201,6 +202,7 @@
<field name="version_id" widget="selection"/>
<field name="user_id"/>
<field name="assigned_to"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" help="To Do"/>
@ -224,9 +226,9 @@
<filter string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-camera_test"/>
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Issues" icon="terp-gtk-media-pause"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today" separator="1" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's bugs" />
<filter icon="terp-go-today" string="Today" separator="1" domain="[('create_date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's bugs" />
<filter icon="terp-go-week" string="7 Days" separator="1"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date', '&gt;=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d')), ('create_date', '&gt;=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Bugs during last 7 days"
/>
<separator orientation="vertical"/>

View File

@ -135,7 +135,7 @@
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home"
domain="[]"
context="{'group_by':'company_id'}" />
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical" />
<filter string="Day" icon="terp-go-today"
domain="[]" context="{'group_by':'day'}" help="Current Day"/>

View File

@ -20,6 +20,7 @@
##############################################################################
from datetime import datetime
from dateutil.relativedelta import relativedelta
from tools.translate import _
from osv import fields, osv
from resource.faces import task as Task
@ -90,13 +91,26 @@ class project_phase(osv.osv):
model_data_obj = self.pool.get('ir.model.data')
model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
return model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id']
def _compute(self, cr, uid, ids, context=None):
res = {}
if not ids:
return res
for phase in self.browse(cr, uid, ids, context=context):
tot = 0.0
for task in phase.task_ids:
tot += task.planned_hours
res[phase.id] = {
'total_hours' : tot
}
return res
_columns = {
'name': fields.char("Name", size=64, required=True),
'date_start': fields.date('Start Date', help="Starting Date of the phase", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'date_end': fields.date('End Date', help="Ending Date of the phase", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'constraint_date_start': fields.date('Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'constraint_date_end': fields.date('End Date', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'constraint_date_start': fields.date('Minimum Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'constraint_date_end': fields.date('Deadline', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'project_id': fields.many2one('project.project', 'Project', required=True),
'next_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'prv_phase_id', 'next_phase_id', 'Next Phases', states={'cancelled':[('readonly',True)]}),
'previous_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'next_phase_id', 'prv_phase_id', 'Previous Phases', states={'cancelled':[('readonly',True)]}),
@ -108,7 +122,8 @@ class project_phase(osv.osv):
'responsible_id': fields.many2one('res.users', 'Responsible', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\
\n If the phase is over, the states is set to \'Done\'.')
\n If the phase is over, the states is set to \'Done\'.'),
'total_hours': fields.function(_compute, method=True, string='Total Hours'),
}
_defaults = {
'responsible_id': lambda obj,cr,uid,context: uid,
@ -130,6 +145,14 @@ class project_phase(osv.osv):
project_id = project_obj.browse(cr, uid, project, context=context)
result['date_start'] = project_id.date_start
return {'value': result}
def onchange_days(self, cr, uid, ids, project, context=None):
result = {}
for id in ids:
project_id = self.browse(cr, uid, id, context=context)
newdate = datetime.strptime(project_id.date_start, '%Y-%m-%d') + relativedelta(days=project_id.duration or 0.0)
result['date_end'] = newdate.strftime('%Y-%m-%d')
return {'value': result}
def _check_date_start(self, cr, uid, phase, date_end, context=None):
if context is None:
@ -277,7 +300,6 @@ class project_phase(osv.osv):
context = {}
resource_pool = self.pool.get('resource.resource')
uom_pool = self.pool.get('product.uom')
phase_resource = False
if context is None:
context = {}
default_uom_id = self._get_default_uom_id(cr, uid)
@ -290,11 +312,11 @@ class project_phase(osv.osv):
duration = str(avg_hours) + 'H'
# Create a new project for each phase
def Project():
# If project has working calendar then that
# else the default one would be considered
start = start_date
minimum_time_unit = 1
resource = phase_resource_obj
# If project has working calendar then that
# else the default one would be considered
if calendar_id:
working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context)
vacation = tuple(resource_pool.compute_vacation(cr, uid, calendar_id))
@ -372,8 +394,10 @@ class project_resource_allocation(osv.osv):
_columns = {
'resource_id': fields.many2one('resource.resource', 'Resource', required=True),
'phase_id': fields.many2one('project.phase', 'Project Phase', ondelete='cascade', required=True),
'phase_id_date_start': fields.related('phase_id', 'date_start', type='date', string='Starting Date of the phase'),
'phase_id_date_end': fields.related('phase_id', 'date_end', type='date', string='Ending Date of the phase'),
'project_id': fields.related('phase_id', 'project_id', type='many2one', relation="project.project", string='Project', store=True),
'user_id': fields.related('resource_id', 'user_id', type='many2one', relation="res.users", string='User'),
'date_start': fields.date('Start Date', help="Starting Date"),
'date_end': fields.date('End Date', help="Ending Date"),
'useability': fields.float('Usability', help="Usability of this resource for this project phase in percentage (=50%)"),
}
_defaults = {

View File

@ -13,14 +13,27 @@
<field name="model">project.resource.allocation</field>
<field name="type">gantt</field>
<field name="arch" type="xml">
<gantt color="phase_id" date_start="phase_id_date_start" date_stop="phase_id_date_end" string="R.A." mode="year">
<level object="project.resource" link="resource_id" domain="[]">
<field name="useability"/>
<gantt color="phase_id" date_start="date_start" date_stop="date_end" string="R.A." mode="year">
<level object="res.users" link="user_id" domain="[]">
<field name="useability" string="Availability"/>
</level>
</gantt>
</field>
</record>
<record id="view_project_resource_allocation_calendar" model="ir.ui.view">
<field name="name">project.resource.allocation.calendar</field>
<field name="model">project.resource.allocation</field>
<field name="type">calendar</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar color="user_id" date_start="date_start" date_stop="date_end" day_length="12" string="Resources">
<field name="phase_id"/>
<field name="project_id"/>
</calendar>
</field>
</record>
<record id="view_project_resource_allocation_form" model="ir.ui.view">
<field name="name">project.resource.allocation.form</field>
@ -28,9 +41,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Resource Allocation">
<field name="resource_id" select="1"/>
<field name="phase_id"/>
<field name="useability" string="Availability"/>
<group colspan="4" col="6">
<field name="resource_id"/>
<field name="phase_id"/>
<field name="project_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="useability" string="Availability"/>
</group>
</form>
</field>
</record>
@ -44,6 +62,7 @@
<tree editable="bottom" string="Project Resource Allocation">
<field name="resource_id"/>
<field name="phase_id"/>
<field name="project_id"/>
<field name="useability"/>
</tree>
</field>
@ -58,11 +77,13 @@
<group colspan="4" col="20">
<field name="resource_id"/>
<field name="phase_id"/>
<field name="project_id"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20">
<filter name="resource" string="Resource" icon="terp-folder-blue" domain="[]" context="{'group_by':'resource_id'}"/>
<separator orientation="vertical"/>
<filter string="Project" icon="terp-project" domain="[]" context="{'group_by':'project_id'}"/>
<filter string="Phase" icon="terp-project" domain="[]" context="{'group_by':'phase_id'}"/>
</group>
</search>
@ -73,7 +94,7 @@
<field name="name">Resource Allocations</field>
<field name="res_model">project.resource.allocation</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,gantt</field>
<field name="view_mode">gantt,tree,form,calendar</field>
<field name="context">{}</field>
<field name="search_view_id" ref="view_project_resource_allocation_search"/>
</record>
@ -97,7 +118,7 @@
<group colspan="2" col="4">
<field name="project_id" on_change="onchange_project(project_id)" colspan="4"/>
<newline/>
<field name="duration" colspan="1"/>
<field name="duration" colspan="1" on_change="onchange_days(project_id)" />
<field name="product_uom" nolabel="1" domain="[('category_id.name', '=', 'Working Time')]"/>
</group>
<group colspan="2" col="2">
@ -110,10 +131,14 @@
<field colspan="4" name="resource_ids" nolabel="1">
<tree editable="bottom" string="Project Resource Allocation">
<field name="resource_id" context="{'project_id':parent.project_id}"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="useability"/>
</tree>
<form string="Project Resource Allocation">
<field name="resource_id" context="{'project_id':parent.project_id}"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="useability"/>
</form>
</field>
@ -134,6 +159,7 @@
<field name="user_id"/>
<field name="planned_hours" widget="float_time"/>
<field name="project_id" invisible="1"/>
<field name="total_hours" sum='Total Hours'/>
</tree>
<form string="Project's Tasks">
<notebook colspan="4">
@ -151,6 +177,7 @@
<group colspan="2" col="2">
<separator string="Planning" colspan="2"/>
<field name="planned_hours" widget="float_time"/>
<field name="total_hours" widget="float_time"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
<field name="effective_hours" invisible="1"/>
</group>
@ -263,7 +290,7 @@
<field name="name">Project Phases</field>
<field name="res_model">project.phase</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,gantt,calendar</field>
<field name="view_mode">gantt,tree,form,calendar</field>
<field name="context">{'search_default_responsible_id':uid}</field>
<field name="search_view_id" ref="view_project_phase_search"/>
<field name="help">You can subdivide your larger projects into several phases. For each phase, you can define your resources allocation (humans or engine), describe de differend task and link your phase with previous and next one, add constraints date and scheduling. A gantt view of your project phase is also available from this menu. Gantt view is a graphically draw of the project plan; it includes any task dependencies by visually adjusting task durations and priorities, and by linking tasks to each other.</field>
@ -299,7 +326,30 @@
# ------------------------------------------------------
# Project Task
# ------------------------------------------------------
<record id="view_phase_task_form2" model="ir.ui.view">
<field name="name">phase.task.form2</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="sequence" position="after">
<field name="phase_id"/>
</field>
</field>
</record>
<record id="view_phase_task_search_form" model="ir.ui.view">
<field name="name">phase.task.search.form</field>
<field name="model">project.task</field>
<field name="type">search</field>
<field name="inherit_id" ref="project.view_task_search_form"/>
<field name="arch" type="xml">
<field name="project_id" position="after">
<field name="phase_id" select="1"/>
</field>
</field>
</record>
<act_window
id="project_phase_task_list"
name="Related Tasks"

View File

@ -30,6 +30,7 @@ class messages(osv.osv):
logger = netsvc.Logger()
_columns = {
'create_date': fields.datetime('Creation Date', readonly=True),
'from_id': fields.many2one('res.users', 'From', required=True, ondelete="CASCADE"),
'to_id': fields.many2one('res.users', 'To', ondelete="CASCADE", help="Keep this empty to broadcast the message."),
'project_id': fields.many2one('project.project', 'Project',

View File

@ -55,6 +55,7 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Messages">
<field name="create_date"/>
<field name="project_id"/>
<field name="from_id"/>
<field name="to_id"/>
@ -67,8 +68,10 @@
<field name="model">project.messages</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Communication Messages">
<search string="Project Messages">
<group>
<filter icon="terp-go-today" string="Today" separator="1" domain="[('create_date','=',time.strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical"/>
<field name="project_id"/>
<field name="from_id"/>
<field name="to_id"/>
@ -86,7 +89,7 @@
</record>
<record id="messages_form" model="ir.actions.act_window">
<field name="name">Communication Messages</field>
<field name="name">Project Messages</field>
<field name="res_model">project.messages</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="view_project_messages_search"/>

View File

@ -278,7 +278,6 @@
<search string="Planning statistics">
<group col="10" colspan="4">
<filter icon="gtk-execute" string="My" domain="[('user_id','=',uid),('planning_id.state','&lt;&gt;','cancel')]" help="My Plannings Statistics"/>
<filter icon="gtk-execute" string="My Project" domain="[('manager_id','=',uid),('planning_id.state','&lt;&gt;','cancel')]" help="Planning Statistics of My Projects"/>
<separator orientation="vertical"/>
<field name="planning_id" select="1"/>
<field name="user_id" select="1"/>
@ -294,6 +293,7 @@
<field name="res_model">report_account_analytic.planning.stat</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="account_analytic_planning_stat_view_search"/>
</record>
<menuitem id="next_id_85" name="Planning"

View File

@ -18,13 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
from osv import fields, osv
from tools.translate import _
import re
import time
import tools
from datetime import datetime
from dateutil.relativedelta import relativedelta
class project_scrum_project(osv.osv):
_inherit = 'project.project'
@ -147,7 +147,7 @@ class project_scrum_sprint(osv.osv):
proj = self.pool.get('project.project').browse(cr, uid, [project_id])[0]
v['product_owner_id']= proj.product_owner_id and proj.product_owner_id.id or False
v['scrum_master_id']= proj.user_id and proj.user_id.id or False
v['date_stop'] = (DateTime.now() + DateTime.RelativeDateTime(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
v['date_stop'] = (datetime.now() + relativedelta(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
return {'value':v}
project_scrum_sprint()
@ -257,14 +257,14 @@ class project_scrum_product_backlog(osv.osv):
'name' : fields.char('Feature', size=64, required=True),
'note' : fields.text('Note'),
'active' : fields.boolean('Active', help="If Active field is set to true, it will allow you to hide the product backlog without removing it."),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)]),
'user_id': fields.many2one('res.users', 'Author'),
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
'progress': fields.function(_compute, multi="progress", group_operator="avg", type='float', method=True, string='Progress', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_compute, multi="effective_hours", method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks"),
'effective_hours': fields.function(_compute, multi="effective_hours", method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks", store=True),
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
'create_date': fields.datetime("Creation Date", readonly=True),
'task_hours': fields.function(_compute, multi="task_hours", method=True, string='Task Hours', help='Estimated time of the total hours of the tasks')

View File

@ -41,7 +41,7 @@
<field name="user_id"/>
<field name="progress" widget="progressbar"/>
<field name="expected_hours" sum="Planned hours" widget="float_time" string="Total Planned Hours"/>
<field name="effective_hours" sum="Effective hours" widget="float_time" string="Total Spent Hours"/>
<field name="effective_hours" sum="Spent hours" widget="float_time" string="Total Spent Hours"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera_test"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
@ -192,7 +192,19 @@
<!--
Scrum Sprint
-->
<record id="view_scrum_sprint_calendar" model="ir.ui.view">
<field name="name">project.scrum.sprint.calendar</field>
<field name="model">project.scrum.sprint</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Scrum Sprint" date_start="date_start">
<field name="name"/>
<field name="project_id"/>
</calendar>
</field>
</record>
<record id="view_scrum_sprint_tree" model="ir.ui.view">
<field name="name">project.scrum.sprint.tree</field>
<field name="model">project.scrum.sprint</field>
@ -333,7 +345,7 @@
<field name="name">Sprints</field>
<field name="res_model">project.scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_id" ref="view_scrum_sprint_tree"/>
<field name="context">{"search_default_filter_current": 1, "search_default_scrum_master_id":uid}</field>
<field name="search_view_id" ref="view_scrum_sprint_search"/>
@ -345,7 +357,19 @@
<!--
Daily Meeting
-->
<record id="view_scrum_meeting_calendar" model="ir.ui.view">
<field name="name">project.scrum.meeting.calendar</field>
<field name="model">project.scrum.meeting</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Scrum Meeting" date_start="date" color="user_id">
<field name="sprint_id"/>
<field name="project_id"/>
</calendar>
</field>
</record>
<record id="view_scrum_meeting_tree" model="ir.ui.view">
<field name="name">project.scrum.meeting.tree</field>
<field name="model">project.scrum.meeting</field>
@ -424,7 +448,7 @@
<field name="name">Scrum Meetings</field>
<field name="res_model">project.scrum.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="context">{'search_default_scrum_daily':1,'search_default_project_id':project_id}</field>
<field name="search_view_id" ref="view_scrum_meeting_search"/>
</record>

View File

@ -31,6 +31,7 @@ class backlog_create_task(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
task = self.pool.get('project.task')
backlog_id = self.pool.get('project.scrum.product.backlog')
document_pool = self.pool.get('ir.attachment')
ids_task = []
if context is None:
@ -39,9 +40,9 @@ class backlog_create_task(osv.osv_memory):
backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context)
result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')
id = mod_obj.read(cr, uid, result, ['res_id'])
for backlog in backlogs:
ids_task.append(task.create(cr, uid, {
task_id = task.create(cr, uid, {
'product_backlog_id': backlog.id,
'name': backlog.name,
'description': backlog.note,
@ -50,8 +51,11 @@ class backlog_create_task(osv.osv_memory):
'planned_hours': backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
'sequence':backlog.sequence,
}))
})
document_ids = document_pool.search(cr, uid, [('res_id', '=', backlog.id), ('res_model', '=', backlog_id._name)])
for document_id in document_ids:
document_pool.copy(cr, uid, document_id, default={'res_id':task_id, 'res_model':task._name})
ids_task.append(task_id)
return {
'domain': "[('product_backlog_id','in',["+','.join(map(str, context['active_ids']))+"])]",
'name': 'Tasks',

View File

@ -333,7 +333,7 @@
<para style="terp_default_9">Taxes :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Purchase Price')) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
</td>
</tr>
<tr>
@ -364,4 +364,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>

View File

@ -102,7 +102,7 @@
<field name="type">tree</field>
<field name="model">purchase.requisition</field>
<field name="arch" type="xml">
<tree colors="grey:state in ('done');red:date_end&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date;" string="Purchase Requisition">
<tree colors="grey:state in ('done');red:date_end&lt;current_date and state not in ('done','cancel');black:date_end&gt;=current_date;" string="Purchase Requisition">
<field name="name"/>
<field name="user_id"/>
<field name="date_start"/>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-09-29 08:39+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2010-10-03 07:41+0000\n"
"Last-Translator: Phong Nguyen <Unknown>\n"
"Language-Team: Vietnamese <vi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@ -40,7 +40,7 @@ msgstr "Đặt giao hàng"
#. module: sale
#: field:sale.order.line,address_allotment_id:0
msgid "Allotment Partner"
msgstr ""
msgstr "Đối tác phân phối"
#. module: sale
#: constraint:ir.actions.act_window:0
@ -58,11 +58,13 @@ msgid ""
"If you don't have enough stock available to deliver all at once, do you "
"accept partial shipments or not?"
msgstr ""
"Nếu bạn không có đủ hàng để giao hàng toàn bộ một lần, bạn có chấp nhận giao "
"hàng từng phần hay không?"
#. module: sale
#: selection:sale.order.line,type:0
msgid "from stock"
msgstr ""
msgstr "theo nhu cầu dự báo"
#. module: sale
#: field:sale.config.picking_policy,step:0
@ -100,13 +102,13 @@ msgstr "Sửa lại"
#. module: sale
#: selection:sale.order,state:0
msgid "Invoice Exception"
msgstr ""
msgstr "Hóa đơn ngoại lệ"
#. module: sale
#: help:sale.order,picking_ids:0
msgid ""
"This is the list of picking list that have been generated for this invoice"
msgstr ""
msgstr "Đây là danh sách các sản phẩm đã chọn được tạo ra cho hóa đơn này"
#. module: sale
#: model:process.node,note:sale.process_node_deliveryorder0
@ -126,7 +128,7 @@ msgstr "Xác nhận"
#. module: sale
#: view:sale.order:0
msgid "Make Invoice"
msgstr ""
msgstr "Lập hóa đơn"
#. module: sale
#: field:sale.order.line,price_subtotal:0
@ -139,6 +141,8 @@ msgid ""
"Whenever confirm button is clicked, the draft state is moved to manual. that "
"is, quotation is moved to sale order."
msgstr ""
"Bất kỳ khi nào nút xác nhận được chọn, trạng thái dự thảo sẽ được chuyển "
"sang thủ công. Nghĩa là, báo giá được chuyển thành đơn chào hàng."
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_cancelorder0
@ -194,7 +198,7 @@ msgstr "Đã hủy bỏ"
#. module: sale
#: selection:sale.order,state:0
msgid "Shipping Exception"
msgstr ""
msgstr "Vận chuyển ngoại lệ"
#. module: sale
#: field:sale.order,amount_total:0
@ -229,7 +233,7 @@ msgstr "Tất cả một lúc"
#. module: sale
#: model:process.transition,note:sale.process_transition_saleprocurement0
msgid "Procurement is created after confirmation of sale order."
msgstr ""
msgstr "Việc thu mua hàng được tạo sau khi có xác nhận của đơn chào hàng."
#. module: sale
#: field:sale.order,project_id:0
@ -271,7 +275,7 @@ msgstr "Thông tin các dơn đặt hàng"
#. module: sale
#: field:sale.order.line,product_uos_qty:0
msgid "Quantity (UoS)"
msgstr ""
msgstr "Số lượng (Đơn vị bán)"
#. module: sale
#: help:sale.order,invoice_quantity:0
@ -281,6 +285,11 @@ msgid ""
"choose if you invoice based on ordered or shipped quantities. If the product "
"is a service, shipped quantities means hours spent on the associated tasks."
msgstr ""
"Đơn chào hàng sẽ tự động tạo hóa đơn gợi ý (hóa đơn dự thảo). Số lượng yêu "
"cầu và số lượng giao hàng có thể không giống nhau. Bạn phải chọn nếu bạn lập "
"hóa đơn dựa trên số lượng đặt hàng hay số lượng giao hàng. Nếu sản phẩm là "
"một dịch vụ, số lượng giao hàng có nghĩa là số giờ đã dùng để thực hiện các "
"công việc liên quan."
#. module: sale
#: selection:sale.order.line,state:0
@ -355,7 +364,7 @@ msgstr "Dòng hoá đơn"
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_forceassignation0
msgid "Force Assignation"
msgstr ""
msgstr "Phân phối lực lượng"
#. module: sale
#: view:sale.order:0
@ -368,6 +377,9 @@ msgid ""
"Packing list is created when 'Assign' is being clicked after confirming the "
"sale order. This transaction moves the sale order to packing list."
msgstr ""
"Bảng kê bao bì hàng hóa được tạo khi nút 'Chỉ định' được chọn sau khi xác "
"nhận đơn chào hàng. Giao dịch này chuyển đơn chào hàng sang bảng kê bao bì "
"hàng hóa."
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree8
@ -386,6 +398,8 @@ msgid ""
"When you select Shipping Ploicy = 'Automatic Invoice after delivery' , it "
"will automatic create after delivery."
msgstr ""
"Khi bạn chọn chính sách vận chuyển = 'Tự động xuất hóa đơn sau khi giao "
"hàng', nó sẽ tự động tạo sau khi giao hàng."
#. module: sale
#: selection:sale.order,picking_policy:0
@ -475,7 +489,7 @@ msgstr ""
#. module: sale
#: field:sale.shop,payment_account_id:0
msgid "Payment Accounts"
msgstr ""
msgstr "Tài khoản thanh toán"
#. module: sale
#: constraint:product.template:0
@ -506,7 +520,7 @@ msgstr "Tài khoản thanh toán"
#. module: sale
#: wizard_button:sale.advance_payment_inv,create,end:0
msgid "Close"
msgstr ""
msgstr "Đóng"
#. module: sale
#: model:process.node,name:sale.process_node_invoice0
@ -534,18 +548,18 @@ msgstr "Giảm giá (%)"
#. module: sale
#: model:process.node,note:sale.process_node_invoice0
msgid "Draft customer invoice, to be reviewed by accountant."
msgstr ""
msgstr "Hóa đơn khách hàng dự thảo, sẽ được kế toán xem xét lại."
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree3
#: model:ir.ui.menu,name:sale.menu_action_order_tree3
msgid "Sales Order To Be Invoiced"
msgstr ""
msgstr "Đơn chào hàng sẽ được lập hóa đơn"
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
msgid "Procurement for each line"
msgstr ""
msgstr "Thu mua hàng cho mỗi sản phẩm"
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree10
@ -556,7 +570,7 @@ msgstr ""
#. module: sale
#: wizard_view:sale.advance_payment_inv,create:0
msgid "Invoices"
msgstr ""
msgstr "Hóa đơn"
#. module: sale
#: view:sale.order:0
@ -581,7 +595,7 @@ msgstr ""
#. module: sale
#: field:sale.order.line,product_packaging:0
msgid "Packaging"
msgstr ""
msgstr "Đóng gói"
#. module: sale
#: model:ir.module.module,shortdesc:sale.module_meta_information

View File

@ -86,17 +86,17 @@
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="date"/>
<field name="date_confirm"/>
<separator orientation="vertical"/>
<field name="shop_id" widget="selection"/>
<field name="categ_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
<field name="date"/>
<field name="date_confirm"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
<filter string="Default UoM" icon="terp-mrp" context="{'group_by':'uom_name'}"/>

View File

@ -37,7 +37,10 @@ class sale_shop(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse'),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist'),
'project_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
'company_id': fields.many2one('res.company', 'Company', required=True),
'company_id': fields.many2one('res.company', 'Company', required=False),
}
_defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.shop', context=c),
}
sale_shop()
@ -865,13 +868,6 @@ class sale_order_line(osv.osv):
'product_packaging': False
}
def create_sale_order_line_invoice(self, cr, uid, ids, context=None):
if context is None:
context = {}
context.update({'active_ids' : ids,'active_id' : ids})
self.pool.get('sale.order.line.make.invoice').make_invoices(cr, uid, ids, context=context)
return True
def invoice_line_create(self, cr, uid, ids, context=None):
if context is None:
context = {}

View File

@ -157,10 +157,10 @@
<field name="invoiced"/>
<group attrs="{'invisible':[('invoiced','=',True)]}">
<button colspan="1"
name="create_sale_order_line_invoice"
name="%(action_view_sale_order_line_make_invoice)d"
states="confirmed"
string="Create Invoice"
type="object"
string="Make Invoices"
type="action"
icon="terp-document-new" />
</group>
</group>
@ -364,6 +364,7 @@ to your configuration: from the sales order, from the pickings, etc.
<field name="salesman_id"/>
<field name="price_subtotal"/>
<field name="state"/>
<field name="invoiced"/>
</tree>
</field>
</record>
@ -373,7 +374,6 @@ to your configuration: from the sales order, from the pickings, etc.
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales Order Lines">
<separator colspan="4" string="General Information"/>
<group colspan="4" col="6">
<field name="order_id"/>
<field name="product_id" readonly="1"/>
@ -381,50 +381,36 @@ to your configuration: from the sales order, from the pickings, etc.
<field name="product_uom_qty" readonly="1"/>
<field groups="product.group_uos" name="product_uos_qty"/>
<field name="product_uom"/>
<field colspan="4" name="name" groups="base.group_extended"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="order_partner_id" readonly="1" invisible="1"/>
</group>
<notebook>
<page string="Order Lines">
<separator colspan="4" string="Manual Designation"/>
<group colspan="4" col="6">
<field name="type" groups="base.group_extended"/>
<field name="delay" groups="base.group_extended"/>
<field name="th_weight" groups="base.group_extended"/>
<field name="price_unit"/>
<field name="discount"/>
<field name="price_subtotal"/>
</group>
<separator colspan="4" string="Description"/>
<field colspan="4" name="name" groups="base.group_extended"/>
<separator colspan="4" string="Taxes"/>
<field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]" nolabel="1"/>
<separator colspan="4"/>
<field name="state"/>
<group col="3" colspan="2">
<button colspan="1"
name="create_sale_order_line_invoice"
string="Create Invoice"
type="object"
icon="terp-document-new"
attrs="{'invisible': ['|',('state', 'in', ('draft','cancel')),('invoiced', '=', 1)]}"/>
<button name="button_cancel"
string="Cancel" type="object"
icon="gtk-cancel"
attrs="{'invisible': ['|',('state', 'not in', ('confirmed', 'exception')),('invoiced', '=', 1)]}"/>
<button name="button_done"
string="Done" type="object"
icon="gtk-jump-to"
attrs="{'invisible': ['|',('state', 'not in', ('confirmed','exception')),('invoiced', '=', 0)]}"/>
</group>
</page>
<page string="Invoice Lines" groups="base.group_extended">
<field colspan="4" name="invoice_lines" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="notes" nolabel="1"/>
</page>
</notebook>
<separator colspan="4" string="Price"/>
<group colspan="4" col="6">
<field name="price_unit"/>
<field name="discount"/>
<field name="price_subtotal"/>
</group>
<separator colspan="4" string="Notes"/>
<field colspan="4" name="notes" nolabel="1"/>
<separator colspan="4"/>
<field name="state"/>
<group col="3" colspan="2">
<!-- <button colspan="1"
name="%(action_view_sale_order_line_make_invoice)d"
string="Make Invoice"
type="action"
icon="terp-document-new"
attrs="{'invisible': ['|',('state', 'in', ('draft','cancel')),('invoiced', '=', 1)]}"/>-->
<button name="button_cancel"
string="Cancel" type="object"
icon="gtk-cancel"
attrs="{'invisible': ['|',('state', 'not in', ('confirmed', 'exception')),('invoiced', '=', 1)]}"/>
<button name="button_done"
string="Done" type="object"
icon="gtk-jump-to"
attrs="{'invisible': ['|',('state', 'not in', ('confirmed','exception')),('invoiced', '=', 0)]}"/>
</group>
</form>
</field>
</record>

View File

@ -41,15 +41,20 @@
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
-
I click on the "Create Invoice" button of sale order line
I click on the "Make Invoice" button of sale order line
-
!record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_0}:
{}
-
I click on the "Create Invoice" button of wizard
-
!python {model: sale.order.line}: |
!python {model: sale.order.line.make.invoice}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
sol = so.order_line[0]
self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
"tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
"search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_0")], {"lang": "en_US",
"tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
"search_default_uninvoiced": 1, "active_id": sol.id,
})
-
I verify that "Invoiced" has been set to True.
@ -115,17 +120,20 @@
sale_id=self.browse(cr, uid, ref("sale_order_so3"))
assert(sale_id.invoiced == True), "Paid has not been set to true"
-
I click on the "Create Invoice" button of sale order and verify that it gives a warning message
I create an invoice for another sale order line. I click on the "Make Invoice" button of sale order line
-
I create an invoice for another sale order line. I click on the "Create Invoice" button of sale order line
-
!python {model: sale.order.line}: |
!record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_1}:
{}
-
I click on the "Create Invoice" button of wizard
-
!python {model: sale.order.line.make.invoice}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
sol = so.order_line[1]
self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
"tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
"search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_1")], {"lang": "en_US",
"tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
"search_default_uninvoiced": 1, "active_id": sol.id,
})
-
I verify that invoice for sale order line has been created.

Some files were not shown because too many files have changed in this diff Show More