[MERGE] Merge (After merge with main branch)

bzr revid: mra@tinyerp.com-20100426061422-uira4lfkczecerox
This commit is contained in:
mra (Open ERP) 2010-04-26 11:44:22 +05:30
commit c5234382c8
195 changed files with 5135 additions and 2676 deletions

View File

@ -99,17 +99,16 @@ module named account_voucherss
'account_installer.xml',
'report/account_invoice_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
],
'demo_xml': [
#'demo/price_accuracy00.yml',
'account_demo.xml',
'project/project_demo.xml',
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'account_unit_test.xml',
],
'test': [
'test/price_accuracy00.yml',
],
'installable': True,
'active': False,
'certificate': '0080331923549',

View File

@ -44,6 +44,7 @@
Then I should see an account entry linked to this invoice.
-
!assert {model: account.invoice, id: invoice1}:
test:
- bool(move_id)
-
# This is not working, find a way to do that in YAML, *qty is not
@ -52,12 +53,14 @@
equal to *qty x *price x (1 + *tax)
-
!assert {model: account.invoice, id: invoice1}:
- abs(sum(x.credit for x in move_id.line_id) - 163.97) < 0.000001
test:
- abs(sum(x.credit for x in move_id.line_id) - 163.97) < 0.000001
-
And this account entry must have a credit equals to the debit
-
!assert {model: account.invoice, id: invoice1}:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
test:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
-
Then, I change the precision of numbers to 3 digits.
-
@ -77,7 +80,8 @@
Then this account entry must have a credit equals to the debit
-
!assert {model: account.invoice, id: invoice2}:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
test:
- abs(sum(x.credit - x.debit for x in move_id.line_id)) < 0.000001
-
And this account entry must have a credit equals to 163.968€ which is
equal to *qty x *price x (1 + *tax)

View File

@ -7,13 +7,17 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-08 18:06+0000\n"
"PO-Revision-Date: 2010-04-01 22:39+0000\n"
"Last-Translator: mitev.dmitry <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-04-03 03:54+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:05+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -115,7 +119,7 @@ msgstr "Rodič"
#. module: account
#: selection:account.move,type:0
msgid "Journal Voucher"
msgstr "Rada"
msgstr ""
#. module: account
#: field:account.invoice,residual:0
@ -134,7 +138,7 @@ msgstr "Základní kódová značka"
#: model:ir.actions.wizard,name:account.wizard_unreconcile_select
#: model:ir.ui.menu,name:account.menu_unreconcile_select
msgid "Unreconcile entries"
msgstr "Nepotvrzené záznamy"
msgstr ""
#. module: account
#: constraint:account.period:0
@ -159,7 +163,7 @@ msgstr "Debetní Centralizace"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_invoice_state_confirm
msgid "Confirm draft invoices"
msgstr "Potvrdit návrh faktury"
msgstr ""
#. module: account
#: help:account.payment.term.line,days2:0
@ -182,7 +186,7 @@ msgstr "Grafy účtu"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_move_line_select
msgid "Move line select"
msgstr "Přesun řádku vyberte"
msgstr ""
#. module: account
#: rml:account.journal.period.print:0
@ -310,7 +314,7 @@ msgstr "Původ"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "Move Name"
msgstr "Název Pohybu"
msgstr ""
#. module: account
#: xsl:account.transfer:0
@ -325,7 +329,7 @@ msgstr "Vypočítat předpaltné(Subscription Compute)"
#. module: account
#: rml:account.central.journal:0
msgid "Account Num."
msgstr "Číslo účtu"
msgstr ""
#. module: account
#: rml:account.analytic.account.analytic.check:0
@ -337,12 +341,12 @@ msgstr ""
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
msgid "Tax"
msgstr "Daň"
msgstr ""
#. module: account
#: rml:account.general.journal:0
msgid "Debit Trans."
msgstr "Debetní transakce"
msgstr ""
#. module: account
#: field:account.analytic.line,account_id:0
@ -356,24 +360,24 @@ msgstr "Analytický účet"
#: field:account.tax,child_depend:0
#: field:account.tax.template,child_depend:0
msgid "Tax on Children"
msgstr "Daň z dětí"
msgstr ""
#. module: account
#: rml:account.central.journal:0
#: rml:account.general.journal:0
#: field:account.journal,name:0
msgid "Journal Name"
msgstr "Název časopisu"
msgstr ""
#. module: account
#: view:account.payment.term:0
msgid "Description on invoices"
msgstr "Popis na fakturách"
msgstr ""
#. module: account
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "Chyba! Nemůžete vytvářet rekurzivní analytické účty."
msgstr ""
#. module: account
#: field:account.bank.statement.reconcile,total_entry:0
@ -389,13 +393,13 @@ msgstr "Zdroj účtu"
#. module: account
#: field:account.journal,update_posted:0
msgid "Allow Cancelling Entries"
msgstr "Povolit Zrušení Příspěvky"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_paymentorderbank0
#: model:process.transition,name:account.process_transition_paymentorderreconcilation0
msgid "Payment Reconcilation"
msgstr "Platba usmíření"
msgstr ""
#. module: account
#: model:account.journal,name:account.expenses_journal
@ -425,7 +429,7 @@ msgstr "(Účet / Partner) Název"
#. module: account
#: selection:account.move,type:0
msgid "Contra"
msgstr "Kontraindikace"
msgstr ""
#. module: account
#: field:account.analytic.account,state:0
@ -447,7 +451,7 @@ msgstr ""
#: view:account.tax:0
#: view:account.tax.template:0
msgid "Special Computation"
msgstr "Speciální výpočetní"
msgstr ""
#. module: account
#: model:process.transition,note:account.process_transition_confirmstatementfromdraft0
@ -506,7 +510,7 @@ msgstr ""
#. module: account
#: view:account.invoice:0
msgid "Supplier invoice"
msgstr "Dodavatele uvedený na faktuře"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_reconcilepaid0
@ -533,7 +537,7 @@ msgstr ""
#. module: account
#: field:account.account.type,close_method:0
msgid "Deferral Method"
msgstr "Metoda zpoždění"
msgstr ""
#. module: account
#: field:account.tax.template,include_base_amount:0
@ -560,7 +564,7 @@ msgstr ""
#: selection:account.tax,applicable_type:0
#: selection:account.tax.template,applicable_type:0
msgid "True"
msgstr "Pravda"
msgstr ""
#. module: account
#: help:account.payment.term.line,days:0
@ -577,7 +581,7 @@ msgstr ""
#. module: account
#: rml:account.central.journal:0
msgid "Printing Date"
msgstr "Datum vydání"
msgstr ""
#. module: account
#: rml:account.general.ledger:0
@ -593,7 +597,7 @@ msgstr ""
#. module: account
#: view:account.journal:0
msgid "Entry Controls"
msgstr "Vstupní kontrolou"
msgstr ""
#. module: account
#: help:account.model.line,sequence:0
@ -616,13 +620,13 @@ msgstr ""
#. module: account
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "Kontakt"
msgstr ""
#. module: account
#: selection:account.model.line,date:0
#: selection:account.model.line,date_maturity:0
msgid "Partner Payment Term"
msgstr "Partner splatnosti"
msgstr ""
#. module: account
#: view:account.move.reconcile:0
@ -637,13 +641,13 @@ msgstr "Otevřeno pro bankovní vyrovnání(Open for bank reconciliation)"
#. module: account
#: field:account.invoice.line,discount:0
msgid "Discount (%)"
msgstr "Sleva (%)"
msgstr ""
#. module: account
#: wizard_field:account.move.line.reconcile,init_full,writeoff:0
#: wizard_field:account.move.line.reconcile,init_partial,writeoff:0
msgid "Write-Off amount"
msgstr "Odpis části"
msgstr ""
#. module: account
#: help:account.fiscalyear,company_id:0
@ -653,7 +657,7 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_analytic_accounting
msgid "Analytic Accounting"
msgstr "Analytické účetnictví"
msgstr ""
#. module: account
#: rml:account.overdue:0
@ -666,22 +670,22 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_account_analytic_line_form
#: model:ir.ui.menu,name:account.next_id_41
msgid "Analytic Entries"
msgstr "Analytická Příspěvky"
msgstr ""
#. module: account
#: selection:account.subscription,period_type:0
msgid "month"
msgstr "měsíc"
msgstr ""
#. module: account
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr "Přidruženého partnera"
msgstr ""
#. module: account
#: field:account.invoice,comment:0
msgid "Additional Information"
msgstr "Další informace"
msgstr ""
#. module: account
#: selection:account.invoice,type:0
@ -719,18 +723,18 @@ msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_supplieranalyticcost0
msgid "Analytic Invoice"
msgstr "Analytická faktury"
msgstr ""
#. module: account
#: field:account.journal.column,field:0
msgid "Field Name"
msgstr "Název pole"
msgstr ""
#. module: account
#: field:account.tax.code,sign:0
#: field:account.tax.code.template,sign:0
msgid "Sign for parent"
msgstr "Přihlaste se na mateřské"
msgstr ""
#. module: account
#: field:account.fiscalyear,end_journal_period_id:0
@ -741,7 +745,7 @@ msgstr ""
#: view:product.product:0
#: view:product.template:0
msgid "Purchase Properties"
msgstr "Nákup Nemovitosti"
msgstr ""
#. module: account
#: model:process.node,note:account.process_node_paymententries0
@ -751,12 +755,12 @@ msgstr ""
#. module: account
#: wizard_button:account.invoice.pay,init,reconcile:0
msgid "Partial Payment"
msgstr "Částečná platba"
msgstr ""
#. module: account
#: wizard_view:account_use_models,create:0
msgid "Move Lines Created."
msgstr "Přesun vytvořených linek."
msgstr ""
#. module: account
#: field:account.fiscalyear,state:0
@ -766,18 +770,18 @@ msgstr "Přesun vytvořených linek."
#: field:account.period,state:0
#: field:account.subscription,state:0
msgid "Status"
msgstr "Stav"
msgstr ""
#. module: account
#: rml:account.analytic.account.cost_ledger:0
#: rml:account.analytic.account.quantity_cost_ledger:0
msgid "Period to"
msgstr "Období do"
msgstr ""
#. module: account
#: field:account.account.type,partner_account:0
msgid "Partner account"
msgstr "Partner účet"
msgstr ""
#. module: account
#: wizard_view:account.subscription.generate,init:0
@ -803,7 +807,7 @@ msgstr ""
#. module: account
#: field:account.invoice,move_lines:0
msgid "Move Lines"
msgstr "Přesun Linky"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_config_wizard
@ -831,26 +835,26 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.next_id_30
msgid "Bank Reconciliation"
msgstr "Bankovní usmíření"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_account_template
msgid "Templates for Accounts"
msgstr "Šablony pro účty"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_form
#: model:ir.model,name:account.model_account_analytic_account
#: model:ir.ui.menu,name:account.account_analytic_def_account
msgid "Analytic Accounts"
msgstr "Analytické účty"
msgstr ""
#. module: account
#: wizard_view:account.print.journal.report,init:0
#: model:ir.actions.wizard,name:account.wizard_print_journal
#: model:ir.ui.menu,name:account.menu_print_journal
msgid "Print Journal"
msgstr "Tisk věstníku"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_bank_accounts_wizard
@ -861,39 +865,39 @@ msgstr ""
#: field:account.move.line,date_created:0
#: field:account.move.reconcile,create_date:0
msgid "Creation date"
msgstr "Datum vytvoření"
msgstr ""
#. module: account
#: wizard_button:account.invoice.refund,init,cancel_invoice:0
msgid "Cancel Invoice"
msgstr "Zrušit účet"
msgstr ""
#. module: account
#: field:account.journal.column,required:0
msgid "Required"
msgstr "Požadované"
msgstr ""
#. module: account
#: field:product.category,property_account_expense_categ:0
#: field:product.template,property_account_expense:0
msgid "Expense Account"
msgstr "Cestovní účet"
msgstr ""
#. module: account
#: wizard_field:account.move.line.reconcile,addendum,journal_id:0
msgid "Write-Off Journal"
msgstr "Odpis věstníku"
msgstr ""
#. module: account
#: field:account.model.line,amount_currency:0
#: field:account.move.line,amount_currency:0
msgid "Amount Currency"
msgstr "Částka měny"
msgstr ""
#. module: account
#: field:account.chart.template,property_account_expense_categ:0
msgid "Expense Category Account"
msgstr "Kategorie výdajů účtu"
msgstr ""
#. module: account
#: wizard_field:account.fiscalyear.close,init,fy2_id:0
@ -910,7 +914,7 @@ msgstr ""
#. module: account
#: wizard_field:account.open_closed_fiscalyear,init,fyear_id:0
msgid "Fiscal Year to Open"
msgstr "Fiskální rok otevřena"
msgstr ""
#. module: account
#: view:account.config.wizard:0
@ -928,7 +932,7 @@ msgstr ""
#: field:account.model.line,quantity:0
#: field:account.move.line,quantity:0
msgid "Quantity"
msgstr "Množství"
msgstr ""
#. module: account
#: wizard_field:account.account.balance.report,checktype,date_to:0
@ -936,7 +940,7 @@ msgstr "Množství"
#: wizard_field:account.partner.balance.report,init,date2:0
#: wizard_field:account.third_party_ledger.report,init,date2:0
msgid "End date"
msgstr "Datum ukončení"
msgstr ""
#. module: account
#: field:account.invoice.tax,base_amount:0
@ -957,12 +961,12 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_bank_statement_tree
#: model:ir.ui.menu,name:account.menu_bank_statement_tree
msgid "Entries by Statements"
msgstr "Příspěvky výroky"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_analyticinvoice0
msgid "analytic Invoice"
msgstr "analytické faktury"
msgstr ""
#. module: account
#: wizard_field:account.automatic.reconcile,init,period_id:0
@ -981,22 +985,22 @@ msgstr "analytické faktury"
#: wizard_field:account.print.journal.report,init,period_id:0
#: field:account.subscription,period_nbr:0
msgid "Period"
msgstr "Perioda"
msgstr ""
#. module: account
#: rml:account.partner.balance:0
msgid "Grand total"
msgstr "Úhrn"
msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_accounting
msgid "Financial Accounting"
msgstr "Finanční účetnictví"
msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Net Total:"
msgstr "Čistá celkem:"
msgstr ""
#. module: account
#: view:account.fiscal.position:0
@ -1010,7 +1014,7 @@ msgstr "Čistá celkem:"
#: model:ir.model,name:account.model_account_fiscal_position
#: field:res.partner,property_account_position:0
msgid "Fiscal Position"
msgstr "Fiskální pozice"
msgstr ""
#. module: account
#: field:account.analytic.line,product_uom_id:0
@ -1027,7 +1031,7 @@ msgstr ""
#: field:account.account,child_parent_ids:0
#: field:account.account.template,child_parent_ids:0
msgid "Children"
msgstr "Děti"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_fiscal_position_tax
@ -1038,35 +1042,35 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_invoice_tree2_new
#: model:ir.ui.menu,name:account.menu_action_invoice_tree2_new
msgid "New Supplier Invoice"
msgstr "Nového dodavatele faktury"
msgstr ""
#. module: account
#: wizard_field:account.invoice.pay,init,amount:0
msgid "Amount paid"
msgstr "Zaplacené částky"
msgstr ""
#. module: account
#: selection:account.invoice,type:0
#: model:process.transition,name:account.process_transition_customerinvoice0
#: model:process.transition,name:account.process_transition_suppliercustomerinvoice0
msgid "Customer Invoice"
msgstr "Zákazník faktury"
msgstr ""
#. module: account
#: wizard_view:account.open_closed_fiscalyear,init:0
msgid "Choose Fiscal Year"
msgstr "Vyberte si fiskální rok"
msgstr ""
#. module: account
#: field:account.sequence.fiscalyear,sequence_main_id:0
msgid "Main Sequence"
msgstr "Hlavní posloupnosti"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_journal_tree
#: model:ir.ui.menu,name:account.account_analytic_journal_print
msgid "Print Analytic Journals"
msgstr "Tisk Analytické Časopisy"
msgstr ""
#. module: account
#: rml:account.tax.code.entries:0
@ -1083,7 +1087,7 @@ msgstr ""
#. module: account
#: field:account.bank.statement.reconcile,total_new:0
msgid "Total write-off"
msgstr "Celkem odpis"
msgstr ""
#. module: account
#: view:account.tax.template:0
@ -1095,14 +1099,14 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_tax_code_list
#: model:ir.ui.menu,name:account.menu_action_tax_code_list
msgid "Tax codes"
msgstr "Daňové kódy"
msgstr ""
#. module: account
#: field:account.fiscal.position.template,chart_template_id:0
#: field:account.tax.template,chart_template_id:0
#: field:wizard.multi.charts.accounts,chart_template_id:0
msgid "Chart Template"
msgstr "Graf šablony"
msgstr ""
#. module: account
#: field:account.chart.template,property_account_income_categ:0
@ -1113,24 +1117,24 @@ msgstr ""
#: model:ir.actions.act_window,name:account.analytic_account_form
#: model:ir.ui.menu,name:account.account_analytic_form
msgid "New Analytic Account"
msgstr "Nový analitickiý účet"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_fiscal_position_template_form
#: model:ir.ui.menu,name:account.menu_action_account_fiscal_position_form_template
msgid "Fiscal Position Templates"
msgstr "Fiskální pozice Šablony"
msgstr ""
#. module: account
#: rml:account.invoice:0
#: field:account.invoice.line,price_unit:0
msgid "Unit Price"
msgstr "Cena za kus"
msgstr ""
#. module: account
#: rml:account.analytic.account.journal:0
msgid "Period from :"
msgstr "Období od:"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_wizard_multi_charts_accounts
@ -1140,7 +1144,7 @@ msgstr ""
#. module: account
#: model:account.journal,name:account.sales_journal
msgid "Journal de vente"
msgstr "Prodej věstníku"
msgstr ""
#. module: account
#: help:account.model.line,amount_currency:0
@ -1151,23 +1155,23 @@ msgstr ""
#: view:account.fiscal.position.template:0
#: field:account.fiscal.position.template,name:0
msgid "Fiscal Position Template"
msgstr "Fiskální pozice šablony"
msgstr ""
#. module: account
#: field:account.payment.term,line_ids:0
msgid "Terms"
msgstr "Podmínky"
msgstr ""
#. module: account
#: rml:account.vat.declaration:0
msgid "Tax Report"
msgstr "Daňové Report"
msgstr ""
#. module: account
#: wizard_button:account.analytic.account.chart,init,open:0
#: wizard_button:account.chart,init,open:0
msgid "Open Charts"
msgstr "Zobrazit Grafy"
msgstr ""
#. module: account
#: wizard_view:account.fiscalyear.close.state,init:0
@ -1177,7 +1181,7 @@ msgstr ""
#. module: account
#: selection:account.move,type:0
msgid "Bank Receipt"
msgstr "Bankovní Příjem"
msgstr ""
#. module: account
#: view:res.partner:0
@ -1187,17 +1191,17 @@ msgstr "Bankovní účet"
#. module: account
#: field:account.chart.template,tax_template_ids:0
msgid "Tax Template List"
msgstr "Daňové seznamu šablon"
msgstr ""
#. module: account
#: model:process.transition,name:account.process_transition_invoiceimport0
msgid "Invoice import"
msgstr "Faktura import"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.action_move_journal_line_form_select
msgid "Standard entry"
msgstr "Standardní vstupní"
msgstr ""
#. module: account
#: help:account.account,currency_mode:0
@ -1212,7 +1216,7 @@ msgstr ""
#. module: account
#: field:account.account,company_currency_id:0
msgid "Company Currency"
msgstr "Společnost měny"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_fiscal_position_account_template
@ -1222,7 +1226,7 @@ msgstr ""
#. module: account
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "Parent Analytická účtu"
msgstr ""
#. module: account
#: wizard_button:account.move.line.reconcile,init_partial,addendum:0
@ -1242,22 +1246,22 @@ msgstr ""
#. module: account
#: field:account.bank.statement,balance_end_real:0
msgid "Ending Balance"
msgstr "Konečný zůstatek"
msgstr ""
#. module: account
#: view:product.product:0
msgid "Purchase Taxes"
msgstr "Nákup Daně"
msgstr ""
#. module: account
#: field:account.payment.term.line,name:0
msgid "Line Name"
msgstr "Název řádku"
msgstr ""
#. module: account
#: selection:account.payment.term.line,value:0
msgid "Fixed Amount"
msgstr "Pevná částka"
msgstr ""
#. module: account
#: rml:account.analytic.account.analytic.check:0
@ -1285,24 +1289,24 @@ msgstr ""
#. module: account
#: view:account.config.wizard:0
msgid "Continue"
msgstr "Pokračovat"
msgstr ""
#. module: account
#: field:account.payment.term.line,value:0
msgid "Value"
msgstr "Hodnota"
msgstr ""
#. module: account
#: wizard_field:account.invoice.pay,addendum,writeoff_acc_id:0
#: wizard_field:account.move.line.reconcile,addendum,writeoff_acc_id:0
msgid "Write-Off account"
msgstr "Odpis účet"
msgstr ""
#. module: account
#: field:account.model.line,model_id:0
#: field:account.subscription,model_id:0
msgid "Model"
msgstr "Vzor"
msgstr ""
#. module: account
#: model:ir.actions.wizard,name:account.wizard_fiscalyear_close_state
@ -1313,12 +1317,12 @@ msgstr ""
#. module: account
#: field:account.journal,centralisation:0
msgid "Centralised counterpart"
msgstr "Centralizované protějšek"
msgstr ""
#. module: account
#: view:wizard.company.setup:0
msgid "Message"
msgstr "Zpráva"
msgstr ""
#. module: account
#: model:process.node,note:account.process_node_supplierpaymentorder0
@ -1332,7 +1336,7 @@ msgstr ""
#: selection:account.analytic.account,type:0
#: field:account.journal,view_id:0
msgid "View"
msgstr "Pohled"
msgstr ""
#. module: account
#: selection:account.account.balance.report,checktype,display_account:0
@ -1340,13 +1344,13 @@ msgstr "Pohled"
#: selection:account.tax,type_tax_use:0
#: selection:account.tax.template,type_tax_use:0
msgid "All"
msgstr "Vše"
msgstr ""
#. module: account
#: field:account.move.line,analytic_lines:0
#: model:ir.model,name:account.model_account_analytic_line
msgid "Analytic lines"
msgstr "Analytická linky"
msgstr ""
#. module: account
#: help:account.tax,type:0
@ -1370,28 +1374,28 @@ msgstr ""
#. module: account
#: model:process.node,name:account.process_node_electronicfile0
msgid "Electronic File"
msgstr "Elektronický soubor"
msgstr ""
#. module: account
#: view:res.partner:0
msgid "Customer Credit"
msgstr "Odběratelský úvěr"
msgstr ""
#. module: account
#: field:account.invoice,tax_line:0
msgid "Tax Lines"
msgstr "Daňové Linky"
msgstr ""
#. module: account
#: field:ir.sequence,fiscal_ids:0
msgid "Sequences"
msgstr "Posloupnosti"
msgstr ""
#. module: account
#: model:ir.actions.act_window,name:account.action_account_type_form
#: model:ir.ui.menu,name:account.menu_action_account_type_form
msgid "Account Types"
msgstr "Typy účtů"
msgstr ""
#. module: account
#: wizard_field:account.automatic.reconcile,init,journal_id:0
@ -1413,18 +1417,18 @@ msgstr "Typy účtů"
#: wizard_field:populate_statement_from_inv,init,journal_id:0
#: field:report.hr.timesheet.invoice.journal,journal_id:0
msgid "Journal"
msgstr "Časopis"
msgstr ""
#. module: account
#: field:account.account,child_id:0
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "Dětská konta"
msgstr ""
#. module: account
#: field:account.account,check_history:0
msgid "Display History"
msgstr "Zobrazení historie"
msgstr ""
#. module: account
#: wizard_field:account.third_party_ledger.report,init,date1:0
@ -1454,7 +1458,7 @@ msgstr ""
#: wizard_view:account.move.line.reconcile,init_full:0
#: wizard_view:account.move.line.reconcile,init_partial:0
msgid "Write-Off"
msgstr "Odpis"
msgstr ""
#. module: account
#: help:account.invoice,partner_bank:0
@ -1466,12 +1470,12 @@ msgstr ""
#. module: account
#: field:res.partner,debit:0
msgid "Total Payable"
msgstr "Celkem za poplatek"
msgstr ""
#. module: account
#: wizard_button:account.fiscalyear.close.state,init,close:0
msgid "Close states"
msgstr "Zavřít státy"
msgstr ""
#. module: account
#: model:ir.model,name:account.model_wizard_company_setup
@ -1486,22 +1490,22 @@ msgstr ""
#. module: account
#: field:account.journal,refund_journal:0
msgid "Refund Journal"
msgstr "Refundace věstníku"
msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_income
msgid "Income"
msgstr "Příjem"
msgstr ""
#. module: account
#: selection:account.bank.statement.line,type:0
msgid "Supplier"
msgstr "Dodavatel"
msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Tel. :"
msgstr "Telefonní číslo:"
msgstr ""
#. module: account
#: field:account.invoice.tax,tax_amount:0

View File

@ -36,6 +36,7 @@ import account_balance_landscape
import compare_account_balance
import account_invoice_report
import account_report
import account_analytic_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class analytic_report(osv.osv):
_name = "analytic.report"
_description = "Analytic Accounts Statistics"
_auto = False
_columns = {
'date_start': fields.date('Date Start', readonly=True),
'date_end': fields.date('Date End',readonly=True),
'name' : fields.char('Analytic Account', size=128, readonly=True),
'partner_id' : fields.many2one('res.partner', 'Associated Partner',readonly=True),
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', readonly=True),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
'user_id' : fields.many2one('res.users', 'Account Manager',readonly=True),
'product_id' : fields.many2one('product.product', 'Product',readonly=True),
'quantity': fields.float('Quantity',readonly=True),
'debit' : fields.float('Debit',readonly=True),
'credit' : fields.float('Credit',readonly=True),
'balance' : fields.float('Balance',readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'state': fields.selection([('draft','Draft'),
('open','Open'),
('pending','Pending'),
('cancelled', 'Cancelled'),
('close','Close'),
('template', 'Template')],
'State', readonly=True),
}
_order = 'date_start desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'analytic_report')
cr.execute("""
create or replace view analytic_report as (
select
min(s.id) as id,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
l.journal_id,
l.product_id,
s.parent_id,
s.date_start,
s.date as date_end,
s.user_id,
s.name,
s.partner_id,
s.quantity,
s.debit,
s.credit,
s.balance,
count(*) as nbr,
s.state
from account_analytic_account s
left join account_analytic_line l on (s.id=l.account_id)
GROUP BY s.create_date,s.state,l.journal_id,s.name,
s.partner_id,s.date_start,s.date,s.user_id,s.quantity,
s.debit,s.credit,s.balance,s.parent_id,l.product_id
)
""")
analytic_report()

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_analytic_report_tree" model="ir.ui.view">
<field name="name">analytic.report.tree</field>
<field name="model">analytic.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Analytic Accounts Statistics">
<field name="parent_id" invisible="1" string="Analytic Account"/>
<field name="product_id" invisible="1"/>
<field name="name"/>
<field name="partner_id"/>
<field name="journal_id" string="Analytic Journal"/>
<field name="user_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="quantity"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="state"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
</tree>
</field>
</record>
<record id="view_analytic_report_search" model="ir.ui.view">
<field name="name">analytic.report.search</field>
<field name="model">analytic.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Accounts">
<group>
<filter icon="terp-account"
string="This Year"
domain="[('year','=',time.strftime('%%Y'))]"/>
<filter icon="terp-account"
string="This Month"
domain="[('month','=',time.strftime('%%m'))]"/>
<separator orientation="vertical"/>
<filter string="Start" icon="terp-account" domain="[('date_start','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="End" icon="terp-account" domain="[('date_end','=',time.strftime('%%Y/%%m/%%d'))]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Accounts"
name="User"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-account"
string="Pending"
domain="[('state','=','pending')]"/>
<filter icon="terp-account"
string="Close"
domain="[('state','=','close')]"/>
<filter icon="terp-account"
string="Template"
domain="[('state','=','template')]"/>
<separator orientation="vertical"/>
<field name="parent_id"/>
<field name="journal_id"/>
<field name="product_id"/>
<separator orientation="vertical"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="User" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Analytic Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Analytic Account" icon="terp-account" context="{'group_by':'parent_id'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_analytic_report_all" model="ir.actions.act_window">
<field name="name">Analytic Accounts</field>
<field name="res_model">analytic.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_User':1,'search_default_user_id':uid}</field>
<field name="search_view_id" ref="view_analytic_report_search"/>
</record>
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_reporting" sequence="0"/>
</data>
</openerp>

View File

@ -30,11 +30,17 @@ class account_invoice_report(osv.osv):
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'payment_term': fields.many2one('account.payment.term', 'Payment Term',readonly=True),
'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')],readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position',readonly=True),
'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal',readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
@ -66,9 +72,15 @@ class account_invoice_report(osv.osv):
s.date_invoice as date,
to_char(s.date_invoice, 'YYYY') as year,
to_char(s.date_invoice, 'MM') as month,
to_char(s.date_invoice, 'YYYY-MM-DD') as day,
l.product_id as product_id,
sum(l.quantity * u.factor) as product_qty,
s.partner_id as partner_id,
s.payment_term as payment_term,
s.period_id as period_id,
s.currency_id as currency_id,
s.journal_id as journal_id,
s.fiscal_position as fiscal_position,
s.user_id as user_id,
s.company_id as company_id,
sum(l.quantity*l.price_unit) as price_total,
@ -82,9 +94,19 @@ class account_invoice_report(osv.osv):
account_invoice s on (s.id=l.invoice_id)
left join product_uom u on (u.id=l.uos_id)
group by
s.type,s.date_invoice, s.partner_id, l.product_id,
l.uos_id, s.user_id, s.state,
s.company_id
s.type,
s.date_invoice,
s.partner_id,
l.product_id,
l.uos_id,
s.user_id,
s.state,
s.company_id,
s.payment_term,
s.period_id,
s.fiscal_position,
s.currency_id,
s.journal_id
)
""")
account_invoice_report()

View File

@ -7,20 +7,26 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Invoices Statistics">
<field name="date"/>
<field name="user_id"/>
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="type" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_qty" invisible="1"/>
<!--field name="delay" avg="Days to Close"/-->
<field name="nbr" sum="# of Lines"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="state" invisible="1"/>
<field name="payment_term" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="fiscal_position" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
</tree>
</field>
</record>
@ -44,60 +50,85 @@
<field name="arch" type="xml">
<search string="Invoices">
<group>
<filter icon="terp-account"
string="This Year"
domain="[('year','=',time.strftime('%%Y'))]"
help="Invoices of the year"/>
<filter icon="terp-account"
string="This Month"
domain="[('month','=',time.strftime('%%m'))]"
help="Invoices of this month"/>
<filter icon="terp-account" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of the year"/>
<filter icon="terp-account" string="This Month"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of this month"/>
<filter icon="gtk-media-rewind"
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'))]"
help="Invoices during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
string="Invoices"
domain="[('state','&lt;&gt;','draft'),('state','&lt;&gt;','cancel')]"/>
<filter icon="terp-account"
string="Paid"
domain="[('state','=','paid')]"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Invoices"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<filter string="Draft"
icon="terp-account"
domain="[('state','=','draft')]"
help = "Draft tasks"/>
<filter string="Pro-forma"
icon="terp-account"
domain="[('state','=','proforma'),('state','=','proforma2')]"
help = "Pro-forma tasks"/>
<filter string="Current"
icon="terp-account"
domain="[('state', '=' ,'open')]"
help = "In progress tasks"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Invoices"
help = "My Invoices"
domain="[('user_id','=',uid)]" />
<filter icon="terp-account"
string="Invoices Non Users"
help="Invoices Non Users"
domain="[('user_id','=',False)]"/>
</field>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Done"
icon="terp-account"
domain="[('state','=','paid')]"
help = "Done tasks"/>
<filter string="Cancelled"
icon="terp-account"
domain="[('state', '=' ,'cancel')]"
help = "Cancelled tasks"/>
<separator orientation="vertical"/>
<field name="payment_term" widget="selection"/>
<field name="currency_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="type"/>
<field name="period_id" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<field name="date"/>
</group>
<newline/>
<group expand="1" string="Extended options..." >
<filter icon="terp-account"
string="Customer Invoices"
domain="[('type','=','out_invoice')]"/>
<filter icon="terp-account"
string="Customer Refunds"
domain="[('type','=','out_refund')]"/>
<separator orientation="vertical"/>
<filter icon="terp-account"
string="Supplier Invoices"
domain="[('type','=','in_invoice')]"/>
<filter icon="terp-account"
string="Supplier Refunds"
domain="[('type','=','in_refund')]"/>
</group>
<newline/>
<group expand="1" string="Group By..." >
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}"/>
<filter string="Salesman" icon="terp-account" context="{'group_by':'user_id'}" />
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Salesman" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Payment Term" icon="terp-account" context="{'group_by':'payment_term'}"/>
<separator orientation="vertical"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Force Period" icon="terp-account" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Position" icon="terp-account" context="{'group_by':'fiscal_position'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
@ -110,6 +141,7 @@
<field name="res_model">account.invoice.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_invoice_report_search"/>
</record>

View File

@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
#
# TODO: move this in a YAML test with !python tag
#
import xmlrpclib
DB = 'training3'
USERID = 1
USERPASS = 'admin'
sock = xmlrpclib.ServerProxy('http://%s:%s/xmlrpc/object' % ('localhost',8069))
ids = sock.execute(DB, USERID, USERPASS, 'account.account', 'search', [], {})
account_lists = sock.execute(DB, USERID, USERPASS, 'account.account', 'read', ids, ['parent_id','parent_left','parent_right'])
accounts = dict(map(lambda x: (x['id'],x), account_lists))
for a in account_lists:
if a['parent_id']:
assert a['parent_left'] > accounts[a['parent_id'][0]]['parent_left']
assert a['parent_right'] < accounts[a['parent_id'][0]]['parent_right']
assert a['parent_left'] < a['parent_right']
for a2 in account_lists:
assert not ((a2['parent_right']>a['parent_left']) and
(a2['parent_left']<a['parent_left']) and
(a2['parent_right']<a['parent_right']))
if a2['parent_id']==a['id']:
assert (a2['parent_left']>a['parent_left']) and (a2['parent_right']<a['parent_right'])
print 'Tests Ok'

View File

@ -1,12 +1,5 @@
- |
In order to test the Preorder Traversal Tree algorythm to organize tree
structure, we retrieve all accounts and test their parent_left and
parent_right values with the following assertions
. parent_left < parent_right
. parent_left < parent_left of all childs
. parent_right > parent_right of all childs
. if an account is a child it is included in parent_left-parent_right
. if an account is not a child it is not included in parent_left-parent_right
-
We retrieve all accounts and test they are in a tree data structure.
-
!python {model: account.account}: |
ids = self.search(cr, uid, [])

View File

@ -7,13 +7,17 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-07 22:24+0000\n"
"Last-Translator: mitev.dmitry <Unknown>\n"
"PO-Revision-Date: 2009-02-03 06:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-03-30 04:07+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:11+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
@ -46,7 +50,7 @@ msgstr ""
#: field:payment.line,info_owner:0
#: view:payment.order:0
msgid "Owner Account"
msgstr "Majitel účtu"
msgstr ""
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
@ -65,17 +69,17 @@ msgstr ""
#. module: account_payment
#: field:payment.order,date_prefered:0
msgid "Preferred date"
msgstr "Preferované datum"
msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Free"
msgstr "Volný"
msgstr ""
#. module: account_payment
#: wizard_field:populate_payment,search,entries:0
msgid "Entries"
msgstr "Příspěvky"
msgstr ""
#. module: account_payment
#: wizard_field:populate_payment,init,duedate:0
@ -96,7 +100,7 @@ msgstr ""
#: rml:payment.order:0
#: view:payment.order:0
msgid "Amount"
msgstr "Částka"
msgstr ""
#. module: account_payment
#: rml:payment.order:0
@ -111,7 +115,7 @@ msgstr ""
#. module: account_payment
#: selection:payment.order,state:0
msgid "Cancelled"
msgstr "Zrušeno"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
@ -123,7 +127,7 @@ msgstr ""
#: rml:payment.order:0
#: field:payment.order,reference:0
msgid "Reference"
msgstr "Odkaz"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
@ -134,7 +138,7 @@ msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Directly"
msgstr "Přímo"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
@ -157,7 +161,7 @@ msgstr ""
#. module: account_payment
#: selection:payment.order,state:0
msgid "Confirmed"
msgstr "Potvrzeno"
msgstr ""
#. module: account_payment
#: help:payment.line,ml_date_created:0
@ -177,12 +181,12 @@ msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Structured"
msgstr "Strukturované"
msgstr ""
#. module: account_payment
#: field:payment.order,state:0
msgid "State"
msgstr "Stav"
msgstr ""
#. module: account_payment
#: view:payment.line:0
@ -223,17 +227,17 @@ msgstr ""
#. module: account_payment
#: field:payment.order,date_done:0
msgid "Execution date"
msgstr "Datum představení"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Fixed date"
msgstr "Pevné datum"
msgstr ""
#. module: account_payment
#: field:payment.line,info_partner:0
msgid "Destination Account"
msgstr "Protiúčet"
msgstr ""
#. module: account_payment
#: view:payment.line:0
@ -251,12 +255,12 @@ msgstr ""
#: wizard_button:populate_payment,search,end:0
#: wizard_button:populate_statement,init,end:0
msgid "_Cancel"
msgstr "Zrušit"
msgstr ""
#. module: account_payment
#: field:payment.line,create_date:0
msgid "Created"
msgstr "Vytvořeno"
msgstr ""
#. module: account_payment
#: view:payment.line:0
@ -281,12 +285,12 @@ msgstr ""
#. module: account_payment
#: field:payment.line,communication:0
msgid "Communication"
msgstr "Komunikace"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Due date"
msgstr "Termín dokončení"
msgstr ""
#. module: account_payment
#: field:account.invoice,amount_to_pay:0
@ -307,7 +311,7 @@ msgstr ""
#: view:payment.type:0
#: help:payment.type,name:0
msgid "Payment Type"
msgstr "Typ platby"
msgstr ""
#. module: account_payment
#: help:payment.line,amount_currency:0

View File

@ -63,13 +63,13 @@ class account_analytic_account(osv.osv):
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
@ -78,18 +78,18 @@ class account_analytic_account(osv.osv):
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency<0 and a.id =ANY(%s) GROUP BY a.id",(ids2,))
r = dict(cr.fetchall())
return self._compute_currency_for_level_tree(cr, uid, ids, ids2, r, acc_set, context)
def _debit_calc(self, cr, uid, ids, name, arg, context={}):
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
@ -98,48 +98,48 @@ class account_analytic_account(osv.osv):
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE l.amount_currency>0 and a.id =ANY(%s) GROUP BY a.id" ,(ids2,))
r= dict(cr.fetchall())
return self._compute_currency_for_level_tree(cr, uid, ids, ids2, r, acc_set, context)
def _balance_calc(self, cr, uid, ids, name, arg, context={}):
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
if context.get('to_date',False):
where_date += " AND l.date <= '" + context['to_date'] + "'"
cr.execute("SELECT a.id, COALESCE(SUM(l.amount_currency),0) FROM account_analytic_account a LEFT JOIN account_analytic_line l ON (a.id=l.account_id "+where_date+") WHERE a.id =ANY(%s) GROUP BY a.id",(ids2,))
for account_id, sum in cr.fetchall():
res[account_id] = sum
return self._compute_currency_for_level_tree(cr, uid, ids, ids2, res, acc_set, context)
def _quantity_calc(self, cr, uid, ids, name, arg, context={}):
#XXX must convert into one uom
res = {}
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
acc_set = ",".join(map(str, ids2))
for i in ids:
res.setdefault(i,0.0)
if not ids2:
return res
where_date = ''
if context.get('from_date',False):
where_date += " AND l.date >= '" + context['from_date'] + "'"
if context.get('to_date',False):
where_date += " AND l.date <= '" + context['to_date'] + "'"
cr.execute('SELECT a.id, COALESCE(SUM(l.unit_amount), 0) \
FROM account_analytic_account a \
LEFT JOIN account_analytic_line l ON (a.id = l.account_id ' + where_date + ') \
@ -182,7 +182,7 @@ class account_analytic_account(osv.osv):
def _get_account_currency(self, cr, uid, ids, field_name, arg, context={}):
result=self._get_company_currency(cr, uid, ids, field_name, arg, context={})
return result
_columns = {
'name' : fields.char('Account Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, method=True, type='char', string='Full Account Name'),
@ -192,10 +192,10 @@ class account_analytic_account(osv.osv):
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance'),
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit'),
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit'),
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity'),
'balance' : fields.function(_balance_calc, method=True, type='float', string='Balance',store=True),
'debit' : fields.function(_debit_calc, method=True, type='float', string='Debit',store=True),
'credit' : fields.function(_credit_calc, method=True, type='float', string='Credit',store=True),
'quantity': fields.function(_quantity_calc, method=True, type='float', string='Quantity',store=True),
'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'),
'partner_id' : fields.many2one('res.partner', 'Associated Partner'),
'contact_id' : fields.many2one('res.partner.address', 'Contact'),

View File

@ -7,19 +7,23 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-04-07 08:27+0000\n"
"Last-Translator: iTuxer <Unknown>\n"
"PO-Revision-Date: 2009-02-03 12:33+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-03-30 04:13+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:17+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
msgstr "Audit Trail"
msgstr ""
#. module: audittrail
#: constraint:ir.model:0
@ -32,22 +36,22 @@ msgstr ""
#. module: audittrail
#: field:audittrail.log.line,log_id:0
msgid "Log"
msgstr "Log"
msgstr ""
#. module: audittrail
#: selection:audittrail.rule,state:0
msgid "Subscribed"
msgstr "Iscritto"
msgstr ""
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value : "
msgstr "Valore precendente : "
msgstr ""
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Create"
msgstr "Crea"
msgstr ""
#. module: audittrail
#: wizard_view:audittrail.view.log,init:0
@ -67,7 +71,7 @@ msgstr ""
#. module: audittrail
#: field:audittrail.log.line,old_value:0
msgid "Old Value"
msgstr "Valore precedente"
msgstr ""
#. module: audittrail
#: constraint:ir.actions.act_window:0

View File

@ -40,6 +40,7 @@
'wizard/base_calendar_invite_attendee_view.xml',
'base_calendar_view.xml'
],
"test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}

View File

@ -469,6 +469,7 @@ property or property parameter."),
reply_to=email_from
)
return True
def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
"""
Make entry on email and availbility on change of user_id field.
@ -795,7 +796,26 @@ class calendar_event(osv.osv):
def _tz_get(self, cr, uid, context={}):
return [(x.lower(), x) for x in pytz.all_timezones]
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, context={}):
def onchange_allday(self, cr, uid, ids, allday, context={}):
"""
@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 calendar events IDs.
@param allday: Value of allday boolean
@param context: A standard dictionary for contextual values
"""
if not allday or not ids:
return {}
event = self.browse(cr, uid, ids, context=context)[0]
value = {
'date': event.date and event.date[:11] + '00:00:00',
'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
'duration': 24
}
return {'value': value}
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context={}):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@ -805,14 +825,23 @@ class calendar_event(osv.osv):
@param duration: Get Duration between start date and end date or False
@param end_date: Get Ending Date or False
@param context: A standard dictionary for contextual values
"""
if not start_date:
return {}
value = {}
if not start_date:
return value
if not end_date and not duration:
duration = 8.00
value['duration'] = 8.00
value['duration'] = duration
if allday: # For all day event
start = start_date[:11] + '00:00:00'
value = {
'date': start,
'date_deadline': start,
'duration': 24
}
return {'value': value}
start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
if end_date and not duration:
end = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S")
@ -822,6 +851,7 @@ class calendar_event(osv.osv):
elif not end_date:
end = start + timedelta(hours=duration)
value['date_deadline'] = end.strftime("%Y-%m-%d %H:%M:%S")
return {'value': value}
def _set_rrulestring(self, cr, uid, id, name, value, arg, context):
@ -998,8 +1028,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('3', 'Third'), ('4', 'Fourth'), \
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
'month_list': fields.selection(months.items(), 'Month'),
'end_date': fields.date('Repeat Until')
'end_date': fields.date('Repeat Until'),
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
'event_id', 'attendee_id', 'Attendees'),
'allday': fields.boolean('All Day')
}
_defaults = {
'class': lambda *a: 'public',
'show_as': lambda *a: 'busy',
@ -1007,6 +1041,46 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'select1': lambda *x: 'date',
'interval': lambda *x: 1,
}
def open_event(self, cr, uid, ids, context=None):
"""
Open Event From for Editing
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of events IDs
@param context: A standard dictionary for contextual values
@return: Dictionary value which open Crm Meeting form.
"""
if not context:
context = {}
data_obj = self.pool.get('ir.model.data')
value = {}
id2 = data_obj._get_id(cr, uid, 'base_calendar', 'event_form_view')
id3 = data_obj._get_id(cr, uid, 'base_calendar', 'event_tree_view')
id4 = data_obj._get_id(cr, uid, 'base_calendar', 'event_calendar_view')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
if id4:
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
for id in ids:
value = {
'name': _('Event'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'calendar.event',
'view_id': False,
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
'type': 'ir.actions.act_window',
'res_id': base_calendar_id2real_id(id),
'nodestroy': True
}
return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
"""
@ -1085,8 +1159,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
count = 0
for data in cr.dictfetchall():
start_date = base_start_date and datetime.strptime(base_start_date, "%Y-%m-%d") or False
until_date = base_until_date and datetime.strptime(base_until_date, "%Y-%m-%d") or False
start_date = base_start_date and datetime.strptime(base_start_date[:10], "%Y-%m-%d") or False
until_date = base_until_date and datetime.strptime(base_until_date[:10], "%Y-%m-%d") or False
if count > limit:
break
event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
@ -1124,7 +1198,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
new_rule = '%s=%s' % (name, value)
new_rrule_str.append(new_rule)
new_rrule_str = ';'.join(new_rrule_str)
start_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date)
for rdate in rdates:
r_date = datetime.strptime(rdate, "%Y-%m-%d %H:%M:%S")
@ -1216,8 +1289,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
args_without_date.append(arg)
else:
if arg[1] in ('>', '>='):
if start_date:
continue
start_date = arg[2]
elif arg[1] in ('<', '<='):
if until_date:
continue
until_date = arg[2]
res = super(calendar_event, self).search(cr, uid, args_without_date, \
offset, limit, order, context, count)
@ -1261,7 +1338,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
context.update({'alarm_id': vals.get('alarm_id')})
alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date', \
context=context)
return res
def browse(self, cr, uid, ids, context=None, list_class=None, fields_process={}):

View File

@ -1,7 +1,12 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="res.request.link" id="request_link_meeting">
<field name="name">Event</field>
<field name="object">calendar.event</field>
</record>
<record model="res.alarm" id="alarm1">
<field name="name">1 minute before</field>
<field name="active" eval="1" />

View File

@ -71,7 +71,7 @@
<field name="arch" type="xml">
<tree string="Invitation details">
<field name="email" string="Invitation To"/>
<field name="partner_id" string="Partner" />
<field name="user_id" string="Internal User" />
<field name="partner_address_id" string="Contact" />
<field name="role" />
<field name="state" />
@ -100,8 +100,30 @@
</search>
</field>
</record>
<record id="action_view_attendee_form" model="ir.actions.act_window">
<field name="name">Event Invitations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">calendar.attendee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
<field name="context">{'default_sent_by_uid': uid}</field>
</record>
<!-- Calenadar's menu -->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
<!-- Invitation menu -->
<menuitem id="menu_attendee_invitations"
name="Event Invitations" parent="base.menu_calendar_configuration"
sequence="10" action="action_view_attendee_form" />
<record id="res_alarm_form_view" model="ir.ui.view">
<!-- ALARM FORM VIEW-->
<record id="res_alarm_form_view" model="ir.ui.view">
<field name="name">res.alarm.form</field>
<field name="model">res.alarm</field>
<field name="type">form</field>
@ -121,36 +143,230 @@
</field>
</record>
<record id="res_alarm_tree_view" model="ir.ui.view">
<field name="name">res.alarm.tree</field>
<field name="model">res.alarm</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Reminder details">
<field name="name" select="1"/>
<field name="trigger_interval" select="1"/>
<field name="trigger_duration" select="1"/>
<field name="trigger_occurs" select="1"/>
<field name="trigger_related" select="1"/>
</tree>
</field>
</record>
<record id="action_res_alarm_view" model="ir.actions.act_window">
<!-- ALARM TREE VIEW-->
<record id="res_alarm_tree_view" model="ir.ui.view">
<field name="name">res.alarm.tree</field>
<field name="model">res.alarm</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Reminder details">
<field name="name" select="1"/>
<field name="trigger_interval" select="1"/>
<field name="trigger_duration" select="1"/>
<field name="trigger_occurs" select="1"/>
<field name="trigger_related" select="1"/>
</tree>
</field>
</record>
<record id="action_res_alarm_view" model="ir.actions.act_window">
<field name="name">Available Alarms</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.alarm</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!--Available alarms-->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
</record>
<menuitem id="menu_crm_meeting_avail_alarm"
groups="base.group_extended"
action="base_calendar.action_res_alarm_view"
parent="base.menu_calendar_configuration" />
</data>
</openerp>
<!-- Event Form View-->
<record model="ir.ui.view" id="event_form_view">
<field name="name">Event Form</field>
<field name="model">calendar.event</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Meetings">
<group col="6" colspan="4">
<field name="name" select="1" string="Summary"
colspan="4" />
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
<newline/>
<field name="date" string="Start Date" required="1" select="1"
on_change="onchange_dates(date,duration,False,allday)" />
<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)" attrs="{'readonly': [('allday', '=', True)]}"/>
<field name="date_deadline" string="End Date" required="1"
on_change="onchange_dates(date,False,date_deadline)" />
<field name="location" />
<field name="alarm_id" string="Reminder"
widget="selection" />
<group colspan="2" col="4" >
<field name="rrule_type" string="Recurrency"
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
<button string="Edit All"
help="Edit all Ourrences of recurrent Meeting"
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
name="open_event" icon="gtk-edit"
type="object" />
</group>
</group>
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
<separator string="Select data for Custom Rule" colspan="8"/>
<group col="8" colspan="4">
<field name="freq" />
<field name="interval" />
<field name="count" />
<field name="end_date" />
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible' : [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="10" colspan="4"
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('freq','=','yearly')]}" />
</group>
</group>
</group>
<notebook colspan="4">
<page string="Event">
<group col="6" colspan="4">
<separator colspan="6" string="Visibility"/>
<field name="user_id" string="Responsible User" />
<field name="show_as" string="Show time as"/>
<field name="class" string="Privacy"/>
<field name="rrule" groups="base.group_extended" />
<field name="recurrent_id" invisible="1" />
<field name="recurrent_uid" invisible="1" />
</group>
<separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" />
<separator colspan="4"/>
</page>
<page string="Invitation Detail">
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
icon="terp-partner" type="action"
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
<field name="attendee_ids" colspan="4"
nolabel="1" widget="one2many" mode="tree,form">
<tree string="Invitation details" editable="top">
<field name="email" />
<field name="role" select="1" />
<field name="state" />
</tree>
<form string="Invitation details">
<notebook colspan="4">
<page string="Details">
<field name="email" />
<field name="rsvp" select="1" />
<field name="cutype" select="1" />
<field name="role" select="1" />
<separator colspan="4" string="" />
<group col="6" colspan="4">
<field name="state" select="2" />
<button name="do_tentative"
states="needs-action,declined,accepted"
string="Uncertain"
type="object"
icon="terp-crm" />
<button name="do_accept"
string="Accept"
states="needs-action,tentative,declined"
type="object"
icon="gtk-apply" />
<button name="do_decline"
string="Decline"
states="needs-action,tentative,accepted"
type="object"
icon="gtk-cancel" />
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate"
type="action"
icon="gtk-sort-descending"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
</group>
</page>
</notebook>
</form>
</field>
</page>
</notebook>
</form>
</field>
</record>
<!-- Event Tree View -->
<record model="ir.ui.view" id="event_tree_view">
<field name="name">Event Tree</field>
<field name="model">calendar.event</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Events">
<field name="name" string="Subject" />
<field name="date" string="Meeting Date" />
<field name="location" />
<field name="show_as" />
<field name="class" string="Privacy" />
</tree>
</field>
</record>
<!-- Event Calendar View -->
<record model="ir.ui.view" id="event_calendar_view">
<field name="name">Events Calendar</field>
<field name="model">calendar.event</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Events" date_start="date" color="show_as" date_delay="duration">
<field name="name"/>
<field name="class"/>
<field name="show_as"/>
</calendar>
</field>
</record>
<!-- Event action -->
<record id="action_view_event" model="ir.actions.act_window">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">calendar.event</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
</record>
<!-- Event menu -->
<menuitem id="menu_events"
name="Events" parent="base.menu_calendar_configuration"
sequence="5" action="action_view_event" />
</data>
</openerp>

