diff --git a/addons/account_accountant/i18n/zh_CN.po b/addons/account_accountant/i18n/zh_CN.po index 5ab0e7f6b34..3dfcf883c39 100644 --- a/addons/account_accountant/i18n/zh_CN.po +++ b/addons/account_accountant/i18n/zh_CN.po @@ -8,14 +8,14 @@ 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: 2010-12-21 15:14+0000\n" -"Last-Translator: Wei \"oldrev\" Li \n" +"PO-Revision-Date: 2011-04-12 03:56+0000\n" +"Last-Translator: Black Jack \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-15 05:56+0000\n" -"X-Generator: Launchpad (build 12177)\n" +"X-Launchpad-Export-Date: 2011-04-13 04:40+0000\n" +"X-Generator: Launchpad (build 12735)\n" #. module: account_accountant #: model:ir.module.module,description:account_accountant.module_meta_information @@ -26,6 +26,9 @@ msgid "" "items and the chart of accounts.\n" " " msgstr "" +"\n" +"这模块给管理员设定所有的会计要素如:凭证簿项科目表\n" +" " #. module: account_accountant #: model:ir.module.module,shortdesc:account_accountant.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/zh_CN.po b/addons/account_analytic_analysis/i18n/zh_CN.po index aaf02e0a84c..9afc132483a 100644 --- a/addons/account_analytic_analysis/i18n/zh_CN.po +++ b/addons/account_analytic_analysis/i18n/zh_CN.po @@ -7,26 +7,26 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2010-12-20 08:39+0000\n" -"Last-Translator: Wei \"oldrev\" Li \n" +"PO-Revision-Date: 2011-04-12 18:24+0000\n" +"Last-Translator: Black Jack \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-15 05:32+0000\n" -"X-Generator: Launchpad (build 12177)\n" +"X-Launchpad-Export-Date: 2011-04-13 04:39+0000\n" +"X-Generator: Launchpad (build 12735)\n" #. module: account_analytic_analysis #: help:account.analytic.account,hours_qtt_invoiced:0 msgid "" "Number of hours that can be invoiced plus those that already have been " "invoiced." -msgstr "小时数能加在已开的发票上" +msgstr "小时数能开票,加到已开的发票上." #. module: account_analytic_analysis #: help:account.analytic.account,remaining_ca:0 msgid "Computed using the formula: Max Invoice Price - Invoiced Amount." -msgstr "计算公式为:最高发票价格 - 已开票金额" +msgstr "计算公式为:最大发票价格 - 已开票金额" #. module: account_analytic_analysis #: help:account.analytic.account,remaining_hours:0 @@ -56,6 +56,10 @@ msgid "" "You can also view the report of account analytic summary\n" "user-wise as well as month wise.\n" msgstr "" +"\n" +"此模块在分析会计视图为公司的项目经理显示重要的数据,增加菜单为管理者显示有关信息。\n" +"\n" +"你可以查看会计分析报表如:用户- wise 或月度-wise\n" #. module: account_analytic_analysis #: field:account.analytic.account,last_invoice_date:0 @@ -75,7 +79,7 @@ msgstr "实际利润(%)" #. module: account_analytic_analysis #: field:account.analytic.account,ca_theorical:0 msgid "Theoretical Revenue" -msgstr "" +msgstr "理论收入" #. module: account_analytic_analysis #: help:account.analytic.account,last_worked_invoiced_date:0 @@ -87,12 +91,12 @@ msgstr "如果发票来自费用, 这是最近工作日期或已开票的费用" #. module: account_analytic_analysis #: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing msgid "Billing" -msgstr "" +msgstr "收费" #. module: account_analytic_analysis #: field:account.analytic.account,last_worked_date:0 msgid "Date of Last Cost/Work" -msgstr "费用或工作的最近日期" +msgstr "最近日期的工作成本" #. module: account_analytic_analysis #: field:account.analytic.account,total_cost:0 @@ -104,17 +108,17 @@ msgstr "总成本" msgid "" "Number of hours you spent on the analytic account (from timesheet). It " "computes on all journal of type 'general'." -msgstr "在辅助核算项目你花费的小时数(根据时间表). 它在所有类型为普通的记录集合里计算." +msgstr "在分析会计中你花费的小时数(根据时间表). 它在计算所有类型为'普通的'凭证簿." #. module: account_analytic_analysis #: field:account.analytic.account,remaining_hours:0 msgid "Remaining Hours" -msgstr "剩余的小时数" +msgstr "剩余小时数" #. module: account_analytic_analysis #: field:account.analytic.account,theorical_margin:0 msgid "Theoretical Margin" -msgstr "" +msgstr "理论的差额" #. module: account_analytic_analysis #: help:account.analytic.account,ca_theorical:0 @@ -122,7 +126,7 @@ 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 "如果所有这些成本开发票按普通销售价目表.你项目的成本,将按这计算收入." +msgstr "如果所有成本按正常的销售价格开票那这项目的成本基于未来的收入." #. module: account_analytic_analysis #: field:account.analytic.account,user_ids:0 diff --git a/addons/account_anglo_saxon/i18n/zh_CN.po b/addons/account_anglo_saxon/i18n/zh_CN.po index ed27c3bc4ca..6c076ea88e4 100644 --- a/addons/account_anglo_saxon/i18n/zh_CN.po +++ b/addons/account_anglo_saxon/i18n/zh_CN.po @@ -8,14 +8,14 @@ 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: 2010-07-13 08:42+0000\n" -"Last-Translator: Black Jack \n" +"PO-Revision-Date: 2011-04-12 17:30+0000\n" +"Last-Translator: Black Jack \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-15 05:50+0000\n" -"X-Generator: Launchpad (build 12177)\n" +"X-Launchpad-Export-Date: 2011-04-13 04:39+0000\n" +"X-Generator: Launchpad (build 12735)\n" #. module: account_anglo_saxon #: view:product.category:0 @@ -25,43 +25,43 @@ msgstr " 会计属性" #. module: account_anglo_saxon #: sql_constraint:purchase.order:0 msgid "Order Reference must be unique !" -msgstr "" +msgstr "单号必须唯一!" #. module: account_anglo_saxon #: constraint:product.category:0 msgid "Error ! You can not create recursive categories." -msgstr "" +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 "" +msgstr "错误:默认的计量单位和采购的计量单位必须是同一类型." #. module: account_anglo_saxon #: model:ir.model,name:account_anglo_saxon.model_account_invoice_line msgid "Invoice Line" -msgstr "" +msgstr "发票明细" #. module: account_anglo_saxon #: model:ir.model,name:account_anglo_saxon.model_purchase_order msgid "Purchase Order" -msgstr "" +msgstr "采购订单" #. module: account_anglo_saxon #: model:ir.model,name:account_anglo_saxon.model_product_template msgid "Product Template" -msgstr "" +msgstr "产品模板" #. module: account_anglo_saxon #: model:ir.model,name:account_anglo_saxon.model_product_category msgid "Product Category" -msgstr "" +msgstr "产品类型" #. module: account_anglo_saxon #: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information msgid "Stock Accounting for Anglo Saxon countries" -msgstr "" +msgstr "新美国模式的库存会计" #. module: account_anglo_saxon #: field:product.category,property_account_creditor_price_difference_categ:0 @@ -72,12 +72,12 @@ msgstr "价格差异科目" #. module: account_anglo_saxon #: model:ir.model,name:account_anglo_saxon.model_account_invoice msgid "Invoice" -msgstr "" +msgstr "发票" #. module: account_anglo_saxon #: model:ir.model,name:account_anglo_saxon.model_stock_picking msgid "Picking List" -msgstr "" +msgstr "分拣单" #. module: account_anglo_saxon #: model:ir.module.module,description:account_anglo_saxon.module_meta_information @@ -97,6 +97,11 @@ msgid "" " Secondly, price differences between actual purchase price and fixed " "product standard price are booked on a separate account" msgstr "" +"此模块支持按新美国会计模式更改会计逻辑和库存运作.\n" +"新美国会计模式和欧洲大陆会计模式的不同在货物销售成本对应的销售成本不同.\n" +"新美国会计模式的成本在在创建销售发票是完成,欧洲大陆会计模式的成本含货物运送成本.\n" +"这模块通过使用一个临时性的科目来增加这功能.货物运输时的库存价值将保存在这临时科目,当创建发票时这金额将转借方或贷方科目.\n" +"其次实际价格和固定的标准价格的差异价格保存在一个独立的科目." #. module: account_anglo_saxon #: help:product.category,property_account_creditor_price_difference_categ:0 @@ -104,7 +109,7 @@ msgstr "" msgid "" "This account will be used to value price difference between purchase price " "and cost price." -msgstr "这科目将用于在采购价格和销售价格之间的价格差异" +msgstr "这科目将用于采购价格和成本价格之间的差异" #~ msgid "Invalid XML for View Architecture!" #~ msgstr "无效XML视图结构!" diff --git a/addons/account_cancel/i18n/zh_CN.po b/addons/account_cancel/i18n/zh_CN.po new file mode 100644 index 00000000000..6182c00f6ea --- /dev/null +++ b/addons/account_cancel/i18n/zh_CN.po @@ -0,0 +1,35 @@ +# Chinese (Simplified) translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +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: 2011-04-12 12:51+0000\n" +"Last-Translator: Black Jack \n" +"Language-Team: Chinese (Simplified) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-04-13 04:39+0000\n" +"X-Generator: Launchpad (build 12735)\n" + +#. module: account_cancel +#: model:ir.module.module,description:account_cancel.module_meta_information +msgid "" +"\n" +" Module adds 'Allow cancelling entries' field on form view of account " +"journal. If set to true it allows user to cancel entries & invoices.\n" +" " +msgstr "" +"\n" +" 此模块在凭证簿界面增加了一个“允许作废”的字段。如勾选了此选项,这个凭证簿的会计凭证或发票允许作废。\n" +" " + +#. module: account_cancel +#: model:ir.module.module,shortdesc:account_cancel.module_meta_information +msgid "Account Cancel" +msgstr "作废" diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index ee458ca0076..39ffeb70eed 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -205,7 +205,7 @@ class account_analytic_account(osv.osv): def check_recursion(self, cr, uid, ids, parent=None): return super(account_analytic_account, self)._check_recursion(cr, uid, ids, parent=parent) - _order = 'date_start desc,parent_id desc,code' + _order = 'name asc' _constraints = [ (check_recursion, 'Error! You can not create recursive analytic accounts.', ['parent_id']), ] diff --git a/addons/anonymization/i18n/ca.po b/addons/anonymization/i18n/ca.po new file mode 100644 index 00000000000..5ea0c6cc031 --- /dev/null +++ b/addons/anonymization/i18n/ca.po @@ -0,0 +1,226 @@ +# Catalan translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +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: 2011-04-09 18:26+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-04-10 04:49+0000\n" +"X-Generator: Launchpad (build 12735)\n" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard +msgid "ir.model.fields.anonymize.wizard" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization,field_name:0 +msgid "Field Name" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization,field_id:0 +msgid "Field" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,state:0 +#: field:ir.model.fields.anonymize.wizard,state:0 +msgid "State" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,file_import:0 +msgid "Import" +msgstr "" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization +msgid "ir.model.fields.anonymization" +msgstr "" + +#. module: anonymization +#: model:ir.module.module,shortdesc:anonymization.module_meta_information +msgid "Database anonymization module" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,direction:0 +msgid "Direction" +msgstr "" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree +#: view:ir.model.fields.anonymization:0 +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields +msgid "Anonymized Fields" +msgstr "" + +#. module: anonymization +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization +msgid "Database anonymization" +msgstr "" + +#. module: anonymization +#: code:addons/anonymization/anonymization.py:55 +#: sql_constraint:ir.model.fields.anonymization:0 +#, python-format +msgid "You cannot have two records having the same model and the same field" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Anonymized" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization,state:0 +msgid "unknown" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization,model_id:0 +msgid "Object" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,filepath:0 +msgid "File path" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,date:0 +msgid "Date" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,file_export:0 +msgid "Export" +msgstr "" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Reverse the Database Anonymization" +msgstr "" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Database Anonymization" +msgstr "" + +#. module: anonymization +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard +msgid "Anonymize database" +msgstr "" + +#. module: anonymization +#: view:ir.model.fields.anonymization.history:0 +#: field:ir.model.fields.anonymization.history,field_ids:0 +msgid "Fields" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Clear" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,direction:0 +msgid "clear -> anonymized" +msgstr "" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +#: field:ir.model.fields.anonymize.wizard,summary:0 +msgid "Summary" +msgstr "" + +#. module: anonymization +#: view:ir.model.fields.anonymization:0 +msgid "Anonymized Field" +msgstr "" + +#. module: anonymization +#: model:ir.module.module,description:anonymization.module_meta_information +msgid "" +"\n" +"This module allows you to anonymize a database.\n" +" " +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Unstable" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Exception occured" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Not Existing" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymization,model_name:0 +msgid "Object Name" +msgstr "" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree +#: view:ir.model.fields.anonymization.history:0 +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history +msgid "Anonymization History" +msgstr "" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history +msgid "ir.model.fields.anonymization.history" +msgstr "" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Anonymize Database" +msgstr "" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,name:0 +msgid "File Name" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,direction:0 +msgid "anonymized -> clear" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Started" +msgstr "" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Done" +msgstr "" + +#. module: anonymization +#: view:ir.model.fields.anonymization.history:0 +#: field:ir.model.fields.anonymization.history,msg:0 +#: field:ir.model.fields.anonymize.wizard,msg:0 +msgid "Message" +msgstr "" diff --git a/addons/base_action_rule/i18n/ca.po b/addons/base_action_rule/i18n/ca.po new file mode 100644 index 00000000000..ff5e454b899 --- /dev/null +++ b/addons/base_action_rule/i18n/ca.po @@ -0,0 +1,502 @@ +# Catalan translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +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: 2011-04-11 21:15+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-04-12 04:34+0000\n" +"X-Generator: Launchpad (build 12735)\n" + +#. module: base_action_rule +#: help:base.action.rule,act_mail_to_user:0 +msgid "" +"Check this if you want the rule to send an email to the responsible person." +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_remind_partner:0 +msgid "Remind Partner" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_partner_categ_id:0 +msgid "Partner Category" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_mail_to_watchers:0 +msgid "Mail to Watchers (CC)" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_state_to:0 +msgid "Button Pressed" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,model_id:0 +msgid "Object" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_mail_to_email:0 +msgid "Mail to these Emails" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_state:0 +msgid "Set State to" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_email_from:0 +msgid "Email From" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Email Body" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_range_type:0 +msgid "Days" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,last_run:0 +msgid "Last Run" +msgstr "" + +#. module: base_action_rule +#: code:addons/base_action_rule/base_action_rule.py:313 +#, python-format +msgid "Error!" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_reply_to:0 +msgid "Reply-To" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_email_cc:0 +msgid "" +"These people will receive a copy of the future communication between partner " +"and users by email" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_range_type:0 +msgid "Minutes" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,name:0 +msgid "Rule Name" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_remind_partner:0 +msgid "" +"Check this if you want the rule to send a reminder by email to the partner." +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Conditions on Model Partner" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_type:0 +msgid "Deadline" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_partner_id:0 +msgid "Partner" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_subject)s = Object subject" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Email Reminders" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Special Keywords to Be Used in The Body" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_state_from:0 +msgid "State" +msgstr "" + +#. module: base_action_rule +#: model:ir.actions.act_window,help:base_action_rule.base_action_rule_act +msgid "" +"Use automated actions to automatically trigger actions for various screens. " +"Example: a lead created by a specific user may be automatically set to a " +"specific sales team, or an opportunity which still has status pending after " +"14 days might trigger an automatic reminder email." +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_mail_to_email:0 +msgid "Email-id of the persons whom mail is to be sent" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +#: model:ir.module.module,shortdesc:base_action_rule.module_meta_information +msgid "Action Rule" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Fields to Change" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_type:0 +msgid "Creation Date" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_type:0 +msgid "Last Action Date" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_range_type:0 +msgid "Hours" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_id)s = Object ID" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Delay After Trigger Date" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_remind_attach:0 +msgid "Remind with Attachment" +msgstr "" + +#. module: base_action_rule +#: constraint:ir.cron:0 +msgid "Invalid arguments" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_user_id:0 +msgid "Set Responsible to" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_type:0 +msgid "None" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_email_to:0 +msgid "" +"Use a python expression to specify the right field on which one than we will " +"use for the 'To' field of the header" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_user_phone)s = Responsible phone" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "" +"The rule uses the AND operator. The model must match all non-empty fields so " +"that the rule executes the action described in the 'Actions' tab." +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_date_range_type:0 +msgid "Delay type" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,regex_name:0 +msgid "" +"Regular expression for matching name of the resource\n" +"e.g.: 'urgent.*' will search for records having name starting with the " +"string 'urgent'\n" +"Note: This is case sensitive search." +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_method:0 +msgid "Call Object Method" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_email_to:0 +msgid "Email To" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_mail_to_watchers:0 +msgid "" +"Check this if you want the rule to mark CC(mail to any other person defined " +"in actions)." +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(partner)s = Partner name" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Note" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_email_from:0 +msgid "" +"Use a python expression to specify the right field on which one than we will " +"use for the 'From' field of the header" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_date_range:0 +msgid "Delay after trigger date" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Conditions" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,trg_date_range:0 +msgid "" +"Delay After Trigger Date,specifies you can put a negative number. If you " +"need a delay before the trigger date, like sending a reminder 15 minutes " +"before a meeting." +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,active:0 +msgid "Active" +msgstr "" + +#. module: base_action_rule +#: code:addons/base_action_rule/base_action_rule.py:314 +#, python-format +msgid "No E-Mail ID Found for your Company address!" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_remind_user:0 +msgid "Remind Responsible" +msgstr "" + +#. module: base_action_rule +#: model:ir.module.module,description:base_action_rule.module_meta_information +msgid "This module allows to implement action rules for any object." +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,sequence:0 +msgid "Gives the sequence order when displaying a list of rules." +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_range_type:0 +msgid "Months" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,filter_id:0 +msgid "Filter" +msgstr "" + +#. module: base_action_rule +#: selection:base.action.rule,trg_date_type:0 +msgid "Date" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,server_action_id:0 +msgid "" +"Describes the action name.\n" +"eg:on which object which action to be taken on basis of which condition" +msgstr "" + +#. module: base_action_rule +#: model:ir.model,name:base_action_rule.model_ir_cron +msgid "ir.cron" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_description)s = Object description" +msgstr "" + +#. module: base_action_rule +#: constraint:base.action.rule:0 +msgid "Error: The mail is not well formated" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Email Actions" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Email Information" +msgstr "" + +#. module: base_action_rule +#: model:ir.model,name:base_action_rule.model_base_action_rule +msgid "Action Rules" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_mail_body:0 +msgid "Content of mail" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_user_id:0 +msgid "Responsible" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(partner_email)s = Partner Email" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_date)s = Creation date" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_user_email)s = Responsible Email" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_mail_body:0 +msgid "Mail body" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_remind_user:0 +msgid "" +"Check this if you want the rule to send a reminder by email to the user." +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Server Action to be Triggered" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_mail_to_user:0 +msgid "Mail to Responsible" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,act_email_cc:0 +msgid "Add Watchers (Cc)" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Conditions on Model Fields" +msgstr "" + +#. module: base_action_rule +#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act +#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form +msgid "Automated Actions" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,server_action_id:0 +msgid "Server Action" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,regex_name:0 +msgid "Regex on Resource Name" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,act_remind_attach:0 +msgid "" +"Check this if you want that all documents attached to the object be attached " +"to the reminder email sent." +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Conditions on Timing" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,sequence:0 +msgid "Sequence" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Actions" +msgstr "" + +#. module: base_action_rule +#: help:base.action.rule,active:0 +msgid "" +"If the active field is set to False, it will allow you to hide the rule " +"without removing it." +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "%(object_user)s = Responsible name" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,create_date:0 +msgid "Create Date" +msgstr "" + +#. module: base_action_rule +#: view:base.action.rule:0 +msgid "Conditions on States" +msgstr "" + +#. module: base_action_rule +#: field:base.action.rule,trg_date_type:0 +msgid "Trigger Date" +msgstr "" diff --git a/addons/base_action_rule/i18n/ru.po b/addons/base_action_rule/i18n/ru.po index 2edea84a77c..e54e38f77c8 100644 --- a/addons/base_action_rule/i18n/ru.po +++ b/addons/base_action_rule/i18n/ru.po @@ -8,14 +8,14 @@ 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: 2011-01-02 09:33+0000\n" -"Last-Translator: Chertykov Denis \n" +"PO-Revision-Date: 2011-04-12 16:27+0000\n" +"Last-Translator: Viktor Prokopiev \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-15 05:55+0000\n" -"X-Generator: Launchpad (build 12177)\n" +"X-Launchpad-Export-Date: 2011-04-13 04:39+0000\n" +"X-Generator: Launchpad (build 12735)\n" #. module: base_action_rule #: help:base.action.rule,act_mail_to_user:0 @@ -78,7 +78,7 @@ msgstr "Дней" #. module: base_action_rule #: field:base.action.rule,last_run:0 msgid "Last Run" -msgstr "" +msgstr "Последнее выполнение" #. module: base_action_rule #: code:addons/base_action_rule/base_action_rule.py:313 diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py index e77da6a5629..a01cf0df8cf 100644 --- a/addons/base_calendar/__openerp__.py +++ b/addons/base_calendar/__openerp__.py @@ -42,9 +42,7 @@ It supports: "update_xml" : [ 'security/calendar_security.xml', 'security/ir.model.access.csv', - 'wizard/calendar_event_edit_all_view.xml', 'wizard/base_calendar_invite_attendee_view.xml', - 'wizard/base_calendar_set_exrule_view.xml', 'base_calendar_view.xml' ], "test" : ['test/base_calendar_test.yml'], diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 9693a0d5c0f..16f93a1a5df 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -22,6 +22,7 @@ from datetime import datetime, timedelta, date from dateutil import parser from dateutil import rrule +from dateutil.relativedelta import relativedelta from osv import fields, osv from service import web_services from tools.translate import _ @@ -47,20 +48,21 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=None): def todate(date): val = parser.parse(''.join((re.compile('\d')).findall(date))) return val - + if not startdate: startdate = datetime.now() + if not exdate: exdate = [] rset1 = rrule.rrulestr(str(rrulestring), dtstart=startdate, forceset=True) - for date in exdate: datetime_obj = todate(date) rset1._exdate.append(datetime_obj) + if exrule: rset1.exrule(rrule.rrulestr(str(exrule), dtstart=startdate)) - return list(rset1._iter()) + return list(rset1) def base_calendar_id2real_id(base_calendar_id=None, with_date=False): """ @@ -373,7 +375,8 @@ property or property parameter."), multi='event_end_date'), 'ref': fields.reference('Event Ref', selection=_links_get, size=128), 'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"), - } + } + _defaults = { 'state': 'needs-action', 'role': 'req-participant', @@ -411,7 +414,7 @@ property or property parameter."), cal = vobject.iCalendar() event = cal.add('vevent') if not event_obj.date_deadline or not event_obj.date: - raise osv.except_osv(_('Warning !'),_("Couldn't Invite because date is not specified!")) + raise osv.except_osv(_('Warning !'),_("Couldn't Invite because date is not specified!")) 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) @@ -456,7 +459,7 @@ property or property parameter."), 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)] @@ -674,7 +677,7 @@ true, it will allow you to hide the event alarm information without removing it. 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', + ' WHERE id=%s', (cal_alarm.id, new_res_alarm, data.id)) self.do_alarm_unlink(cr, uid, [data.id], model) @@ -914,22 +917,6 @@ class calendar_event(osv.osv): def _tz_get(self, cr, uid, context=None): return [(x.lower(), x) for x in pytz.all_timezones] - def onchange_allday(self, cr, uid, ids, allday, context=None): - """Sets duration as 24 Hours if event is selected for all day - @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 allday: Value of allday boolean - @param context: A standard dictionary for contextual values - """ - if not allday or not ids: - return {} - value = { - 'duration': 24 - } - return {'value': value} - 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 @@ -954,6 +941,11 @@ class calendar_event(osv.osv): if allday: # For all day event value = {'duration': 24} duration = 24.0 + if start_date: + start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S") + start_date = datetime.strftime(datetime(start.year, start.month, start.day, 0,0,0), "%Y-%m-%d %H:%M:%S") + value['date'] = start_date + start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S") if end_date and not duration: @@ -966,7 +958,7 @@ class calendar_event(osv.osv): 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 + # 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 @@ -988,85 +980,6 @@ class calendar_event(osv.osv): self.unlink(cr, uid, r_ids, context=context) return True - def _set_rrulestring(self, cr, uid, id, name, value, arg, context=None): - """ - Sets values of fields that defines event recurrence from the value of rrule string - @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. - """ - if context is None: - context = {} - cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\ - mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\ - day=0,select1='date',month_list=Null ,byday=Null where id=%%s" % (self._table), (id,)) - - if not value: - cr.execute("UPDATE %s set rrule_type='none' where id=%%s" % self._table,(id,)) - return True - val = {} - for part in value.split(';'): - if part.lower().__contains__('freq') and len(value.split(';')) <=2: - rrule_type = part.lower()[5:] - break - else: - rrule_type = 'custom' - break - ans = value.split(';') - for i in ans: - val[i.split('=')[0].lower()] = i.split('=')[1].lower() - if not val.get('interval'): - rrule_type = 'custom' - elif int(val.get('interval')) > 1: #If interval is other than 1 rule is custom - rrule_type = 'custom' - - qry = "UPDATE \"%s\" set rrule_type=%%s " % self._table - qry_args = [ rrule_type, ] - new_val = val.copy() - for k, v in val.items(): - if val['freq'] == 'weekly' and val.get('byday'): - for day in val['byday'].split(','): - new_val[day] = True - val.pop('byday') - - if val.get('until'): - until = parser.parse(''.join((re.compile('\d')).findall(val.get('until')))) - new_val['end_date'] = until.strftime('%Y-%m-%d') - val.pop('until') - new_val.pop('until') - - if val.get('bymonthday'): - new_val['day'] = val.get('bymonthday') - val.pop('bymonthday') - new_val['select1'] = 'date' - new_val.pop('bymonthday') - - if val.get('byday'): - d = val.get('byday') - if '-' in d: - new_val['byday'] = d[:2] - new_val['week_list'] = d[2:4].upper() - else: - new_val['byday'] = d[:1] - new_val['week_list'] = d[1:3].upper() - new_val['select1'] = 'day' - - if val.get('bymonth'): - new_val['month_list'] = val.get('bymonth') - val.pop('bymonth') - new_val.pop('bymonth') - - for k, v in new_val.items(): - qry += ", %s=%%s" % k - qry_args.append(v) - - qry = qry + " where id=%s" - qry_args.append(id) - cr.execute(qry, qry_args) - 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. @@ -1076,28 +989,15 @@ class calendar_event(osv.osv): @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ + result = {} - for datas in self.read(cr, uid, ids, context=context): + for datas in self.read(cr, uid, ids, ['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 = datas['id'] - if datas.get('rrule_type'): - if datas.get('rrule_type') == 'none': - result[event] = False - cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,)) - if datas.get('rrule_type') : - if datas.get('interval', 0) < 0: - raise osv.except_osv(_('Warning!'), _('Interval can not be Negative')) - if datas.get('count', 0) < 0: - raise osv.except_osv(_('Warning!'), _('Count can not be Negative')) - rrule_custom = self.compute_rule_string(cr, uid, datas, \ - context=context) - result[event] = rrule_custom - else: - result[event] = self.compute_rule_string(cr, uid, {'freq': datas.get('rrule_type').upper(), 'interval': 1}, context=context) - - for id, myrule in result.items(): - #Remove the events generated from recurrent event - if not myrule: - self.unlink_events(cr, uid, [id], context=context) + if datas.get('interval', 0) < 0: + raise osv.except_osv(_('Warning!'), _('Interval can not be Negative')) + if datas.get('count', 0) < 0: + raise osv.except_osv(_('Warning!'), _('Count can not be Negative')) + result[event] = self.compute_rule_string(datas) return result _columns = { @@ -1123,14 +1023,10 @@ 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, method=True, \ - string='Recurrent Rule', store=True, \ - fnct_inv=_set_rrulestring, help='Defines a\ - rule or repeating pattern for recurring events\n\ -e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ - FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'), + string='Recurrent Rule'), 'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \ ('weekly', 'Weekly'), ('monthly', 'Monthly'), \ - ('yearly', 'Yearly'),], + ('yearly', 'Yearly'),], 'Recurrency', states={'done': [('readonly', True)]}, help="Let the event automatically repeat at that interval"), 'alarm_id': fields.many2one('res.alarm', 'Alarm', states={'done': [('readonly', True)]}, @@ -1142,14 +1038,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ 'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}), 'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with Organizer Attribure of VEvent. 'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}), - 'freq': fields.selection([('None', 'No Repeat'), - ('hourly', 'Hours'), - ('daily', 'Days'), - ('weekly', 'Weeks'), - ('monthly', 'Months'), - ('yearly', 'Years'), ], 'Frequency'), - - 'end_type' : fields.selection([('forever', 'Forever'), ('count', 'Fix amout of times'), ('end_date','End date')], 'Way to end reccurency'), + 'end_type' : fields.selection([('count', 'Fix amout of times'), ('end_date','End date')], 'Way to end reccurency'), 'interval': fields.integer('Repeat every', help="Repeat every (Days/Week/Month/Year)"), 'count': fields.integer('Repeat', help="Repeat x times"), 'mo': fields.boolean('Mon'), @@ -1159,7 +1048,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ 'fr': fields.boolean('Fri'), 'sa': fields.boolean('Sat'), 'su': fields.boolean('Sun'), - 'select1': fields.selection([('date', 'Date of month'), + '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'), \ @@ -1176,8 +1065,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ '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"), - 'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Meeting."), + 'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"), + 'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Meeting."), } def default_organizer(self, cr, uid, context=None): user_pool = self.pool.get('res.users') @@ -1188,11 +1077,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ return res _defaults = { - 'end_type' : 'forever', + 'end_type' : 'count', + 'count' : 1, + 'rrule_type' : 'none', 'state': 'tentative', 'class': 'public', 'show_as': 'busy', - 'freq': 'None', 'select1': 'date', 'interval': 1, 'active': 1, @@ -1201,43 +1091,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ 'edit_all' : False, } - def onchange_edit_all(self, cr, uid, ids, rrule_type,edit_all, context=None): - if not context: - context = {} - - value = {} - if edit_all and rrule_type: - for id in ids: - base_calendar_id2real_id(id) - return value - - def modify_all(self, cr, uid, event_ids, defaults, context=None, *args): - """ - Modifies the recurring event - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param event_ids: List of crm meeting’s IDs. - @param context: A standard dictionary for contextual values - @return: True - """ - for event_id in event_ids: - event_id = base_calendar_id2real_id(event_id) - - defaults.pop('id') - defaults.update({'table': self._table}) - - qry = "UPDATE %(table)s set name = '%(name)s', \ - date = '%(date)s', date_deadline = '%(date_deadline)s'" - if defaults.get('alarm_id'): - qry += ", alarm_id = %(alarm_id)s" - if defaults.get('location'): - qry += ", location = '%(location)s'" - qry += "WHERE id = %s" % (event_id) - cr.execute(qry, defaults) - - return True - - def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): + def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, 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 @@ -1246,46 +1100,33 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ @param base_start_date: Get Start Date @param base_until_date: Get End Date @param limit: The Number of Results to Return """ + if not context: + context = {} + + virtual_id = context and context.get('virtual_id', False) or False - if not limit: - limit = 100 if isinstance(select, (str, int, long)): ids = [select] else: ids = select result = [] recur_dict = [] - if ids and (base_start_date or base_until_date): - cr.execute("select m.id, m.rrule, m.date, m.date_deadline, m.duration, \ - m.exdate, m.exrule, m.recurrent_id, m.recurrent_uid from " + self._table + \ - " m where m.id = ANY(%s)", (ids,) ) - - count = 0 - for data in cr.dictfetchall(): + if ids and virtual_id: + for data in super(calendar_event, self).read(cr, uid, ids, context=context): start_date = base_start_date and datetime.strptime(base_start_date[:10]+ ' 00:00:00' , "%Y-%m-%d %H:%M:%S") or False until_date = base_until_date and datetime.strptime(base_until_date[:10]+ ' 23:59:59', "%Y-%m-%d %H:%M:%S") or False - if count > limit: - break event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S") # To check: If the start date is replace by event date .. the event date will be changed by that of calendar code - start_date = event_date + if not data['rrule']: if start_date and (event_date < start_date): continue if until_date and (event_date > until_date): continue - idval = real_id2base_calendar_id(data['id'], data['date']) - if not data['recurrent_id']: - result.append(idval) - count += 1 - else: - ex_id = real_id2base_calendar_id(data['recurrent_uid'], data['recurrent_id']) - ls = base_calendar_id2real_id(ex_id, with_date=data and data.get('duration', 0) or 0) - if not isinstance(ls, (str, int, long)) and len(ls) >= 2: - if ls[1] == data['recurrent_id']: - result.append(idval) - recur_dict.append(ex_id) + idval = data['id'] + result.append(idval) else: + start_date = event_date exdate = data['exdate'] and data['exdate'].split(',') or [] rrule_str = data['rrule'] new_rrule_str = [] @@ -1301,6 +1142,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ until_date = rrule_until_date if until_date: value = until_date.strftime("%Y%m%d%H%M%S") + else: + value = value.strftime("%Y%m%d%H%M%S") new_rule = '%s=%s' % (name, value) new_rrule_str.append(new_rule) if not is_until and until_date: @@ -1310,6 +1153,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ new_rrule_str.append(new_rule) new_rrule_str = ';'.join(new_rrule_str) rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date, data['exrule']) + for r_date in rdates: if start_date and r_date < start_date: continue @@ -1317,77 +1161,75 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ continue idval = real_id2base_calendar_id(data['id'], r_date.strftime("%Y-%m-%d %H:%M:%S")) result.append(idval) - count += 1 + if result: - ids = list(set(result)-set(recur_dict)) + ids = list(set(result)) if isinstance(select, (str, int, long)): return ids and ids[0] or False return ids - def compute_rule_string(self, cr, uid, datas, context=None, *args): + def compute_rule_string(self, datas): """ Compute 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 uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. - @param context: A standard dictionary for contextual values - @return: String value of the format RECUR of iCalendar """ - - weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'] - weekstring = '' - monthstring = '' - yearstring = '' - freq=datas.get('rrule_type') - if freq == 'none': + + def get_week_string(freq, datas): + weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'] + if freq == 'weekly': + byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas)) + if byday: + return ';BYDAY=' + ','.join(byday) + return '' + + def get_month_string(freq, datas): + if freq == 'monthly': + if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31): + raise osv.except_osv(_('Error!'), ("Please select proper Day of month")) + + if datas.get('select1')=='day': + return ';BYDAY=' + datas.get('byday') + datas.get('week_list') + elif datas.get('select1')=='date': + return ';BYMONTHDAY=' + str(datas.get('day')) return '' + + def get_end_date(datas): + if datas.get('end_date'): + datas['end_date_new'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + 'T235959Z' - interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or '' - - if freq == 'weekly': - byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas)) - if byday: - weekstring = ';BYDAY=' + ','.join(byday) - - elif freq == 'monthly': - if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31): - raise osv.except_osv(_('Error!'), ("Please select proper Day of month")) - if datas.get('select1')=='day': - monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list') - elif datas.get('select1')=='date': - monthstring = ';BYMONTHDAY=' + str(datas.get('day')) - + return (datas.get('end_type') == 'count' and (';COUNT=' + str(datas.get('count'))) or '') +\ + ((datas.get('end_date_new') and datas.get('end_type') == 'end_date' and (';UNTIL=' + datas.get('end_date_new'))) or '') - if datas.get('end_date'): - datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + 'T235959Z' - enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\ - ((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '') + freq=datas.get('rrule_type') + if freq == 'none': + return '' + interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or '' + return 'FREQ=' + freq.upper() + get_week_string(freq, datas) + interval_srting + get_end_date(datas) + get_month_string(freq, datas) - rrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \ - + enddate + monthstring + yearstring - return rrule_string - - def search(self, cr, uid, args, offset=0, limit=100, order=None, + def remove_virtual_id(self, ids): + if isinstance(ids, (str, int)): + return base_calendar_id2real_id(ids) + + if isinstance(ids, (list, tuple)): + res = [] + for id in ids: + res.append(base_calendar_id2real_id(id)) + return res + + def search(self, cr, uid, args, offset=0, limit=0, order=None, context=None, count=False): - """ - Overrides orm search method. - @param cr: the current row, from the database cursor, - @param user: the current user’s ID for security checks, - @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. - @param offset: The Number of Results to Pass - @param limit: The Number of Results to Return - @param context: A standard dictionary for contextual values - @param count: If its True the method returns number of records instead of ids - @return: List of id - """ args_without_date = [] start_date = False until_date = False for arg in args: - if arg[0] not in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')): + if arg[0] == "id": + new_id = self.remove_virtual_id(arg[2]) + new_arg = (arg[0], arg[1], new_id) + args_without_date.append(new_arg) + elif arg[0] not in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): @@ -1398,12 +1240,17 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ if until_date: continue until_date = arg[2] + res = super(calendar_event, self).search(cr, uid, args_without_date, \ - offset, limit, order, context, count) + 0, 0, order, context, count=False) + res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit, context=context) + if count: + return len(res) + elif limit: + return res[offset:offset+limit] + else: + return res - res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit) - return res - def get_edit_all(self, cr, uid, id, vals=None): """ @@ -1414,22 +1261,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ if(vals and 'edit_all' in vals): #we jsut check edit_all return vals['edit_all'] else: #it's a recurrent event and edit_all is already check - return meeting['recurrency'] and meeting['edit_all'] + return meeting['recurrency'] and meeting['edit_all'] + - def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): - """ - Overrides orm write 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 ids: List of crm meeting's ids - @param vals: Dictionary of field value. - @param context: A standard dictionary for contextual values - @return: True - """ if context is None: context = {} if isinstance(ids, (str, int, long)): @@ -1440,12 +1277,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ res = False for event_id in select: real_event_id = base_calendar_id2real_id(event_id) - if(self.get_edit_all(cr, uid, event_id, vals=vals)): event_id = real_event_id - - + + #if edit one instance of a reccurrent id if len(str(event_id).split('-')) > 1: data = self.read(cr, uid, event_id, ['date', 'date_deadline', \ 'rrule', 'duration', 'exdate']) @@ -1459,15 +1295,15 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ 'edit_all': False, 'recurrency' : False, }) - + new_id = self.copy(cr, uid, real_event_id, default=data, context=context) - + date_new = event_id.split('-')[1] date_new = time.strftime("%Y%m%dT%H%M%S", \ time.strptime(date_new, "%Y%m%d%H%M%S")) exdate = (data['exdate'] and (data['exdate'] + ',') or '') + date_new res = self.write(cr, uid, [real_event_id], {'exdate': exdate}) - + context.update({'active_id': new_id, 'active_ids': [new_id]}) continue if not real_event_id in new_ids: @@ -1495,18 +1331,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ # change alarm details alarm_obj = self.pool.get('res.alarm') alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date', context=context) - return res + return res or True and False def browse(self, cr, uid, ids, context=None, list_class=None, fields_process=None): - """ - Overrides orm browse 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 ids: List of crm meeting's ids - @param context: A standard dictionary for contextual values - @return: the object list. - """ if isinstance(ids, (str, int, long)): select = [ids] else: @@ -1518,20 +1345,32 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ return res and res[0] or False return res + + def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False): + if not context: + context = {} + + if 'date' in groupby: + raise osv.except_osv(_('Warning !'), _('Group by date not supported, use the calendar view instead')) + + virtual_id = context.get('virtual_id', False) + + context.update({'virtual_id': False}) + res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby) + for re in res: + #remove the count, since the value is not consistent with the result of the search when expand the group + for groupname in groupby: + if re.get(groupname + "_count"): + del re[groupname + "_count"] + re.get('__context').update({'virtual_id' : virtual_id}) + return res def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'): - """ - Overrides orm Read method.Read List of fields for calendar event. - @param cr: the current row, from the database cursor, - @param user: the current user’s ID for security checks, - @param ids: List of calendar event's id. - @param fields: List of fields. - @param context: A standard dictionary for contextual values - @return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...] - """ # FIXME This whole id mangling has to go! if context is None: context = {} + + if isinstance(ids, (str, int, long)): select = [ids] @@ -1545,9 +1384,10 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ fields.append('duration') - for base_calendar_id, real_id in select: + for base_calendar_id, real_id in select: #REVET: Revision ID: olt@tinyerp.com-20100924131709-cqsd1ut234ni6txn res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load) + if not res : continue ls = base_calendar_id2real_id(base_calendar_id, with_date=res and res.get('duration', 0) or 0) @@ -1559,17 +1399,10 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ result.append(res) if isinstance(ids, (str, int, long)): return result and result[0] or False + return result def copy(self, cr, uid, id, default=None, context=None): - """ - Duplicate record on specified id. - @param self: the object pointer. - @param cr: the current row, from the database cursor, - @param id: id of record from which we duplicated. - @param context: A standard dictionary for contextual values - @return: Duplicate record id. - """ if context is None: context = {} res = super(calendar_event, self).copy(cr, uid, base_calendar_id2real_id(id), default, context) @@ -1577,23 +1410,35 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context) return res + + def web_client_unfucking_timebomb(self, ids): + if (date.today() < date(2011, 5, 1)): + import re + if isinstance(ids, list) and len(ids) == 1: + string = ids[0] + if isinstance(string, str) and string.startswith('[') and string.endswith(']'): + string = string[1:-1] + list_ids = re.split(',\s*', string) + ids = list_ids + + return ids def unlink(self, cr, uid, ids, context=None): - """ - Deletes records specified in ids. - @param self: the object pointer. - @param cr: the current row, from the database cursor, - @param id: List of calendar event's id. - @param context: A standard dictionary for contextual values - @return: True - """ - res = False - for event_datas in self.read(cr, uid, ids, ['date', 'rrule', 'exdate'], context=context): - event_id = event_datas['id'] + #temporary fixes for web client + #Time bomb + ids = self.web_client_unfucking_timebomb(ids) + if not isinstance(ids, list): + ids = [ids] + res = False + for id in ids: + event_datas = self.read(cr, uid, [id], ['date', 'rrule', 'exdate'], context=context)[0] + print event_datas + event_id = event_datas['id'] + if self.get_edit_all(cr, uid, event_id, vals=None): event_id = base_calendar_id2real_id(event_id) - + if isinstance(event_id, (int, long)): res = super(calendar_event, self).unlink(cr, uid, event_id, context=context) self.pool.get('res.alarm').do_alarm_unlink(cr, uid, [event_id], self._name) @@ -1614,18 +1459,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ return res def create(self, cr, uid, vals, context=None): - """ - Create new record. - @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: dictionary of every field value. - @param context: A standard dictionary for contextual values - @return: new created record id. - """ if context is None: context = {} + virtual_id = context.get('virtual_id', False) + if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'): vals['vtimezone'] = vals['vtimezone'][40:] @@ -1636,11 +1474,13 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ vals.get('allday', False), context=context) vals.update(updated_vals.get('value', {})) - res = super(calendar_event, self).create(cr, uid, vals, context) alarm_obj = self.pool.get('res.alarm') alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context) + return res + + def do_tentative(self, cr, uid, ids, context=None, *args): """ Makes event invitation as Tentative @@ -1711,7 +1551,7 @@ class calendar_todo(osv.osv): @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. @param context: A standard dictionary for contextual values """ - + assert name == 'date' return self.write(cr, uid, id, { 'date_start': value }, context=context) @@ -1743,9 +1583,9 @@ class ir_attachment(osv.osv): for arg in args: args1.append(map(lambda x:str(x).split('-')[0], arg)) return super(ir_attachment, self).search_count(cr, user, args1, context) - - - + + + def create(self, cr, uid, vals, context=None): if context: id = context.get('default_res_id', False) diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index d5525e48e74..451152b2b58 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -242,8 +242,7 @@ widget="selection" /> - + diff --git a/addons/base_calendar/wizard/__init__.py b/addons/base_calendar/wizard/__init__.py index 8b45dc18a17..cd0690b1dc0 100644 --- a/addons/base_calendar/wizard/__init__.py +++ b/addons/base_calendar/wizard/__init__.py @@ -19,9 +19,7 @@ # ############################################################################## -import calendar_event_edit_all import base_calendar_invite_attendee -import base_calendar_set_exrule # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_calendar/wizard/base_calendar_set_exrule.py b/addons/base_calendar/wizard/base_calendar_set_exrule.py deleted file mode 100644 index 80fe1e44720..00000000000 --- a/addons/base_calendar/wizard/base_calendar_set_exrule.py +++ /dev/null @@ -1,163 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from base_calendar import base_calendar -from osv import fields, osv -from tools.translate import _ -import tools -import re - - -months = { - 1: "January", 2: "February", 3: "March", 4: "April", \ - 5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \ - 10: "October", 11: "November", 12: "December" -} - -class base_calendar_set_exrule(osv.osv_memory): - """ - Set Exrule. - """ - - _name = "base.calendar.set.exrule" - _description = "Set Exrule" - - _columns = { - 'freq': fields.selection([('None', 'No Repeat'), \ - ('secondly', 'Secondly'), \ - ('minutely', 'Minutely'), \ - ('hourly', 'Hourly'), \ - ('daily', 'Daily'), \ - ('weekly', 'Weekly'), \ - ('monthly', 'Monthly'), \ - ('yearly', 'Yearly')], 'Frequency',required=True), - 'interval': fields.integer('Interval'), - 'count': fields.integer('Count'), - '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'), - - } - - def view_init(self, cr, uid, fields, context=None): - """ - This function checks for precondition before wizard executes - @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 fields: List of fields for default value - @param context: A standard dictionary for contextual values - """ - if context is None: - context = {} - event_obj = self.pool.get(context.get('active_model')) - for event in event_obj.browse(cr, uid, context.get('active_ids', []), context=context): - if not event.rrule: - raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency before applying Exception Rule.")) - return False - - def compute_exrule_string(self, cr, uid, ids, context=None): - """ - Compute rule string. - @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 datas: dictionary of freq and interval value. - @return: string value which compute FREQILY;INTERVAL - """ - - weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'] - weekstring = '' - monthstring = '' - yearstring = '' - if context is None: - context = {} - ex_id = base_calendar.base_calendar_id2real_id(context.get('active_id', False)) - model = context.get('model', False) - model_obj = self.pool.get(model) - for datas in self.read(cr, uid, ids, context=context): - freq = datas.get('freq') - if freq == 'None': - model_obj.write(cr, uid, ex_id,{'exrule': ''}) - return{} - - interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or '' - - if freq == 'weekly': - - byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas)) - if byday: - weekstring = ';BYDAY=' + ','.join(byday) - - elif freq == 'monthly': - if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31): - raise osv.except_osv(_('Error!'), ("Please select proper Day of month")) - if datas.get('select1')=='day': - monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list') - elif datas.get('select1')=='date': - monthstring = ';BYMONTHDAY=' + str(datas.get('day')) - - elif freq == 'yearly': - if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31): - raise osv.except_osv(_('Error!'), ("Please select proper Day of month")) - bymonth = ';BYMONTH=' + str(datas.get('month_list')) - if datas.get('select1')=='day': - bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list') - elif datas.get('select1')=='date': - bystring = ';BYMONTHDAY=' + str(datas.get('day')) - yearstring = bymonth + bystring - - if datas.get('end_date'): - datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z' - enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\ - ((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '') - - exrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \ - + enddate + monthstring + yearstring - - model_obj.write(cr, uid, ex_id,{'exrule': exrule_string}) - return {'type': 'ir.actions.act_window_close'} - - _defaults = { - 'freq': lambda *x: 'None', - 'select1': lambda *x: 'date', - 'interval': lambda *x: 1, - } - -base_calendar_set_exrule() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/base_calendar/wizard/base_calendar_set_exrule_view.xml b/addons/base_calendar/wizard/base_calendar_set_exrule_view.xml deleted file mode 100644 index 2a2d6412d4b..00000000000 --- a/addons/base_calendar/wizard/base_calendar_set_exrule_view.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - base.calendar.set.exrule.form - base.calendar.set.exrule - form - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ Forward to Partner crm.lead.forward.to.partner form form - + new + + + crm.new.mass.forward.mail.form + crm.lead.mass.forward.to.partner + form + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +