diff --git a/addons/account_anglo_saxon/i18n/nl_BE.po b/addons/account_anglo_saxon/i18n/nl_BE.po new file mode 100644 index 00000000000..b1d19e494a8 --- /dev/null +++ b/addons/account_anglo_saxon/i18n/nl_BE.po @@ -0,0 +1,109 @@ +# Dutch (Belgium) translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:35+0000\n" +"PO-Revision-Date: 2012-03-01 17:37+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Dutch (Belgium) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-03-02 04:36+0000\n" +"X-Generator: Launchpad (build 14886)\n" + +#. module: account_anglo_saxon +#: sql_constraint:purchase.order:0 +msgid "Order Reference must be unique per Company!" +msgstr "" + +#. module: account_anglo_saxon +#: view:product.category:0 +msgid " Accounting Property" +msgstr " Boekhoudeigenschap" + +#. module: account_anglo_saxon +#: model:ir.model,name:account_anglo_saxon.model_product_category +msgid "Product Category" +msgstr "Productcategorie" + +#. module: account_anglo_saxon +#: sql_constraint:stock.picking:0 +msgid "Reference must be unique per Company!" +msgstr "" + +#. module: account_anglo_saxon +#: constraint:product.category:0 +msgid "Error ! You cannot create recursive categories." +msgstr "" + +#. module: account_anglo_saxon +#: constraint:account.invoice:0 +msgid "Invalid BBA Structured Communication !" +msgstr "" + +#. module: account_anglo_saxon +#: constraint:product.template:0 +msgid "" +"Error: The default UOM and the purchase UOM must be in the same category." +msgstr "" +"Fout: de standaardmeeteenheid en de aankoopmeeteenheid moeten in dezelfde " +"categorie zitten." + +#. module: account_anglo_saxon +#: model:ir.model,name:account_anglo_saxon.model_account_invoice_line +msgid "Invoice Line" +msgstr "Factuurlijn" + +#. module: account_anglo_saxon +#: model:ir.model,name:account_anglo_saxon.model_purchase_order +msgid "Purchase Order" +msgstr "Aankooporder" + +#. module: account_anglo_saxon +#: model:ir.model,name:account_anglo_saxon.model_product_template +msgid "Product Template" +msgstr "Productsjabloon" + +#. module: account_anglo_saxon +#: field:product.category,property_account_creditor_price_difference_categ:0 +#: field:product.template,property_account_creditor_price_difference:0 +msgid "Price Difference Account" +msgstr "Prijsverschillenrekening" + +#. module: account_anglo_saxon +#: model:ir.model,name:account_anglo_saxon.model_account_invoice +msgid "Invoice" +msgstr "Factuur" + +#. module: account_anglo_saxon +#: model:ir.model,name:account_anglo_saxon.model_stock_picking +msgid "Picking List" +msgstr "" + +#. module: account_anglo_saxon +#: sql_constraint:account.invoice:0 +msgid "Invoice Number must be unique per Company!" +msgstr "" + +#. module: account_anglo_saxon +#: help:product.category,property_account_creditor_price_difference_categ:0 +#: help:product.template,property_account_creditor_price_difference:0 +msgid "" +"This account will be used to value price difference between purchase price " +"and cost price." +msgstr "" + +#~ msgid "Order Reference must be unique !" +#~ msgstr "De orderreferentie moet uniek zijn." + +#~ msgid "Error ! You can not create recursive categories." +#~ msgstr "U kunt niet dezelfde categorieën maken." + +#~ msgid "Stock Accounting for Anglo Saxon countries" +#~ msgstr "Voorraadboekhouding voor Angelsaksische landen" diff --git a/addons/account_check_writing/i18n/nl.po b/addons/account_check_writing/i18n/nl.po new file mode 100644 index 00000000000..03162df1829 --- /dev/null +++ b/addons/account_check_writing/i18n/nl.po @@ -0,0 +1,201 @@ +# Dutch translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:35+0000\n" +"PO-Revision-Date: 2012-03-01 18:13+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-03-02 04:36+0000\n" +"X-Generator: Launchpad (build 14886)\n" + +#. module: account_check_writing +#: selection:res.company,check_layout:0 +msgid "Check on Top" +msgstr "Cheque boven" + +#. module: account_check_writing +#: model:ir.actions.act_window,help:account_check_writing.action_write_check +msgid "" +"The check payment form allows you to track the payment you do to your " +"suppliers specially by check. When you select a supplier, the payment method " +"and an amount for the payment, OpenERP will propose to reconcile your " +"payment with the open supplier invoices or bills.You can print the check" +msgstr "" + +#. module: account_check_writing +#: view:account.voucher:0 +#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_bottom +#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle +#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_top +msgid "Print Check" +msgstr "Cheque afdrukken" + +#. module: account_check_writing +#: selection:res.company,check_layout:0 +msgid "Check in middle" +msgstr "Cheque miodden" + +#. module: account_check_writing +#: help:res.company,check_layout:0 +msgid "" +"Check on top is compatible with Quicken, QuickBooks and Microsoft Money. " +"Check in middle is compatible with Peachtree, ACCPAC and DacEasy. Check on " +"bottom is compatible with Peachtree, ACCPAC and DacEasy only" +msgstr "" + +#. module: account_check_writing +#: selection:res.company,check_layout:0 +msgid "Check on bottom" +msgstr "Cheque beneden" + +#. module: account_check_writing +#: constraint:res.company:0 +msgid "Error! You can not create recursive companies." +msgstr "Fout! U kunt geen recursieve bedrijven aanmaken." + +#. module: account_check_writing +#: help:account.journal,allow_check_writing:0 +msgid "Check this if the journal is to be used for writing checks." +msgstr "" + +#. module: account_check_writing +#: field:account.journal,allow_check_writing:0 +msgid "Allow Check writing" +msgstr "Sta cheque uitschrijven toe" + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +#: report:account.print.check.top:0 +msgid "Description" +msgstr "Omschrijving" + +#. module: account_check_writing +#: model:ir.model,name:account_check_writing.model_account_journal +msgid "Journal" +msgstr "Dagboek" + +#. module: account_check_writing +#: model:ir.actions.act_window,name:account_check_writing.action_write_check +#: model:ir.ui.menu,name:account_check_writing.menu_action_write_check +msgid "Write Checks" +msgstr "Schrijf cheque uit" + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +#: report:account.print.check.top:0 +msgid "Discount" +msgstr "Korting" + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +#: report:account.print.check.top:0 +msgid "Original Amount" +msgstr "Oorspronkelijk bedrag" + +#. module: account_check_writing +#: view:res.company:0 +msgid "Configuration" +msgstr "Configuratie" + +#. module: account_check_writing +#: field:account.voucher,allow_check:0 +msgid "Allow Check Writing" +msgstr "Sta uitschrijven cheque toe" + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +#: report:account.print.check.top:0 +msgid "Payment" +msgstr "Betaling" + +#. module: account_check_writing +#: field:account.journal,use_preprint_check:0 +msgid "Use Preprinted Check" +msgstr "Gebruik voorafgedrukte cheque" + +#. module: account_check_writing +#: sql_constraint:res.company:0 +msgid "The company name must be unique !" +msgstr "De naam van het bedrijf moet uniek zijn!" + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +#: report:account.print.check.top:0 +msgid "Due Date" +msgstr "Einddatum" + +#. module: account_check_writing +#: model:ir.model,name:account_check_writing.model_res_company +msgid "Companies" +msgstr "Bedrijven" + +#. module: account_check_writing +#: view:res.company:0 +msgid "Default Check layout" +msgstr "Standaard cheque opmaak" + +#. module: account_check_writing +#: constraint:account.journal:0 +msgid "" +"Configuration error! The currency chosen should be shared by the default " +"accounts too." +msgstr "" +"Configuratiefout! De gekozen valuta moet hetzelfde zijn als dat van de " +"standaard grootboekrekeningen." + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +msgid "Balance Due" +msgstr "Saldo" + +#. module: account_check_writing +#: report:account.print.check.bottom:0 +#: report:account.print.check.middle:0 +#: report:account.print.check.top:0 +msgid "Check Amount" +msgstr "Cheque bedrag" + +#. module: account_check_writing +#: model:ir.model,name:account_check_writing.model_account_voucher +msgid "Accounting Voucher" +msgstr "Betalingsintentie" + +#. module: account_check_writing +#: sql_constraint:account.journal:0 +msgid "The name of the journal must be unique per company !" +msgstr "De naam van het dagboek moet uniek zijn per bedrijf !" + +#. module: account_check_writing +#: sql_constraint:account.journal:0 +msgid "The code of the journal must be unique per company !" +msgstr "De code van het dagboek moet uniek zijn per bedrijf !" + +#. module: account_check_writing +#: field:account.voucher,amount_in_word:0 +msgid "Amount in Word" +msgstr "Bedrag in woord" + +#. module: account_check_writing +#: report:account.print.check.top:0 +msgid "Open Balance" +msgstr "Open balans" + +#. module: account_check_writing +#: field:res.company,check_layout:0 +msgid "Choose Check layout" +msgstr "Kies cheque opmaak" diff --git a/addons/account_payment/i18n/lv.po b/addons/account_payment/i18n/lv.po new file mode 100644 index 00000000000..91045eb6acd --- /dev/null +++ b/addons/account_payment/i18n/lv.po @@ -0,0 +1,729 @@ +# Latvian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:35+0000\n" +"PO-Revision-Date: 2012-03-02 13:58+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Latvian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-03-03 05:14+0000\n" +"X-Generator: Launchpad (build 14886)\n" + +#. module: account_payment +#: field:payment.order,date_scheduled:0 +msgid "Scheduled date if fixed" +msgstr "" + +#. module: account_payment +#: field:payment.line,currency:0 +msgid "Partner Currency" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Set to draft" +msgstr "" + +#. module: account_payment +#: help:payment.order,mode:0 +msgid "Select the Payment Mode to be applied." +msgstr "" + +#. module: account_payment +#: view:payment.mode:0 +#: view:payment.order:0 +msgid "Group By..." +msgstr "" + +#. module: account_payment +#: field:payment.order,line_ids:0 +msgid "Payment lines" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +#: field:payment.line,info_owner:0 +#: view:payment.order:0 +msgid "Owner Account" +msgstr "" + +#. module: account_payment +#: help:payment.order,state:0 +msgid "" +"When an order is placed the state is 'Draft'.\n" +" Once the bank is confirmed the state is set to 'Confirmed'.\n" +" Then the order is paid the state is 'Done'." +msgstr "" + +#. module: account_payment +#: help:account.invoice,amount_to_pay:0 +msgid "" +"The amount which should be paid at the current date\n" +"minus the amount which is already in payment order" +msgstr "" + +#. module: account_payment +#: field:payment.line,company_id:0 +#: field:payment.mode,company_id:0 +#: field:payment.order,company_id:0 +msgid "Company" +msgstr "Uzņēmums" + +#. module: account_payment +#: field:payment.order,date_prefered:0 +msgid "Preferred date" +msgstr "" + +#. module: account_payment +#: model:res.groups,name:account_payment.group_account_payment +msgid "Accounting / Payments" +msgstr "" + +#. module: account_payment +#: selection:payment.line,state:0 +msgid "Free" +msgstr "" + +#. module: account_payment +#: view:payment.order.create:0 +#: field:payment.order.create,entries:0 +msgid "Entries" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Used Account" +msgstr "" + +#. module: account_payment +#: field:payment.line,ml_maturity_date:0 +#: field:payment.order.create,duedate:0 +msgid "Due Date" +msgstr "Apmaksas termiņš" + +#. module: account_payment +#: view:account.move.line:0 +msgid "Account Entry Line" +msgstr "Konta Ieraksta Rinda" + +#. module: account_payment +#: view:payment.order.create:0 +msgid "_Add to payment order" +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,name:account_payment.action_account_payment_populate_statement +#: model:ir.actions.act_window,name:account_payment.action_account_populate_statement_confirm +msgid "Payment Populate statement" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +#: view:payment.order:0 +msgid "Amount" +msgstr "" + +#. module: account_payment +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Total in Company Currency" +msgstr "" + +#. module: account_payment +#: selection:payment.order,state:0 +msgid "Cancelled" +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new +msgid "New Payment Order" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +#: field:payment.order,reference:0 +msgid "Reference" +msgstr "" + +#. module: account_payment +#: sql_constraint:payment.line:0 +msgid "The payment line name must be unique!" +msgstr "" + +#. module: account_payment +#: constraint:account.invoice:0 +msgid "Invalid BBA Structured Communication !" +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree +#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_form +msgid "Payment Orders" +msgstr "" + +#. module: account_payment +#: constraint:account.move.line:0 +msgid "" +"The date of your Journal Entry is not in the defined period! You should " +"change the date or remove this constraint from the journal." +msgstr "" + +#. module: account_payment +#: selection:payment.order,date_prefered:0 +msgid "Directly" +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,name:account_payment.action_payment_line_form +#: model:ir.model,name:account_payment.model_payment_line +#: view:payment.line:0 +#: view:payment.order:0 +msgid "Payment Line" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +msgid "Amount Total" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +#: selection:payment.order,state:0 +msgid "Confirmed" +msgstr "" + +#. module: account_payment +#: help:payment.line,ml_date_created:0 +msgid "Invoice Effective Date" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Execution Type" +msgstr "" + +#. module: account_payment +#: selection:payment.line,state:0 +msgid "Structured" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +#: field:payment.order,state:0 +msgid "State" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +#: view:payment.order:0 +msgid "Transaction Information" +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,name:account_payment.action_payment_mode_form +#: model:ir.model,name:account_payment.model_payment_mode +#: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form +#: view:payment.mode:0 +#: view:payment.order:0 +msgid "Payment Mode" +msgstr "" + +#. module: account_payment +#: field:payment.line,ml_date_created:0 +msgid "Effective Date" +msgstr "" + +#. module: account_payment +#: field:payment.line,ml_inv_ref:0 +msgid "Invoice Ref." +msgstr "" + +#. module: account_payment +#: help:payment.order,date_prefered:0 +msgid "" +"Choose an option for the Payment Order:'Fixed' stands for a date specified " +"by you.'Directly' stands for the direct execution.'Due date' stands for the " +"scheduled date of execution." +msgstr "" + +#. module: account_payment +#: code:addons/account_payment/account_move_line.py:110 +#, python-format +msgid "Error !" +msgstr "" + +#. module: account_payment +#: view:account.move.line:0 +msgid "Total debit" +msgstr "" + +#. module: account_payment +#: field:payment.order,date_done:0 +msgid "Execution date" +msgstr "" + +#. module: account_payment +#: help:payment.mode,journal:0 +msgid "Bank or Cash Journal for the Payment Mode" +msgstr "" + +#. module: account_payment +#: selection:payment.order,date_prefered:0 +msgid "Fixed date" +msgstr "" + +#. module: account_payment +#: field:payment.line,info_partner:0 +#: view:payment.order:0 +msgid "Destination Account" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +msgid "Desitination Account" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Search Payment Orders" +msgstr "" + +#. module: account_payment +#: field:payment.line,create_date:0 +msgid "Created" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Select Invoices to Pay" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +msgid "Currency Amount Total" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Make Payments" +msgstr "" + +#. module: account_payment +#: field:payment.line,state:0 +msgid "Communication Type" +msgstr "" + +#. module: account_payment +#: field:payment.line,partner_id:0 +#: field:payment.mode,partner_id:0 +#: report:payment.order:0 +msgid "Partner" +msgstr "" + +#. module: account_payment +#: field:payment.line,bank_statement_line_id:0 +msgid "Bank statement line" +msgstr "" + +#. module: account_payment +#: selection:payment.order,date_prefered:0 +msgid "Due date" +msgstr "" + +#. module: account_payment +#: field:account.invoice,amount_to_pay:0 +msgid "Amount to be paid" +msgstr "" + +#. module: account_payment +#: constraint:account.move.line:0 +msgid "" +"The selected account of your Journal Entry forces to provide a secondary " +"currency. You should remove the secondary currency on the account or select " +"a multi-currency view on the journal." +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Currency" +msgstr "" + +#. module: account_payment +#: view:account.payment.make.payment:0 +msgid "Yes" +msgstr "" + +#. module: account_payment +#: help:payment.line,info_owner:0 +msgid "Address of the Main Partner" +msgstr "" + +#. module: account_payment +#: help:payment.line,date:0 +msgid "" +"If no payment date is specified, the bank will treat this payment line " +"directly" +msgstr "" + +#. module: account_payment +#: model:ir.model,name:account_payment.model_account_payment_populate_statement +msgid "Account Payment Populate Statement" +msgstr "" + +#. module: account_payment +#: help:payment.mode,name:0 +msgid "Mode of Payment" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Value Date" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Payment Type" +msgstr "" + +#. module: account_payment +#: help:payment.line,amount_currency:0 +msgid "Payment amount in the partner currency" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +#: selection:payment.order,state:0 +msgid "Draft" +msgstr "" + +#. module: account_payment +#: help:payment.line,communication2:0 +msgid "The successor message of Communication." +msgstr "" + +#. module: account_payment +#: code:addons/account_payment/account_move_line.py:110 +#, python-format +msgid "No partner defined on entry line" +msgstr "" + +#. module: account_payment +#: help:payment.line,info_partner:0 +msgid "Address of the Ordering Customer." +msgstr "" + +#. module: account_payment +#: view:account.payment.populate.statement:0 +msgid "Populate Statement:" +msgstr "" + +#. module: account_payment +#: view:account.move.line:0 +msgid "Total credit" +msgstr "" + +#. module: account_payment +#: help:payment.order,date_scheduled:0 +msgid "Select a date if you have chosen Preferred Date to be fixed." +msgstr "" + +#. module: account_payment +#: field:payment.order,user_id:0 +msgid "User" +msgstr "" + +#. module: account_payment +#: field:account.payment.populate.statement,lines:0 +msgid "Payment Lines" +msgstr "" + +#. module: account_payment +#: model:ir.model,name:account_payment.model_account_move_line +msgid "Journal Items" +msgstr "" + +#. module: account_payment +#: constraint:account.move.line:0 +msgid "You can not create journal items on an account of type view." +msgstr "" + +#. module: account_payment +#: help:payment.line,move_line_id:0 +msgid "" +"This Entry Line will be referred for the information of the ordering " +"customer." +msgstr "" + +#. module: account_payment +#: view:payment.order.create:0 +msgid "Search" +msgstr "" + +#. module: account_payment +#: model:ir.actions.report.xml,name:account_payment.payment_order1 +#: model:ir.model,name:account_payment.model_payment_order +msgid "Payment Order" +msgstr "" + +#. module: account_payment +#: field:payment.line,date:0 +msgid "Payment Date" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Total:" +msgstr "" + +#. module: account_payment +#: field:payment.order,date_created:0 +msgid "Creation date" +msgstr "" + +#. module: account_payment +#: view:account.payment.populate.statement:0 +msgid "ADD" +msgstr "" + +#. module: account_payment +#: view:account.bank.statement:0 +msgid "Import payment lines" +msgstr "" + +#. module: account_payment +#: field:account.move.line,amount_to_pay:0 +msgid "Amount to pay" +msgstr "" + +#. module: account_payment +#: field:payment.line,amount:0 +msgid "Amount in Company Currency" +msgstr "" + +#. module: account_payment +#: help:payment.line,partner_id:0 +msgid "The Ordering Customer" +msgstr "" + +#. module: account_payment +#: model:ir.model,name:account_payment.model_account_payment_make_payment +msgid "Account make payment" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Invoice Ref" +msgstr "" + +#. module: account_payment +#: sql_constraint:account.invoice:0 +msgid "Invoice Number must be unique per Company!" +msgstr "" + +#. module: account_payment +#: field:payment.line,name:0 +msgid "Your Reference" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Payment order" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +#: view:payment.order:0 +msgid "General Information" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +#: selection:payment.order,state:0 +msgid "Done" +msgstr "" + +#. module: account_payment +#: model:ir.model,name:account_payment.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_payment +#: field:payment.line,communication:0 +msgid "Communication" +msgstr "" + +#. module: account_payment +#: view:account.payment.make.payment:0 +#: view:account.payment.populate.statement:0 +#: view:payment.order:0 +#: view:payment.order.create:0 +msgid "Cancel" +msgstr "" + +#. module: account_payment +#: field:payment.line,bank_id:0 +msgid "Destination Bank Account" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +#: view:payment.order:0 +msgid "Information" +msgstr "" + +#. module: account_payment +#: constraint:account.move.line:0 +msgid "Company must be the same for its related account and period." +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree +msgid "" +"A payment order is a payment request from your company to pay a supplier " +"invoice or a customer credit note. Here you can register all payment orders " +"that should be done, keep track of all payment orders and mention the " +"invoice reference and the partner the payment should be done for." +msgstr "" + +#. module: account_payment +#: help:payment.line,amount:0 +msgid "Payment amount in the company currency" +msgstr "" + +#. module: account_payment +#: view:payment.order.create:0 +msgid "Search Payment lines" +msgstr "" + +#. module: account_payment +#: field:payment.line,amount_currency:0 +msgid "Amount in Partner Currency" +msgstr "" + +#. module: account_payment +#: field:payment.line,communication2:0 +msgid "Communication 2" +msgstr "" + +#. module: account_payment +#: view:account.payment.make.payment:0 +msgid "Are you sure you want to make payment?" +msgstr "" + +#. module: account_payment +#: view:payment.mode:0 +#: field:payment.mode,journal:0 +msgid "Journal" +msgstr "" + +#. module: account_payment +#: field:payment.mode,bank_id:0 +msgid "Bank account" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +msgid "Confirm Payments" +msgstr "" + +#. module: account_payment +#: field:payment.line,company_currency:0 +#: report:payment.order:0 +msgid "Company Currency" +msgstr "" + +#. module: account_payment +#: model:ir.ui.menu,name:account_payment.menu_main_payment +#: view:payment.line:0 +#: view:payment.order:0 +msgid "Payment" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Payment Order / Payment" +msgstr "" + +#. module: account_payment +#: field:payment.line,move_line_id:0 +msgid "Entry line" +msgstr "" + +#. module: account_payment +#: help:payment.line,communication:0 +msgid "" +"Used as the message between ordering customer and current company. Depicts " +"'What do you want to say to the recipient about this order ?'" +msgstr "" + +#. module: account_payment +#: field:payment.mode,name:0 +msgid "Name" +msgstr "" + +#. module: account_payment +#: report:payment.order:0 +msgid "Bank Account" +msgstr "" + +#. module: account_payment +#: view:payment.line:0 +#: view:payment.order:0 +msgid "Entry Information" +msgstr "" + +#. module: account_payment +#: model:ir.model,name:account_payment.model_payment_order_create +msgid "payment.order.create" +msgstr "" + +#. module: account_payment +#: field:payment.line,order_id:0 +msgid "Order" +msgstr "" + +#. module: account_payment +#: constraint:account.move.line:0 +msgid "You can not create journal items on closed account." +msgstr "" + +#. module: account_payment +#: field:payment.order,total:0 +msgid "Total" +msgstr "" + +#. module: account_payment +#: view:account.payment.make.payment:0 +#: model:ir.actions.act_window,name:account_payment.action_account_payment_make_payment +msgid "Make Payment" +msgstr "" + +#. module: account_payment +#: field:payment.order,mode:0 +msgid "Payment mode" +msgstr "" + +#. module: account_payment +#: model:ir.actions.act_window,name:account_payment.action_create_payment_order +msgid "Populate Payment" +msgstr "" + +#. module: account_payment +#: help:payment.mode,bank_id:0 +msgid "Bank Account for the Payment Mode" +msgstr "" + +#~ msgid "You can not create move line on closed account." +#~ msgstr "Nav iespējams veikt grāmatojumus slēgtā kontā." diff --git a/addons/base_tools/i18n/nl_BE.po b/addons/base_tools/i18n/nl_BE.po new file mode 100644 index 00000000000..3f4b9288f59 --- /dev/null +++ b/addons/base_tools/i18n/nl_BE.po @@ -0,0 +1,32 @@ +# Dutch (Belgium) translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2012-03-01 17:18+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Dutch (Belgium) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-03-02 04:36+0000\n" +"X-Generator: Launchpad (build 14886)\n" + +#. module: base_tools +#: model:ir.module.module,shortdesc:base_tools.module_meta_information +msgid "Common base for tools modules" +msgstr "Gemeenschappelijke basis voor hulpmiddelen" + +#. module: base_tools +#: model:ir.module.module,description:base_tools.module_meta_information +msgid "" +"\n" +" " +msgstr "" +"\n" +" " diff --git a/addons/crm_caldav/i18n/nl_BE.po b/addons/crm_caldav/i18n/nl_BE.po new file mode 100644 index 00000000000..02c0dd637c6 --- /dev/null +++ b/addons/crm_caldav/i18n/nl_BE.po @@ -0,0 +1,48 @@ +# Dutch (Belgium) translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:36+0000\n" +"PO-Revision-Date: 2012-03-01 17:20+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Dutch (Belgium) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-03-02 04:36+0000\n" +"X-Generator: Launchpad (build 14886)\n" + +#. module: crm_caldav +#: model:ir.actions.act_window,name:crm_caldav.action_caldav_browse +msgid "Caldav Browse" +msgstr "Bladeren Caldav" + +#. module: crm_caldav +#: model:ir.ui.menu,name:crm_caldav.menu_caldav_browse +msgid "Synchronize This Calendar" +msgstr "" + +#. module: crm_caldav +#: model:ir.model,name:crm_caldav.model_crm_meeting +msgid "Meeting" +msgstr "Afspraak" + +#~ msgid "Extended Module to Add CalDav feature on Meeting" +#~ msgstr "Uitgebreide module om CalDav-functies toe te voegen aan afspraken" + +#~ msgid "" +#~ "\n" +#~ " New Features in Meeting:\n" +#~ " * Share meeting with other calendar clients like sunbird\n" +#~ msgstr "" +#~ "\n" +#~ " Nieuwe functies voorafspraken:\n" +#~ " * afspraken delen met andere kalendertoepassingen, zoals sunbird\n" + +#~ msgid "Synchronyze this calendar" +#~ msgstr "Deze agenda synchroniseren" diff --git a/addons/decimal_precision/i18n/nl_BE.po b/addons/decimal_precision/i18n/nl_BE.po new file mode 100644 index 00000000000..4bae9c50386 --- /dev/null +++ b/addons/decimal_precision/i18n/nl_BE.po @@ -0,0 +1,67 @@ +# Dutch (Belgium) translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:36+0000\n" +"PO-Revision-Date: 2012-03-01 17:22+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Dutch (Belgium) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-03-02 04:36+0000\n" +"X-Generator: Launchpad (build 14886)\n" + +#. module: decimal_precision +#: field:decimal.precision,digits:0 +msgid "Digits" +msgstr "Cijfers" + +#. module: decimal_precision +#: model:ir.actions.act_window,name:decimal_precision.action_decimal_precision_form +#: model:ir.ui.menu,name:decimal_precision.menu_decimal_precision_form +msgid "Decimal Accuracy" +msgstr "Decimale precisie" + +#. module: decimal_precision +#: field:decimal.precision,name:0 +msgid "Usage" +msgstr "Gebruik" + +#. module: decimal_precision +#: sql_constraint:decimal.precision:0 +msgid "Only one value can be defined for each given usage!" +msgstr "Er kan slechts een waarde worden ingesteld per type" + +#. module: decimal_precision +#: view:decimal.precision:0 +msgid "Decimal Precision" +msgstr "Decimale precisie" + +#. module: decimal_precision +#: model:ir.model,name:decimal_precision.model_decimal_precision +msgid "decimal.precision" +msgstr "decimal.precision" + +#~ msgid "" +#~ "\n" +#~ "This module allows to configure the price accuracy you need for different " +#~ "kind\n" +#~ "of usage: accounting, sales, purchases, ...\n" +#~ "\n" +#~ "The decimal precision is configured per company.\n" +#~ msgstr "" +#~ "\n" +#~ "Met deze module kunt u de prij nauwkeurigheid configureren die u nodig heeft " +#~ "voor verschillend gebruik:\n" +#~ "boekhouding, verkoop, aankoop, ...\n" +#~ "\n" +#~ "De decimale precisie wordt per bedrijf ingesteld.\n" + +#~ msgid "Decimal Precision Configuration" +#~ msgstr "Decimale precisie instellen" diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py index 4c809888f71..06252001c83 100644 --- a/addons/event/__openerp__.py +++ b/addons/event/__openerp__.py @@ -39,28 +39,23 @@ Note that: Association / Configuration / Types of Events """, 'author': 'OpenERP SA', - 'depends': ['crm', 'account', 'marketing', 'mail'], + 'depends': ['email_template'], 'init_xml': [], 'update_xml': [ + 'security/event_security.xml', 'security/ir.model.access.csv', - 'wizard/event_confirm_registration_view.xml', 'wizard/event_confirm_view.xml', 'event_view.xml', 'report/report_event_registration_view.xml', - 'wizard/event_make_invoice_view.xml', - 'wizard/partner_event_registration_view.xml', 'board_association_view.xml', 'res_partner_view.xml', + 'email_template.xml', ], 'demo_xml': ['event_demo.xml'], - 'test': ['test/process/event_confirm2done.yml', - 'test/process/event_draft2cancel.yml', - 'test/process/partner_register2invoice.yml', - 'test/ui/duplicate_event.yml', - 'test/ui/demo_data.yml'], + 'test': ['test/process/event_draft2done.yml'], 'installable': True, + 'application': True, 'auto_install': False, - 'certificate': '0083059161581', 'images': ['images/1_event_type_list.jpeg','images/2_events.jpeg','images/3_registrations.jpeg'], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event/board_association_view.xml b/addons/event/board_association_view.xml index da848bc7fdc..b91d0bfeb44 100644 --- a/addons/event/board_association_view.xml +++ b/addons/event/board_association_view.xml @@ -21,7 +21,7 @@ Events Filling Status report.event.registration form - [('state','not in',('cancel','done'))] + [('event_state','not in',('cancel','done'))] graph,tree @@ -45,9 +45,6 @@ - + + + + Confirmation of the Event + + ${object.user_id.user_email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'} + ${object.email} + Your registration at ${object.event_id.name} + + hello ${object.name}, + + The event ${object.event_id.name} that you registered for is confirmed and will be held from ${object.event_id.date_begin} to ${object.event_id.date_end}. For any further information please contact our event department. + + we thank you for your participation + + best regards + + + + + + + + Confirmation of the Registration + + ${object.user_id.user_email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'} + ${object.email} + Your registration at ${object.event_id.name} + + hello ${object.name}, + + We confirm you that your registration to the event ${object.event_id.name} has been recorded. You will automatically receive an email providing you more practical information (such as the schedule, the plan...) as soon as the event will be confirmed to be held. + + we thank you for your participation + + best regards + + + + + + default_email_event + default + + + event.type + + + default_email_registration + default + + + event.type + + + + diff --git a/addons/event/event.py b/addons/event/event.py index 99ccddc660d..133d29281f1 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -20,15 +20,9 @@ ############################################################################## import time - -from crm import crm from osv import fields, osv from tools.translate import _ import decimal_precision as dp -from crm import wizard - - -wizard.mail_compose_message.SUPPORTED_MODELS.append('event.registration') class event_type(osv.osv): """ Event Type """ @@ -36,7 +30,16 @@ class event_type(osv.osv): _description = __doc__ _columns = { 'name': fields.char('Event type', size=64, required=True), + 'default_reply_to': fields.char('Default Reply-To', size=64,help="The email address of the organizer which is put in the 'Reply-To' of all emails sent automatically at event or registrations confirmation. You can also put your email address of your mail gateway if you use one." ), + 'default_email_event': fields.many2one('email.template','Event Confirmation Email', help="It will select this default confirmation event mail value when you choose this event"), + 'default_email_registration': fields.many2one('email.template','Registration Confirmation Email', help="It will select this default confirmation registration mail value when you choose this event"), + 'default_registration_min': fields.integer('Default Minimum Registration', help="It will select this default minimum value when you choose this event"), + 'default_registration_max': fields.integer('Default Maximum Registration', help="It will select this default maximum value when you choose this event"), } + _defaults = { + 'default_registration_min': 0, + 'default_registration_max':0, + } event_type() @@ -46,10 +49,29 @@ class event_event(osv.osv): _description = __doc__ _order = 'date_begin' + def name_get(self, cr, uid, ids, context=None): + if not ids: + return [] + res = [] + for record in self.browse(cr, uid, ids, context=context): + date = record.date_begin.split(" ") + date = date[0] + registers='' + if record.register_max !=0: + register_max = str(record.register_max) + register_tot = record.register_current+record.register_prospect + register_tot = str(register_tot) + registers = register_tot+'/'+register_max + name = record.name+' ('+date+') '+registers + res.append((record['id'], name)) + return res + + def _name_get_fnc(self, cr, uid, ids,prop,unknow, context=None): + res = self.name_get(cr, uid, ids, context=context) + return dict(res) + def copy(self, cr, uid, id, default=None, context=None): - """ Copy record of Given id - @param id: Id of Event record. - @param context: A standard dictionary for contextual values + """ Reset the state and the registrations while copying an event """ if not default: default = {} @@ -59,81 +81,45 @@ class event_event(osv.osv): }) return super(event_event, self).copy(cr, uid, id, default=default, context=context) - def onchange_product(self, cr, uid, ids, product_id=False): - """This function returns value of product's unit price based on product id. - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of Event IDs - @param product_id: Product's id - """ - if not product_id: - return {'value': {'unit_price': False}} - else: - unit_price=self.pool.get('product.product').price_get(cr, uid, [product_id])[product_id] - return {'value': {'unit_price': unit_price}} - def button_draft(self, cr, uid, ids, context=None): return self.write(cr, uid, ids, {'state': 'draft'}, context=context) def button_cancel(self, cr, uid, ids, context=None): + registration = self.pool.get('event.registration') + reg_ids = registration.search(cr, uid, [('event_id','in',ids)], context=context) + for event_reg in registration.browse(cr,uid,reg_ids,context=context): + if event_reg.state == 'done': + raise osv.except_osv(_('Error!'),_("You have already set a registration for this event as 'Attended'. Please reset it to draft if you want to cancel this event.") ) + registration.write(cr, uid, reg_ids, {'state': 'cancel'}, context=context) return self.write(cr, uid, ids, {'state': 'cancel'}, context=context) def button_done(self, cr, uid, ids, context=None): - if type(ids) in (int, long,): - ids = [ids] return self.write(cr, uid, ids, {'state': 'done'}, context=context) - def do_confirm(self, cr, uid, ids, context=None): - """ Confirm Event and send confirmation email to all register peoples - """ + def check_registration_limits(self, cr, uid, ids, context=None): register_pool = self.pool.get('event.registration') - for event in self.browse(cr, uid, ids, context=context): - if event.mail_auto_confirm: - #send reminder that will confirm the event for all the people that were already confirmed - reg_ids = register_pool.search(cr, uid, [ - ('event_id', '=', event.id), - ('state', 'not in', ['draft', 'cancel'])], context=context) - register_pool.mail_user_confirm(cr, uid, reg_ids) + for self.event in self.browse(cr, uid, ids, context=context): + total_confirmed = self.event.register_current + if total_confirmed < self.event.register_min or total_confirmed > self.event.register_max and self.event.register_max!=0: + raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. You should maybe reconsider those limits before going further") % (self.event.name)) + def confirm_event(self, cr, uid, ids, context=None): + register_pool = self.pool.get('event.registration') + if self.event.email_confirmation_id: + #send reminder that will confirm the event for all the people that were already confirmed + reg_ids = register_pool.search(cr, uid, [ + ('event_id', '=', self.event.id), + ('state', 'not in', ['draft', 'cancel'])], context=context) + register_pool.mail_user_confirm(cr, uid, reg_ids) return self.write(cr, uid, ids, {'state': 'confirm'}, context=context) def button_confirm(self, cr, uid, ids, context=None): - """This Function Confirm Event. - @param ids: List of Event IDs - @param context: A standard dictionary for contextual values - @return: True + """ Confirm Event and send confirmation email to all register peoples """ - if context is None: - context = {} - res = False - if type(ids) in (int, long,): + if isinstance(ids, (int, long)): ids = [ids] - data_pool = self.pool.get('ir.model.data') - unconfirmed_ids = [] - for event in self.browse(cr, uid, ids, context=context): - total_confirmed = event.register_current - if total_confirmed >= event.register_min or event.register_max == 0: - res = self.do_confirm(cr, uid, [event.id], context=context) - else: - unconfirmed_ids.append(event.id) - if unconfirmed_ids: - view_id = data_pool.get_object_reference(cr, uid, 'event', 'view_event_confirm') - view_id = view_id and view_id[1] or False - context['event_ids'] = unconfirmed_ids - return { - 'name': _('Confirm Event'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'event.confirm', - 'views': [(view_id, 'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - 'context': context, - 'nodestroy': True - } - return res + self.check_registration_limits(cr, uid, ids, context=context) + return self.confirm_event(cr, uid, ids, context=context) def _get_register(self, cr, uid, ids, fields, args, context=None): """Get Confirm or uncofirm register value. @@ -146,77 +132,37 @@ class event_event(osv.osv): res = {} for event in self.browse(cr, uid, ids, context=context): res[event.id] = {} + reg_open = reg_done = reg_draft =0 + for registration in event.registration_ids: + if registration.state == 'open': + reg_open += registration.nb_register + elif registration.state == 'done': + reg_done += registration.nb_register + elif registration.state == 'draft': + reg_draft += registration.nb_register for field in fields: - res[event.id][field] = False - state = [] - if 'register_current' in fields: - state += ['open', 'done'] - if 'register_prospect' in fields: - state.append('draft') - - reg_ids = register_pool.search(cr, uid, [ - ('event_id', '=', event.id), - ('state', 'in', state)], context=context) - - number = 0.0 - if reg_ids: - cr.execute('SELECT SUM(nb_register) FROM event_registration WHERE id IN %s', (tuple(reg_ids),)) - number = cr.fetchone() - - if 'register_current' in fields: - res[event.id]['register_current'] = number and number[0] or 0.0 - if 'register_prospect' in fields: - res[event.id]['register_prospect'] = number and number[0] or 0.0 - return res - - def write(self, cr, uid, ids, vals, context=None): - """ - Writes values in one or several fields. - @param ids: List of Event registration type's IDs - @param vals: dictionary with values to update. - @return: True - """ - register_pool = self.pool.get('event.registration') - res = super(event_event, self).write(cr, uid, ids, vals, context=context) - if vals.get('date_begin', False) or vals.get('mail_auto_confirm', False) or vals.get('mail_confirm', False): - for event in self.browse(cr, uid, ids, context=context): - #change the deadlines of the registration linked to this event - register_values = {} - if vals.get('date_begin', False): - register_values['date_deadline'] = vals['date_begin'] - - #change the description of the registration linked to this event - if vals.get('mail_auto_confirm', False): - if vals['mail_auto_confirm']: - if 'mail_confirm' not in vals: - vals['mail_confirm'] = event.mail_confirm - else: - vals['mail_confirm'] = False - if 'mail_confirm' in vals: - register_values['description'] = vals['mail_confirm'] - - if register_values: - reg_ids = register_pool.search(cr, uid, [('event_id', '=', event.id)], context=context) - register_pool.write(cr, uid, reg_ids, register_values, context=context) + number = 0 + if field == 'register_current': + number = reg_open + elif field == 'register_attended': + number = reg_done + elif field == 'register_prospect': + number = reg_draft + res[event.id][field] = number return res _columns = { - 'name': fields.char('Summary', size=64, required=True, translate=True, readonly=False, states={'done': [('readonly', True)]}), + 'name': fields.char('Name', size=64, required=True, translate=True, readonly=False, states={'done': [('readonly', True)]}), 'user_id': fields.many2one('res.users', 'Responsible User', readonly=False, states={'done': [('readonly', True)]}), - 'parent_id': fields.many2one('event.event', 'Parent Event', readonly=False, states={'done': [('readonly', True)]}), - 'section_id': fields.many2one('crm.case.section', 'Sale Team', readonly=False, states={'done': [('readonly', True)]}), - 'child_ids': fields.one2many('event.event', 'parent_id', 'Child Events', readonly=False, states={'done': [('readonly', True)]}), - 'reply_to': fields.char('Reply-To', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address put in the 'Reply-To' of all emails sent by OpenERP"), - 'type': fields.many2one('event.type', 'Type', help="Type of Event like Seminar, Exhibition, Conference, Training.", readonly=False, states={'done': [('readonly', True)]}), - 'register_max': fields.integer('Maximum Registrations', help="Provide Maximum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}), - 'register_min': fields.integer('Minimum Registrations', help="Provide Minimum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}), - 'register_current': fields.function(_get_register, string='Confirmed Registrations', multi='register_current', - help="Total of Open and Done Registrations"), - 'register_prospect': fields.function(_get_register, string='Unconfirmed Registrations', multi='register_prospect', - help="Total of Prospect Registrations"), + 'type': fields.many2one('event.type', 'Type of Event', readonly=False, states={'done': [('readonly', True)]}), + 'register_max': fields.integer('Maximum Registrations', help="You can for each event define a maximum registration level. If you have too much registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}), + 'register_min': fields.integer('Minimum Registrations', help="You can for each event define a minimum registration level. If you do not enough registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}), + 'register_current': fields.function(_get_register, string='Confirmed Registrations', multi='register_numbers'), + 'register_prospect': fields.function(_get_register, string='Unconfirmed Registrations', multi='register_numbers'), + 'register_attended': fields.function(_get_register, string='Attended Registrations', multi='register_numbers'), 'registration_ids': fields.one2many('event.registration', 'event_id', 'Registrations', readonly=False, states={'done': [('readonly', True)]}), - 'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event", readonly=True, states={'draft': [('readonly', False)]}), - 'date_end': fields.datetime('Closing date', required=True, help="Closing Date of Event", readonly=True, states={'draft': [('readonly', False)]}), + 'date_begin': fields.datetime('Start Date', required=True, readonly=True, states={'draft': [('readonly', False)]}), + 'date_end': fields.datetime('End Date', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'state': fields.selection([ ('draft', 'Draft'), ('confirm', 'Confirmed'), @@ -224,21 +170,16 @@ class event_event(osv.osv): ('cancel', 'Cancelled')], 'State', readonly=True, required=True, help='If event is created, the state is \'Draft\'.If event is confirmed for the particular dates the state is set to \'Confirmed\'. If the event is over, the state is set to \'Done\'.If event is cancelled the state is set to \'Cancelled\'.'), - 'mail_auto_registr': fields.boolean('Mail Auto Register', readonly=False, states={'done': [('readonly', True)]}, help='Check this box if you want to use automatic emailing for new registration.'), - 'mail_auto_confirm': fields.boolean('Mail Auto Confirm', readonly=False, states={'done': [('readonly', True)]}, help='Check this box if you want to use automatic confirmation emailing or reminder.'), - 'mail_registr': fields.text('Registration Email', readonly=False, states={'done': [('readonly', True)]}, help='This email will be sent when someone subscribes to the event.'), - 'mail_confirm': fields.text('Confirmation Email', readonly=False, states={'done': [('readonly', True)]}, help="This email will be sent when the event gets confirmed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."), - 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="The invoices of this event registration will be created with this Product. Thus it allows you to set the default label and the accounting info you want by default on these invoices."), - 'note': fields.text('Notes', help="Description or Summary of Event", readonly=False, states={'done': [('readonly', True)]}), - 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."), - 'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify a specific amount for each registration.", digits_compute=dp.get_precision('Sale Price')), + 'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'), + 'email_confirmation_id' : fields.many2one('email.template','Event Confirmation Email', help="If you set an email template, each participant will receive this email announcing the confirmation of the event."), + 'full_name' : fields.function(_name_get_fnc, type="char", string='Name'), + 'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."), 'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who will be giving speech at the event."), 'speaker_ids': fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}), 'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}), 'speaker_confirmed': fields.boolean('Speaker Confirmed', readonly=False, states={'done': [('readonly', True)]}), 'country_id': fields.related('address_id', 'country_id', type='many2one', relation='res.country', string='Country', readonly=False, states={'done': [('readonly', True)]}), - 'language': fields.char('Language',size=64, readonly=False, states={'done': [('readonly', True)]}), 'note': fields.text('Description', readonly=False, states={'done': [('readonly', True)]}), 'company_id': fields.many2one('res.company', 'Company', required=False, change_default=True, readonly=False, states={'done': [('readonly', True)]}), } @@ -249,9 +190,6 @@ class event_event(osv.osv): 'user_id': lambda obj, cr, uid, context: uid, } - def _check_recursion(self, cr, uid, ids, context=None): - return super(event_event, self)._check_recursion(cr, uid, ids, context=context) - def _check_closing_date(self, cr, uid, ids, context=None): for event in self.browse(cr, uid, ids, context=context): if event.date_end < event.date_begin: @@ -259,456 +197,157 @@ class event_event(osv.osv): return True _constraints = [ - (_check_recursion, 'Error ! You cannot create recursive event.', ['parent_id']), (_check_closing_date, 'Error ! Closing Date cannot be set before Beginning Date.', ['date_end']), ] - def do_team_change(self, cr, uid, ids, team_id, context=None): - """ - On Change Callback: when team change, this is call. - on this function, take value of reply_to from selected team. - """ - if not team_id: - return {} - team_pool = self.pool.get('crm.case.section') - res = {} - team = team_pool.browse(cr, uid, team_id, context=context) - if team.reply_to: - res = {'value': {'reply_to': team.reply_to}} - return res - + def onchange_event_type(self, cr, uid, ids, type_event, context=None): + if type_event: + type_info = self.pool.get('event.type').browse(cr,uid,type_event,context) + dic ={ + 'reply_to': type_info.default_reply_to, + 'email_registration_id': type_info.default_email_registration.id, + 'email_confirmation_id': type_info.default_email_event.id, + 'register_min': type_info.default_registration_min, + 'register_max': type_info.default_registration_max, + } + return {'value': dic} event_event() class event_registration(osv.osv): """Event Registration""" _name= 'event.registration' _description = __doc__ - _inherit = 'mail.thread' - - def _amount_line(self, cr, uid, ids, field_name, arg, context=None): - cur_obj = self.pool.get('res.currency') - res = {} - for line in self.browse(cr, uid, ids, context=context): - price = line.unit_price * line.nb_register - pricelist = line.event_id.pricelist_id or line.partner_invoice_id.property_product_pricelist - cur = pricelist and pricelist.currency_id or False - res[line.id] = cur and cur_obj.round(cr, uid, cur, price) or price - return res - + _inherit = ['mail.thread','res.partner.address'] _columns = { 'id': fields.integer('ID'), - 'name': fields.char('Summary', size=124, readonly=True, states={'draft': [('readonly', False)]}), - 'email_cc': fields.text('CC', size=252, readonly=False, states={'done': [('readonly', True)]}, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"), - 'nb_register': fields.integer('Quantity', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Number of Registrations or Tickets"), + 'origin': fields.char('Origin', size=124,readonly=True,help="Name of the sale order which create the registration"), + 'nb_register': fields.integer('Number of Participants', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}), - "partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}), - "contact_id": fields.many2one('res.partner.address', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id - "unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}), - 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute=dp.get_precision('Sale Price'), store=True), - "badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}), - "event_product": fields.char("Invoice Name", size=128, readonly=True, states={'draft': [('readonly', False)]}), - "tobe_invoiced": fields.boolean("To be Invoiced", readonly=True, states={'draft': [('readonly', False)]}), - "invoice_id": fields.many2one("account.invoice", "Invoice", readonly=True), - 'date_closed': fields.datetime('Closed', readonly=True), - 'ref': fields.reference('Reference', selection=crm._links_get, size=128), - 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128), - 'email_from': fields.char('Email', size=128, states={'done': [('readonly', True)]}, help="These people will receive email."), - 'create_date': fields.datetime('Creation Date', readonly=True), - 'write_date': fields.datetime('Write Date', readonly=True), - 'description': fields.text('Description', states={'done': [('readonly', True)]}), - 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]), + 'partner_address_id': fields.many2one('res.partner.address', 'Partner', states={'done': [('readonly', True)]}), + "contact_id": fields.many2one('res.partner.address', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), + 'create_date': fields.datetime('Creation Date' , readonly=True), + 'date_closed': fields.datetime('Attended Date', readonly=True), + 'date_open': fields.datetime('Registration Date', readonly=True), + 'reply_to': fields.related('event_id','reply_to',string='Reply-to Email', type='char', size=128, readonly=True,), 'log_ids': fields.one2many('mail.message', 'res_id', 'Logs', domain=[('email_from', '=', False),('model','=',_name)]), - 'date_deadline': fields.related('event_id','date_end', type='datetime', string="End Date", readonly=True), - 'date': fields.related('event_id', 'date_begin', type='datetime', string="Start Date", readonly=True), + 'event_end_date': fields.related('event_id','date_end', type='datetime', string="Event End Date", readonly=True), + 'event_begin_date': fields.related('event_id', 'date_begin', type='datetime', string="Event Start Date", readonly=True), 'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}), - 'active': fields.boolean('Active'), - 'section_id': fields.related('event_id', 'section_id', type='many2one', relation='crm.case.section', string='Sale Team', store=True, readonly=True), 'company_id': fields.related('event_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}), - 'state': fields.selection([('open', 'Confirmed'), - ('draft', 'Unconfirmed'), + 'state': fields.selection([('draft', 'Unconfirmed'), + ('open', 'Confirmed'), ('cancel', 'Cancelled'), - ('done', 'Done')], 'State', \ + ('done', 'Attended')], 'State', size=16, readonly=True) } + _defaults = { 'nb_register': 1, - 'tobe_invoiced': True, 'state': 'draft', - 'active': 1, 'user_id': lambda self, cr, uid, ctx: uid, } + _order = 'name, create_date desc' - def _make_invoice(self, cr, uid, reg, lines, context=None): - """ Create Invoice from Invoice lines - @param reg: Model of Event Registration - @param lines: Ids of Invoice lines - """ - if context is None: - context = {} - inv_pool = self.pool.get('account.invoice') - val_invoice = inv_pool.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False) - val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id}) - val_invoice['value'].update({ - 'origin': reg.event_product, - 'reference': False, - 'invoice_line': [(6, 0, lines)], - 'comment': "", - 'date_invoice': context.get('date_inv', False) - }) - inv_id = inv_pool.create(cr, uid, val_invoice['value'], context=context) - inv_pool.button_compute(cr, uid, [inv_id]) - self.message_append(cr, uid, [reg], _('Invoiced')) - return inv_id - def copy(self, cr, uid, id, default=None, context=None): - """ Copy record of Given id - @param id: Id of Registration record. - @param context: A standard dictionary for contextual values - """ - if not default: - default = {} - default.update({ - 'invoice_id': False, - }) - return super(event_registration, self).copy(cr, uid, id, default=default, context=context) + def do_draft(self, cr, uid, ids, context=None): + return self.write(cr, uid, ids, {'state': 'draft'}, context=context) - def action_invoice_create(self, cr, uid, ids, grouped=False, date_inv = False, context=None): - """ Action of Create Invoice """ - res = False - invoices = {} - tax_ids=[] - new_invoice_ids = [] - inv_lines_pool = self.pool.get('account.invoice.line') - inv_pool = self.pool.get('account.invoice') - product_pool = self.pool.get('product.product') - contact_pool = self.pool.get('res.partner.address') - if context is None: - context = {} - # If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the - # last day of the last month as invoice date - if date_inv: - context['date_inv'] = date_inv + def confirm_registration(self, cr, uid, ids, context=None): + self.message_append(cr, uid, ids,_('State set to open'),body_text= _('Open')) + return self.write(cr, uid, ids, {'state': 'open'}, context=context) - for reg in self.browse(cr, uid, ids, context=context): - val_invoice = inv_pool.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False) - val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id}) - partner_address_id = val_invoice['value']['address_invoice_id'] - if not partner_address_id: - raise osv.except_osv(_('Error !'), - _("Registered partner doesn't have an address to make the invoice.")) - value = inv_lines_pool.product_id_change(cr, uid, [], reg.event_id.product_id.id, uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id) - product = product_pool.browse(cr, uid, reg.event_id.product_id.id, context=context) - for tax in product.taxes_id: - tax_ids.append(tax.id) - vals = value['value'] - c_name = reg.contact_id and ('-' + contact_pool.name_get(cr, uid, [reg.contact_id.id])[0][1]) or '' - vals.update({ - 'name': reg.event_product + '-' + c_name, - 'price_unit': reg.unit_price, - 'quantity': reg.nb_register, - 'product_id':reg.event_id.product_id.id, - 'invoice_line_tax_id': [(6, 0, tax_ids)], - }) - inv_line_ids = self._create_invoice_lines(cr, uid, [reg.id], vals) - invoices.setdefault(reg.partner_id.id, []).append((reg, inv_line_ids)) - for val in invoices.values(): - res = False - if grouped: - res = self._make_invoice(cr, uid, val[0][0], [v for k, v in val], context=context) - - for k, v in val: - self.do_close(cr, uid, [k.id], context={'invoice_id': res}) - - else: - for k, v in val: - res = self._make_invoice(cr, uid, k, [v], context=context) - self.do_close(cr, uid, [k.id], context={'invoice_id': res}) - if res: new_invoice_ids.append(res) - return new_invoice_ids - - def do_open(self, cr, uid, ids, context=None): + def registration_open(self, cr, uid, ids, context=None): """ Open Registration """ - res = self.write(cr, uid, ids, {'state': 'open'}, context=context) - self.mail_user(cr, uid, ids) - self.message_append(cr, uid, ids, _('Open')) + res = self.confirm_registration(cr, uid, ids, context=context) + self.mail_user(cr, uid, ids, context=context) return res - def do_close(self, cr, uid, ids, context=None): + def button_reg_close(self, cr, uid, ids, context=None): """ Close Registration """ if context is None: context = {} - invoice_id = context.get('invoice_id', False) - values = {'state': 'done', 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')} - msg = _('Done') - if invoice_id: - values['invoice_id'] = invoice_id - res = self.write(cr, uid, ids, values) - self.message_append(cr, uid, ids, msg) - return res - - # event uses add_note wizard from crm, which expects case_* methods - def case_open(self, cr, uid, ids, context=None): - self.do_open(cr, uid, ids, context) - - # event uses add_note wizard from crm, which expects case_* methods - def case_close(self, cr, uid, ids, context=None): - self.do_close(cr, uid, ids, context) - - # event uses add_note wizard from crm, which expects case_* methods - def case_cancel(self, cr, uid, ids, context=None): - """ Cancel Registration - """ - self.message_append(cr, uid, ids, _('Cancel')) - return self.write(cr, uid, ids, {'state': 'cancel'}) - - # event uses add_note wizard from crm, which expects case_* methods - def case_reset(self, cr, uid, ids, context=None): - pass - - # event uses add_note wizard from crm, which expects case_* methods - def case_pending(self, cr, uid, ids, context=None): - pass - - def check_confirm(self, cr, uid, ids, context=None): - """This Function Open Event Registration and send email to user. - @param ids: List of Event registration's IDs - @param context: A standard dictionary for contextual values - @return: True - """ - if type(ids) in (int, long,): - ids = [ids] - data_pool = self.pool.get('ir.model.data') - unconfirmed_ids = [] - if context is None: - context = {} + today = fields.datetime.now() for registration in self.browse(cr, uid, ids, context=context): - total_confirmed = registration.event_id.register_current + registration.nb_register - if total_confirmed <= registration.event_id.register_max or registration.event_id.register_max == 0: - self.do_open(cr, uid, [registration.id], context=context) + if today >= registration.event_id.date_begin: + values = {'state': 'done', 'date_closed': today} + self.write(cr, uid, ids, values) + self.message_append(cr, uid, ids, _('State set to Done'), body_text=_('Done')) else: - unconfirmed_ids.append(registration.id) - if unconfirmed_ids: - view_id = data_pool.get_object_reference(cr, uid, 'event', 'view_event_confirm_registration') - view_id = view_id and view_id[1] or False - context['registration_ids'] = unconfirmed_ids - return { - 'name': _('Confirm Registration'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'event.confirm.registration', - 'views': [(view_id, 'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - 'context': context, - 'nodestroy': True - } - return True - - def button_reg_close(self, cr, uid, ids, context=None): - """This Function Close Event Registration. - """ - data_pool = self.pool.get('ir.model.data') - unclosed_ids = [] - for registration in self.browse(cr, uid, ids, context=context): - if registration.tobe_invoiced and not registration.invoice_id: - unclosed_ids.append(registration.id) - else: - self.do_close(cr, uid, [registration.id], context=context) - if unclosed_ids: - view_id = data_pool.get_object_reference(cr, uid, 'event', 'view_event_make_invoice') - view_id = view_id and view_id[1] or False - context['active_ids'] = unclosed_ids - return { - 'name': _('Close Registration'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'event.make.invoice', - 'views': [(view_id, 'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - 'context': context, - 'nodestroy': True - } + raise osv.except_osv(_('Error!'),_("You must wait the event starting day to do this action.") ) return True def button_reg_cancel(self, cr, uid, ids, context=None, *args): - return self.case_cancel(cr, uid, ids) + self.message_append(cr, uid, ids,_('State set to Cancel'),body_text= _('Cancel')) + return self.write(cr, uid, ids, {'state': 'cancel'}) - def mail_user(self, cr, uid, ids, confirm=False, context=None): + def mail_user(self, cr, uid, ids, context=None): """ - Send email to user + Send email to user with email_template when registration is done """ - mail_message = self.pool.get('mail.message') for registration in self.browse(cr, uid, ids, context=context): - src = registration.event_id.reply_to or False - email_to = [] - email_cc = [] - if registration.email_from: - email_to = [registration.email_from] - if registration.email_cc: - email_cc += [registration.email_cc] - if not (email_to or email_cc): - continue - subject = "" - body = "" - if confirm: - subject = _('Auto Confirmation: [%s] %s') %(registration.id, registration.name) - body = registration.event_id.mail_confirm - elif registration.event_id.mail_auto_confirm or registration.event_id.mail_auto_registr: - if registration.event_id.state in ['draft', 'fixed', 'open', 'confirm', 'running'] and registration.event_id.mail_auto_registr: - subject = _('Auto Registration: [%s] %s') %(registration.id, registration.name) - body = registration.event_id.mail_registr - if (registration.event_id.state in ['confirm', 'running']) and registration.event_id.mail_auto_confirm: - subject = _('Auto Confirmation: [%s] %s') %(registration.id, registration.name) - body = registration.event_id.mail_confirm - if subject or body: - mail_message.schedule_with_attach(cr, uid, src, email_to, subject, body, model='event.registration', email_cc=email_cc, res_id=registration.id) - + if registration.event_id.state == 'confirm' and registration.event_id.email_confirmation_id.id: + self.mail_user_confirm(cr, uid, ids, context=context) + else: + template_id = registration.event_id.email_registration_id.id + if template_id: + mail_message = self.pool.get('email.template').send_mail(cr,uid,template_id,registration.id) return True def mail_user_confirm(self, cr, uid, ids, context=None): """ - Send email to user + Send email to user when the event is confirmed """ - return self.mail_user(cr, uid, ids, confirm=True, context=context) + for registration in self.browse(cr, uid, ids, context=context): + template_id = registration.event_id.email_confirmation_id.id + if template_id: + mail_message = self.pool.get('email.template').send_mail(cr,uid,template_id,registration.id) + return True - def _create_invoice_lines(self, cr, uid, ids, vals): - """ Create account Invoice line for Registration Id. - """ - return self.pool.get('account.invoice.line').create(cr, uid, vals) - - def onchange_contact_id(self, cr, uid, ids, contact, partner): - - """This function returns value of Badge Name, Badge Title based on Partner contact. - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of Registration IDs - @param contact: Patner Contact IDS - @param partner: Partner IDS - """ + def onchange_contact_id(self, cr, uid, ids, contact, partner, context=None): data ={} if not contact: return data addr_obj = self.pool.get('res.partner.address') - data['email_from'] = addr_obj.browse(cr, uid, contact).email + contact_id = addr_obj.browse(cr, uid, contact, context=context) + data = { + 'email':contact_id.email, + 'contact_id':contact_id.id, + 'name':contact_id.name, + 'phone':contact_id.phone, + } return {'value': data} - def onchange_event(self, cr, uid, ids, event_id, partner_invoice_id): + def onchange_event(self, cr, uid, ids, event_id, context=None): """This function returns value of Product Name, Unit Price based on Event. - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of Registration IDs - @param event_id: Event ID - @param partner_invoice_id: Partner Invoice ID """ - context = {} + if context is None: + context = {} if not event_id: - return {'value': {'unit_price': False, 'event_product': False}} - + return {} event_obj = self.pool.get('event.event') - prod_obj = self.pool.get('product.product') + data_event = event_obj.browse(cr, uid, event_id, context=context) + return {'value': + {'event_begin_date': data_event.date_begin, + 'event_end_date': data_event.date_end, + 'company_id': data_event.company_id and data_event.company_id.id or False, + } + } + + def onchange_partner_id(self, cr, uid, ids, part, context=None): res_obj = self.pool.get('res.partner') - - data_event = event_obj.browse(cr, uid, event_id) - res = {'value': {'unit_price': False, - 'event_product': False, - 'user_id': False, - 'date': data_event.date_begin, - 'date_deadline': data_event.date_end, - 'description': data_event.note, - 'name': data_event.name, - 'section_id': data_event.section_id and data_event.section_id.id or False, - }} - if data_event.user_id.id: - res['value'].update({'user_id': data_event.user_id.id}) - if data_event.product_id: - pricelist_id = data_event.pricelist_id and data_event.pricelist_id.id or False - if partner_invoice_id: - partner = res_obj.browse(cr, uid, partner_invoice_id, context=context) - pricelist_id = pricelist_id or partner.property_product_pricelist.id - unit_price = prod_obj._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': pricelist_id})[data_event.product_id.id] - if not unit_price: - unit_price = data_event.unit_price - res['value'].update({'unit_price': unit_price, 'event_product': data_event.product_id.name}) - return res - - def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False): - """This function returns value of Patner Invoice id, Unit Price, badget title based on partner and Event. - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of Registration IDs - @param event_id: Event ID - @param partner_invoice_id: Partner Invoice ID - """ - res_obj = self.pool.get('res.partner') - data = {} - data['contact_id'], data['partner_invoice_id'], data['email_from'] = (False, False, False) if not part: return {'value': data} - data['partner_invoice_id'] = part - # this calls onchange_partner_invoice_id - d = self.onchange_partner_invoice_id(cr, uid, ids, event_id, part) - # this updates the dictionary - data.update(d['value']) addr = res_obj.address_get(cr, uid, [part]).get('default', False) if addr: - d = self.onchange_contact_id(cr, uid, ids, addr, part) + d = self.onchange_contact_id(cr, uid, ids, addr, part, context) data.update(d['value']) return {'value': data} - def onchange_partner_invoice_id(self, cr, uid, ids, event_id, partner_invoice_id): - """This function returns value of Product unit Price based on Invoiced partner. - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of Registration IDs - @param event_id: Event ID - @param partner_invoice_id: Partner Invoice ID - """ - data = {} - context = {} - event_obj = self.pool.get('event.event') - prod_obj = self.pool.get('product.product') - res_obj = self.pool.get('res.partner') - - data['unit_price']=False - if not event_id: - return {'value': data} - data_event = event_obj.browse(cr, uid, event_id, context=context) - if data_event.product_id: - data['event_product'] = data_event.product_id.name - pricelist_id = data_event.pricelist_id and data_event.pricelist_id.id or False - if partner_invoice_id: - partner = res_obj.browse(cr, uid, partner_invoice_id, context=context) - pricelist_id = pricelist_id or partner.property_product_pricelist.id - unit_price = prod_obj._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': pricelist_id})[data_event.product_id.id] - if not unit_price: - unit_price = data_event.unit_price - data['unit_price'] = unit_price - return {'value': data} - event_registration() -class event_registration_badge(osv.osv): - _name = 'event.registration.badge' - _description = __doc__ - _columns = { - "registration_id": fields.many2one('event.registration', 'Registration', required=True), - "title": fields.char('Title', size=128), - "name": fields.char('Name', size=128, required=True), - "address_id": fields.many2one('res.partner.address', 'Address'), - } - -event_registration_badge() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event/event_demo.xml b/addons/event/event_demo.xml index 4f86f620e6f..0dfbbf6de18 100644 --- a/addons/event/event_demo.xml +++ b/addons/event/event_demo.xml @@ -1,143 +1,86 @@ - + - + - - - 68.00 - 15.00 - - - Ticket for Concert - - - - - 24.00 - 15.00 - - - Ticket for Opera - - - - - 15.50 - 5.00 - - - Ticket for Conference - - - - Seminar - + + Seminar + - - Exhibition - + + Exhibition + - - Conference - + + Conference + - - Saloon - + + Show + - - Training - + + Training + - - Concert of Bon Jovi + + Concert of Bon Jovi - - 68.00 - True - True - - 500 - - + + 500 + + - - Opera of Verdi + + Opera of Verdi - - 24.00 - - - 50 - 350 - - - Conference on ERP Buisness + + + 50 + 350 + + + Conference on ERP Buisness - - 15.50 - - 200 - - True - True - Thanks for registration. We will keep you informed of the modalities. - Thanks for registration. The conference will begin at 2 PM and will be given by Mr. Pinckaers. - + + 200 + + - - - - - 5 - Ticket for Opera - 24.00 - + + + 5 + - - - - - 10 - Ticket for Opera - 24.00 - + + + 10 + - - - - - - 6 - Ticket for Concert - 15.50 - + + + 6 + + - - 5 - Ticket for Conference - 20 - - - - + + diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 31fb353c113..88be188080e 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -2,11 +2,8 @@ - - - - - + + @@ -18,6 +15,11 @@
+ + + + + @@ -38,11 +40,8 @@ event.type form - - - - - + + @@ -56,106 +55,75 @@ - - - + + + - - - - - - - - - - - - - - - - - - - + + + + + + + +