View File

@ -0,0 +1,77 @@
- |
In Order to test base_calendar, I will first create One Simple Event with real data
-
!record {model: calendar.event, id: calendar_event_technicalpresentation0}:
class: private
date: '2010-04-30 16:00:00'
date_deadline: '2010-04-30 18:30:00'
description: The Technical Presentation will cover following topics:\n* Creating OpenERP
class\n* Views\n* Wizards\n* Workflows
duration: 2.5
location: OpenERP S.A.
name: Technical Presentation
rrule_type: none
- |
Now I will set recurrence for this event to occure monday and friday of week
-
!python {model: calendar.event}: |
self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], {'fr': 1, 'mo': 1, 'interval': 1, 'freq': 'weekly', 'rrule_type': 'custom'})
- |
In order to check that recurrent events are views successfully in calenadar view,
I will open calendar view of events
-
!python {model: calendar.event}: |
self.fields_view_get(cr, uid, False, 'calendar', context)
- |
In order to check that recurrent events are views successfully in calenadar view,
I will search for one of the recurrent event and count the number of events
-
!python {model: calendar.event}: |
ids = self.search(cr, uid, [('date', '>=', '2010-05-01 00:00:00'), ('date', '<=', '2010-05-31 00:00:00')] )
assert len(ids) == 9
- |
Now I will make All day event and test it
-
!record {model: calendar.event, id: calendar_event_alldaytestevent0}:
allday: 1
class: confidential
date: '2010-04-30 00:00:00'
date_deadline: '2010-04-30 00:00:00'
description: 'All day technical test '
location: School
name: All day test event
rrule_type: none
- |
In order to check reminder I will first create reminder
-
!record {model: res.alarm, id: res_alarm_daybeforeeventstarts0}:
name: 1 Day before event starts
trigger_duration: 1
trigger_interval: days
trigger_occurs: before
trigger_related: start
- |
Now I will assign this reminder to all day event
-
!python {model: calendar.event}: |
self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")})
- |
In order to assign attendee I will invite Demo user
-
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
type: internal
partner_id: base.res_partner_9 # Put bcz of problem in read
user_ids:
- base.user_demo
- |
Then I click on Invite Button
-
!python {model: base_calendar.invite.attendee}: |
self.do_invite(cr, uid, [ref("base_calendar_invite_attendee_0")], {'active_id': ref("calendar_event_alldaytestevent0"), 'model' : 'calendar.event', 'attendee_field':'attendee_ids'})
- |
Now I will Accept this invitation
-
!python {model: calendar.attendee}: |
ids = self.search(cr, uid, [('ref', '=', 'calendar.event' + ',' + str(ref("calendar_event_alldaytestevent0")))])
if ids:
self.do_accept(cr, uid, ids, context=context)

View File

@ -14,7 +14,11 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:03+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact

View File

@ -1,283 +0,0 @@
# Persian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
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-04-08 14:27+0000\n"
"Last-Translator: Sadegh Ismael Nattaj <nat@sethack.com>\n"
"Language-Team: Persian <fa@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-04-17 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,city:0
#: wizard_field:base_setup.base_setup,init,city:0
#: wizard_field:base_setup.base_setup,update,city:0
msgid "City"
msgstr "شهر"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid ""
"You can start configuring the system or connect directly to the database "
"using the default setup."
msgstr ""
"شما می‌توانید با بکارگیری از سوارسازی پیش‌فرض آغاز به پیکربندی سامانه کنید و "
"یا یک‌راست به دادگان متصل شوید."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,zip:0
#: wizard_field:base_setup.base_setup,init,zip:0
#: wizard_field:base_setup.base_setup,update,zip:0
msgid "Zip code"
msgstr "کد پستی"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "Select a Profile"
msgstr "یک پروفایل را برگزینید"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report header"
msgstr "سرنویس گزارش"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,config:0
msgid "Start Configuration"
msgstr "آغاز پیکربندی"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid ""
"You'll be able to install more modules later through the Administration menu."
msgstr ""
"شما می‌توانید از طریق منوی راهبری پیمانه‌های بیشتری را در آینده برپاسازی "
"نمایید."
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid ""
"A profile sets a pre-selection of modules for specific needs. These profiles "
"have been setup to help you discover the different aspects of OpenERP. This "
"is just an overview, we have 300+ available modules."
msgstr ""
"یک پروفایل دارای پیمانه‌های از پیش گزینش شده برای نیازهای خاص است. این "
"پروفایل‌ها برای این سوار می‌شوند تا به شما برای شناخت بیشتر جنبه‌های متفاوت "
"اپن ای‌آر‌پی کمک نماید. این تنها یک پیش‌نمایش است، ما بیش از ۳۰۰ پیمانه "
"آماده داریم."
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,update:0
#: wizard_button:base_setup.base_setup,init,company:0
msgid "Next"
msgstr "پس"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,email:0
#: wizard_field:base_setup.base_setup,init,email:0
#: wizard_field:base_setup.base_setup,update,email:0
msgid "E-mail"
msgstr "ایمیل"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,state_id:0
#: wizard_field:base_setup.base_setup,init,state_id:0
#: wizard_field:base_setup.base_setup,update,state_id:0
msgid "State"
msgstr "استان"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Your new database is now fully installed."
msgstr "دادگان نو شما بطور کامل برپاسازی گردید."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,profile:0
#: wizard_field:base_setup.base_setup,init,profile:0
#: wizard_field:base_setup.base_setup,update,profile:0
msgid "Profile"
msgstr "پروفایل"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer1:0
#: wizard_field:base_setup.base_setup,init,rml_footer1:0
#: wizard_field:base_setup.base_setup,update,rml_footer1:0
msgid "Report Footer 1"
msgstr "پانویس گزارش ۱"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer2:0
#: wizard_field:base_setup.base_setup,init,rml_footer2:0
#: wizard_field:base_setup.base_setup,update,rml_footer2:0
msgid "Report Footer 2"
msgstr "پانویس گزارش ۲"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "General Information"
msgstr "آگهگان عمومی"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street2:0
#: wizard_field:base_setup.base_setup,init,street2:0
#: wizard_field:base_setup.base_setup,update,street2:0
msgid "Street2"
msgstr "خیابان۲"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report Information"
msgstr "آگهگان گزارش"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,phone:0
#: wizard_field:base_setup.base_setup,init,phone:0
#: wizard_field:base_setup.base_setup,update,phone:0
msgid "Phone"
msgstr "تلفن"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Define Main Company"
msgstr "تعریف شرکت اصلی"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,name:0
#: wizard_field:base_setup.base_setup,init,name:0
#: wizard_field:base_setup.base_setup,update,name:0
msgid "Company Name"
msgstr "نام شرکت"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer2:0
#: help:base_setup.base_setup,init,rml_footer2:0
#: help:base_setup.base_setup,update,rml_footer2:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to put bank information here:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
msgstr ""
"این جمله در پایین گزارش‌های شما ظاهر خواهد شد.\n"
"پیشنهاد می‌کنیم آگهگان بانکی را اینجا وارد نمایید:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,country_id:0
#: wizard_field:base_setup.base_setup,init,country_id:0
#: wizard_field:base_setup.base_setup,update,country_id:0
msgid "Country"
msgstr "کشور"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
#: wizard_view:base_setup.base_setup,finish:0
#: wizard_view:base_setup.base_setup,init:0
#: wizard_view:base_setup.base_setup,update:0
#: model:ir.actions.wizard,name:base_setup.action_wizard_setup
#: model:ir.actions.wizard,name:base_setup.wizard_base_setup
msgid "Setup"
msgstr "سوارکردن"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer1:0
#: help:base_setup.base_setup,init,rml_footer1:0
#: help:base_setup.base_setup,update,rml_footer1:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to write legal sentences here:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
msgstr ""
"این جمله در پایین گزارش‌های شما ظاهر خواهد شد.\n"
"پیشنهاد می‌کنیم تا از عبارات قانونی در اینجا بکار ببرید:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
#. module: base_setup
#: wizard_view:base_setup.base_setup,update:0
msgid "Summary"
msgstr "چکیده"
#. module: base_setup
#: wizard_button:base_setup.base_setup,update,finish:0
msgid "Install"
msgstr "برپایی"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Installation Done"
msgstr "برپایی انجام شد"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_header1:0
#: help:base_setup.base_setup,init,rml_header1:0
#: help:base_setup.base_setup,update,rml_header1:0
msgid ""
"This sentence will appear at the top right corner of your reports.\n"
"We suggest you to put a slogan here:\n"
"\"Open Source Business Solutions\"."
msgstr ""
"این جمله در گوشه بالا سمت راست گزارش‌های شما ظاهر خواهد شد.\n"
"پیشنهاد می‌کنیم شعار خود را اینجا قرار دهید:\n"
"\"راهکارهای بازمتن برای تجارت\"."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_header1:0
#: wizard_field:base_setup.base_setup,init,rml_header1:0
#: wizard_field:base_setup.base_setup,update,rml_header1:0
msgid "Report Header"
msgstr "سرنویس گزارش"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Your Logo - Use a size of about 450x150 pixels."
msgstr "نشان شما - اندازه تصویری ۱۵۰×۴۵۰ پیکسل را بکار برید."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,currency:0
#: wizard_field:base_setup.base_setup,init,currency:0
#: wizard_field:base_setup.base_setup,update,currency:0
msgid "Currency"
msgstr "ارز"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street:0
#: wizard_field:base_setup.base_setup,init,street:0
#: wizard_field:base_setup.base_setup,update,street:0
msgid "Street"
msgstr "خیابان"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,menu:0
msgid "Use Directly"
msgstr "بکارگیری آنی"
#. module: base_setup
#: wizard_button:base_setup.base_setup,init,menu:0
msgid "Cancel"
msgstr "لغو"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,logo:0
#: wizard_field:base_setup.base_setup,init,logo:0
#: wizard_field:base_setup.base_setup,update,logo:0
msgid "Logo"
msgstr "نشان"
#. module: base_setup
#: model:ir.module.module,shortdesc:base_setup.module_meta_information
msgid "Base Setup"
msgstr "سوارکردن پایه"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,init:0
#: wizard_button:base_setup.base_setup,update,company:0
msgid "Previous"
msgstr "پیش"

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -38,9 +38,6 @@
'account',
'hr_timesheet_invoice',
'board',
'report_account',
'report_analytic',
'report_analytic_line',
'account_report'
],
'update_xml': ['board_account_view.xml'],

View File

@ -41,7 +41,7 @@
<child1>
<action colspan="4" height="160" name="%(report_analytic.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
<action colspan="4" height="160" name="%(hr_timesheet_invoice.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
<action colspan="4" height="160" name="%(act_my_account)d" string="Accounts to invoice" width="510"/>

View File

@ -6,40 +6,38 @@
-->
<record model="ir.ui.view" id="view_crm_lead_stage_graph1">
<field name="name">Leads By Stage - Graph</field>
<field name="model">report.crm.lead.section.stage</field>
<field name="model">crm.lead.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Leads By Stage" type="pie">
<field name="stage_id"/>
<field name="nbr" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_categ_graph">
<field name="name">report.crm.opportunity.categ.graph</field>
<field name="model">report.crm.opportunity.categ</field>
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Sections and Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<act_window name="Opportunities By Categories"
domain="[('state','!=','done'),('state','!=','cancel')]"
res_model="report.crm.opportunity.categ"
res_model="crm.opportunity.report"
view_type="form"
view_mode="graph,tree,form"
view_id="view_crm_opportunity_categ_graph"
id="act_oppor_categ"/>
<record model="ir.actions.act_window" id="act_leads_state">
<field name="res_model">report.crm.lead.section.stage</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
@ -48,7 +46,7 @@
<act_window name="Leads Of The Month By User"
domain="[('month','=',time.strftime('%%m')),('state','!=','cancel')]"
res_model="report.crm.lead.user"
res_model="crm.lead.report"
view_type="form"
view_mode="graph,tree,form"
view_id="view_crm_lead_stage_graph1"

