\n" +" Click to define a new contract.\n" +"
\n" +" You will find here the contracts to be renewed because the\n" +" end date is passed or the working effort is higher than the\n" +" maximum authorized one.\n" +"
\n" +" OpenERP automatically sets contracts to be renewed in a " +"pending\n" +" state. After the negociation, the salesman should close or " +"renew\n" +" pending contracts.\n" +"
\n" +" " +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "End Date" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Account Manager" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,remaining_hours_to_invoice:0 +msgid "Computed using the formula: Maximum Time - Total Invoiced Time" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Expected" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Contracts not assigned" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,theorical_margin:0 +msgid "Computed using the formula: Theoretical Revenue - Total Costs" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,hours_qtt_invoiced:0 +msgid "Invoiced Time" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,fix_price_to_invoice:0 +#: field:account.analytic.account,remaining_hours:0 +#: field:account.analytic.account,remaining_hours_to_invoice:0 +#: field:account.analytic.account,timesheet_ca_invoiced:0 +msgid "Remaining Time" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "" +"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', " +"'normal','template'])]}" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,real_margin_rate:0 +msgid "Real Margin Rate (%)" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,remaining_hours:0 +msgid "Computed using the formula: Maximum Time - Total Worked Time" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,hours_quantity:0 +msgid "" +"Number of time you spent on the analytic account (from timesheet). It " +"computes quantities on all journal of type 'general'." +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Nothing to invoice, create" +msgstr "" + +#. module: account_analytic_analysis +#: model:res.groups,name:account_analytic_analysis.group_template_required +msgid "Mandatory use of templates in contracts" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,hours_quantity:0 +msgid "Total Worked Time" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,real_margin:0 +msgid "Real Margin" +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_month +msgid "Hours summary by month" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,real_margin_rate:0 +msgid "Computes using the formula: (Real Margin / Total Costs) * 100." +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "or view" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Customer Contracts" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Parent" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,month_ids:0 +#: field:account_analytic_analysis.summary.month,month:0 +msgid "Month" +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_all +#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_all +msgid "Time & Materials to Invoice" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_overdue_all +#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_overdue_all +msgid "Contracts" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Start Date" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Invoiced" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "" +"The contracts to be renewed because the deadline is passed or the working " +"hours are higher than the allocated hours" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Pending contracts to renew with your customer" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Timesheets" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,hours_qtt_non_invoiced:0 +msgid "" +"Number of time (hours/days) (from journal of type 'general') that can be " +"invoiced if you invoice based on analytic account." +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Pending" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,is_overdue_quantity:0 +msgid "Overdue Quantity" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Status" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,ca_theorical:0 +msgid "Theoretical Revenue" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "To Renew" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "" +"A contract in OpenERP is an analytic account having a partner set on it." +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +#: model:ir.actions.act_window,name:account_analytic_analysis.action_sales_order +msgid "Sales Orders" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,last_invoice_date:0 +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,ca_theorical:0 +msgid "" +"Based on the costs you had on the project, what would have been the revenue " +"if all these costs have been invoiced at the normal sale price provided by " +"the pricelist." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,user_ids:0 +#: field:account_analytic_analysis.summary.user,user:0 +msgid "User" +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.actions.act_window,help:account_analytic_analysis.template_of_contract_action +msgid "" +"\n" +" Click here to create a template of contract.\n" +"
\n" +" Templates are used to prefigure contract/project that \n" +" can be selected by the salespeople to quickly configure " +"the\n" +" terms and conditions of the contract.\n" +"
\n" +" " +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user +msgid "Hours Summary by User" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Contract" +msgstr "" + +#. module: account_analytic_analysis +#: help:sale.config.settings,group_template_required:0 +msgid "" +"Allows you to set the template field as required when creating an analytic " +"account or a contract." +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,hours_qtt_invoiced:0 +msgid "" +"Number of time (hours/days) that can be invoiced plus those that already " +"have been invoiced." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,revenue_per_hour:0 +msgid "Revenue per Time (real)" +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue_all +msgid "" +"\n" +" Click to create a new contract.\n" +"
\n" +" Use contracts to follow tasks, issues, timesheets or " +"invoicing based on\n" +" work done, expenses and/or sales orders. OpenERP will " +"automatically manage\n" +" the alerts for the renewal of the contracts to the right " +"salesperson.\n" +"
\n" +" " +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,toinvoice_total:0 +msgid "Total to Invoice" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Sale Orders" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Open" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,invoiced_total:0 +msgid "Total Invoiced" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,remaining_ca:0 +msgid "Computed using the formula: Max Invoice Price - Invoiced Amount." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,last_invoice_date:0 +msgid "Last Invoice Date" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Units Remaining" +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.actions.act_window,help:account_analytic_analysis.action_hr_tree_invoiced_all +msgid "" +"\n" +" You will find here timesheets and purchases you did for\n" +" contracts that can be reinvoiced to the customer. If you " +"want\n" +" to record new activities to invoice, you should use the " +"timesheet\n" +" menu instead.\n" +"
\n" +" " +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,hours_qtt_non_invoiced:0 +msgid "Uninvoiced Time" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Invoicing" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,total_cost:0 +msgid "Total Costs" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,remaining_total:0 +msgid "" +"Expectation of remaining income for this contract. Computed as the sum of " +"remaining subtotals which, in turn, are computed as the maximum between " +"'(Estimation - Invoiced)' and 'To Invoice' amounts" +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_overdue +#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_overdue +msgid "Contracts to Renew" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,toinvoice_total:0 +msgid " Sum of everything that could be invoiced for this contract." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,theorical_margin:0 +msgid "Theoretical Margin" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,remaining_total:0 +msgid "Total Remaining" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,real_margin:0 +msgid "Computed using the formula: Invoiced Amount - Total Costs." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,hours_qtt_est:0 +msgid "Estimation of Hours to Invoice" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,fix_price_invoices:0 +msgid "Fixed Price" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,last_worked_date:0 +msgid "Date of the latest work done on this account." +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings +msgid "sale.config.settings" +msgstr "" + +#. module: account_analytic_analysis +#: field:sale.config.settings,group_template_required:0 +msgid "Mandatory use of templates." +msgstr "" + +#. module: account_analytic_analysis +#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action +#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action +msgid "Contract Template" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Units Done" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,total_cost:0 +msgid "" +"Total of costs for this account. It includes real costs (from invoices) and " +"indirect costs, like time spent on timesheets." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,est_total:0 +msgid "Total Estimation" +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,remaining_ca:0 +msgid "Remaining Revenue" +msgstr "" + +#. module: account_analytic_analysis +#: help:account.analytic.account,ca_to_invoice:0 +msgid "" +"If invoice from analytic account, the remaining amount you can invoice to " +"the customer based on the total costs." +msgstr "" + +#. module: account_analytic_analysis +#: field:account_analytic_analysis.summary.month,unit_amount:0 +#: field:account_analytic_analysis.summary.user,unit_amount:0 +msgid "Total Time" +msgstr "" + +#. module: account_analytic_analysis +#: model:res.groups,comment:account_analytic_analysis.group_template_required +msgid "" +"the field template of the analytic accounts and contracts will be required." +msgstr "" + +#. module: account_analytic_analysis +#: field:account.analytic.account,invoice_on_timesheets:0 +msgid "On Timesheets" +msgstr "" + +#. module: account_analytic_analysis +#: view:account.analytic.account:0 +msgid "Total" +msgstr "" diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml index 42b17ae06c3..05955d6f5cd 100644 --- a/addons/account_analytic_plans/account_analytic_plans_view.xml +++ b/addons/account_analytic_plans/account_analytic_plans_view.xml @@ -270,6 +270,20 @@\n" +" Click to create a payment order.\n" +"
\n" +" A payment order is a payment request from your company to " +"pay a\n" +" supplier invoice or a customer refund.\n" +"
\n" +" " +msgstr "" #. module: account_payment #: field:payment.line,currency:0 msgid "Partner Currency" -msgstr "Moneda de la empresa" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Set to draft" -msgstr "Cambiar a borrador" +msgstr "" #. module: account_payment #: help:payment.order,mode:0 msgid "Select the Payment Mode to be applied." -msgstr "Seleccione el modo de pago a aplicar." +msgstr "" #. module: account_payment #: view:payment.mode:0 #: view:payment.order:0 msgid "Group By..." -msgstr "Agrupar por..." - -#. module: account_payment -#: model:ir.module.module,description:account_payment.module_meta_information -msgid "" -"\n" -"This module provides :\n" -"* a more efficient way to manage invoice payment.\n" -"* a basic mechanism to easily plug various automated payment.\n" -" " msgstr "" -"\n" -"Este módulo proporciona:\n" -"* Una forma más eficiente para gestionar el pago de las facturas.\n" -"* Un mecanismo básico para conectar fácilmente varios pagos automatizados.\n" -" " #. module: account_payment #: field:payment.order,line_ids:0 msgid "Payment lines" -msgstr "Líneas de pago" +msgstr "" #. module: account_payment #: view:payment.line:0 #: field:payment.line,info_owner:0 #: view:payment.order:0 msgid "Owner Account" -msgstr "Cuenta propietario" - -#. 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 "" -"Cuando se hace una orden, el estado es 'Borrador'.\n" -" Una vez se confirma el banco, el estado es \"Confirmada\".\n" -" Cuando la orden se paga, el estado es 'Realizada'." #. module: account_payment #: help:account.invoice,amount_to_pay:0 @@ -86,108 +69,109 @@ msgid "" "The amount which should be paid at the current date\n" "minus the amount which is already in payment order" msgstr "" -"El importe que se debería haber pagado en la fecha actual\n" -"menos el importe que ya está en la orden de pago" #. module: account_payment +#: field:payment.line,company_id:0 #: field:payment.mode,company_id:0 +#: field:payment.order,company_id:0 msgid "Company" -msgstr "Compañía" +msgstr "" #. module: account_payment -#: field:payment.order,date_prefered:0 -msgid "Preferred date" -msgstr "Fecha preferida" +#: model:res.groups,name:account_payment.group_account_payment +msgid "Accounting / Payments" +msgstr "" #. module: account_payment #: selection:payment.line,state:0 msgid "Free" -msgstr "Libre" +msgstr "" #. module: account_payment +#: view:payment.order.create:0 #: field:payment.order.create,entries:0 msgid "Entries" -msgstr "Asientos" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Used Account" -msgstr "Cuenta utilizada" +msgstr "" #. module: account_payment #: field:payment.line,ml_maturity_date:0 #: field:payment.order.create,duedate:0 msgid "Due Date" -msgstr "Fecha de vencimiento" - -#. module: account_payment -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "No puede crear una línea de movimiento en una cuenta cerrada." - -#. module: account_payment -#: view:account.move.line:0 -msgid "Account Entry Line" -msgstr "Línea del asiento contable" +msgstr "" #. module: account_payment #: view:payment.order.create:0 msgid "_Add to payment order" -msgstr "_Añadir a la orden de pago" +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 "Extracto generar pago" +msgstr "" + +#. module: account_payment +#: code:addons/account_payment/account_invoice.py:43 +#, python-format +msgid "" +"You cannot cancel an invoice which has already been imported in a payment " +"order. Remove it from the following payment order : %s." +msgstr "" + +#. module: account_payment +#: code:addons/account_payment/account_invoice.py:43 +#: code:addons/account_payment/account_move_line.py:110 +#, python-format +msgid "Error!" +msgstr "" #. module: account_payment #: report:payment.order:0 #: view:payment.order:0 msgid "Amount" -msgstr "Importe" - -#. module: account_payment -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "¡Valor haber o debe erróneo en el asiento contable!" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Total in Company Currency" -msgstr "Total en moneda de la compañía" +msgstr "" #. module: account_payment #: selection:payment.order,state:0 msgid "Cancelled" -msgstr "Cancelado" +msgstr "" #. module: account_payment #: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new msgid "New Payment Order" -msgstr "Nueva orden de pago" +msgstr "" #. module: account_payment #: report:payment.order:0 #: field:payment.order,reference:0 msgid "Reference" -msgstr "Referencia" +msgstr "" #. module: account_payment #: sql_constraint:payment.line:0 msgid "The payment line name must be unique!" -msgstr "¡El nombre de la línea de pago debe ser única!" +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 "Órdenes de pago" +msgstr "" #. module: account_payment #: selection:payment.order,date_prefered:0 msgid "Directly" -msgstr "Directamente" +msgstr "" #. module: account_payment #: model:ir.actions.act_window,name:account_payment.action_payment_line_form @@ -195,45 +179,52 @@ msgstr "Directamente" #: view:payment.line:0 #: view:payment.order:0 msgid "Payment Line" -msgstr "Línea de pago" +msgstr "" #. module: account_payment #: view:payment.line:0 msgid "Amount Total" -msgstr "Importe total" +msgstr "" + +#. module: account_payment +#: help:payment.order,state:0 +msgid "" +"When an order is placed the status is 'Draft'.\n" +" Once the bank is confirmed the status is set to 'Confirmed'.\n" +" Then the order is paid the status is 'Done'." +msgstr "" #. module: account_payment #: view:payment.order:0 #: selection:payment.order,state:0 msgid "Confirmed" -msgstr "Confirmada" +msgstr "" #. module: account_payment #: help:payment.line,ml_date_created:0 msgid "Invoice Effective Date" -msgstr "Fecha vencimiento factura" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Execution Type" -msgstr "Tipo ejecución" +msgstr "" #. module: account_payment #: selection:payment.line,state:0 msgid "Structured" -msgstr "Estructurado" +msgstr "" #. module: account_payment -#: view:payment.order:0 -#: field:payment.order,state:0 -msgid "State" -msgstr "Estado" +#: view:account.bank.statement:0 +msgid "Import Payment Lines" +msgstr "" #. module: account_payment #: view:payment.line:0 #: view:payment.order:0 msgid "Transaction Information" -msgstr "Información de transacción" +msgstr "" #. module: account_payment #: model:ir.actions.act_window,name:account_payment.action_payment_mode_form @@ -241,18 +232,19 @@ msgstr "Información de transacción" #: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form #: view:payment.mode:0 #: view:payment.order:0 +#: field:payment.order,mode:0 msgid "Payment Mode" -msgstr "Modo de pago" +msgstr "" #. module: account_payment #: field:payment.line,ml_date_created:0 msgid "Effective Date" -msgstr "Fecha vencimiento" +msgstr "" #. module: account_payment #: field:payment.line,ml_inv_ref:0 msgid "Invoice Ref." -msgstr "Ref. factura" +msgstr "" #. module: account_payment #: help:payment.order,date_prefered:0 @@ -261,119 +253,99 @@ msgid "" "by you.'Directly' stands for the direct execution.'Due date' stands for the " "scheduled date of execution." msgstr "" -"Seleccione una opción para la orden de pago: 'Fecha fija' para una fecha " -"especificada por usted. 'Directamente' para la ejecución directa. 'Fecha " -"vencimiento' para la fecha programada de ejecución." #. module: account_payment -#: code:addons/account_payment/account_move_line.py:110 -#, python-format -msgid "Error !" -msgstr "¡Error!" - -#. module: account_payment -#: view:account.move.line:0 -msgid "Total debit" -msgstr "Total debe" - -#. module: account_payment -#: field:payment.order,date_done:0 -msgid "Execution date" -msgstr "Fecha ejecución" +#: field:payment.order,date_created:0 +msgid "Creation Date" +msgstr "" #. module: account_payment #: help:payment.mode,journal:0 msgid "Bank or Cash Journal for the Payment Mode" -msgstr "Diario de banco o caja para el modo de pago." +msgstr "" #. module: account_payment #: selection:payment.order,date_prefered:0 msgid "Fixed date" -msgstr "Fecha fija" +msgstr "" #. module: account_payment #: field:payment.line,info_partner:0 #: view:payment.order:0 msgid "Destination Account" -msgstr "Cuenta de destino" +msgstr "" #. module: account_payment #: view:payment.line:0 msgid "Desitination Account" -msgstr "Cuenta de destino" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Search Payment Orders" -msgstr "Buscar órdenes de pago" - -#. module: account_payment -#: constraint:account.move.line:0 -msgid "" -"You can not create move line on receivable/payable account without partner" msgstr "" -"No puede crear una línea de movimiento en una cuenta a cobrar/a pagar sin " -"una empresa." #. module: account_payment #: field:payment.line,create_date:0 msgid "Created" -msgstr "Creado" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Select Invoices to Pay" -msgstr "Seleccionar facturas a pagar" +msgstr "" #. module: account_payment #: view:payment.line:0 msgid "Currency Amount Total" -msgstr "Importe total monetario" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Make Payments" -msgstr "Realizar pagos" +msgstr "" #. module: account_payment #: field:payment.line,state:0 msgid "Communication Type" -msgstr "Tipo de comunicación" +msgstr "" #. module: account_payment -#: model:ir.module.module,shortdesc:account_payment.module_meta_information -msgid "Payment Management" -msgstr "Gestión de pagos" +#: 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 "Línea extracto bancario" +msgstr "" #. module: account_payment #: selection:payment.order,date_prefered:0 msgid "Due date" -msgstr "Fecha vencimiento" +msgstr "" #. module: account_payment #: field:account.invoice,amount_to_pay:0 msgid "Amount to be paid" -msgstr "Importe a pagar" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Currency" -msgstr "Moneda" +msgstr "" #. module: account_payment #: view:account.payment.make.payment:0 msgid "Yes" -msgstr "Sí" +msgstr "" #. module: account_payment #: help:payment.line,info_owner:0 msgid "Address of the Main Partner" -msgstr "Dirección de la empresa principal" +msgstr "" #. module: account_payment #: help:payment.line,date:0 @@ -381,92 +353,79 @@ msgid "" "If no payment date is specified, the bank will treat this payment line " "directly" msgstr "" -"Si no se indica fecha de pago, el banco procesará esta línea de pago " -"directamente" #. module: account_payment #: model:ir.model,name:account_payment.model_account_payment_populate_statement msgid "Account Payment Populate Statement" -msgstr "Contabilidad extracto generar pago" +msgstr "" + +#. module: account_payment +#: code:addons/account_payment/account_move_line.py:110 +#, python-format +msgid "There is no partner defined on the entry line." +msgstr "" #. module: account_payment #: help:payment.mode,name:0 msgid "Mode of Payment" -msgstr "Modo de pago" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Value Date" -msgstr "Fecha valor" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Payment Type" -msgstr "Tipo de Pago" +msgstr "" #. module: account_payment #: help:payment.line,amount_currency:0 msgid "Payment amount in the partner currency" -msgstr "Importe pagado en la moneda de la empresa" +msgstr "" #. module: account_payment #: view:payment.order:0 #: selection:payment.order,state:0 msgid "Draft" -msgstr "Borrador" +msgstr "" + +#. module: account_payment +#: view:payment.order:0 +#: field:payment.order,state:0 +msgid "Status" +msgstr "" #. module: account_payment #: help:payment.line,communication2:0 msgid "The successor message of Communication." -msgstr "El mensaje de pago realizado a comunicar." - -#. module: account_payment -#: code:addons/account_payment/account_move_line.py:110 -#, python-format -msgid "No partner defined on entry line" -msgstr "No se ha definido la empresa en la línea de entrada" +msgstr "" #. module: account_payment #: help:payment.line,info_partner:0 msgid "Address of the Ordering Customer." -msgstr "Dirección del cliente que ordena." +msgstr "" #. module: account_payment #: view:account.payment.populate.statement:0 msgid "Populate Statement:" -msgstr "Generar extracto:" - -#. module: account_payment -#: view:account.move.line:0 -msgid "Total credit" -msgstr "Total haber" +msgstr "" #. module: account_payment #: help:payment.order,date_scheduled:0 msgid "Select a date if you have chosen Preferred Date to be fixed." msgstr "" -"Seleccione una fecha si ha seleccionado que la fecha preferida sea fija." - -#. module: account_payment -#: field:payment.order,user_id:0 -msgid "User" -msgstr "Usuario" #. module: account_payment #: field:account.payment.populate.statement,lines:0 -#: model:ir.actions.act_window,name:account_payment.act_account_invoice_2_payment_line msgid "Payment Lines" -msgstr "Líneas de pago" +msgstr "" #. module: account_payment #: model:ir.model,name:account_payment.model_account_move_line msgid "Journal Items" -msgstr "Apuntes contables" - -#. module: account_payment -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "La compañía debe ser la misma para la cuenta y periodo relacionados." +msgstr "" #. module: account_payment #: help:payment.line,move_line_id:0 @@ -474,202 +433,192 @@ msgid "" "This Entry Line will be referred for the information of the ordering " "customer." msgstr "" -"Esta línea se usará como referencia para la información del cliente que " -"ordena." #. module: account_payment #: view:payment.order.create:0 msgid "Search" -msgstr "Buscar" +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 "Orden de pago" +#: field:payment.order,user_id:0 +msgid "Responsible" +msgstr "" #. module: account_payment #: field:payment.line,date:0 msgid "Payment Date" -msgstr "Fecha de pago" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Total:" -msgstr "Total:" +msgstr "" #. module: account_payment -#: field:payment.order,date_created:0 -msgid "Creation date" -msgstr "Fecha de creación" +#: field:payment.order,date_done:0 +msgid "Execution Date" +msgstr "" #. module: account_payment #: view:account.payment.populate.statement:0 msgid "ADD" -msgstr "Añadir" +msgstr "" #. module: account_payment -#: view:account.bank.statement:0 -msgid "Import payment lines" -msgstr "Importar líneas de pago" +#: model:ir.actions.act_window,name:account_payment.action_create_payment_order +msgid "Populate Payment" +msgstr "" #. module: account_payment #: field:account.move.line,amount_to_pay:0 msgid "Amount to pay" -msgstr "Importe a pagar" +msgstr "" #. module: account_payment #: field:payment.line,amount:0 msgid "Amount in Company Currency" -msgstr "Importe en la moneda de la compañía" +msgstr "" #. module: account_payment #: help:payment.line,partner_id:0 msgid "The Ordering Customer" -msgstr "El cliente que ordena" +msgstr "" #. module: account_payment #: model:ir.model,name:account_payment.model_account_payment_make_payment msgid "Account make payment" -msgstr "Contabilidad realizar pago" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Invoice Ref" -msgstr "Ref. factura" +msgstr "" #. module: account_payment #: field:payment.line,name:0 msgid "Your Reference" -msgstr "Su referencia" - -#. module: account_payment -#: field:payment.order,mode:0 -msgid "Payment mode" -msgstr "Modo de pago" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Payment order" -msgstr "Órdenes de pago" +msgstr "" #. module: account_payment #: view:payment.line:0 #: view:payment.order:0 msgid "General Information" -msgstr "Información General" +msgstr "" #. module: account_payment #: view:payment.order:0 #: selection:payment.order,state:0 msgid "Done" -msgstr "Realizado" +msgstr "" #. module: account_payment #: model:ir.model,name:account_payment.model_account_invoice msgid "Invoice" -msgstr "Factura" +msgstr "" #. module: account_payment #: field:payment.line,communication:0 msgid "Communication" -msgstr "Comunicación" +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 "Cancelar" +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 "Información" +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." +#: model:ir.actions.report.xml,name:account_payment.payment_order1 +#: model:ir.model,name:account_payment.model_payment_order +#: view:payment.order:0 +msgid "Payment Order" msgstr "" -"Una órden de pago es una petición de pago que realiza su compañía para pagar " -"una factura de proveedor o un apunte de crédito de un cliente. Aquí puede " -"registrar todas las órdenes de pago pendientes y hacer seguimiento de las " -"órdenes e indicar la referencia de factura y la entidad a la cual pagar." #. module: account_payment #: help:payment.line,amount:0 msgid "Payment amount in the company currency" -msgstr "Importe pagado en la moneda de la compañía" +msgstr "" #. module: account_payment #: view:payment.order.create:0 msgid "Search Payment lines" -msgstr "Buscar líneas de pago" +msgstr "" #. module: account_payment #: field:payment.line,amount_currency:0 msgid "Amount in Partner Currency" -msgstr "Importe en la moneda de la empresa" +msgstr "" #. module: account_payment #: field:payment.line,communication2:0 msgid "Communication 2" -msgstr "Comunicación 2" +msgstr "" #. module: account_payment -#: field:payment.line,bank_id:0 -msgid "Destination Bank account" -msgstr "Cuenta bancaria destino" +#: field:payment.order,date_scheduled:0 +msgid "Scheduled Date" +msgstr "" #. module: account_payment #: view:account.payment.make.payment:0 msgid "Are you sure you want to make payment?" -msgstr "¿Está seguro que quiere realizar el pago?" +msgstr "" #. module: account_payment #: view:payment.mode:0 #: field:payment.mode,journal:0 msgid "Journal" -msgstr "Diario" +msgstr "" #. module: account_payment #: field:payment.mode,bank_id:0 msgid "Bank account" -msgstr "Cuenta bancaria" +msgstr "" #. module: account_payment #: view:payment.order:0 msgid "Confirm Payments" -msgstr "Confirmar pagos" +msgstr "" #. module: account_payment #: field:payment.line,company_currency:0 #: report:payment.order:0 msgid "Company Currency" -msgstr "Moneda de la compañía" +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 "Pago" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Payment Order / Payment" -msgstr "Orden de pago / Pago" +msgstr "" #. module: account_payment #: field:payment.line,move_line_id:0 msgid "Entry line" -msgstr "Línea del asiento" +msgstr "" #. module: account_payment #: help:payment.line,communication:0 @@ -677,134 +626,57 @@ 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 "" -"Se utiliza como mensaje entre el cliente que hace el pedido y la compañía " -"actual. Describe '¿Qué quiere decir al receptor sobre este pedido?'" #. module: account_payment #: field:payment.mode,name:0 msgid "Name" -msgstr "Nombre" +msgstr "" #. module: account_payment #: report:payment.order:0 msgid "Bank Account" -msgstr "Cuenta bancaria" +msgstr "" #. module: account_payment #: view:payment.line:0 #: view:payment.order:0 msgid "Entry Information" -msgstr "Información del asiento" +msgstr "" #. module: account_payment #: model:ir.model,name:account_payment.model_payment_order_create msgid "payment.order.create" -msgstr "pago.orden.crear" +msgstr "" #. module: account_payment #: field:payment.line,order_id:0 msgid "Order" -msgstr "Orden" +msgstr "" #. module: account_payment #: field:payment.order,total:0 msgid "Total" -msgstr "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 "Realizar pago" +msgstr "" #. module: account_payment -#: field:payment.line,partner_id:0 -#: report:payment.order:0 -msgid "Partner" -msgstr "Empresa" +#: field:payment.order,date_prefered:0 +msgid "Preferred Date" +msgstr "" #. module: account_payment -#: model:ir.actions.act_window,name:account_payment.action_create_payment_order -msgid "Populate Payment" -msgstr "Generar pago" +#: view:account.payment.make.payment:0 +#: view:account.payment.populate.statement:0 +#: view:payment.order.create:0 +msgid "or" +msgstr "" #. module: account_payment #: help:payment.mode,bank_id:0 msgid "Bank Account for the Payment Mode" -msgstr "Cuenta bancaria para el modo de pago" - -#. module: account_payment -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "No puede crear una línea de movimiento en una cuenta de tipo vista." - -#~ msgid "Execution date:" -#~ msgstr "Fecha de ejecución:" - -#~ msgid "Suitable bank types" -#~ msgstr "Tipos de banco adecuados" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "¡XML inválido para la definición de la vista!" - -#~ msgid "_Cancel" -#~ msgstr "_Cancelar" - -#~ msgid "Date" -#~ msgstr "Fecha" - -#~ msgid "Reference:" -#~ msgstr "Referencia:" - -#~ msgid "Maturity Date" -#~ msgstr "Fecha vencimiento" - -#~ msgid "Specify the Code for Payment Type" -#~ msgstr "Indique el código para el tipo de pago" - -#~ msgid "Code" -#~ msgstr "Código" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter " -#~ "especial!" - -#~ msgid "Pay" -#~ msgstr "Pagar" - -#~ msgid "Draft Payment Order" -#~ msgstr "Orden de pago borrador" - -#~ msgid "Cash Journal for the Payment Mode" -#~ msgstr "Diario de caja para el modo de pago" - -#~ msgid "_Search" -#~ msgstr "_Buscar" - -#, python-format -#~ msgid "Partner '+ line.partner_id.name+ ' has no bank account defined" -#~ msgstr "" -#~ "Empresa '+ line.partner_id.name+ ' no tiene una cuenta bancaria definida" - -#~ msgid "Payment Orders to Validate" -#~ msgstr "Órdenes de pago a validar" - -#~ msgid "Payment type" -#~ msgstr "Tipo de pago" - -#~ msgid "_Add" -#~ msgstr "_Añadir" - -#~ msgid "Select the Payment Type for the Payment Mode." -#~ msgstr "Seleccione el tipo de pago para el modo de pago." - -#~ msgid "Invalid model name in the action definition." -#~ msgstr "Nombre de modelo no válido en la definición de acción." - -#~ msgid "Populate payment" -#~ msgstr "Rellenar la orden" - -#~ msgid "Populate Statement with Payment lines" -#~ msgstr "Llenar un extracto con líneas de pago" +msgstr "" diff --git a/addons/account_payment/i18n/zh_TW.po b/addons/account_payment/i18n/zh_TW.po index 5c206a238c1..aee33acd84c 100644 --- a/addons/account_payment/i18n/zh_TW.po +++ b/addons/account_payment/i18n/zh_TW.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2012-12-21 17:05+0000\n" -"PO-Revision-Date: 2012-08-29 15:27+0000\n" -"Last-Translator: Eric Huang
Select when the action must be run, and add filters and/or timing conditions.
diff --git a/addons/base_action_rule/i18n/he.po b/addons/base_action_rule/i18n/he.po
new file mode 100644
index 00000000000..49d917c2665
--- /dev/null
+++ b/addons/base_action_rule/i18n/he.po
@@ -0,0 +1,313 @@
+# Hebrew translation for openobject-addons
+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR \n"
+" Click to setup a new automated action rule. \n"
+" \n"
+" Use automated actions to automatically trigger actions for\n"
+" various screens. Example: a lead created by a specific user "
+"may\n"
+" be automatically set to a specific sales team, or an\n"
+" opportunity which still has status pending after 14 days "
+"might\n"
+" trigger an automatic reminder email.\n"
+"
- Click to schedule a new meeting.
-
- The calendar is shared between employees and fully integrated with
- other applications such as the employee holidays or the business
- opportunities.
-
-
-
-
-
- Hello,
-
-
- You are invited for %(company)s Event.
-
-
-Below are the details of event. Hours and dates expressed in %(timezone)s time.
-
-
-
-
-
-
- %(name)s
-
-
-
-
-
-
-
-
-
-
- :
- %(start_date)s
-
-
- :
- %(end_date)s
-
-
- Description
- :
- %(description)s
-
-
-
-
- :
- %(location)s
-
-
-
-
- :
-
-
-
-
-
-
-"""
-
-class calendar_attendee(osv.osv):
- """
- Calendar Attendee Information
- """
- _name = 'calendar.attendee'
- _description = 'Attendee information'
- _rec_name = 'cutype'
-
- __attribute__ = {}
-
- def _get_address(self, name=None, email=None):
- """
- Gives email information in ical CAL-ADDRESS type format.
- @param name: name for CAL-ADDRESS value
- @param email: email address for CAL-ADDRESS value
- """
- if name and email:
- name += ':'
- return (name or '') + (email and ('MAILTO:' + email) or '')
-
- def _compute_data(self, cr, uid, ids, name, arg, context=None):
- """
- Compute data on function fields for attendee values.
- @param cr: the current row, from the database cursor
- @param uid: the current user's ID for security checks
- @param ids: list of calendar attendee's IDs
- @param name: name of field
- @param context: a standard dictionary for contextual values
- @return: dictionary of form {id: {'field Name': value'}}
- """
- name = name[0]
- result = {}
- for attdata in self.browse(cr, uid, ids, context=context):
- id = attdata.id
- result[id] = {}
- if name == 'sent_by':
- if not attdata.sent_by_uid:
- result[id][name] = ''
- continue
- else:
- result[id][name] = self._get_address(attdata.sent_by_uid.name, \
- attdata.sent_by_uid.email)
-
- if name == 'cn':
- if attdata.user_id:
- result[id][name] = attdata.user_id.name
- elif attdata.partner_id:
- result[id][name] = attdata.partner_id.name or False
- else:
- result[id][name] = attdata.email or ''
-
- if name == 'delegated_to':
- todata = []
- for child in attdata.child_ids:
- if child.email:
- todata.append('MAILTO:' + child.email)
- result[id][name] = ', '.join(todata)
-
- if name == 'delegated_from':
- fromdata = []
- for parent in attdata.parent_ids:
- if parent.email:
- fromdata.append('MAILTO:' + parent.email)
- result[id][name] = ', '.join(fromdata)
-
- if name == 'event_date':
- if attdata.ref:
- result[id][name] = attdata.ref.date
- else:
- result[id][name] = False
-
- if name == 'event_end_date':
- if attdata.ref:
- result[id][name] = attdata.ref.date_deadline
- else:
- result[id][name] = False
-
- if name == 'sent_by_uid':
- if attdata.ref:
- result[id][name] = (attdata.ref.user_id.id, attdata.ref.user_id.name)
- else:
- result[id][name] = uid
-
- if name == 'language':
- user_obj = self.pool.get('res.users')
- lang = user_obj.read(cr, uid, uid, ['lang'], context=context)['lang']
- result[id][name] = lang.replace('_', '-') if lang else False
-
- return result
-
- def _lang_get(self, cr, uid, context=None):
- """
- Get language for language selection field.
- @param cr: the current row, from the database cursor
- @param uid: the current user's id for security checks
- @param context: a standard dictionary for contextual values
- @return: list of dictionary which contain code and name and id
- """
- obj = self.pool.get('res.lang')
- ids = obj.search(cr, uid, [])
- res = obj.read(cr, uid, ids, ['code', 'name'], context=context)
- res = [((r['code']).replace('_', '-').lower(), r['name']) for r in res]
- return res
-
- _columns = {
- 'cutype': fields.selection([('individual', 'Individual'), \
- ('group', 'Group'), ('resource', 'Resource'), \
- ('room', 'Room'), ('unknown', 'Unknown') ], \
- 'Invite Type', help="Specify the type of Invitation"),
- 'member': fields.char('Member', size=124,
- help="Indicate the groups that the attendee belongs to"),
- 'role': fields.selection([('req-participant', 'Participation required'), \
- ('chair', 'Chair Person'), \
- ('opt-participant', 'Optional Participation'), \
- ('non-participant', 'For information Purpose')], 'Role', \
- help='Participation role for the calendar user'),
- 'state': fields.selection([('needs-action', 'Needs Action'),
- ('tentative', 'Uncertain'),
- ('declined', 'Declined'),
- ('accepted', 'Accepted'),
- ('delegated', 'Delegated')], 'Status', readonly=True, \
- help="Status of the attendee's participation"),
- 'rsvp': fields.boolean('Required Reply?',
- help="Indicats whether the favor of a reply is requested"),
- 'delegated_to': fields.function(_compute_data, \
- string='Delegated To', type="char", size=124, store=True, \
- multi='delegated_to', help="The users that the original \
-request was delegated to"),
- 'delegated_from': fields.function(_compute_data, string=\
- 'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
- 'parent_ids': fields.many2many('calendar.attendee', 'calendar_attendee_parent_rel', \
- 'attendee_id', 'parent_id', 'Delegrated From'),
- 'child_ids': fields.many2many('calendar.attendee', 'calendar_attendee_child_rel', \
- 'attendee_id', 'child_id', 'Delegrated To'),
- 'sent_by': fields.function(_compute_data, string='Sent By', \
- type="char", multi='sent_by', store=True, size=124, \
- help="Specify the user that is acting on behalf of the calendar user"),
- 'sent_by_uid': fields.function(_compute_data, string='Sent By User', \
- type="many2one", relation="res.users", multi='sent_by_uid'),
- 'cn': fields.function(_compute_data, string='Common name', \
- type="char", size=124, multi='cn', store=True),
- 'dir': fields.char('URI Reference', size=124, help="Reference to the URI\
-that points to the directory information corresponding to the attendee."),
- 'language': fields.function(_compute_data, string='Language', \
- type="selection", selection=_lang_get, multi='language', \
- store=True, help="To specify the language for text values in a\
-property or property parameter."),
- 'user_id': fields.many2one('res.users', 'User'),
- 'partner_id': fields.many2one('res.partner', 'Contact'),
- 'email': fields.char('Email', size=124, help="Email of Invited Person"),
- 'event_date': fields.function(_compute_data, string='Event Date', \
- type="datetime", multi='event_date'),
- 'event_end_date': fields.function(_compute_data, \
- string='Event End Date', type="datetime", \
- multi='event_end_date'),
- 'ref': fields.reference('Event Ref', selection=openerp.addons.base.res.res_request.referencable_models, size=128),
- 'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
- }
- _defaults = {
- 'state': 'needs-action',
- 'role': 'req-participant',
- 'rsvp': True,
- 'cutype': 'individual',
- }
-
-
- def copy(self, cr, uid, id, default=None, context=None):
- raise osv.except_osv(_('Warning!'), _('You cannot duplicate a calendar attendee.'))
-
- def onchange_partner_id(self, cr, uid, ids, partner_id,context=None):
- """
- Make entry on email and availbility on change of partner_id field.
- @param cr: the current row, from the database cursor
- @param uid: the current user's ID for security checks
- @param ids: list of calendar attendee's IDs
- @param partner_id: changed value of partner id
- @param context: a standard dictionary for contextual values
- @return: dictionary of values which put value in email and availability fields
- """
-
- if not partner_id:
- return {'value': {'email': ''}}
- partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
- return {'value': {'email': partner.email}}
-
- def get_ics_file(self, cr, uid, event_obj, context=None):
- """
- Returns iCalendar file for the event invitation.
- @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 event_obj: event object (browse record)
- @param context: a standard dictionary for contextual values
- @return: .ics file content
- """
- res = None
- def ics_datetime(idate, short=False):
- if idate:
- #returns the datetime as UTC, because it is stored as it in the database
- return datetime.strptime(idate, '%Y-%m-%d %H:%M:%S').replace(tzinfo=pytz.timezone('UTC'))
- return False
- try:
- # FIXME: why isn't this in CalDAV?
- import vobject
- except ImportError:
- return res
- cal = vobject.iCalendar()
- event = cal.add('vevent')
- if not event_obj.date_deadline or not event_obj.date:
- raise osv.except_osv(_('Warning!'),_("First you have to specify the date of the invitation."))
- event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S'))
- event.add('dtstart').value = ics_datetime(event_obj.date)
- event.add('dtend').value = ics_datetime(event_obj.date_deadline)
- event.add('summary').value = event_obj.name
- if event_obj.description:
- event.add('description').value = event_obj.description
- if event_obj.location:
- event.add('location').value = event_obj.location
- if event_obj.rrule:
- event.add('rrule').value = event_obj.rrule
-
- if event_obj.user_id or event_obj.organizer_id:
- event_org = event.add('organizer')
- organizer = event_obj.organizer_id
- if not organizer:
- organizer = event_obj.user_id
- event_org.params['CN'] = [organizer.name]
- event_org.value = 'MAILTO:' + (organizer.email or organizer.name)
-
- if event_obj.alarm_id:
- # computes alarm data
- valarm = event.add('valarm')
- alarm_object = self.pool.get('res.alarm')
- alarm_data = alarm_object.read(cr, uid, event_obj.alarm_id.id, context=context)
- # Compute trigger data
- interval = alarm_data['trigger_interval']
- occurs = alarm_data['trigger_occurs']
- duration = (occurs == 'after' and alarm_data['trigger_duration']) \
- or -(alarm_data['trigger_duration'])
- related = alarm_data['trigger_related']
- trigger = valarm.add('TRIGGER')
- trigger.params['related'] = [related.upper()]
- if interval == 'days':
- delta = timedelta(days=duration)
- if interval == 'hours':
- delta = timedelta(hours=duration)
- if interval == 'minutes':
- delta = timedelta(minutes=duration)
- trigger.value = delta
- # Compute other details
- valarm.add('DESCRIPTION').value = alarm_data['name'] or 'OpenERP'
-
- for attendee in event_obj.attendee_ids:
- attendee_add = event.add('attendee')
- attendee_add.params['CUTYPE'] = [str(attendee.cutype)]
- attendee_add.params['ROLE'] = [str(attendee.role)]
- attendee_add.params['RSVP'] = [str(attendee.rsvp)]
- attendee_add.value = 'MAILTO:' + (attendee.email or '')
- res = cal.serialize()
- return res
-
- def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context=None):
- """
- Send mail for event invitation to event attendees.
- @param email_from: email address for user sending the mail
- @return: True
- """
- company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.name
- for att in self.browse(cr, uid, ids, context=context):
- sign = att.sent_by_uid and att.sent_by_uid.signature or ''
- sign = '
-
- From:
-
-
- %(user)s
-
-
- --------------------------
-
-
- %(sign)s
-
'.join(sign and sign.split('\n') or [])
- res_obj = att.ref
- if res_obj:
- att_infos = []
- sub = res_obj.name
- other_invitation_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))])
-
- for att2 in self.browse(cr, uid, other_invitation_ids):
- att_infos.append(((att2.user_id and att2.user_id.name) or \
- (att2.partner_id and att2.partner_id.name) or \
- att2.email) + ' - Status: ' + att2.state.title())
- #dates and times are gonna be expressed in `tz` time (local timezone of the `uid`)
- tz = context.get('tz', pytz.timezone('UTC'))
- #res_obj.date and res_obj.date_deadline are in UTC in database so we use context_timestamp() to transform them in the `tz` timezone
- date_start = fields.datetime.context_timestamp(cr, uid, datetime.strptime(res_obj.date, tools.DEFAULT_SERVER_DATETIME_FORMAT), context=context)
- date_stop = False
- if res_obj.date_deadline:
- date_stop = fields.datetime.context_timestamp(cr, uid, datetime.strptime(res_obj.date_deadline, tools.DEFAULT_SERVER_DATETIME_FORMAT), context=context)
- body_vals = {'name': res_obj.name,
- 'start_date': date_start,
- 'end_date': date_stop,
- 'timezone': tz,
- 'description': res_obj.description or '-',
- 'location': res_obj.location or '-',
- 'attendees': '
'.join(att_infos),
- 'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
- 'sign': sign,
- 'company': company
- }
- body = html_invitation % body_vals
- if mail_to and email_from:
- ics_file = self.get_ics_file(cr, uid, res_obj, context=context)
- vals = {'email_from': email_from,
- 'email_to': mail_to,
- 'state': 'outgoing',
- 'subject': sub,
- 'body_html': body,
- 'auto_delete': True}
- if ics_file:
- vals['attachment_ids'] = [(0,0,{'name': 'invitation.ics',
- 'datas_fname': 'invitation.ics',
- 'datas': str(ics_file).encode('base64')})]
- self.pool.get('mail.mail').create(cr, uid, vals, context=context)
- 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.
- @param cr: the current row, from the database cursor
- @param uid: the current user's ID for security checks
- @param ids: list of calendar attendee's IDs
- @param user_id: changed value of User id
- @return: dictionary of values which put value in email and availability fields
- """
-
- if not user_id:
- return {'value': {'email': ''}}
- usr_obj = self.pool.get('res.users')
- user = usr_obj.browse(cr, uid, user_id, *args)
- return {'value': {'email': user.email, 'availability':user.availability}}
-
- def do_tentative(self, cr, uid, ids, context=None, *args):
- """
- Makes event invitation as Tentative.
- @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 calendar attendee's IDs
- @param *args: get Tupple value
- @param context: a standard dictionary for contextual values
- """
- return self.write(cr, uid, ids, {'state': 'tentative'}, context)
-
- def do_accept(self, cr, uid, ids, context=None, *args):
- """
- Marks event invitation as Accepted.
- @param cr: the current row, from the database cursor
- @param uid: the current user's ID for security checks
- @param ids: list of calendar attendee's IDs
- @param context: a standard dictionary for contextual values
- @return: True
- """
- if context is None:
- context = {}
-
- return self.write(cr, uid, ids, {'state': 'accepted'}, context)
-
- def do_decline(self, cr, uid, ids, context=None, *args):
- """
- Marks event invitation as Declined.
- @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 calendar attendee's IDs
- @param *args: get Tupple value
- @param context: a standard dictionary for contextual values
- """
- if context is None:
- context = {}
- return self.write(cr, uid, ids, {'state': 'declined'}, context)
-
- def create(self, cr, uid, vals, context=None):
- """
- Overrides orm create method.
- @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 vals: get Values
- @param context: a standard dictionary for contextual values
- """
- if context is None:
- context = {}
- if not vals.get("email") and vals.get("cn"):
- cnval = vals.get("cn").split(':')
- email = filter(lambda x:x.__contains__('@'), cnval)
- vals['email'] = email and email[0] or ''
- vals['cn'] = vals.get("cn")
- res = super(calendar_attendee, self).create(cr, uid, vals, context=context)
- return res
-
-
-class res_alarm(osv.osv):
- """Resource Alarm """
- _name = 'res.alarm'
- _description = 'Basic Alarm Information'
-
- _columns = {
- 'name':fields.char('Name', size=256, required=True),
- 'trigger_occurs': fields.selection([('before', 'Before'), \
- ('after', 'After')], \
- 'Triggers', required=True),
- 'trigger_interval': fields.selection([('minutes', 'Minutes'), \
- ('hours', 'Hours'), \
- ('days', 'Days')], 'Interval', \
- required=True),
- 'trigger_duration': fields.integer('Duration', required=True),
- 'trigger_related': fields.selection([('start', 'The event starts'), \
- ('end', 'The event ends')], \
- 'Related to', required=True),
- 'duration': fields.integer('Duration', help="""Duration' and 'Repeat' \
-are both optional, but if one occurs, so MUST the other"""),
- 'repeat': fields.integer('Repeat'),
- 'active': fields.boolean('Active', help="If the active field is set to \
-true, it will allow you to hide the event alarm information without removing it.")
- }
- _defaults = {
- 'trigger_interval': 'minutes',
- 'trigger_duration': 5,
- 'trigger_occurs': 'before',
- 'trigger_related': 'start',
- 'active': 1,
- }
-
- def do_alarm_create(self, cr, uid, ids, model, date, context=None):
- """
- Create Alarm for event.
- @param cr: the current row, from the database cursor,
- @param uid: the current user's ID for security checks,
- @param ids: List of res alarm's IDs.
- @param model: Model name.
- @param date: Event date
- @param context: A standard dictionary for contextual values
- @return: True
- """
- if context is None:
- context = {}
- alarm_obj = self.pool.get('calendar.alarm')
- res_alarm_obj = self.pool.get('res.alarm')
- ir_obj = self.pool.get('ir.model')
- model_id = ir_obj.search(cr, uid, [('model', '=', model)])[0]
-
- model_obj = self.pool[model]
- for data in model_obj.browse(cr, uid, ids, context=context):
-
- basic_alarm = data.alarm_id
- cal_alarm = data.base_calendar_alarm_id
- if (not basic_alarm and cal_alarm) or (basic_alarm and cal_alarm):
- new_res_alarm = None
- # Find for existing res.alarm
- duration = cal_alarm.trigger_duration
- interval = cal_alarm.trigger_interval
- occurs = cal_alarm.trigger_occurs
- related = cal_alarm.trigger_related
- domain = [('trigger_duration', '=', duration), ('trigger_interval', '=', interval), ('trigger_occurs', '=', occurs), ('trigger_related', '=', related)]
- alarm_ids = res_alarm_obj.search(cr, uid, domain, context=context)
- if not alarm_ids:
- val = {
- 'trigger_duration': duration,
- 'trigger_interval': interval,
- 'trigger_occurs': occurs,
- 'trigger_related': related,
- 'name': str(duration) + ' ' + str(interval) + ' ' + str(occurs)
- }
- new_res_alarm = res_alarm_obj.create(cr, uid, val, context=context)
- else:
- new_res_alarm = alarm_ids[0]
- cr.execute('UPDATE %s ' % model_obj._table + \
- ' SET base_calendar_alarm_id=%s, alarm_id=%s ' \
- ' WHERE id=%s',
- (cal_alarm.id, new_res_alarm, data.id))
-
- self.do_alarm_unlink(cr, uid, [data.id], model)
- if basic_alarm:
- vals = {
- 'action': 'display',
- 'description': data.description,
- 'name': data.name,
- 'attendee_ids': [(6, 0, map(lambda x:x.id, data.attendee_ids))],
- 'trigger_related': basic_alarm.trigger_related,
- 'trigger_duration': basic_alarm.trigger_duration,
- 'trigger_occurs': basic_alarm.trigger_occurs,
- 'trigger_interval': basic_alarm.trigger_interval,
- 'duration': basic_alarm.duration,
- 'repeat': basic_alarm.repeat,
- 'state': 'run',
- 'event_date': data[date],
- 'res_id': data.id,
- 'model_id': model_id,
- 'user_id': uid
- }
- alarm_id = alarm_obj.create(cr, uid, vals)
- cr.execute('UPDATE %s ' % model_obj._table + \
- ' SET base_calendar_alarm_id=%s, alarm_id=%s '
- ' WHERE id=%s', \
- ( alarm_id, basic_alarm.id, data.id) )
- return True
-
- def do_alarm_unlink(self, cr, uid, ids, model, context=None):
- """
- Delete alarm specified in ids
- @param cr: the current row, from the database cursor,
- @param uid: the current user's ID for security checks,
- @param ids: List of res alarm's IDs.
- @param model: Model name for which alarm is to be cleared.
- @return: True
- """
- if context is None:
- context = {}
- alarm_obj = self.pool.get('calendar.alarm')
- ir_obj = self.pool.get('ir.model')
- model_id = ir_obj.search(cr, uid, [('model', '=', model)])[0]
- model_obj = self.pool[model]
- for data in model_obj.browse(cr, uid, ids, context=context):
- alarm_ids = alarm_obj.search(cr, uid, [('model_id', '=', model_id), ('res_id', '=', data.id)])
- if alarm_ids:
- alarm_obj.unlink(cr, uid, alarm_ids)
- cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\
- where id=%%s' % model_obj._table,(data.id,))
- return True
-
-
-class calendar_alarm(osv.osv):
- _name = 'calendar.alarm'
- _description = 'Event alarm information'
- _inherit = 'res.alarm'
- __attribute__ = {}
-
- _columns = {
- 'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
- 'name': fields.char('Summary', size=124, help="""Contains the text to be \
- used as the message subject for email \
- or contains the text to be used for display"""),
- 'action': fields.selection([('audio', 'Audio'), ('display', 'Display'), \
- ('procedure', 'Procedure'), ('email', 'Email') ], 'Action', \
- required=True, help="Defines the action to be invoked when an alarm is triggered"),
- 'description': fields.text('Description', help='Provides a more complete \
- description of the calendar component, than that \
- provided by the "SUMMARY" property'),
- 'attendee_ids': fields.many2many('calendar.attendee', 'alarm_attendee_rel', \
- 'alarm_id', 'attendee_id', 'Attendees', readonly=True),
- 'attach': fields.binary('Attachment', help="""* Points to a sound resource,\
- which is rendered when the alarm is triggered for audio,
- * File which is intended to be sent as message attachments for email,
- * Points to a procedure resource, which is invoked when\
- the alarm is triggered for procedure."""),
- 'res_id': fields.integer('Resource ID'),
- 'model_id': fields.many2one('ir.model', 'Model'),
- 'user_id': fields.many2one('res.users', 'Owner'),
- 'event_date': fields.datetime('Event Date'),
- 'event_end_date': fields.datetime('Event End Date'),
- 'trigger_date': fields.datetime('Trigger Date', readonly="True"),
- 'state':fields.selection([
- ('draft', 'Draft'),
- ('run', 'Run'),
- ('stop', 'Stop'),
- ('done', 'Done'),
- ], 'Status', select=True, readonly=True),
- }
-
- _defaults = {
- 'action': 'email',
- 'state': 'run',
- }
-
- def create(self, cr, uid, vals, context=None):
- """
- Overrides orm create method.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param vals: dictionary of fields value.{'name_of_the_field': value, ...}
- @param context: A standard dictionary for contextual values
- @return: new record id for calendar_alarm.
- """
- if context is None:
- context = {}
- event_date = vals.get('event_date', False)
- if event_date:
- dtstart = datetime.strptime(vals['event_date'], "%Y-%m-%d %H:%M:%S")
- if vals['trigger_interval'] == 'days':
- delta = timedelta(days=vals['trigger_duration'])
- if vals['trigger_interval'] == 'hours':
- delta = timedelta(hours=vals['trigger_duration'])
- if vals['trigger_interval'] == 'minutes':
- delta = timedelta(minutes=vals['trigger_duration'])
- trigger_date = dtstart + (vals['trigger_occurs'] == 'after' and delta or -delta)
- vals['trigger_date'] = trigger_date
- res = super(calendar_alarm, self).create(cr, uid, vals, context=context)
- return res
-
- def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, \
- context=None):
- """Scheduler for event reminder
- @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 calendar alarm's IDs.
- @param use_new_cursor: False or the dbname
- @param context: A standard dictionary for contextual values
- """
- if context is None:
- context = {}
- current_datetime = datetime.now()
- alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context)
-
- mail_to = ""
-
- for alarm in self.browse(cr, uid, alarm_ids, context=context):
- next_trigger_date = None
- update_vals = {}
- model_obj = self.pool[alarm.model_id.model]
- res_obj = model_obj.browse(cr, uid, alarm.res_id, context=context)
- re_dates = []
-
- if hasattr(res_obj, 'rrule') and res_obj.rrule:
- event_date = datetime.strptime(res_obj.date, '%Y-%m-%d %H:%M:%S')
- #exdate is a string and we need a list
- exdate = res_obj.exdate and res_obj.exdate.split(',') or []
- recurrent_dates = get_recurrent_dates(res_obj.rrule, exdate, event_date, res_obj.exrule)
-
- trigger_interval = alarm.trigger_interval
- if trigger_interval == 'days':
- delta = timedelta(days=alarm.trigger_duration)
- if trigger_interval == 'hours':
- delta = timedelta(hours=alarm.trigger_duration)
- if trigger_interval == 'minutes':
- delta = timedelta(minutes=alarm.trigger_duration)
- delta = alarm.trigger_occurs == 'after' and delta or -delta
-
- for rdate in recurrent_dates:
- if rdate + delta > current_datetime:
- break
- if rdate + delta <= current_datetime:
- re_dates.append(rdate.strftime("%Y-%m-%d %H:%M:%S"))
- rest_dates = recurrent_dates[len(re_dates):]
- next_trigger_date = rest_dates and rest_dates[0] or None
-
- else:
- re_dates = [alarm.trigger_date]
-
- if re_dates:
- if alarm.action == 'email':
- sub = '[OpenERP Reminder] %s' % (alarm.name)
- body = """
-Event: %s
-Event Date: %s
-Description: %s
-
-From:
- %s
-
-----
-%s
-
-""" % (alarm.name, alarm.trigger_date, alarm.description, \
- alarm.user_id.name, alarm.user_id.signature)
- mail_to = alarm.user_id.email
- for att in alarm.attendee_ids:
- mail_to = mail_to + " " + att.user_id.email
- if mail_to:
- vals = {
- 'state': 'outgoing',
- 'subject': sub,
- 'body_html': body,
- 'email_to': mail_to,
- 'email_from': tools.config.get('email_from', mail_to),
- }
- self.pool.get('mail.mail').create(cr, uid, vals, context=context)
- if next_trigger_date:
- update_vals.update({'trigger_date': next_trigger_date})
- else:
- update_vals.update({'state': 'done'})
- self.write(cr, uid, [alarm.id], update_vals)
- return True
-
-
-
-class calendar_event(osv.osv):
- _name = "calendar.event"
- _description = "Calendar Event"
- __attribute__ = {}
-
- def _tz_get(self, cr, uid, context=None):
- return [(x.lower(), x) for x in pytz.all_timezones]
-
- def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context=None):
- """Returns duration and/or end date based on values passed
- @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 calendar event's IDs.
- @param start_date: Starting date
- @param duration: Duration between start date and end date
- @param end_date: Ending Datee
- @param context: A standard dictionary for contextual values
- """
- if context is None:
- context = {}
-
- value = {}
- if not start_date:
- return value
- if not end_date and not duration:
- duration = 1.00
- value['duration'] = duration
-
- start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
- if allday: # For all day event
- duration = 24.0
- value['duration'] = duration
- # change start_date's time to 00:00:00 in the user's timezone
- user = self.pool.get('res.users').browse(cr, uid, uid)
- tz = pytz.timezone(user.tz) if user.tz else pytz.utc
- start = pytz.utc.localize(start).astimezone(tz) # convert start in user's timezone
- start = start.replace(hour=0, minute=0, second=0) # change start's time to 00:00:00
- start = start.astimezone(pytz.utc) # convert start back to utc
- start_date = start.strftime("%Y-%m-%d %H:%M:%S")
- value['date'] = start_date
-
- if end_date and not duration:
- end = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S")
- diff = end - start
- duration = float(diff.days)* 24 + (float(diff.seconds) / 3600)
- value['duration'] = round(duration, 2)
- elif not end_date:
- end = start + timedelta(hours=duration)
- value['date_deadline'] = end.strftime("%Y-%m-%d %H:%M:%S")
- elif end_date and duration and not allday:
- # we have both, keep them synchronized:
- # set duration based on end_date (arbitrary decision: this avoid
- # getting dates like 06:31:48 instead of 06:32:00)
- end = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S")
- diff = end - start
- duration = float(diff.days)* 24 + (float(diff.seconds) / 3600)
- value['duration'] = round(duration, 2)
-
- return {'value': value}
-
- def unlink_events(self, cr, uid, ids, context=None):
- """
- This function deletes event which are linked with the event with recurrent_id
- (Removes the events which refers to the same UID value)
- """
- if context is None:
- context = {}
- for event_id in ids:
- cr.execute("select id from %s where recurrent_id=%%s" % (self._table), (event_id,))
- r_ids = map(lambda x: x[0], cr.fetchall())
- self.unlink(cr, uid, r_ids, context=context)
- return True
-
- def _get_rulestring(self, cr, uid, ids, name, arg, context=None):
- """
- Gets Recurrence rule string according to value type RECUR of iCalendar from the values given.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param id: List of calendar event's ids.
- @param context: A standard dictionary for contextual values
- @return: dictionary of rrule value.
- """
-
- result = {}
- if not isinstance(ids, list):
- ids = [ids]
-
- for id in ids:
- #read these fields as SUPERUSER because if the record is private a normal search could return False and raise an error
- data = self.read(cr, SUPERUSER_ID, id, ['interval', 'count'], context=context)
- if data.get('interval', 0) < 0:
- raise osv.except_osv(_('Warning!'), _('Interval cannot be negative.'))
- if data.get('count', 0) <= 0:
- raise osv.except_osv(_('Warning!'), _('Count cannot be negative or 0.'))
- data = self.read(cr, uid, id, ['id','byday','recurrency', 'month_list','end_date', 'rrule_type', 'select1', 'interval', 'count', 'end_type', 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su', 'exrule', 'day', 'week_list' ], context=context)
- event = data['id']
- if data['recurrency']:
- result[event] = self.compute_rule_string(data)
- else:
- result[event] = ""
- return result
-
- def _rrule_write(self, obj, cr, uid, ids, field_name, field_value, args, context=None):
- data = self._get_empty_rrule_data()
- if field_value:
- data['recurrency'] = True
- for event in self.browse(cr, uid, ids, context=context):
- rdate = rule_date or event.date
- update_data = self._parse_rrule(field_value, dict(data), rdate)
- data.update(update_data)
- super(calendar_event, obj).write(cr, uid, ids, data, context=context)
- return True
-
- _columns = {
- 'id': fields.integer('ID', readonly=True),
- 'sequence': fields.integer('Sequence'),
- 'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}),
- 'date': fields.datetime('Date', states={'done': [('readonly', True)]}, required=True,),
- 'date_deadline': fields.datetime('End Date', states={'done': [('readonly', True)]}, required=True,),
- 'create_date': fields.datetime('Created', readonly=True),
- 'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
- 'description': fields.text('Description', states={'done': [('readonly', True)]}),
- 'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
- ('confidential', 'Public for Employees')], 'Privacy', states={'done': [('readonly', True)]}),
- 'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
- 'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
- 'Show Time as', states={'done': [('readonly', True)]}),
- 'base_calendar_url': fields.char('Caldav URL', size=264),
- 'state': fields.selection([
- ('tentative', 'Uncertain'),
- ('cancelled', 'Cancelled'),
- ('confirmed', 'Confirmed'),
- ], 'Status', readonly=True),
- 'exdate': fields.text('Exception Date/Times', help="This property \
-defines the list of date/time exceptions for a recurring calendar component."),
- 'exrule': fields.char('Exception Rule', size=352, help="Defines a \
-rule or repeating pattern of time to exclude from the recurring rule."),
- 'rrule': fields.function(_get_rulestring, type='char', size=124, \
- fnct_inv=_rrule_write, store=True, string='Recurrent Rule'),
- 'rrule_type': fields.selection([
- ('daily', 'Day(s)'),
- ('weekly', 'Week(s)'),
- ('monthly', 'Month(s)'),
- ('yearly', 'Year(s)')
- ], 'Recurrency', states={'done': [('readonly', True)]},
- help="Let the event automatically repeat at that interval"),
- 'alarm_id': fields.many2one('res.alarm', 'Reminder', states={'done': [('readonly', True)]},
- help="Set an alarm at this time, before the event occurs" ),
- 'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
- 'recurrent_id': fields.integer('Recurrent ID'),
- 'recurrent_id_date': fields.datetime('Recurrent ID date'),
- 'vtimezone': fields.selection(_tz_get, size=64, string='Timezone'),
- 'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
- 'organizer': fields.char("Organizer (deprecated)", size=256, states={'done': [('readonly', True)]},
- deprecated='Will be removed with OpenERP v8; use organizer_id field instead'), # Map with organizer attribute of VEvent.
- 'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
- 'end_type' : fields.selection([('count', 'Number of repetitions'), ('end_date','End date')], 'Recurrence Termination'),
- 'interval': fields.integer('Repeat Every', help="Repeat every (Days/Week/Month/Year)"),
- 'count': fields.integer('Repeat', help="Repeat x times"),
- 'mo': fields.boolean('Mon'),
- 'tu': fields.boolean('Tue'),
- 'we': fields.boolean('Wed'),
- 'th': fields.boolean('Thu'),
- 'fr': fields.boolean('Fri'),
- 'sa': fields.boolean('Sat'),
- 'su': fields.boolean('Sun'),
- 'select1': fields.selection([('date', 'Date of month'),
- ('day', 'Day of month')], 'Option'),
- 'day': fields.integer('Date of month'),
- 'week_list': fields.selection([
- ('MO', 'Monday'),
- ('TU', 'Tuesday'),
- ('WE', 'Wednesday'),
- ('TH', 'Thursday'),
- ('FR', 'Friday'),
- ('SA', 'Saturday'),
- ('SU', 'Sunday')], 'Weekday'),
- 'byday': fields.selection([
- ('1', 'First'),
- ('2', 'Second'),
- ('3', 'Third'),
- ('4', 'Fourth'),
- ('5', 'Fifth'),
- ('-1', 'Last')], 'By day'),
- 'month_list': fields.selection(months.items(), 'Month'),
- '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', states={'done': [('readonly', True)]}),
- 'active': fields.boolean('Active', help="If the active field is set to \
- true, it will allow you to hide the event alarm information without removing it."),
- 'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"),
- 'partner_ids': fields.many2many('res.partner', string='Attendees', states={'done': [('readonly', True)]}),
- }
-
- def create_attendees(self, cr, uid, ids, context):
- att_obj = self.pool.get('calendar.attendee')
- user_obj = self.pool.get('res.users')
- current_user = user_obj.browse(cr, uid, uid, context=context)
- for event in self.browse(cr, uid, ids, context):
- attendees = {}
- for att in event.attendee_ids:
- attendees[att.partner_id.id] = True
- new_attendees = []
- mail_to = ""
- for partner in event.partner_ids:
- if partner.id in attendees:
- continue
- local_context = context.copy()
- local_context.pop('default_state', None)
- att_id = self.pool.get('calendar.attendee').create(cr, uid, {
- 'partner_id': partner.id,
- 'user_id': partner.user_ids and partner.user_ids[0].id or False,
- 'ref': self._name+','+str(event.id),
- 'email': partner.email
- }, context=local_context)
- if partner.email:
- mail_to = mail_to + " " + partner.email
- self.write(cr, uid, [event.id], {
- 'attendee_ids': [(4, att_id)]
- }, context=context)
- new_attendees.append(att_id)
-
- if mail_to and current_user.email:
- att_obj._send_mail(cr, uid, new_attendees, mail_to,
- email_from = current_user.email, context=context)
- return True
-
- def default_organizer(self, cr, uid, context=None):
- """
- .. deprecated:: 8.0
- Use organizer_id field and its default value instead.
- """
- user_pool = self.pool.get('res.users')
- user = user_pool.browse(cr, uid, uid, context=context)
- res = user.name
- if user.email:
- res += " <%s>" %(user.email)
- return res
-
- _defaults = {
- 'end_type': 'count',
- 'count': 1,
- 'rrule_type': False,
- 'state': 'tentative',
- 'class': 'public',
- 'show_as': 'busy',
- 'select1': 'date',
- 'interval': 1,
- 'active': 1,
- 'user_id': lambda self, cr, uid, ctx: uid,
- }
-
- def _check_closing_date(self, cr, uid, ids, context=None):
- for event in self.browse(cr, uid, ids, context=context):
- if event.date_deadline < event.date:
- return False
- return True
-
- _constraints = [
- (_check_closing_date, 'Error ! End date cannot be set before start date.', ['date_deadline']),
- ]
-
- def get_recurrent_ids(self, cr, uid, select, domain, limit=100, context=None):
- """Gives virtual event ids for recurring events based on value of Recurrence Rule
- This method gives ids of dates that comes between start date and end date of calendar views
- @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 limit: The Number of Results to Return """
- if not context:
- context = {}
-
- result = []
- for data in super(calendar_event, self).read(cr, uid, select, ['rrule', 'recurrency', 'exdate', 'exrule', 'date'], context=context):
- if not data['recurrency'] or not data['rrule']:
- result.append(data['id'])
- continue
- event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
-
- # TOCHECK: the start date should be replaced by event date; the event date will be changed by that of calendar code
-
- if not data['rrule']:
- continue
-
- exdate = data['exdate'] and data['exdate'].split(',') or []
- rrule_str = data['rrule']
- new_rrule_str = []
- rrule_until_date = False
- is_until = False
- for rule in rrule_str.split(';'):
- name, value = rule.split('=')
- if name == "UNTIL":
- is_until = True
- value = parser.parse(value)
- rrule_until_date = parser.parse(value.strftime("%Y-%m-%d %H:%M:%S"))
- value = value.strftime("%Y%m%d%H%M%S")
- new_rule = '%s=%s' % (name, value)
- new_rrule_str.append(new_rule)
- new_rrule_str = ';'.join(new_rrule_str)
- rdates = get_recurrent_dates(str(new_rrule_str), exdate, event_date, data['exrule'])
- for r_date in rdates:
- # fix domain evaluation
- # step 1: check date and replace expression by True or False, replace other expressions by True
- # step 2: evaluation of & and |
- # check if there are one False
- pile = []
- for arg in domain:
- if str(arg[0]) in (str('date'), str('date_deadline')):
- if (arg[1] == '='):
- ok = r_date.strftime('%Y-%m-%d')==arg[2]
- if (arg[1] == '>'):
- ok = r_date.strftime('%Y-%m-%d')>arg[2]
- if (arg[1] == '<'):
- ok = r_date.strftime('%Y-%m-%d')
+ Once installed, you can configure your API credentials for "Google calendar" +
+\n" +" Your personal dashboard is empty.\n" +"
\n" +" To add your first report into this dashboard, go to any\n" +" menu, switch to list or graph view, and click 'Add " +"to\n" +" Dashboard' in the extended search options.\n" +"
\n" +" You can filter and group data before inserting into the\n" +" dashboard using the search options.\n" +"
\n" +"${object.event_id.user_id.partner_id.name} invited you for the ${object.event_id.name} meeting of ${object.event_id.user_id.company_id.name}.
+|
+ ${object.event_id.get_interval(object.event_id.date, 'dayname')}
+
+ ${object.event_id.get_interval(object.event_id.date,'day')}
+
+ ${object.event_id.get_interval(object.event_id.date, 'month')}
+ ${object.event_id.get_interval(object.event_id.date, 'time')}
+ |
+
+
|
+ ||||||||||||||