View File

@ -0,0 +1,117 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="board.note.type" id="note_crm_type">
<field name="name">CRM Configuration</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
<field name="name">crm.opportunity.user.graph1</field>
<field name="model">crm.opportunity.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunities by User and Section" type="pie">
<field name="state"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="act_my_leads">
<field name="res_model">crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
<field name="res_model">crm.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<act_window name="My Cases"
domain="[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]"
res_model="crm.case"
view_type="form"
view_mode="tree,form"
id="act_my_cases"/>
<record model="ir.actions.act_window" id="act_my_leads_stage">
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
<field name="res_model">crm.opportunity.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.ui.view" id="board_crm_form">
<field name="name">CRM - Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Connecting Dashboard">
<hpaned>
<child1>
<action
name="%(act_my_leads)d"
colspan="4"
height="150"
width="510"/>
<action
string="My Meetings"
name="%(act_my_meetings)d"
height="150"
colspan="4"/>
<action
string="My Cases"
name="%(act_my_cases)d"
colspan="4"
height="200"/>
</child1>
<child2>
<action
string="My Leads By Stage"
name="%(act_my_leads_stage)d"
colspan="4"/>
<action
string="My Sales Pipeline"
name="%(act_sales_pipeline)d"
colspan="4"/>
</child2>
</hpaned>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_crm">
<field name="name">CRM Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
<menuitem
name="Connecting Dashboard" parent="menu_board_crm_config"
action="open_board_crm"
sequence="1"
id="menu_board_crm" icon="terp-graph"/>
</data>
</openerp>

View File

@ -1,123 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="board.note.type" id="note_crm_type">
<field name="name">CRM Configuration</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
<field name="name">crm.opportunity.user.graph1</field>
<field name="model">report.crm.opportunity.user</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunities by User and Section" type="pie">
<field name="state"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="act_my_leads">
<field name="res_model">crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_my_meetings">
<field name="res_model">crm.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<act_window name="My Cases"
domain="[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]"
res_model="crm.case"
view_type="form"
view_mode="tree,form"
id="act_my_cases"/>
<record model="ir.actions.act_window" id="act_my_leads_stage">
<field name="res_model">report.crm.lead.section.stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.actions.act_window" id="act_sales_pipeline">
<field name="res_model">report.crm.opportunity.user</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
</record>
<record model="ir.ui.view" id="board_crm_form">
<field name="name">CRM - Dashboard Form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Connecting Dashboard">
<hpaned>
<child1>
<action
string="My Leads"
name="%(act_my_leads)d"
colspan="4"
height="150"
width="510"/>
<action
string="My Meetings"
name="%(act_my_meetings)d"
height="150"
colspan="4"/>
<action
string="My Cases"
name="%(act_my_cases)d"
colspan="4"
height="200"/>
</child1>
<child2>
<action
string="My Leads By Stage"
name="%(act_my_leads_stage)d"
colspan="4"/>
<action
string="My Sales Pipeline"
name="%(act_sales_pipeline)d"
colspan="4"/>
</child2>
</hpaned>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_crm">
<field name="name">CRM Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
<menuitem
name="Connecting Dashboard" parent="menu_board_crm_config"
action="open_board_crm"
sequence="1"
id="menu_board_crm" icon="terp-graph"/>
</data>
</openerp>

View File

@ -32,7 +32,7 @@ This module implements a dashboard for human resource management that includes:
""",
'author': 'Tiny',
'depends': [ 'project_issue','board','hr_expense','hr_timesheet_sheet','hr_holidays'
],
, 'hr_evaluation'],
'update_xml': ['board_hr_view.xml'],
'demo_xml': [],
'installable': True,

View File

@ -15,25 +15,52 @@
<field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
</record>
<record id="act_hr_current_timesheet_sheet_form" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<record id="act_hr_evaluation_tree" model="ir.actions.act_window">
<field name="name">My Current Evaluations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="res_model">hr_evaluation.evaluation</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
<field name="domain">[('date_to','&gt;=',time.strftime('%Y-%m-01')),('date_from','&lt;=',time.strftime('%Y-%m-01'))]</field>
<field name="search_view_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_tree"/>
<field name="domain">[('state','!=','done'),('create_uid','=',uid)]</field>
<field name="search_view_id" ref="hr_evaluation.view_hr_evaluation_tree"/>
</record>
<record id="action_view_holiday_status_board" model="ir.actions.act_window">
<field name="name">My Leaves</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.per.user</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="hr_holidays.view_my_leave_board_tree"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="hr_holidays.open_allocation_holidays"/>
</record>
<record id="action_timesheet_report_all" model="ir.actions.act_window">
<field name="name">Timesheets by Month</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))]</field>
<field name="view_id" ref="hr_timesheet_sheet.view_timesheet_report_graph"/>
</record>
<record id="action_hr_holidays_remaining_leaves_user_all" model="ir.actions.act_window">
<field name="name">Remaining Leaves by User</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays.remaining.leaves.user</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="hr_holidays.view_hr_holidays_remaining_leaves_user_graph"/>
</record>
<record id="action_hr_timesheet_sheet_graph" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_graph"/>
</record>
<record id="board_hr_form" model="ir.ui.view">
<field name="name">board.hr.form</field>
<field name="model">board.board</field>
@ -42,11 +69,13 @@
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(act_hr_current_timesheet_sheet_form)d" string="My current timesheet" width="510"/>
<action colspan="4" height="220" name="%(act_hr_evaluation_tree)d" string="My Current Evaluations" width="510"/>
<action colspan="4" height="220" name="%(action_view_holiday_status_board)d" string="My Leaves"/>
<action colspan="4" height="220" name="%(action_my_expense)d" string="My Expenses" />
</child1>
<child2>
<action colspan="4" height="220" name="%(action_view_holiday_status_board)d" string="My Leaves"/>
<action colspan="4" height="220" name="%(action_my_expense)d" string="My Expenses" />
<action colspan="4" height="220" name="%(action_hr_timesheet_sheet_graph)d" string="Timesheets by Month" />
<action colspan="4" height="220" name="%(action_hr_holidays_remaining_leaves_user_all)d" string="Reamining Leaves by Type and User" />
</child2>
</hpaned>
</form>

View File

@ -34,16 +34,14 @@ This module implements a dashboard for project member that includes:
'author': 'Tiny',
'depends': [
'project',
'report_timesheet',
'board',
'project_planning',
'report_analytic_line',
'report_task',
'hr_timesheet_sheet',
'project_issue',
'resource'
'resource',
'scrum'
],
'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml'],
'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml','board_project_issue_view.xml','board_scrum_view.xml'],
'demo_xml': ['board_project_demo.xml'],
'installable': True,
'active': False,

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="action_view_current_project_issue_tree" model="ir.actions.act_window">
<field name="name">Project issues</field>
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('create_date', '&gt;=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '&lt;=', time.strftime('%Y-%m-%d 23:59:59'))]</field>
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
</record>
<record id="board_project_issue_form" model="ir.ui.view">
<field name="name">board.project.issue.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Issue Board">
<vpaned>
<child1>
<action colspan="4" height="220" name="%(action_view_current_project_issue_tree)d" string="Current Project Issues" width="510"/>
</child1>
<child2>
<action colspan="4" height="220" name="%(project.action_task_by_days_graph)d" string="Project Tasks By Days" width="510"/>
</child2>
</vpaned>
</form>
</field>
</record>
<record id="open_board_project_issue" model="ir.actions.act_window">
<field name="name">Project Issue Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_project_issue_form"/>
</record>
<menuitem
id="menu_deshboard_project_issue"
name="Project Issue Dashboard" parent="next_id_86"
icon="terp-graph" action="open_board_project_issue"/>
</data>
</openerp>

View File

@ -13,13 +13,13 @@
<act_window domain="[('user_id','=',uid),('state','&lt;&gt;','close')]" id="act_my_account" name="My accounts to invoice" res_model="account.analytic.account" view_id="view_account_analytic_simplified" view_mode="tree,form" view_type="form"/>
<record id="action_project_pipeline_user" model="ir.actions.act_window">
<field name="name">Pipeline of tasks</field>
<field name="res_model">report.task.user.pipeline.open</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','in',department_users_get())]</field>
</record>
<!-- <record id="action_project_pipeline_user" model="ir.actions.act_window">-->
<!-- <field name="name">Pipeline of tasks</field>-->
<!-- <field name="res_model">report.task.user.pipeline.open</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">graph,tree</field>-->
<!-- <field name="domain">[('user_id','in',department_users_get())]</field>-->
<!-- </record>-->
<record id="hr_timesheet_sheet_tree" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.tree.simplified.board</field>
@ -66,7 +66,6 @@
<action colspan="4" name="%(project_planning.action_account_analytic_planning_stat_form)d" string="My Project's planning" domain="[('manager_id','=',uid),('planning_id.state','&lt;&gt;','cancel')]"/>
<action colspan="4" name="%(action_project_pipeline_user)d" string="My user's pipeline"/>
</child2>
</hpaned>

View File

@ -47,6 +47,14 @@
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
<field name="view_id" ref="view_task_tree"/>
</record>
<record id="action_view_pending_task_tree" model="ir.actions.act_window">
<field name="name">My Pending Tasks</field>
<field name="res_model">project.task</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
<field name="view_id" ref="view_task_tree"/>
</record>
<record id="action_view_task_tree_deadline" model="ir.actions.act_window">
<field name="name">My Task's Deadlines</field>
<field name="res_model">project.task</field>
@ -91,13 +99,18 @@
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
<action colspan="4" name="%(project_issue.project_issue_categ_act0)d" string="Issues"/>
</child1>
<action colspan="4" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
<action colspan="4" name="%(action_view_pending_task_tree)d" string="My Pending Tasks" width="510"/>
</child1>
<child2>
<action colspan="4" height="150" name="%(action_view_project_member_tree)d" string="Project(s) Members"/>
<action colspan="4" name="%(action_view_project_editable_messages_tree)d" string="Messages"/>
<vpaned>
<child1>
<action colspan="4" name="%(project.action_project_vs_remaining_hours_graph)d" string="Remaining Hours Per Project" />
</child1>
<child2>
<action colspan="4" name="%(project.action_task_by_days_vs_planned_hours_graph)d" string="Planned Hours Per Day" />
</child2>
</vpaned>
</child2>
</hpaned>
</form>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_scrum_sprint_dashboard_tree" model="ir.ui.view">
<field name="name">scrum.sprint.dashboard.tree</field>
<field name="model">scrum.sprint</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Scrum Sprint">
<field name="name"/>
<field name="project_id"/>
<field name="scrum_master_id"/>
<field name="product_owner_id" invisible="1"/>
<field name="date_start"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
<field name="expected_hours" sum="Expected hours" widget="float_time"/>
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
<button name="%(scrum.report_scrum_sprint_burndown_chart)d" states="open,draft,close,cancel"
string="Burndown Chart" type="action" icon="gtk-print"/>
</tree>
</field>
</record>
<record id="action_sprint_all_dashboard_tree" model="ir.actions.act_window">
<field name="name">Sprint's List</field>
<field name="res_model">scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_scrum_sprint_dashboard_tree"/>
</record>
<record id="board_project_scrum_form" model="ir.ui.view">
<field name="name">board.project.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(action_sprint_all_dashboard_tree)d" string="Sprints" width="510"/>
</child1>
</hpaned>
</form>
</field>
</record>
<record id="open_board_project_scrum" model="ir.actions.act_window">
<field name="name">Scrum Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_project_scrum_form"/>
</record>
<menuitem
id="menu_deshboard_scurm"
name="Scrum Dashboard" parent="next_id_86"
icon="terp-graph" action="open_board_project_scrum"/>
</data>
</openerp>

View File

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Board for Purchase Management',
'version': '1.0',
'category': 'Board/Purchase',
'description': """
This module implements a dashboard for purcgase management that includes:
* Current Purchase Orders
* Draft Purchase Orders
* Graph for quantity and amount per month
""",
'author': 'Tiny',
'depends': [ 'purchase','board',
],
'update_xml': ['board_purchase_view.xml'],
'demo_xml': [],
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
<menuitem
id="menu_purchase_deshboard"
name="Purchase"
parent="base.dashboard"/>
<record id="purchase_waiting" model="ir.actions.act_window">
<field name="name">Quotation Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]</field>
<field name="search_view_id" ref="purchase.purchase_order_tree"/>
</record>
<record id="board_purchase_form" model="ir.ui.view">
<field name="name">board.purchase.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(purchase.purchase_rfq)d" string="Draft Purchase Order" width="510"/>
<action colspan="4" height="220" name="%(purchase_waiting)d" string="Purchase Order in Waiting" width="510"/>
</child1>
<child2>
<action colspan="4" height="220" name="%(purchase.action_purchase_order_qty_amount_all)d" string="Total Qty and Amount by month" />
<action colspan="4" height="220" name="%(purchase.action_purchase_order_by_user_all)d" string="Total Orders by User per month" />
</child2>
</hpaned>
</form>
</field>
</record>
<record id="open_board_purchase" model="ir.actions.act_window">
<field name="name">Purchase Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_purchase_form"/>
</record>
<menuitem
action="open_board_purchase"
icon="terp-graph"
id="menu_board_purchase"
parent="menu_purchase_deshboard"
sequence="4"/>
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -5,39 +5,37 @@
<field name="name">Sales</field>
</record>
<record model="ir.actions.act_window" id="board_crm_case_categ_phone_incoming0">
<field name="res_model">crm.phonecall</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm.crm_case_phone_tree_view"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window" id="board_crm_case_categ_meet">
<field name="res_model">crm.meeting</field>
<field name="view_mode">tree,form,gantt</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="domain">[('date','&gt;=',time.strftime('%Y-%m-%d')),('date','&lt;=',(datetime.datetime.today() + datetime.timedelta(days=2)).strftime('%Y-%m-%d'))]</field>
<field name="context" eval="{'default_state':'open'}"/>
</record>
<!-- <record model="ir.actions.act_window" id="board_crm_case_categ_phone_incoming0">
<field name="res_model">crm.phonecall</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar</field>
<field name="view_id" ref="crm.crm_case_phone_tree_view"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="context" eval="{'default_state':'open'}"/>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
<record model="ir.actions.act_window" id="board_crm_case_categ_meet">
<field name="res_model">crm.meeting</field>
<field name="view_mode">tree,form,gantt</field>
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
<field name="domain">[('user_id','=',uid)]</field>
<field name="domain">[('date','&gt;=',time.strftime('%Y-%m-%d')),('date','&lt;=',(datetime.datetime.today() + datetime.timedelta(days=2)).strftime('%Y-%m-%d'))]</field>
<field name="context" eval="{'default_state':'open'}"/>
</record>-->
<record id="board_sales_manager_form" model="ir.ui.view">
<field name="name">board.sales.manager.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales manager board">
<form string="Sales Manager board">
<hpaned position="100">
<child1>
<action colspan="4" height="200" name="%(sale.action_order_tree5)d" string="My quotations" width="510" domain="[('state','=','draft'),('user_id','=',uid)]"/>
<action colspan="4" name="%(board_crm_case_categ_phone_incoming0)d" string="My planned calling calls (IN / OUT)" width="510"/>
<action name="%(sale.action_suninvoiced_lines_per_month)d" string="Uninvoiced lines" />
<action name="%(sale.action_product_bought_by_sale_order)d" string="Product bought base on Sale Orders" />
</child1>
<child2>
<action colspan="4" name="%(crm.crm_case_category_act_oppor11)d" string="My Opportunities" width="510" domain="[('user_id','=',uid)]"/>
<action colspan="4" name="%(board_crm_case_categ_meet)d" String="My Meetings" domain="[('state','=','open')]" width="510"/>
<action name="%(sale.action_sale_order_by_clients)d" string="Sale order by client" />
<action name="%(sale.action_sales_by_regions)d" string="Sales by regions" />
</child2>
</hpaned>
</form>

View File

@ -432,11 +432,20 @@ class crm_case(osv.osv):
"""
if not context:
context = {}
hist_obj = self.pool.get('crm.case.history')
log_obj = self.pool.get('crm.case.log')
for case in self.browse(cr, uid, ids, context):
if (not case.section_id.allow_unlink) and (case.state <> 'draft'):
raise osv.except_osv(_('Warning !'),
_('You can not delete this case. You should better cancel it.'))
# Also removing history and logs
history_ids = map(lambda x: x.id, case.history_line)
log_ids = map(lambda x: x.id, case.log_ids)
hist_obj.unlink(cr, uid, history_ids, context=context)
log_obj.unlink(cr, uid, log_ids, context=context)
return super(crm_case, self).unlink(cr, uid, ids, context)
def stage_next(self, cr, uid, ids, context=None):

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_my_claims":1}</field>
<field name="context">{"search_default_section_id":section_id,"search_default_current":1,"search_default_my_claims":1}</field>
<field name="search_view_id" ref="crm.view_crm_case_claims_filter"/>
</record>

View File

@ -161,7 +161,7 @@
<separator string="Action Information" colspan="4"/>
<field name="name" colspan="4"/>
<field name="date"/>
<field name="user_id"/>
<field name="user_id"/>
</form>
</field>
</page>
@ -183,7 +183,7 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Email"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.claim'}"
icon="gtk-undo" type="action" />
@ -245,9 +245,9 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Claims">
<filter icon="gtk-new" string="Current" name="current"
<filter icon="gtk-new" string="Current"
domain="[('state','in',('draft', 'open'))]"
separator="1" help="Current Claims"
separator="1" help="Current Claims" default="1"
/>
<filter icon="gtk-execute"
string="In Progress"
@ -263,14 +263,16 @@
<field name="name" select='1'/>
<field name="partner_id" select="1"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner" name="my_claims"
domain="[('user_id','=',uid)]" help="My Claims"/>
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Claims"
default="1" />
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Claims" />
</field>
<field name="section_id" select="1"
widget="selection">
widget="selection"
default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"
help="My section" />

View File

@ -13,7 +13,6 @@
<field name="res_model">crm.fundraising</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm.crm_case_tree_view_fund"/>
<field name="context">{"search_default_my_funds":1,"search_default_section_id":section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_fund_filter"/>
</record>

View File

@ -196,7 +196,7 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Email"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.fundraising'}"
icon="gtk-undo" type="action" />
@ -257,7 +257,7 @@
<search string="Search Funds">
<group col='6' colspan='4'>
<filter icon="terp-partner" string="My Funds"
name="my_funds" domain="[('user_id','=',uid)]"
default="1" domain="[('user_id','=',uid)]"
separator="1"
help="Funds Related to Current User"
/>

View File

@ -11,7 +11,6 @@
<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_my_hd_request":1,"search_default_section_id":section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_helpdesk_filter"/>
</record>

View File

@ -104,7 +104,7 @@
<separator colspan="4" string="Action Information"/>
<field colspan="4" name="name"/>
<field name="date"/>
<field name="user_id"/>
<field name="user_id"/>
</form>
</field>
</page>
@ -126,7 +126,7 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Email"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.helpdesk'}"
icon="gtk-undo" type="action" />
@ -224,8 +224,9 @@
<field name="name" select='1' string="Query"/>
<field name="partner_id" />
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner" name="my_hd_request"
domain="[('user_id','=',uid)]" help="My Helpdesk Requests"/>
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Helpdesk Requests" default="1" />
</field>
<field name="section_id" select="1" widget="selection" string="Sales Team">
<filter icon="terp-crm"

View File

@ -55,9 +55,9 @@ class crm_lead(osv.osv):
@param ids: List of Opendays IDs
@return: difference between current date and log date
@param context: A standard dictionary for contextual values
"""
cal_obj = self.pool.get('resource.calendar')
res_obj = self.pool.get('resource.resource')
"""
cal_obj = self.pool.get('resource.calendar')
res_obj = self.pool.get('resource.resource')
res = {}
for lead in self.browse(cr, uid, ids , context):
@ -86,7 +86,7 @@ class crm_lead(osv.osv):
duration = float(ans.days)
if lead.section_id.resource_calendar_id:
duration = float(ans.days) * 24
duration = float(ans.days) * 24
new_dates = cal_obj.interval_get(cr,
uid,
lead.section_id.resource_calendar_id and lead.section_id.resource_calendar_id.id or False,
@ -98,9 +98,9 @@ class crm_lead(osv.osv):
date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
for in_time, out_time in new_dates:
if in_time.date not in no_days:
no_days.append(in_time.date)
no_days.append(in_time.date)
if out_time > date_until:
break
break
duration = len(no_days)
res[lead.id][field] = abs(int(duration))
return res
@ -126,9 +126,9 @@ class crm_lead(osv.osv):
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
'day_open': fields.function(_compute_day, string='Days to Open', \
method=True, multi='day_open', type="integer", store=True),
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="integer", store=True),
method=True, multi='day_close', type="float", store=True),
'function_name': fields.char('Function', size=64),
}

View File

@ -7,8 +7,6 @@
<field name="res_model">crm.lead</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="context">{"search_default_current":1,"search_default_my_lead":1,"search_default_section_id":section_id}</field>
<field name="context">{"search_default_current":1,"search_default_my_lead":1,"search_default_section_id":section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_all">

View File

@ -264,8 +264,9 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Leads">
<filter icon="terp-project" name="current"
<filter icon="terp-project"
string="Current"
default="1"
domain="[('state','in',('draft','open'))]"/>
<filter icon="terp-project"
string="Open"
@ -290,13 +291,13 @@
<field name="user_id" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Leads" name="my_lead"
help="My Leads" default="1"
/>
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Leads" />
</field>
<field name="section_id" widget="selection"
<field name="section_id" default="context.get('section_id', False)" widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-crm"
context="{'invisible_section': False}"

View File

@ -51,7 +51,7 @@ class crm_meeting(osv.osv):
),
'phonecall_id': fields.many2one ('crm.phonecall', 'Phonecall'),
'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
'attendee_ids': fields.many2many('calendar.attendee', 'meeting_attendee_rel',\
'event_id', 'attendee_id', 'Attendees'),
'date_closed': fields.datetime('Closed', readonly=True),
'date_deadline': fields.datetime('Deadline'),
@ -115,16 +115,13 @@ class calendar_attendee(osv.osv):
_description = 'Calendar Attendee'
def _compute_data(self, cr, uid, ids, name, arg, context):
"""
@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 compute datas IDs
@param context: A standard dictionary for contextual values
"""
name = name[0]
result = super(calendar_attendee, self)._compute_data(cr, uid, ids, name, arg, context)
@ -132,7 +129,7 @@ class calendar_attendee(osv.osv):
id = attdata.id
result[id] = {}
if name == 'categ_id':
if attdata.ref:
if attdata.ref and 'categ_id' in attdata.ref._columns:
result[id][name] = (attdata.ref.categ_id.id, attdata.ref.categ_id.name,)
else:
result[id][name] = False

View File

@ -36,14 +36,14 @@
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_partner">
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_partner">
<field name="sequence" eval="3"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
</record>
<act_window
<act_window
id="crm_case_categ_meet_case"
name="Schedule a Meeting"
res_model="crm.meeting"
@ -74,7 +74,7 @@
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet_case"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_case">
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_case">
<field name="sequence" eval="3"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>
@ -85,7 +85,6 @@
<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_current":1,"search_default_section_id":section_id}</field>
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet">
@ -116,27 +115,26 @@
<!-- ALL MEETINGS -->
<menuitem name="Meetings" id="menu_meeting_sale"
parent="base.menu_base_partner" sequence="3" />
parent="base.menu_base_partner" sequence="3" />
<menuitem name="Meetings" id="menu_crm_case_categ_meet"
action="crm_case_categ_meet" parent="menu_meeting_sale"
sequence="1" />
action="crm_case_categ_meet" parent="menu_meeting_sale"
sequence="1" />
<record id="action_view_attendee_form" model="ir.actions.act_window">
<field name="name">Meeting Invitations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">calendar.attendee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
<field name="name">Meeting Invitations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">calendar.attendee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
<field name="domain">[('ref','like','crm.meeting,')]</field>
<field name="context">{'default_sent_by_uid': uid}</field>
</record>
<field name="context">{'default_sent_by_uid': uid}</field>
</record>
<menuitem id="menu_attendee_invitations"
name="Meeting Invitations" parent="crm.menu_meeting_sale"
groups="base.group_extended"
sequence="10" action="action_view_attendee_form" />
name="Meeting Invitations" parent="crm.menu_meeting_sale"
sequence="10" action="action_view_attendee_form" />
<record model="ir.actions.act_window" id="crm_case_category_act_meetall3">
@ -146,7 +144,7 @@
<field name="view_mode">tree,calendar,form,gantt</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain"
eval="[('state','in',('pending','draft','open')),('date','>=',time.strftime('%Y-%m-%d'))]" />
eval="[('state','in',('pending','draft','open')),('date','>=',time.strftime('%Y-%m-%d'))]" />
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_meetall3">
@ -170,7 +168,7 @@
<field name="act_window_id" ref="crm_case_category_act_meetall3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_view_meetall3">
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_view_meetall3">
<field name="sequence" eval="2"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="crm_case_gantt_view_meet"/>

View File

@ -62,9 +62,9 @@ class crm_opportunity(osv.osv):
@param ids: List of Opendays IDs
@return: difference between current date and log date
@param context: A standard dictionary for contextual values
"""
cal_obj = self.pool.get('resource.calendar')
res_obj = self.pool.get('resource.resource')
"""
cal_obj = self.pool.get('resource.calendar')
res_obj = self.pool.get('resource.resource')
res = {}
for opportunity in self.browse(cr, uid, ids , context):
@ -93,7 +93,7 @@ class crm_opportunity(osv.osv):
duration = float(ans.days)
if opportunity.section_id.resource_calendar_id:
duration = float(ans.days) * 24
duration = float(ans.days) * 24
new_dates = cal_obj.interval_get(cr,
uid,
opportunity.section_id.resource_calendar_id and opportunity.section_id.resource_calendar_id.id or False,
@ -105,9 +105,9 @@ class crm_opportunity(osv.osv):
date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
for in_time, out_time in new_dates:
if in_time.date not in no_days:
no_days.append(in_time.date)
no_days.append(in_time.date)
if out_time > date_until:
break
break
duration = len(no_days)
res[opportunity.id][field] = abs(int(duration))
return res
@ -138,9 +138,9 @@ class crm_opportunity(osv.osv):
'date_open': fields.datetime('Opened', readonly=True),
'day_open': fields.function(_compute_day, string='Days to Open', \
method=True, multi='day_open', type="integer", store=True),
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="integer", store=True),
method=True, multi='day_close', type="float", store=True),
}
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):

View File

@ -27,7 +27,6 @@
<field name="res_model">crm.opportunity</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="context">{"search_default_my_oprtnit":1,"search_default_new_oprtnit":1,"search_default_section_id":section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor11">

View File

@ -86,13 +86,15 @@
</group>
<notebook colspan="4">
<page string="Opportunity">
<group col="4" colspan="2">
<group col="3" colspan="2">
<separator colspan="4" string="Contacts"/>
<field name="partner_id" select="1"
on_change="onchange_partner_id(partner_id, email_from)" />
on_change="onchange_partner_id(partner_id, email_from)"
colspan="2" />
<field name="partner_address_id"
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
<field name="email_from" string="Email" />
<field name="phone"/>
</group>
@ -104,7 +106,7 @@
domain="[('object_id.model', '=', 'crm.opportunity')]" />
</group>
<separator colspan="4" string="Notes"/>
<separator colspan="4" string="Details"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
@ -216,7 +218,7 @@
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="planned_revenue" sum="Expected Revenue"/>
<field name="planned_revenue" sum="Total of Planned Revenue"/>
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
<field name="date_action"/>
<field name="section_id"/>
@ -264,6 +266,7 @@
<search string="Search Opportunities">
<filter icon="terp-project"
string="Current"
default="1"
domain="[('state','in',('draft','open'))]"/>
<filter icon="terp-project"
string="Open"
@ -284,15 +287,16 @@
<field name="name" string="Opportunity"/>
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" name="my_oprtnit"
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Opportunities" />
help="My Opportunities" default="1"
/>
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Opportunities" />
</field>
<field name="section_id"
select="1"
default="context.get('section_id', False)" select="1"
widget="selection">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"

View File

@ -20,7 +20,6 @@
<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">{"set_editable":True,"default_state":'open',"search_default_my_calls":1,"search_default_state":1,"search_default_section_id":section_id}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>
@ -56,7 +55,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">{"default_state":'open',"search_default_my_calls":1,"search_default_state":1,"search_default_section_id":section_id}</field>
<field name="context">{'set_editable':True,'default_state':'open'}</field>
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
</record>

View File

@ -176,9 +176,9 @@
<field name="name" string="Call Summary"/>
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" name="my_calls"
domain="[('user_id','=',uid)]"
help="My Phonecalls"/>
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Phonecalls"
default="1" />
<filter icon="terp-partner"
domain="[('user_id','=',False)]"
help="Unassigned Phonecalls" />

View File

@ -404,7 +404,7 @@
<newline/>
<field name="description" colspan="4" nolabel="1"/>
<button colspan="4"
string="Reply to Email"
string="Reply to Last Email"
name="%(action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.case'}"
icon="gtk-undo" type="action" />
@ -436,7 +436,7 @@
<group col='6' colspan='4'>
<filter icon="terp-partner" string="My Cases"
domain="[('user_id','=',uid)]" separator="1"
help="Cases Related to Current User" />
default="1" help="Cases Related to Current User" />
<field name="state" select="1">
<filter icon="gtk-new"
domain="[('state','in',('draft', 'open'))]"
@ -453,7 +453,8 @@
widget="selection" />
</group>
<field name="section_id"
select="1" widget="selection" string="Section"/>
default="context.get('section_id', False)" select="1"
widget="selection"/>
</search>
</field>
</record>
@ -528,6 +529,7 @@
<field name="date" select="1"/>
<field name="user_id" select="1" widget="selection"/>
<field name="section_id"
default="context.get('section_id', False)"
select="1" widget="selection"/>
</group>
</search>

View File

@ -14,7 +14,11 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
<<<<<<< TREE
"X-Launchpad-Export-Date: 2010-04-07 03:46+0000\n"
=======
"X-Launchpad-Export-Date: 2010-04-17 04:01+0000\n"
>>>>>>> MERGE-SOURCE
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm

View File

@ -21,6 +21,7 @@
from osv import fields,osv
import tools
import crm_report
class crm_claim_report(osv.osv):
@ -32,7 +33,7 @@ class crm_claim_report(osv.osv):
_description = "CRM Claim Report"
_columns = {
'delay_close': fields.char('Delay to close', size=20, 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),
@ -41,6 +42,10 @@ class crm_claim_report(osv.osv):
('object_id.model', '=', 'crm.claim')]", readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
}
def init(self, cr):
@ -56,6 +61,7 @@ class crm_claim_report(osv.osv):
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
to_char(c.create_date, 'YYYY-MM-DD') as day,
c.state,
c.user_id,
c.stage_id,
@ -67,12 +73,16 @@ class crm_claim_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
c.priority as priority,
c.type_id as type_id,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
crm_claim c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
,c.priority,c.type_id,c.som
)""")
crm_claim_report()

View File

@ -10,17 +10,20 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Claims">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id" />
<field name="partner_id" />
<field name="nbr" string="#Claim"/>
<field name="delay_close"/>
<field name="state" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="day" invisible="1"/>
<field name="nbr" string="#Claim" sum="#Claim"/>
<field name="delay_close" avg="Avg Closing Delay"/>
<field name="state" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="priority" invisible="1"/>
<field name="type_id" invisible="1"/>
</tree>
</field>
</record>
@ -66,12 +69,33 @@
<field name="inherit_id" ref="view_crm_case_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<data>
<xpath expr='//search[@string="Search"]/group[@string="Extended options..."]/filter[@string="Cancel"]' position='after'>
<group>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
<separator orientation="vertical"/>
<field name="priority" />
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
</group>
</xpath>
<xpath
expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]'
position='after'>
<filter string="Stage" icon="terp-sale" domain="[]"
context="{'group_by':'stage_id'}" />
</xpath>
<xpath
expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="Category"]'
position='after'>
<separator orientation="vertical"/>
<filter string="Priority" icon="terp-sale" domain="[]"
context="{'group_by':'priority'}" />
<filter string="Type" icon="terp-sale" domain="[]"
context="{'group_by':'type_id'}" />
</xpath>
</data>
</field>
</record>
@ -81,9 +105,9 @@
<field name="name">Claims</field>
<field name="res_model">crm.claim.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_id" ref="view_report_crm_claim_tree"/>
<field name="context">{"search_default_section_id":section_id,"search_default_this_year":1,"search_default_this_month":1,"search_default_by_user":1}</field>
<field name="search_view_id" ref="view_report_crm_claim_filter"/>
</record>

View File

@ -35,10 +35,10 @@ class crm_fundraising_report(osv.osv):
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.fundraising')]"),
'probability': fields.float('Avg. Probability', readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
'delay_close': fields.char('Delay to close', size=20, readonly=True),
'probability': fields.float('Avg. Probability',digits=(16,2),readonly=True, group_operator="avg"),
'amount_revenue': fields.float('Est.Revenue',readonly=True,digits=(16,2)),
'amount_revenue_prob': fields.float('Est. Rev*Prob.',digits=(16,2),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"),
'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company', 'Company'),
}
@ -56,6 +56,7 @@ class crm_fundraising_report(osv.osv):
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
to_char(c.create_date, 'YYYY-MM-DD') as day,
c.state,
c.user_id,
c.section_id,
@ -66,14 +67,16 @@ class crm_fundraising_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
avg(probability)::decimal(16,2) as probability,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
crm_fundraising c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
)""")
crm_fundraising_report()

View File

@ -9,20 +9,21 @@
<field name="model">crm.fundraising.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Fundraising">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id" />
<field name="partner_id" />
<field name="nbr" string="#Fundraising"/>
<field name="amount_revenue" sum="Total Revenue"/>
<field name="probability"/>
<field name="amount_revenue_prob"/>
<field name="delay_close"/>
<tree string="Fundraising">
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="nbr" string='#Fundraising' sum="#Fundraising"/>
<field name="amount_revenue" sum='Est.Revenue'/>
<field name="probability" avg='Avg. Probability' widget="progressbar"/>
<field name="amount_revenue_prob" sum='Est. Rev*Prob.'/>
<field name="delay_close" avg='Avg Closing Delay'/>
<field name="state" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="day" invisible="1"/>
</tree>
</field>
@ -67,8 +68,14 @@
<field name="inherit_id" ref="view_crm_case_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="user_id" position="before">
</field>
<data>
<xpath expr='//search[@string="Search"]/group[@string="Extended options..."]/filter[@string="Cancel"]' position='after'>
<group>
<separator orientation="vertical"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
</group>
</xpath>
</data>
</field>
</record>
@ -79,8 +86,8 @@
<field name="res_model">crm.fundraising.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_id" ref="view_report_crm_fundraising_tree"/>
<field name="context">{"search_default_section_id":section_id,"search_default_this_year":1,"search_default_this_month":1,"search_default_by_user":1}</field>
<field name="search_view_id" ref="view_report_crm_fundraising_filter"/>
</record>

View File

@ -66,40 +66,40 @@
<field name="arch" type="xml">
<search string="Search">
<group col="16" colspan="9">
<filter string="This Year" icon="terp-hr"
domain="[('name','=',time.localtime()[0])]"
name="this_year" />
<filter string="This Year" icon="terp-hr"
domain="[('name','=',time.localtime()[0])]"
default="1" />
<filter string="This Month" icon="terp-hr"
domain="[('month','=',time.strftime('%%m'))]"
name="this_month" />
<filter string="This Month" icon="terp-hr"
domain="[('month','=',time.strftime('%%m'))]"
default="1" />
<separator orientation="vertical" />
<filter string="Current" icon="terp-hr"
domain="[('state','in',('open','draft'))]" />
<separator orientation="vertical" />
<filter string="Current" icon="terp-hr"
domain="[('state','in',('open','draft'))]" />
<filter string="Won" icon="terp-hr"
domain="[('state','=','done')]" />
<filter string="Won" icon="terp-hr"
domain="[('state','=','done')]" />
<filter string="Lost" icon="terp-hr"
domain="[('state','=','cancel')]" />
<filter string="Lost" icon="terp-hr"
domain="[('state','=','cancel')]" />
<filter string="Deadline" icon="terp-hr"
domain="[('date_deadline','=',time.strftime('%%m/%%d/%%Y'))]" />
<filter string="Deadline" icon="terp-hr"
domain="[('date_deadline','=',time.strftime('%%m/%%d/%%Y'))]" />
<separator orientation="vertical" />
<field name="section_id"
widget="selection"
context="{'invisible_section': False}">
<separator orientation="vertical" />
<field name="section_id"
default="context.get('section_id', False)"
widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My section" />
</field>
<field name="company_id" widget="selection">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My section" />
</field>
<field name="company_id" widget="selection">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
@ -137,7 +137,8 @@
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
domain="[]" context="{'group_by':'user_id'}"
default="1" />
<filter string="Company" icon="terp-sale"
domain="[]"
@ -175,7 +176,6 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_report_crm_helpdesk_tree"/>
<field name="context">{"search_default_section_id":section_id,"search_default_this_year":1,"search_default_this_month":1,"search_default_by_user":1}</field>
<field name="search_view_id" ref="view_report_crm_helpdesk_filter"/>
</record>

View File

@ -22,6 +22,14 @@
from osv import fields,osv
import tools
AVAILABLE_STATES = [
('draft','Draft'),
('open','Open'),
('cancel', 'Cancelled'),
('done', 'Closed'),
('pending','Pending')
]
class crm_lead_report(osv.osv):
""" CRM Lead Report """
_name = "crm.lead.report"
@ -30,7 +38,7 @@ class crm_lead_report(osv.osv):
_description = "CRM Lead Report"
_columns = {
'delay_close': fields.char('Delay to close', size=20, 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"),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]" , readonly=True),
@ -54,7 +62,8 @@ class crm_lead_report(osv.osv):
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.state,
to_char(c.create_date, 'YYYY-MM-DD') as day,
c.state as state,
c.user_id,
c.stage_id,
c.company_id,
@ -65,11 +74,13 @@ class crm_lead_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
crm_lead c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
)""")
crm_lead_report()

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