[[ formatLang(o.amount_tax) ]]
diff --git a/addons/account/wizard/account_chart.py b/addons/account/wizard/account_chart.py
index 440dbd407ec..c9cc5ff7bd5 100644
--- a/addons/account/wizard/account_chart.py
+++ b/addons/account/wizard/account_chart.py
@@ -33,7 +33,7 @@ class account_chart(osv.osv_memory):
help = 'Keep empty for all open fiscal years'),
'target_move': fields.selection([('all', 'All Entries'),
('posted', 'All Posted Entries')], 'Target Moves', required = True),
- }
+ }
def _get_fiscalyear(self, cr, uid, context=None):
"""Return default Fiscalyear value"""
diff --git a/addons/account/wizard/account_chart_view.xml b/addons/account/wizard/account_chart_view.xml
index b621019dbe6..d29bffb833d 100644
--- a/addons/account/wizard/account_chart_view.xml
+++ b/addons/account/wizard/account_chart_view.xml
@@ -1,36 +1,34 @@
-
-
+ account.chart.formaccount.chartform
-
+ Chart of Accountsaccount.chartformtree,form
-
- new
+
+ new
-
+
@@ -47,7 +47,7 @@
diff --git a/addons/account_analytic_analysis/i18n/zh_CN.po b/addons/account_analytic_analysis/i18n/zh_CN.po
index 1005b1d9aff..f792d2780f9 100644
--- a/addons/account_analytic_analysis/i18n/zh_CN.po
+++ b/addons/account_analytic_analysis/i18n/zh_CN.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-04-10 04:39+0000\n"
-"Last-Translator: digitalsatori \n"
+"PO-Revision-Date: 2010-07-13 04:28+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: 2010-06-22 04:10+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
@@ -36,7 +36,7 @@ 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
@@ -44,25 +44,26 @@ msgid "Computed using the formula: Maximum Quantity - Hours Tot."
msgstr "计算公式为:最大数量 - 小时合计"
#. module: account_analytic_analysis
+#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all
msgid "All Analytic Accounts"
-msgstr "所有辅助核算项目"
+msgstr "所有辅助核算项"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_open
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_to_valid_open
msgid "My Current Accounts"
-msgstr "我的当前科目"
+msgstr "我的当前项"
#. module: account_analytic_analysis
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr "描述视图结构的XML文件无效"
+msgstr "无效XML视图结构!"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_invoice_date:0
msgid "Date of the last invoice created for this analytic account."
-msgstr "这辅助核算项目的最近开票日期"
+msgstr "这辅助核算项的最近开票日期"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_theorical:0
@@ -83,13 +84,13 @@ msgstr "计算公式:理论收入 - 总费用"
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
-msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_new
msgid "New Analytic Account"
-msgstr "新的分析科目"
+msgstr "新辅助核算项"
#. module: account_analytic_analysis
#: field:account.analytic.account,theorical_margin:0
@@ -105,29 +106,29 @@ msgstr "实际利润(%)"
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all_open
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all_open
msgid "Current Analytic Accounts"
-msgstr "当前分析科目"
+msgstr "当前辅助核算项"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_date:0
msgid "Date of the latest work done on this account."
-msgstr "这科目的最近的工作完成日期"
+msgstr "这项的最近的工作完成日期"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_invoiced_date:0
msgid ""
"If invoice from the costs, this is the date of the latest work or cost that "
"have been invoiced."
-msgstr "如果是成本发票,最近工作或成本的时间已开出的发票"
+msgstr "如果发票来自费用, 这是最近工作日期或已开票的费用"
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
msgid "Invoicing"
-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
@@ -139,7 +140,7 @@ 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
@@ -190,8 +191,8 @@ msgid ""
"important data for project manager of services companies.\n"
"Add menu to show relevant information for each manager."
msgstr ""
-"修改核算到显示服务公司的项目管理主要时间\n"
-"添加菜单显示每个管理的有关信息"
+"修改辅助核算项到显示视图, 服务公司项目经理的重要数据\n"
+"添加菜单显示每个管理者的相关信息"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_non_invoiced:0
@@ -206,12 +207,12 @@ msgstr "总小时"
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_account
msgid "Analytic Accounts"
-msgstr "核算项目"
+msgstr "辅助核算项"
#. module: account_analytic_analysis
#: model:ir.module.module,shortdesc:account_analytic_analysis.module_meta_information
msgid "report_account_analytic"
-msgstr "核算项目报表"
+msgstr "辅助核算项报表"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_invoiced:0
@@ -226,7 +227,7 @@ msgstr "财务项目管理"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_invoiced_date:0
msgid "Date of Last Invoiced Cost"
-msgstr "最近的发票成本日期"
+msgstr "最近的已发票日期"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_to_invoice:0
@@ -237,7 +238,7 @@ msgstr "未开票金额"
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all_pending
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all_pending
msgid "Pending Analytic Accounts"
-msgstr "未决的辅助核算项目"
+msgstr "未决的辅助核算项"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_invoiced:0
@@ -269,12 +270,12 @@ msgstr "计算公式为:(实际利润/总成本×100)"
msgid ""
"Number of hours (from journal of type 'general') that can be invoiced if you "
"invoice based on analytic account."
-msgstr "如果你的发票基于这辅助核算项目"
+msgstr "如果你的发票基于这辅助核算项, 小时数(从记录集合类型是\"普通\")可以开发票"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Analytic accounts"
-msgstr "辅助核算项目"
+msgstr "辅助核算项"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_ca:0
@@ -286,7 +287,7 @@ msgstr "剩余的收入"
msgid ""
"If invoice from analytic account, the remaining amount you can invoice to "
"the customer based on the total costs."
-msgstr "如果是辅助核算项目的发票,剩余金额你能给客户开基于总成本的发票"
+msgstr "如果是辅助核算项的发票, 剩余金额你能给客户开基于总成本的发票"
#. module: account_analytic_analysis
#: help:account.analytic.account,revenue_per_hour:0
@@ -314,23 +315,23 @@ msgstr "月"
#: field:account_analytic_analysis.summary.month,account_id:0
#: field:account_analytic_analysis.summary.user,account_id:0
msgid "Analytic Account"
-msgstr "辅助核算项目"
+msgstr "辅助核算项"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_overpassed
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_managed_overpassed
msgid "Overpassed Accounts"
-msgstr "已废弃项目"
+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 "All Uninvoiced Entries"
-msgstr "所有未开发票凭证"
+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 "这科目的成本合计,它包括实际成本(发票)和间接成本,如花费的时间表"
+msgstr "这项的成本合计,它包括实际成本(发票)和间接成本,如花费的时间表"
diff --git a/addons/account_analytic_default/i18n/zh_CN.po b/addons/account_analytic_default/i18n/zh_CN.po
index 63875579b24..43a13f183e1 100644
--- a/addons/account_analytic_default/i18n/zh_CN.po
+++ b/addons/account_analytic_default/i18n/zh_CN.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-29 00:37+0000\n"
-"Last-Translator: digitalsatori \n"
+"PO-Revision-Date: 2010-07-13 04:32+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: 2010-06-22 04:12+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_default
@@ -21,7 +21,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account_analytic_default.action_analytic_default_form
#: model:ir.ui.menu,name:account_analytic_default.menu_analytic_defaul_form
msgid "Analytic Defaults"
-msgstr "默认辅助核算科目"
+msgstr "默认辅助核算项"
#. module: account_analytic_default
#: model:ir.module.module,shortdesc:account_analytic_default.module_meta_information
@@ -31,13 +31,13 @@ msgstr "默认科目辅助核算"
#. module: account_analytic_default
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr "无效的视图结构xml文件"
+msgstr "无效XML视图结构!"
#. module: account_analytic_default
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
-msgstr "这对象名必须以x_开头并且不能包含特殊的字符!"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: account_analytic_default
#: view:account.analytic.default:0
@@ -67,7 +67,7 @@ msgstr "产品"
#. module: account_analytic_default
#: field:account.analytic.default,analytic_id:0
msgid "Analytic Account"
-msgstr "辅助核算科目"
+msgstr "辅助核算项"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_account_analytic_default
@@ -82,12 +82,12 @@ msgstr "用户"
#. module: account_analytic_default
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "动作定义里模块名无效"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.act_account_acount_move_line_open
msgid "Entries"
-msgstr "条目"
+msgstr "记录"
#. module: account_analytic_default
#: field:account.analytic.default,partner_id:0
@@ -102,7 +102,7 @@ msgstr "开始日期"
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Conditions"
-msgstr "情况"
+msgstr "条件"
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_partner
diff --git a/addons/account_analytic_plans/i18n/zh_CN.po b/addons/account_analytic_plans/i18n/zh_CN.po
index a8293d1fa7e..b6f00a002f7 100644
--- a/addons/account_analytic_plans/i18n/zh_CN.po
+++ b/addons/account_analytic_plans/i18n/zh_CN.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 06:54+0000\n"
+"PO-Revision-Date: 2010-07-13 08:33+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: 2010-06-22 04:10+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
-msgstr "科目4ID"
+msgstr "项4ID"
#. module: account_analytic_plans
#: constraint:ir.model:0
@@ -36,7 +36,7 @@ msgstr "交叉辅助核算"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
-msgstr "科目5ID"
+msgstr "项5ID"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,date2:0
@@ -75,7 +75,7 @@ msgstr "打印"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "To Date"
-msgstr "至今为止"
+msgstr "日期到"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
@@ -90,7 +90,7 @@ msgstr "辅助核算分配模型"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
-msgstr "科目名称"
+msgstr "项名称"
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
@@ -135,13 +135,13 @@ msgstr "选择信息"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
-msgstr "科目3ID"
+msgstr "项3ID"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,journal_id:0
#: wizard_field:wizard.crossovered.analytic,init,journal_ids:0
msgid "Analytic Journal"
-msgstr "辅助核算分类帐"
+msgstr "辅助核算记录集合"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@@ -151,12 +151,12 @@ msgstr "100.00%"
#. module: account_analytic_plans
#: wizard_field:wizard.crossovered.analytic,init,ref:0
msgid "Analytic Account Ref."
-msgstr "辅助核算项目参考"
+msgstr "辅助核算项参考"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account :"
-msgstr "辅助核算项目:"
+msgstr "辅助核算项:"
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
@@ -166,7 +166,7 @@ msgstr "辅助核算方案明细"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
-msgstr "辅助核算项目参考:"
+msgstr "辅助核算项参考:"
#. module: account_analytic_plans
#: model:ir.actions.wizard,name:account_analytic_plans.create_model
@@ -176,7 +176,7 @@ msgstr "创建模型"
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
-msgstr "默认凭证"
+msgstr "默认记录"
#. module: account_analytic_plans
#: view:account.analytic.plan:0
@@ -194,7 +194,7 @@ msgstr "最小允许(%)"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
-msgstr "科目1ID"
+msgstr "项1ID"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
@@ -209,7 +209,7 @@ msgstr "分配模型保存"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
-msgstr "核算方案实例"
+msgstr "辅助核算方案实例"
#. module: account_analytic_plans
#: constraint:ir.ui.view:0
@@ -255,8 +255,8 @@ msgid ""
"for one account entry.\n"
" "
msgstr ""
-"这模块允许使用几个辅助核算方案并根据他们生成分类帐\n"
-"\t所以当开发票或确认凭证时\n"
+"这模块允许使用几个辅助核算方案并根据他们生成记录集合\n"
+"\t所以当开发票或确认记录时\n"
"建立多个辅助核算明细\n"
"\t\n"
"\t例子:你可以定义以下辅助核算结构:\n"
@@ -307,7 +307,7 @@ msgstr "模型方案"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
-msgstr "科目2ID"
+msgstr "项2ID"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@@ -317,12 +317,12 @@ msgstr "金额"
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
-msgstr "这方案的根辅助核算项目"
+msgstr "这方案的根辅助核算项"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
-msgstr "科目6ID"
+msgstr "项6ID"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@@ -332,7 +332,7 @@ msgstr "数量"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
-msgstr "科目ID"
+msgstr "项ID"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@@ -347,7 +347,7 @@ msgstr "确定"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
-msgstr "根辅助核算项目"
+msgstr "根项"
#. module: account_analytic_plans
#: wizard_view:create.model,info:0
@@ -363,7 +363,7 @@ msgstr "序列"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
-msgstr "辅助核算项目"
+msgstr "辅助核算项"
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
@@ -397,4 +397,4 @@ msgstr "在"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
msgid "From Date"
-msgstr "根据日期"
+msgstr "日期从"
diff --git a/addons/account_anglo_saxon/i18n/zh_CN.po b/addons/account_anglo_saxon/i18n/zh_CN.po
new file mode 100644
index 00000000000..5014f9f025b
--- /dev/null
+++ b/addons/account_anglo_saxon/i18n/zh_CN.po
@@ -0,0 +1,64 @@
+# Chinese (Simplified) translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-24 12:50+0000\n"
+"PO-Revision-Date: 2010-07-13 08:42+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: 2010-07-14 03:37+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: account_anglo_saxon
+#: view:product.category:0
+msgid " Accounting Property"
+msgstr " 会计属性"
+
+#. module: account_anglo_saxon
+#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
+msgid ""
+"This module will support the Anglo-Saxons accounting methodology by \n"
+" changing the accounting logic with stock transactions. The difference "
+"between the Anglo-Saxon accounting countries \n"
+" and the Rhine or also called Continental accounting countries is the "
+"moment of taking the Cost of Goods Sold versus Cost of Sales. \n"
+" Anglo-Saxons accounting does take the cost when sales invoice is "
+"created, Continental accounting will take the cost at he moment the goods "
+"are shipped.\n"
+" This module will add this functionality by using a interim account, to "
+"store the value of shipped goods and will contra book this interim account \n"
+" when the invoice is created to transfer this amount to the debtor or "
+"creditor account."
+msgstr ""
+
+#. module: account_anglo_saxon
+#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
+msgid "Stock Account"
+msgstr "库存科目"
+
+#. module: account_anglo_saxon
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "无效XML视图结构!"
+
+#. module: account_anglo_saxon
+#: field:product.category,property_account_creditor_price_difference_categ:0
+#: field:product.template,property_account_creditor_price_difference:0
+msgid "Price Difference Account"
+msgstr "价格差异科目"
+
+#. module: account_anglo_saxon
+#: help:product.category,property_account_creditor_price_difference_categ:0
+#: help:product.template,property_account_creditor_price_difference:0
+msgid ""
+"This account will be used to value price difference between purchase price "
+"and cost price."
+msgstr "这科目将用于在采购价格和销售价格之间的价格差异"
diff --git a/addons/account_budget/crossovered_budget_view.xml b/addons/account_budget/crossovered_budget_view.xml
index 81c5e67f961..c022eca0c68 100644
--- a/addons/account_budget/crossovered_budget_view.xml
+++ b/addons/account_budget/crossovered_budget_view.xml
@@ -148,7 +148,7 @@
-
+
@@ -181,7 +181,7 @@
-
+
diff --git a/addons/account_budget/i18n/zh_CN.po b/addons/account_budget/i18n/zh_CN.po
index 484a556fa51..88406400639 100644
--- a/addons/account_budget/i18n/zh_CN.po
+++ b/addons/account_budget/i18n/zh_CN.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 06:58+0000\n"
+"PO-Revision-Date: 2010-07-13 08:55+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: 2010-06-22 04:18+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_budget
#: field:crossovered.budget,creating_user_id:0
msgid "Responsible User"
-msgstr "责任用户"
+msgstr "负责用户"
#. module: account_budget
#: rml:account.budget:0
@@ -30,7 +30,7 @@ msgstr "% 执行%"
#: model:ir.actions.act_window,name:account_budget.open_budget_post_form
#: model:ir.ui.menu,name:account_budget.menu_budget_post_form
msgid "Budgetary Positions"
-msgstr "预算位于"
+msgstr "预算状况"
#. module: account_budget
#: constraint:ir.actions.act_window:0
@@ -75,7 +75,7 @@ msgstr "会计期间"
#: wizard_field:wizard.crossovered.budget,init,date_to:0
#: wizard_field:wizard.crossovered.budget.summary,init,date_to:0
msgid "End of period"
-msgstr "会计期间结束"
+msgstr "结束会计期间"
#. module: account_budget
#: rml:account.budget:0
@@ -183,7 +183,7 @@ msgstr ""
#: rml:account.budget:0
#: rml:crossovered.budget.report:0
msgid "%"
-msgstr ""
+msgstr "%"
#. module: account_budget
#: rml:account.analytic.account.budget:0
@@ -194,7 +194,7 @@ msgstr "说明"
#. module: account_budget
#: rml:account.analytic.account.budget:0
msgid "Analytic Account :"
-msgstr "辅助核算项目:"
+msgstr "辅助核算项:"
#. module: account_budget
#: wizard_button:account.budget.report,init,report:0
@@ -207,7 +207,7 @@ msgstr "打印"
#. module: account_budget
#: rml:account.budget:0
msgid "A/c No."
-msgstr ""
+msgstr "A/c No."
#. module: account_budget
#: rml:account.analytic.account.budget:0
@@ -369,7 +369,7 @@ msgstr "预算项详情"
#: field:crossovered.budget.lines,general_budget_id:0
#: model:ir.model,name:account_budget.model_account_budget_post
msgid "Budgetary Position"
-msgstr "预算位于"
+msgstr "预算状况"
#. module: account_budget
#: wizard_field:account.budget.report,init,date1:0
@@ -377,7 +377,7 @@ msgstr "预算位于"
#: wizard_field:wizard.crossovered.budget,init,date_from:0
#: wizard_field:wizard.crossovered.budget.summary,init,date_from:0
msgid "Start of period"
-msgstr "期初日期"
+msgstr "开始会计期间"
#. module: account_budget
#: model:ir.actions.report.xml,name:account_budget.account_analytic_account_budget
@@ -422,7 +422,7 @@ msgstr "会计年度"
#. module: account_budget
#: field:crossovered.budget.lines,analytic_account_id:0
msgid "Analytic Account"
-msgstr "辅助核算项目"
+msgstr "辅助核算项"
#. module: account_budget
#: rml:crossovered.budget.report:0
@@ -441,7 +441,7 @@ msgstr "延伸"
#: view:account.budget.post:0
#: field:account.budget.post,account_ids:0
msgid "Accounts"
-msgstr "科目"
+msgstr "项"
#. module: account_budget
#: model:ir.actions.report.xml,name:account_budget.account_budget
diff --git a/addons/account_coda/i18n/zh_CN.po b/addons/account_coda/i18n/zh_CN.po
new file mode 100644
index 00000000000..2dc2a0b20ef
--- /dev/null
+++ b/addons/account_coda/i18n/zh_CN.po
@@ -0,0 +1,169 @@
+# Chinese (Simplified) translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-24 13:11+0000\n"
+"PO-Revision-Date: 2010-07-13 09:17+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: 2010-07-14 03:37+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: account_coda
+#: field:account.coda,journal_id:0
+#: wizard_field:account.coda_import,init,journal_id:0
+msgid "Bank Journal"
+msgstr "银行记录集合"
+
+#. module: account_coda
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
+
+#. module: account_coda
+#: wizard_field:account.coda_import,extraction,note:0
+msgid "Log"
+msgstr "日志"
+
+#. module: account_coda
+#: wizard_button:account.coda_import,extraction,open:0
+msgid "_Open Statement"
+msgstr "打开对帐单"
+
+#. module: account_coda
+#: model:ir.module.module,shortdesc:account_coda.module_meta_information
+msgid "Account CODA"
+msgstr "帐号 CODA"
+
+#. module: account_coda
+#: field:account.coda,name:0
+msgid "Coda file"
+msgstr "Coda文件"
+
+#. module: account_coda
+#: wizard_view:account.coda_import,init:0
+msgid "Clic on 'New' to select your file :"
+msgstr "点击\"新\"去选择你的文件:"
+
+#. module: account_coda
+#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
+msgid "Import Coda File"
+msgstr "导入CODA文件"
+
+#. module: account_coda
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "在动作定义使用了无效的模块名。"
+
+#. module: account_coda
+#: field:account.coda,note:0
+msgid "Import log"
+msgstr "导入日志"
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,def_receivable:0
+msgid "Default receivable Account"
+msgstr "默认应收帐款科目"
+
+#. module: account_coda
+#: model:ir.module.module,description:account_coda.module_meta_information
+msgid ""
+"Module provides functionality to import\n"
+" bank statements from .csv file.\n"
+" Import coda file wizard is used to import bank statements."
+msgstr ""
+"模块提供导入功能\n"
+" 银行对帐单从 .csv文件\n"
+" 导入CODA文件向导用于导入银行对帐单"
+
+#. module: account_coda
+#: wizard_button:account.coda_import,extraction,end:0
+msgid "_Close"
+msgstr "关闭"
+
+#. module: account_coda
+#: field:account.coda,statement_id:0
+msgid "Generated Bank Statement"
+msgstr "生成银行对帐单"
+
+#. module: account_coda
+#: view:account.coda:0
+#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
+#: model:ir.actions.act_window,name:account_coda.action_account_coda
+msgid "Coda import"
+msgstr "coda导入"
+
+#. module: account_coda
+#: field:account.coda,user_id:0
+msgid "User"
+msgstr "用户"
+
+#. module: account_coda
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "无效XML视图结构!"
+
+#. module: account_coda
+#: model:ir.model,name:account_coda.model_account_coda
+msgid "coda for an Account"
+msgstr "帐号的CODA"
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,def_payable:0
+msgid "Default Payable Account"
+msgstr "默认应付帐款科目"
+
+#. module: account_coda
+#: model:ir.ui.menu,name:account_coda.menu_account_coda
+msgid "Coda Statements"
+msgstr "CODA"
+
+#. module: account_coda
+#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
+msgid "Import Coda Statements"
+msgstr "导入CODA"
+
+#. module: account_coda
+#: wizard_button:account.coda_import,init,extraction:0
+msgid "_Ok"
+msgstr "确定"
+
+#. module: account_coda
+#: wizard_view:account.coda_import,extraction:0
+#: wizard_view:account.coda_import,init:0
+msgid "Import Coda Statement"
+msgstr "导入CODA"
+
+#. module: account_coda
+#: field:account.bank.statement,coda_id:0
+msgid "Coda"
+msgstr "CODA"
+
+#. module: account_coda
+#: wizard_view:account.coda_import,extraction:0
+msgid "Results :"
+msgstr "结果:"
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,coda:0
+msgid "Coda File"
+msgstr "CODA文件"
+
+#. module: account_coda
+#: field:account.coda,date:0
+msgid "Import Date"
+msgstr "导入日期"
+
+#. module: account_coda
+#: wizard_view:account.coda_import,init:0
+msgid "Select your bank journal :"
+msgstr "选择你银行记录集合:"
diff --git a/addons/account_followup/__openerp__.py b/addons/account_followup/__openerp__.py
index 5aefa0abc96..7d47d46f926 100644
--- a/addons/account_followup/__openerp__.py
+++ b/addons/account_followup/__openerp__.py
@@ -53,6 +53,7 @@
'account_followup_data.xml'
],
'demo_xml': ['account_followup_demo.xml'],
+ 'test': ['test/account_followup.yml'],
'installable': True,
'active': False,
'certificate': '0072481076453',
diff --git a/addons/account_followup/i18n/zh_CN.po b/addons/account_followup/i18n/zh_CN.po
index 1b2d7facdc2..1224effdbc6 100644
--- a/addons/account_followup/i18n/zh_CN.po
+++ b/addons/account_followup/i18n/zh_CN.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 07:04+0000\n"
+"PO-Revision-Date: 2010-07-13 09:42+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: 2010-06-22 04:03+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Date :"
-msgstr "打印日期:"
+msgstr "日期:"
#. module: account_followup
#: wizard_field:account_followup.followup.print.all,next,partner_ids:0
@@ -35,12 +35,12 @@ msgstr "客户参考:"
#: model:ir.actions.act_window,name:account_followup.act_account_partner_account_move_payable_all
#: model:ir.ui.menu,name:account_followup.menu_account_move_open_unreconcile_payable
msgid "All payable entries"
-msgstr "所有应付款凭证"
+msgstr "所有应付款"
#. module: account_followup
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "在这动作定义中有无效的模块名"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_followup
#: field:account_followup.followup.line,description:0
@@ -66,7 +66,7 @@ msgstr "借方合计"
#: view:account_followup.followup.line:0
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(user_signature)s: User name"
-msgstr "%(user_signature)s:用户名 %(user_signature)"
+msgstr "%(user_signature)s:用户名"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
@@ -176,7 +176,7 @@ msgstr "最近跟进"
#. module: account_followup
#: view:account.move.line:0
msgid "Partner entries"
-msgstr "业务伙伴凭证"
+msgstr "业务伙伴记录"
#. module: account_followup
#: model:ir.model,name:account_followup.model_account_followup_followup_line
@@ -191,7 +191,7 @@ msgstr "业务伙伴选择"
#. module: account_followup
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr "无效的视图结构XML文件!"
+msgstr "无效XML视图结构!"
#. module: account_followup
#: field:account_followup.followup.line,start:0
@@ -211,7 +211,7 @@ msgstr "给业务伙伴一个提醒电子邮件"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Li."
-msgstr ""
+msgstr "Li."
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line1
@@ -242,7 +242,7 @@ msgstr ""
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
-msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: account_followup
#: wizard_button:account_followup.followup.print.all,summary,end:0
@@ -269,7 +269,7 @@ msgstr "月末"
#: view:account_followup.followup.line:0
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(company_name)s: User's Company name"
-msgstr "公司名称:%(company_currency)s"
+msgstr "用户公司名称:%(company_currency)s"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.act_account_partner_account_move_all
@@ -291,7 +291,7 @@ msgstr "发送跟进"
#. module: account_followup
#: field:account.move.line,followup_line_id:0
msgid "Follow-up Level"
-msgstr "跟进期限"
+msgstr "跟进等级"
#. module: account_followup
#: field:account_followup.stat,credit:0
@@ -327,7 +327,7 @@ msgstr "跟进明细"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Document : Customer account statement"
-msgstr "客户科目报表"
+msgstr "文档: 客户科目对帐单"
#. module: account_followup
#: view:account_followup.stat:0
@@ -337,7 +337,7 @@ msgstr "跟进明细"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(company_currency)s: User's Company Currency"
-msgstr "当前公司:%(company_currency)s"
+msgstr "当前用户公司:%(company_currency)s"
#. module: account_followup
#: field:account_followup.stat,balance:0
@@ -379,6 +379,17 @@ msgid ""
"Best Regards,\n"
"\t\t\t"
msgstr ""
+"\n"
+"尊敬的%(partner_name)s,\n"
+"\n"
+"我们不得不发这个通知, 你的帐户已经严重逾期\n"
+"请立即支付, 否则我们不得不停止你的帐户, 并停止一切业务.\n"
+"\n"
+"请采取措施确保在8天内支付.\n"
+"如有疑问请立即联系我们.\n"
+" "
+" 商祺\n"
+"\t\t\t"
#. module: account_followup
#: rml:account_followup.followup.print:0
@@ -413,7 +424,7 @@ msgstr "最后"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Maturity"
-msgstr "到期"
+msgstr "到期日期"
#. module: account_followup
#: model:ir.actions.report.xml,name:account_followup.account_followup_followup_report
@@ -459,7 +470,7 @@ msgstr "到期日期"
#: view:account_followup.followup.line:0
#: wizard_view:account_followup.followup.print.all,next:0
msgid "Legend"
-msgstr "说明"
+msgstr "图表"
#. module: account_followup
#: field:account_followup.followup.line,sequence:0
@@ -508,9 +519,6 @@ msgstr "拖延天数"
msgid "Print Follow Ups & Send Mails"
msgstr "打印跟进&发送电子邮件"
-#~ msgid "Follow-up Message"
-#~ msgstr "跟进消息"
-
#~ msgid ""
#~ "\n"
#~ " Modules to automate letters for unpaid invoices, with multi-level "
@@ -551,11 +559,3 @@ msgstr "打印跟进&发送电子邮件"
#~ "注意:如果你想要变更一业务伙伴/凭证的跟进级别,你可以在菜单:\n"
#~ " 财务管理/报表/跟进/所有应收账款凭证\n"
#~ "\n"
-
-#~ msgid ""
-#~ "Do not change message text, if you want to send email in partner language, "
-#~ "or configre from company"
-#~ msgstr "如果你想在发送的电子邮件中用业务伙伴的语言,请不要改变着消息的文本"
-
-#~ msgid "Send Email in Partner Language"
-#~ msgstr "发送到业务伙伴Email的语言"
diff --git a/addons/account_invoice_layout/i18n/zh_CN.po b/addons/account_invoice_layout/i18n/zh_CN.po
index 152a4cbf20f..3028ea58131 100644
--- a/addons/account_invoice_layout/i18n/zh_CN.po
+++ b/addons/account_invoice_layout/i18n/zh_CN.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 07:11+0000\n"
+"PO-Revision-Date: 2010-07-13 10:00+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: 2010-06-22 04:11+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout
@@ -30,12 +30,12 @@ msgstr "发票日期:"
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
-msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Cancelled Invoice"
-msgstr "取消发票"
+msgstr "被取消的发票"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
@@ -82,7 +82,7 @@ msgstr "单价"
#. module: account_invoice_layout
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "在这动作定义中有无效的模块名"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
@@ -102,7 +102,7 @@ msgstr "发票明细"
#. module: account_invoice_layout
#: view:account.invoice.line:0
msgid "Seq."
-msgstr "序号"
+msgstr "序列"
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
@@ -117,7 +117,7 @@ msgstr "客户参考"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid ")"
-msgstr ""
+msgstr ")"
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
@@ -132,7 +132,7 @@ msgstr "价格"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "/ ("
-msgstr ""
+msgstr "/ ("
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -187,12 +187,12 @@ msgstr "分页符"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Document:"
-msgstr "票据:"
+msgstr "文档:"
#. module: account_invoice_layout
#: wizard_view:wizard.notify_message,init:0
msgid "Select Message"
-msgstr "选择消息"
+msgstr "选择信息"
#. module: account_invoice_layout
#: view:notify.message:0
@@ -242,7 +242,7 @@ msgstr "数量"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Refund"
-msgstr "退货"
+msgstr "退还"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -252,7 +252,7 @@ msgstr "增值税"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Separator Line"
-msgstr "分割线"
+msgstr "分隔线"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -267,17 +267,17 @@ msgstr "备注:"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tax"
-msgstr "税金"
+msgstr "税"
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
msgid "account_invoice_layout"
-msgstr ""
+msgstr "发票式样"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total (Excl. taxes):"
-msgstr "(不含税):"
+msgstr "合计(不含税):"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@@ -292,7 +292,7 @@ msgstr "取消"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Refund"
-msgstr "供应商退货"
+msgstr "供应商退还"
#. module: account_invoice_layout
#: wizard_field:wizard.notify_message,init,message:0
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 29798d34b91..5ba248635ed 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -207,7 +207,7 @@
- Payment Orders to Validate
+ Payment Orders to Approvepayment.orderformtree,form
diff --git a/addons/account_payment/i18n/cs.po b/addons/account_payment/i18n/cs.po
index 0c595581354..eabda793496 100644
--- a/addons/account_payment/i18n/cs.po
+++ b/addons/account_payment/i18n/cs.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-04-07 22:24+0000\n"
-"Last-Translator: mitev.dmitry \n"
+"PO-Revision-Date: 2010-07-13 10:09+0000\n"
+"Last-Translator: Kuvaly [LCT] \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-06-22 04:10+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
@@ -29,7 +29,7 @@ msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Set to draft"
-msgstr ""
+msgstr "Uložit jako návrh"
#. module: account_payment
#: help:payment.order,mode:0
@@ -39,7 +39,7 @@ msgstr ""
#. module: account_payment
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Špatný název modelu v definici akce"
#. module: account_payment
#: view:payment.line:0
@@ -85,7 +85,7 @@ msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Account Entry Line"
-msgstr ""
+msgstr "Účet příchozí linky"
#. module: account_payment
#: wizard_button:populate_payment,search,create:0
@@ -358,6 +358,7 @@ msgstr ""
#. module: account_payment
#: rml:payment.order:0
+#: wizard_field:populate_statement,init,d_date:0
msgid "Date"
msgstr ""
@@ -385,6 +386,7 @@ msgstr ""
#. module: account_payment
#: field:payment.line,ml_maturity_date:0
+#: selection:populate_statement,init,date_select:0
msgid "Maturity Date"
msgstr ""
diff --git a/addons/account_payment/i18n/zh_CN.po b/addons/account_payment/i18n/zh_CN.po
index 0481f778d2a..13591d2cb00 100644
--- a/addons/account_payment/i18n/zh_CN.po
+++ b/addons/account_payment/i18n/zh_CN.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-06-04 13:32+0000\n"
-"Last-Translator: Eleanor Chen \n"
+"PO-Revision-Date: 2010-07-13 11:02+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: 2010-06-22 04:10+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
#: field:payment.order,date_planned:0
msgid "Scheduled date if fixed"
-msgstr "预定日期如果是固定"
+msgstr "指定日期(如果是固定)"
#. module: account_payment
#: field:payment.line,currency:0
@@ -39,21 +39,23 @@ msgstr "选择使用的付款方式"
#. module: account_payment
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "在这动作定义中有无效的模块名"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_payment
#: view:payment.line:0
#: field:payment.line,info_owner:0
#: view:payment.order:0
msgid "Owner Account"
-msgstr "自己的账号"
+msgstr "所有者科目"
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
msgid ""
"The amount which should be paid at the current date\n"
"minus the amount which is already in payment order"
-msgstr "该金额应在当前日期支付扣减付款单"
+msgstr ""
+"在当前日期应支付的金额\n"
+"减去的金额在付款单中"
#. module: account_payment
#: help:payment.line,date:0
@@ -75,7 +77,7 @@ msgstr "自由"
#. module: account_payment
#: wizard_field:populate_payment,search,entries:0
msgid "Entries"
-msgstr "凭证"
+msgstr "记录"
#. module: account_payment
#: wizard_field:populate_payment,init,duedate:0
@@ -85,7 +87,7 @@ msgstr "到期日期"
#. module: account_payment
#: view:account.move.line:0
msgid "Account Entry Line"
-msgstr "凭证明细"
+msgstr "分录明细"
#. module: account_payment
#: wizard_button:populate_payment,search,create:0
@@ -111,7 +113,7 @@ msgstr "公司货币的合计"
#. module: account_payment
#: selection:payment.order,state:0
msgid "Cancelled"
-msgstr "取消"
+msgstr "已取消"
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
@@ -172,12 +174,12 @@ msgstr "付款明细"
#. module: account_payment
#: help:payment.order,date_planned:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
-msgstr "如果你选择的优先日期是固定的选择一个日期"
+msgstr "如果你选择的优先日期是固定的, 选择一个日期"
#. module: account_payment
#: selection:payment.line,state:0
msgid "Structured"
-msgstr "规范"
+msgstr "已安排"
#. module: account_payment
#: field:payment.order,state:0
@@ -213,7 +215,7 @@ msgid ""
"Choose an option for the Payment Order:'Fixed' stands for a date specified "
"by you.'Directly' stands for the direct execution.'Due date' stands for the "
"scheduled date of execution."
-msgstr "选择付款单选项‘固定’由你指定一个指定的日期.‘直接’直接执行.‘预定日期’指定一个时间表的日期执行."
+msgstr "选择付款单选项‘固定’由你指定一个指定的日期. ‘直接’表示直接执行. ‘到期日期’指定一个时间表的日期执行."
#. module: account_payment
#: view:account.move.line:0
@@ -239,7 +241,7 @@ msgstr "目标科目"
#: view:payment.line:0
#: view:payment.order:0
msgid "Desitination Account"
-msgstr "目标账号"
+msgstr "目标科目"
#. module: account_payment
#: constraint:ir.ui.view:0
@@ -266,7 +268,7 @@ msgstr "当前金额合计"
#. module: account_payment
#: view:payment.order:0
msgid "Make Payments"
-msgstr "付款"
+msgstr "建立付款"
#. module: account_payment
#: field:payment.line,state:0
@@ -343,7 +345,7 @@ msgstr "贷方合计"
#. module: account_payment
#: model:ir.actions.wizard,name:account_payment.wizard_populate_payment
msgid "Populate payment"
-msgstr "填写付款"
+msgstr "填入付款"
#. module: account_payment
#: field:payment.order,user_id:0
@@ -358,6 +360,7 @@ msgstr "付款明细"
#. module: account_payment
#: rml:payment.order:0
+#: wizard_field:populate_statement,init,d_date:0
msgid "Date"
msgstr "日期"
@@ -385,8 +388,9 @@ msgstr "创建日期"
#. module: account_payment
#: field:payment.line,ml_maturity_date:0
+#: selection:populate_statement,init,date_select:0
msgid "Maturity Date"
-msgstr "到期日期"
+msgstr "付款到期日期"
#. module: account_payment
#: view:account.bank.statement:0
@@ -459,7 +463,7 @@ msgstr "信息"
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
-msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: account_payment
#: model:ir.actions.wizard,name:account_payment.wizard_pay_payment
@@ -486,7 +490,7 @@ msgstr "在公司货币的付款金额"
#. module: account_payment
#: wizard_view:populate_payment,init:0
msgid "Search Payment lines"
-msgstr "付款明细"
+msgstr "查询付款明细"
#. module: account_payment
#: field:payment.line,amount_currency:0
@@ -501,18 +505,18 @@ msgstr "沟通2"
#. module: account_payment
#: field:payment.line,bank_id:0
msgid "Destination Bank account"
-msgstr "银行账号"
+msgstr "目标银行帐号"
#. module: account_payment
#: help:payment.mode,journal:0
msgid "Cash Journal for the Payment Mode"
-msgstr "付款方式的现金分类帐"
+msgstr "付款方式的现金记录集合"
#. module: account_payment
#: field:payment.mode,bank_id:0
#: rml:payment.order:0
msgid "Bank account"
-msgstr "银行账号"
+msgstr "银行帐号"
#. module: account_payment
#: view:payment.order:0
@@ -535,7 +539,7 @@ msgstr "付款"
#. module: account_payment
#: field:payment.line,move_line_id:0
msgid "Entry line"
-msgstr ""
+msgstr "明细"
#. module: account_payment
#: help:payment.line,communication:0
@@ -559,12 +563,12 @@ msgstr "查找"
#: view:payment.line:0
#: view:payment.order:0
msgid "Entry Information"
-msgstr "凭证信息"
+msgstr "信息"
#. module: account_payment
#: model:ir.actions.wizard,name:account_payment.wizard_populate_statement
msgid "Populate Statement with Payment lines"
-msgstr "填写付款明细"
+msgstr "填入付款明细"
#. module: account_payment
#: field:payment.line,order_id:0
@@ -607,12 +611,12 @@ msgstr "付款方式"
#. module: account_payment
#: help:payment.mode,bank_id:0
msgid "Bank Account for the Payment Mode"
-msgstr "银行账号付款方式"
+msgstr "这付款方式的银行帐号"
#. module: account_payment
#: field:payment.mode,journal:0
msgid "Journal"
-msgstr "分类帐"
+msgstr "记录集合"
#~ msgid ""
#~ "\n"
diff --git a/addons/account_payment/test/account_payment.yml b/addons/account_payment/test/account_payment.yml
index f24ad4dc443..3379ebe9003 100644
--- a/addons/account_payment/test/account_payment.yml
+++ b/addons/account_payment/test/account_payment.yml
@@ -1,8 +1,5 @@
-
- In order to test account_payment in OpenERP I create a new record Type
--
--
- Creating a payment.type record
+ In order to test account_payment in OpenERP I create a new record Type.
-
!record {model: payment.type, id: payment_type_t0}:
code: T0
@@ -127,19 +124,3 @@
- state == 'done'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/account_report/i18n/zh_CN.po b/addons/account_report/i18n/zh_CN.po
index 2f06664bc57..962011baaef 100644
--- a/addons/account_report/i18n/zh_CN.po
+++ b/addons/account_report/i18n/zh_CN.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 07:14+0000\n"
+"PO-Revision-Date: 2010-07-13 16:27+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: 2010-06-22 03:55+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report
@@ -31,7 +31,7 @@ msgstr "选择一个PDF文件"
#. module: account_report
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "在这动作定义中有无效的模块名"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_report
#: view:account.report.report:0
@@ -61,12 +61,12 @@ msgstr "其它"
#. module: account_report
#: view:account.report.report:0
msgid "balance(['ACCOUNT_CODE',],fiscalyear)"
-msgstr ""
+msgstr "余额(['ACCOUNT_CODE',],fiscalyear)"
#. module: account_report
#: rml:print.indicators:0
msgid "Tabular Summary"
-msgstr "一览表"
+msgstr "表格摘要"
#. module: account_report
#: view:account.report.report:0
@@ -128,7 +128,7 @@ msgstr "指标过去的记录"
#. module: account_report
#: view:account.report.report:0
msgid "credit(['ACCOUNT_CODE',],fiscalyear)"
-msgstr ""
+msgstr "贷方(['ACCOUNT_CODE',],fiscalyear)"
#. module: account_report
#: view:account.report.report:0
@@ -200,7 +200,7 @@ msgstr "选择标准"
#. module: account_report
#: view:account.report.report:0
msgid "debit(['ACCOUNT_CODE',],fiscalyear)"
-msgstr ""
+msgstr "借方(['ACCOUNT_CODE',],fiscalyear)"
#. module: account_report
#: view:account.report.report:0
@@ -254,7 +254,7 @@ msgstr "正常"
#. module: account_report
#: view:account.report.report:0
msgid "Example: (balance(['6','45'],-1) - credit(['7'])) / report('RPT1')"
-msgstr ""
+msgstr "例子: (balance(['6','45'],-1) - credit(['7'])) / report('RPT1')"
#. module: account_report
#: field:account.report.report,active:0
@@ -289,7 +289,7 @@ msgstr "表达式:"
#. module: account_report
#: view:account.report.report:0
msgid "report('REPORT_CODE')"
-msgstr ""
+msgstr "报表('REPORT_CODE')"
#. module: account_report
#: field:account.report.report,expression:0
@@ -316,7 +316,7 @@ msgstr "代码"
#. module: account_report
#: field:account.report.history,tmp:0
msgid "temp"
-msgstr ""
+msgstr "temp"
#. module: account_report
#: field:account.report.history,period_id:0
@@ -331,7 +331,7 @@ msgstr "普通"
#. module: account_report
#: view:account.report.report:0
msgid "Legend of operators"
-msgstr "操作说明"
+msgstr "操作员说明"
#. module: account_report
#: wizard_button:print.indicators,init,end:0
@@ -349,7 +349,7 @@ msgstr "子项"
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
-msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
+msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
#. module: account_report
#: help:account.report.report,goodness_limit:0
@@ -367,7 +367,7 @@ msgstr "打印指标"
#. module: account_report
#: view:account.report.report:0
msgid "+ - * / ( )"
-msgstr ""
+msgstr "+ - * / ( )"
#. module: account_report
#: rml:accounting.report:0
@@ -407,12 +407,12 @@ msgstr "其它报表"
msgid ""
"Note: The second arguement 'fiscalyear' and 'period' are optional "
"arguements.If the value is -1,previous fiscalyear or period is considered."
-msgstr "备注:第二参数‘会计年度’和‘会计期间’是可选参数.如果值为-1会计年度或会计期间是以前的."
+msgstr "备注:第二参数‘会计年度’和‘会计期间’是可选参数. 如果值为-1会计年度或会计期间是以前的."
#. module: account_report
#: rml:print.indicators:0
msgid ")"
-msgstr ""
+msgstr ")"
#. module: account_report
#: model:ir.actions.act_window,name:account_report.action_account_report_tree_view_fiscal
@@ -423,7 +423,7 @@ msgstr "财务报表"
#. module: account_report
#: selection:print.indicators,init,select_base:0
msgid "Based on Fiscal Periods"
-msgstr "基于会计会计期间"
+msgstr "基于会计期间"
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.report_print_indicators
@@ -457,7 +457,7 @@ msgstr "选择标准"
#. module: account_report
#: view:account.report.report:0
msgid "tax_code(['ACCOUNT_TAX_CODE',],period)"
-msgstr ""
+msgstr "税号(['ACCOUNT_TAX_CODE',],period)"
#. module: account_report
#: field:account.report.history,fiscalyear_id:0
@@ -512,7 +512,7 @@ msgstr "金额"
#. module: account_report
#: rml:print.indicators:0
msgid "1cm 27.7cm 20cm 27.7cm"
-msgstr ""
+msgstr "1cm 27.7cm 20cm 27.7cm"
#. module: account_report
#: model:ir.module.module,description:account_report.module_meta_information
diff --git a/addons/account_reporting/i18n/zh_CN.po b/addons/account_reporting/i18n/zh_CN.po
index bf346e5f389..9f50d6c9769 100644
--- a/addons/account_reporting/i18n/zh_CN.po
+++ b/addons/account_reporting/i18n/zh_CN.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 07:15+0000\n"
+"PO-Revision-Date: 2010-07-13 16:33+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: 2010-06-22 04:15+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_reporting
@@ -30,12 +30,12 @@ msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Bold"
-msgstr ""
+msgstr "Helvetica-Bold"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica"
-msgstr ""
+msgstr "Helvetica"
#. module: account_reporting
#: field:account.report.bs,note:0
@@ -56,17 +56,17 @@ msgstr "科目余额表"
#. module: account_reporting
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "在这动作定义中有无效的模块名"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier"
-msgstr ""
+msgstr "Courier"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-BoldOblique"
-msgstr ""
+msgstr "Courier-BoldOblique"
#. module: account_reporting
#: wizard_button:account.account.balancesheet.report,init,report:0
@@ -93,7 +93,9 @@ msgstr "科目和子科目报表对象"
msgid ""
"Financial and accounting reporting\n"
" Balance Sheet Report"
-msgstr "财务和会计报表 资产负债表"
+msgstr ""
+"财务和会计报表 \n"
+"资产负债表"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
@@ -103,7 +105,7 @@ msgstr "科目报表对象"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Oblique"
-msgstr ""
+msgstr "Courier-Oblique"
#. module: account_reporting
#: constraint:ir.ui.view:0
@@ -134,7 +136,7 @@ msgstr "备注"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-BoldItalic"
-msgstr ""
+msgstr "Times-BoldItalic"
#. module: account_reporting
#: model:ir.model,name:account_reporting.model_account_report_bs
@@ -144,12 +146,12 @@ msgstr "会计报表资产负债表"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Bold"
-msgstr ""
+msgstr "Courier-Bold"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Italic"
-msgstr ""
+msgstr "Times-Italic"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
@@ -184,7 +186,7 @@ msgstr "序列"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Bold"
-msgstr ""
+msgstr "Times-Bold"
#. module: account_reporting
#: view:account.report.bs:0
@@ -225,12 +227,12 @@ msgstr "取消"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Roman"
-msgstr ""
+msgstr "Times-Roman"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Helvetica-Oblique"
-msgstr ""
+msgstr "Helvetica-Oblique"
#. module: account_reporting
#: field:account.report.bs,font_style:0
diff --git a/addons/account_tax_include/i18n/zh_CN.po b/addons/account_tax_include/i18n/zh_CN.po
index b154a5dbb56..da1e07f44ac 100644
--- a/addons/account_tax_include/i18n/zh_CN.po
+++ b/addons/account_tax_include/i18n/zh_CN.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 07:29+0000\n"
+"PO-Revision-Date: 2010-07-13 16:34+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: 2010-06-22 04:03+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_tax_include
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr "无效的视图结构XML文件!"
+msgstr "无效XML视图结构!"
#. module: account_tax_include
#: field:account.invoice,price_type:0
diff --git a/addons/account_voucher/i18n/zh_CN.po b/addons/account_voucher/i18n/zh_CN.po
index b31cfb9d4ca..8ba6cb29fa0 100644
--- a/addons/account_voucher/i18n/zh_CN.po
+++ b/addons/account_voucher/i18n/zh_CN.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-20 07:30+0000\n"
+"PO-Revision-Date: 2010-07-14 03:20+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: 2010-06-22 04:17+0000\n"
+"X-Launchpad-Export-Date: 2010-07-14 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.act_account_acount_move_line_open1
msgid "Opening Balance Entry"
-msgstr "期初余额凭证"
+msgstr "期初余额"
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_receipt_bakreceipt_voucher_list
@@ -41,7 +41,7 @@ msgstr "状态:"
#. module: account_voucher
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr "在这动作定义中有无效的模块名"
+msgstr "在动作定义使用了无效的模块名。"
#. module: account_voucher
#: rml:voucher.cash_amount:0
@@ -69,12 +69,12 @@ msgstr "公司"
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_voucher_form
msgid "Journal Voucher"
-msgstr "原始凭证分类帐"
+msgstr "原始凭证"
#. module: account_voucher
#: rml:voucher.cash_receipt.drcr:0
msgid ","
-msgstr ""
+msgstr ","
#. module: account_voucher
#: view:account.voucher:0
@@ -105,7 +105,7 @@ msgstr "科目"
#. module: account_voucher
#: rml:voucher.cash_amount:0
msgid "D"
-msgstr ""
+msgstr "D"
#. module: account_voucher
#: field:account.account,level:0
@@ -115,7 +115,7 @@ msgstr "级"
#. module: account_voucher
#: view:account.move:0
msgid "Account Entry Line"
-msgstr "凭证明细"
+msgstr "明细"
#. module: account_voucher
#: view:account.move:0
@@ -139,18 +139,18 @@ msgstr "收款人签字"
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "No."
-msgstr ""
+msgstr "No."
#. module: account_voucher
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Amount (in words) :"
-msgstr "金额:"
+msgstr "金额(口头上):"
#. module: account_voucher
#: field:account.voucher.line,account_analytic_id:0
msgid "Analytic Account"
-msgstr "辅助核算项目"
+msgstr "辅助核算项"
#. module: account_voucher
#: selection:account.move,voucher_type:0
@@ -159,7 +159,7 @@ msgstr "辅助核算项目"
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_sale_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_sale_voucher_form
msgid "Journal Sale Voucher"
-msgstr "销售原始凭证分类帐"
+msgstr "销售原始凭证"
#. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_receipt_vou_voucher_list
@@ -346,12 +346,12 @@ msgstr "新的现金付款"
#. module: account_voucher
#: view:account.move:0
msgid "Optional Information"
-msgstr "其它信息"
+msgstr "可选择信息"
#. module: account_voucher
#: view:account.voucher:0
msgid "General Entries"
-msgstr "一般凭证"
+msgstr "一般记录"
#. module: account_voucher
#: field:account.voucher,date:0
@@ -362,7 +362,7 @@ msgstr "日期"
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid ":"
-msgstr ""
+msgstr ":"
#. module: account_voucher
#: field:account.account,type1:0
@@ -476,7 +476,7 @@ msgstr "说明"
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Canceled"
-msgstr "取消"
+msgstr "已取消"
#. module: account_voucher
#: selection:account.move,voucher_type:0
@@ -497,7 +497,7 @@ msgstr "银行收入"
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "-"
-msgstr ""
+msgstr "-"
#. module: account_voucher
#: selection:account.move,voucher_type:0
@@ -506,12 +506,12 @@ msgstr ""
#: model:ir.actions.act_window,name:account_voucher.action_view_jour_pur_voucher_form
#: model:ir.ui.menu,name:account_voucher.menu_action_view_jour_pur_voucher_form
msgid "Journal Purchase Voucher"
-msgstr "采购原始凭证分类帐"
+msgstr "采购原始凭证"
#. module: account_voucher
#: view:account.account:0
msgid "Closing Balance"
-msgstr "期末结余"
+msgstr "期末余额"
#. module: account_voucher
#: field:account.voucher.line,ref:0
@@ -524,7 +524,7 @@ msgstr "参考"
#: rml:voucher.cash_amount:0
#: rml:voucher.cash_receipt.drcr:0
msgid "Posted"
-msgstr "已审核"
+msgstr "已登帐"
#. module: account_voucher
#: field:account.voucher,name:0
@@ -534,22 +534,22 @@ msgstr "名称"
#. module: account_voucher
#: field:account.voucher,move_ids:0
msgid "Real Entry"
-msgstr "实际凭证"
+msgstr "实际记录"
#. module: account_voucher
#: model:ir.actions.wizard,name:account_voucher.wizard_account_voucher_open
msgid "Open a Voucher Entry"
-msgstr "打开一原始凭证记录"
+msgstr "打开一原始凭证"
#. module: account_voucher
#: field:account.voucher,move_id:0
msgid "Account Entry"
-msgstr "凭证"
+msgstr "分录"
#. module: account_voucher
#: view:account.voucher:0
msgid "Entry Lines"
-msgstr "凭证明细"
+msgstr "明细"
#. module: account_voucher
#: model:ir.ui.menu,name:account_voucher.menu_action_view_bank_rec_voucher_form
@@ -595,4 +595,4 @@ msgstr "银行收入原始凭证"
#: field:account.account,journal_id:0
#: field:account.voucher,journal_id:0
msgid "Journal"
-msgstr "分类帐"
+msgstr "记录集合"
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 13df5a496fc..7f74553f6bf 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -116,10 +116,10 @@ class account_voucher(osv.osv):
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
],'Entry Type', select=True , size=128, readonly=True, states={'draft':[('readonly',False)]}),
- 'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}),
+ 'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, domain=[('type','<>','view')]),
- 'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
+ 'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'draft':[('readonly',True)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'posted':[('readonly',True)]}),
'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=False),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
@@ -137,9 +137,8 @@ class account_voucher(osv.osv):
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount':fields.float('Amount', readonly=True),
- 'reference': fields.char('Voucher Reference', size=64),
- 'reference_type': fields.selection(_get_reference_type, 'Reference Type',
- required=True),
+ 'reference': fields.char('Reference', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Bank cheque number or payorder number"),
+ 'reference_type': fields.selection(_get_reference_type, 'Reference Type', required=True),
'number': fields.related('move_id', 'name', type="char", readonly=True, string='Number'),
'move_id':fields.many2one('account.move', 'Account Entry'),
'move_ids':fields.many2many('account.move.line', 'voucher_id', 'account_id', 'rel_account_move', 'Real Entry'),
@@ -280,7 +279,8 @@ class account_voucher(osv.osv):
'journal_id': journal.id,
'type' : inv.type,
'narration' : inv.narration and inv.narration or inv.name,
- 'date':inv.date
+ 'date':inv.date,
+ 'ref':inv.reference
}
if inv.period_id:
@@ -366,6 +366,10 @@ class account_voucher(osv.osv):
'move_id': move_id,
'move_ids':[(6, 0,line_ids)]
}
+
+ message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm")
+ self.log(cr, uid, inv.id, message)
+
self.write(cr, uid, [inv.id], rec)
return True
@@ -428,15 +432,17 @@ class account_voucher_line(osv.osv):
'type': lambda *a: 'cr'
}
- def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1):
- vals = {}
+ def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1, currency):
+ currency_pool = self.pool.get('res.currency')
+ company = self.pool.get('res.users').browse(cr, uid, uid).company_id
+
+ vals = {
+ 'account_id': False,
+ 'type': False ,
+ 'amount': False
+ }
if not partner_id:
- vals.update({
- 'account_id': False,
- 'type': False ,
- 'amount': False
- })
return {
'value' : vals
}
@@ -466,6 +472,9 @@ class account_voucher_line(osv.osv):
balance = partner.debit
ttype = 'cr'
+ if company.currency_id != currency:
+ balance = currency_pool.compute(cr, uid, company.currency_id.id, currency, balance)
+
vals.update({
'account_id': account_id,
'type': ttype,
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index 658b8f8429b..09425fe4451 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -35,9 +35,9 @@
-
+
-
+
@@ -46,14 +46,21 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
@@ -62,7 +69,7 @@
-
+
diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py
index f2c6507181c..38c8bf93f4a 100755
--- a/addons/account_voucher_payment/account_voucher_payment.py
+++ b/addons/account_voucher_payment/account_voucher_payment.py
@@ -63,7 +63,8 @@ class account_voucher(osv.osv):
'journal_id': journal.id,
'type' : inv.type,
'narration' : inv.narration and inv.narration or inv.name,
- 'date':inv.date
+ 'date':inv.date,
+ 'ref':inv.reference
}
if inv.period_id:
@@ -101,6 +102,7 @@ class account_voucher(osv.osv):
line_ids = []
line_ids += [move_line_pool.create(cr, uid, move_line)]
+ rec_ids = []
for line in inv.payment_ids:
amount=0.0
move_line = {
@@ -146,16 +148,23 @@ class account_voucher(osv.osv):
line_ids += [move_line_id]
if line.invoice_id:
- rec_ids = [move_line_id]
+ rec_ids += [move_line_id]
for move_line in line.invoice_id.move_id.line_id:
if line.account_id.id == move_line.account_id.id:
rec_ids += [move_line.id]
- move_line_pool.reconcile_partial(cr, uid, rec_ids)
+ #move_line_pool.reconcile_partial(cr, uid, rec_ids)
+
+ if rec_ids:
+ move_line_pool.reconcile_partial(cr, uid, rec_ids)
rec = {
'move_id': move_id,
'move_ids':[(6, 0,line_ids)]
}
+
+ message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm")
+ self.log(cr, uid, inv.id, message)
+
self.write(cr, uid, [inv.id], rec)
return True
diff --git a/addons/account_voucher_payment/account_voucher_payment_view.xml b/addons/account_voucher_payment/account_voucher_payment_view.xml
index cc11d3a064c..3f118120c8a 100755
--- a/addons/account_voucher_payment/account_voucher_payment_view.xml
+++ b/addons/account_voucher_payment/account_voucher_payment_view.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/addons/account_voucher_payment/i18n/zh_CN.po b/addons/account_voucher_payment/i18n/zh_CN.po
new file mode 100644
index 00000000000..362481f0a53
--- /dev/null
+++ b/addons/account_voucher_payment/i18n/zh_CN.po
@@ -0,0 +1,90 @@
+# Chinese (Simplified) translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-05-13 20:11+0000\n"
+"PO-Revision-Date: 2010-07-14 03:27+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: 2010-07-14 03:37+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: account_voucher_payment
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "无效XML视图结构!"
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid "Unreconciliation transactions"
+msgstr "取消对账"
+
+#. module: account_voucher_payment
+#: model:ir.module.module,description:account_voucher_payment.module_name_translation
+msgid ""
+"This module includes :\n"
+" * It reconcile the invoice (supplier, customer) while paying through \n"
+" Accounting Vouchers\n"
+" "
+msgstr ""
+"这模块包括:\n"
+" *在支付时核销发票(供应商, 客户) \n"
+" 原始凭证\n"
+" "
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid ""
+"If you unreconciliate transactions, you must also verify all the actions "
+"that are linked to those transactions because they will not be disable"
+msgstr "如果取消交易的核销, 你必须检验链接该交易的所有操作. 因为他们不会被禁止."
+
+#. module: account_voucher_payment
+#: view:account.voucher:0
+#: field:account.voucher,voucher_line_ids:0
+msgid "Voucher Lines"
+msgstr "原始凭证明细"
+
+#. module: account_voucher_payment
+#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
+msgid "Invoice Payment/Receipt by Vouchers."
+msgstr "发票付款/ 收入的原始凭证"
+
+#. module: account_voucher_payment
+#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
+msgid "Unreconcile entries"
+msgstr "取消核销"
+
+#. module: account_voucher_payment
+#: field:account.move.line,voucher_invoice:0
+#: field:account.voucher.line,invoice_id:0
+msgid "Invoice"
+msgstr "发票"
+
+#. module: account_voucher_payment
+#: wizard_button:account.voucher.unreconcile,init,end:0
+msgid "Cancel"
+msgstr "取消"
+
+#. module: account_voucher_payment
+#: field:account.voucher,partner_id:0
+msgid "Partner"
+msgstr "业务伙伴"
+
+#. module: account_voucher_payment
+#: wizard_button:account.voucher.unreconcile,init,unrec:0
+msgid "Unreconcile"
+msgstr "取消核销"
+
+#. module: account_voucher_payment
+#: wizard_view:account.voucher.unreconcile,init:0
+msgid "Unreconciliation"
+msgstr "取消对账"
diff --git a/addons/association/profile_association.py b/addons/association/profile_association.py
index ab437baf2c8..f102d710fd8 100644
--- a/addons/association/profile_association.py
+++ b/addons/association/profile_association.py
@@ -29,7 +29,7 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
_columns = {
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
'project':fields.boolean('Project Management'),
- 'event_project':fields.boolean('Organization and management of events', help="This module allows you to create retro planning for managing your events."),
+ 'event_project':fields.boolean('Organization and management of Events', help="This module allows you to create retro planning for managing your events."),
'project_gtd':fields.boolean('Getting Things Done',
help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
'wiki': fields.boolean('Wiki',
diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml
index c1ee9e163fe..4c02a24dac2 100644
--- a/addons/association/profile_association.xml
+++ b/addons/association/profile_association.xml
@@ -18,6 +18,9 @@
position="attributes">
Install more modules. A few modules are proposed according to the Association Profile you selected. You will be able to install them based on our requirements.
+
+ Configure
+
diff --git a/addons/auction/wizard/auction_lots_buyer_map.py b/addons/auction/wizard/auction_lots_buyer_map.py
index bee39e0d258..f9225b65291 100644
--- a/addons/auction/wizard/auction_lots_buyer_map.py
+++ b/addons/auction/wizard/auction_lots_buyer_map.py
@@ -90,7 +90,6 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
for rec in recs:
if rec.ach_login==datas['ach_login']:
lots_obj.write(cr, uid, [rec.id], {'ach_uid': datas['ach_uid']}, context=context)
- cr.commit()
return {}
def fields_view_get(self, cr, uid, view_id=None, view_type='form',
diff --git a/addons/auction/wizard/auction_lots_make_invoice.py b/addons/auction/wizard/auction_lots_make_invoice.py
index 8cda461e186..ca069c96182 100644
--- a/addons/auction/wizard/auction_lots_make_invoice.py
+++ b/addons/auction/wizard/auction_lots_make_invoice.py
@@ -73,7 +73,6 @@ class auction_lots_make_invoice(osv.osv_memory):
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots_ids = order_obj.seller_trans_create(cr, uid, context['active_ids'], context)
- cr.commit()
return {
'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]",
'name': 'Seller invoices',
diff --git a/addons/auction/wizard/auction_lots_make_invoice_buyer.py b/addons/auction/wizard/auction_lots_make_invoice_buyer.py
index 5d2e370a81e..9357983c315 100644
--- a/addons/auction/wizard/auction_lots_make_invoice_buyer.py
+++ b/addons/auction/wizard/auction_lots_make_invoice_buyer.py
@@ -73,7 +73,6 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
for lot in lots:
up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid': data['buyer_id']})
lots_ids = order_obj.lots_invoice(cr, uid, context['active_ids'], context, data['number'])
- cr.commit()
return {
'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]",
'name': 'Buyer invoices',
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index b1ef4f5ca13..f7f6f8bf3d0 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -105,8 +105,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
help="Email-id of the persons whom mail is to be sent"),
'act_mail_body': fields.text('Mail body', help="Content of mail"),
- 'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for mathching name of the resource\
-\ne.g.: urgent.* will search for records having name starting with urgent\
+ 'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
+\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 85ec16bda8d..a8cdba58975 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -383,7 +383,7 @@ property or property parameter."),
'rsvp': True,
'cutype': 'individual',
}
-
+
def copy(self, cr, uid, id, default=None, context=None):
raise osv.except_osv(_('Warning!'), _('Can not Duplicate'))
@@ -419,10 +419,14 @@ property or property parameter."),
event.add('location').value = event_obj.location
if event_obj.rrule:
event.add('rrule').value = event_obj.rrule
- if event_obj.user_id:
+ if event_obj.user_id or event_obj.organizer_id:
event_org = event.add('organizer')
- event_org.params['CN'] = [event_obj.user_id.name]
- event_org.value = 'MAILTO:' + (event_obj.user_id.user_email or event_obj.user_id.name)
+ organizer = event_obj.organizer_id
+ if not organizer:
+ organizer = event_obj.user_id
+ event_org.params['CN'] = [organizer.name]
+ event_org.value = 'MAILTO:' + (organizer.user_email or organizer.name)
+
if event_obj.alarm_id:
# computes alarm data
valarm = event.add('valarm')
@@ -455,14 +459,14 @@ property or property parameter."),
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.
+ Send mail for event invitation to event attendees.
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of attendee’s IDs.
- @param email_from: Email address for user sending the mail
+ @param email_from: Email address for user sending the mail
@param context: A standard dictionary for contextual values
@return: True
"""
@@ -474,7 +478,7 @@ property or property parameter."),
sign = att.sent_by_uid and att.sent_by_uid.signature or ''
sign = ' '.join(sign and sign.split('\n') or [])
res_obj = att.ref
- sub = '[%s Invitation][%d] %s' % (company, att.id, res_obj.name)
+ sub = res_obj.name
att_infos = []
other_invitaion_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))])
for att2 in self.browse(cr, uid, other_invitaion_ids):
@@ -495,12 +499,12 @@ property or property parameter."),
if mail_to and email_from:
attach = self.get_ics_file(cr, uid, res_obj, context=context)
tools.email_send(
- email_from,
- mail_to,
- sub,
- body,
- attach=attach and [('invitation.ics', attach)] or None,
- subtype='html',
+ email_from,
+ mail_to,
+ sub,
+ body,
+ attach=attach and [('invitation.ics', attach)] or None,
+ subtype='html',
reply_to=email_from
)
return True
@@ -528,31 +532,28 @@ property or property parameter."),
@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
+ @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):
"""
- Update state of invitation as Accepted and
+ Update state of invitation as Accepted and
if the invited user is other then event user it will make a copy of this event for invited user
@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
+ @param context: A standard dictionary for contextual values
@return: True
"""
if not context:
context = {}
for vals in self.browse(cr, uid, ids, context=context):
- #user = vals.user_id
- #if user:
- # mod_obj = self.pool.get(vals.ref._name)
- # if vals.ref:
- # if vals.ref.user_id.id != user.id:
- # defaults = {'user_id': user.id}
- # new_event = mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
+ if vals.ref and vals.ref.user_id:
+ mod_obj = self.pool.get(vals.ref._name)
+ defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
+ new_event = mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
return True
@@ -565,7 +566,8 @@ property or property parameter."),
@param ids: List of calendar attendee’s IDs
@param *args: Get Tupple value
@param context: A standard dictionary for contextual values """
-
+ if not context:
+ context = {}
return self.write(cr, uid, ids, {'state': 'declined'}, context)
def create(self, cr, uid, vals, context=None):
@@ -585,7 +587,6 @@ property or property parameter."),
vals['cn'] = vals.get("cn")
res = super(calendar_attendee, self).create(cr, uid, vals, context)
return res
-
calendar_attendee()
class res_alarm(osv.osv):
@@ -654,9 +655,9 @@ true, it will allow you to hide the event alarm information without removing it.
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_duration': duration,
+ 'trigger_interval': interval,
+ 'trigger_occurs': occurs,
'trigger_related': related,
'name': str(duration) + ' ' + str(interval) + ' ' + str(occurs)
}
@@ -690,7 +691,6 @@ true, it will allow you to hide the event alarm information without removing it.
cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \
where id=%s' % (model_obj._table, \
alarm_id, basic_alarm.id, data.id))
- cr.commit()
return True
def do_alarm_unlink(self, cr, uid, ids, model, context=None):
@@ -714,7 +714,6 @@ true, it will allow you to hide the event alarm information without removing it.
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, datas.id))
- cr.commit()
return True
res_alarm()
@@ -726,35 +725,35 @@ class calendar_alarm(osv.osv):
__attribute__ = {}
_columns = {
- 'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
+ '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"""),
+ 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"),
+ 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'),
+ provided by the "SUMMARY" property'),
'attendee_ids': fields.many2many('calendar.attendee', 'alarm_attendee_rel', \
- 'alarm_id', 'attendee_id', 'Attendees', readonly=True),
+ '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"),
+ 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'),
- ], 'State', select=True, readonly=True),
+ ('draft', 'Draft'),
+ ('run', 'Run'),
+ ('stop', 'Stop'),
+ ('done', 'Done'),
+ ], 'State', select=True, readonly=True),
}
_defaults = {
@@ -803,7 +802,7 @@ class calendar_alarm(osv.osv):
current_datetime = datetime.now()
request_obj = self.pool.get('res.request')
alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context)
-
+
mail_to = []
for alarm in self.browse(cr, uid, alarm_ids, context=context):
@@ -918,10 +917,10 @@ class calendar_event(osv.osv):
return {}
event = self.browse(cr, uid, ids, context=context)[0]
value = {
- 'duration': 24
+ '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
@@ -1084,11 +1083,11 @@ class calendar_event(osv.osv):
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
'description': fields.text('Description', states={'done': [('readonly', True)]}),
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
- ('confidential', 'Confidential')], 'Mark as', states={'done': [('readonly', True)]}),
- 'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
+ ('confidential', 'Confidential')], 'Mark as', 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 as', states={'done': [('readonly', True)]}),
- 'base_calendar_url': fields.char('Caldav URL', size=264),
+ 'base_calendar_url': fields.char('Caldav URL', size=264),
'state': fields.selection([('tentative', 'Tentative'),
('confirmed', 'Confirmed'),
('cancelled', 'Cancelled')], 'State', readonly=True),
@@ -1112,6 +1111,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
string='Timezone', store=True),
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
+ 'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
@@ -1138,25 +1138,27 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('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'),
+ ('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)]}),
+ '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.")
}
_defaults = {
- 'state': 'tentative',
+ 'state': 'tentative',
'class': 'public',
'show_as': 'busy',
'freq': 'None',
'select1': 'date',
'interval': 1,
'active': 1,
- }
+ 'user_id': lambda self, cr, uid, ctx: uid,
+ 'organizer_id': lambda self, cr, uid, ctx: uid,
+ }
def open_event(self, cr, uid, ids, context=None):
"""
@@ -1185,26 +1187,26 @@ true, it will allow you to hide the event alarm information without removing it.
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
for id in ids:
value = {
- 'name': _('Event'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'calendar.event',
- 'view_id': False,
- 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
- 'type': 'ir.actions.act_window',
- 'res_id': base_calendar_id2real_id(id),
+ 'name': _('Event'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'calendar.event',
+ 'view_id': False,
+ 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
+ 'type': 'ir.actions.act_window',
+ 'res_id': base_calendar_id2real_id(id),
'nodestroy': True
}
return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
- """Modifies only one event record out of virtual recurrent events
+ """Modifies only one event record out of virtual recurrent events
and creates new event as a specific instance of a Recurring Event",
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param event_id: Id of Recurring Event
+ @param event_id: Id of Recurring Event
@param real_date: Date of event recurrence that is being modified
@param context: A standard dictionary for contextual values
@param *args: Get Tupple Value
@@ -1227,7 +1229,7 @@ true, it will allow you to hide the event alarm information without removing it.
def modify_all(self, cr, uid, event_ids, defaults, context=None, *args):
"""
- Modifies the recurring event
+ 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.
@@ -1254,7 +1256,7 @@ true, it will allow you to hide the event alarm information without removing it.
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
"""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
+ 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,
@@ -1420,8 +1422,7 @@ true, it will allow you to hide the event alarm information without removing it.
until_date = arg[2]
res = super(calendar_event, self).search(cr, uid, args_without_date, \
offset, limit, order, context, count)
- #Search Event ID which are invitted
-
+
return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
@@ -1560,7 +1561,7 @@ true, it will allow you to hide the event alarm information without removing it.
event_id = [int(event_id)]
for record in self.read(cr, uid, event_id, ['date', 'rrule', 'exdate']):
if record['rrule']:
- # Remove one of the recurrent event
+ # Remove one of the recurrent event
date_new = time.strftime("%Y-%m-%d %H:%M:%S", \
time.strptime(date_new, "%Y%m%d%H%M%S"))
exdate = (record['exdate'] and (record['exdate'] + ',') or '') + ''.join((re.compile('\d')).findall(date_new)) + 'Z'
@@ -1586,7 +1587,7 @@ true, it will allow you to hide the event alarm information without removing it.
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
@param self: The object pointer
@@ -1594,10 +1595,10 @@ true, it will allow you to hide the event alarm information without removing it.
@param uid: the current user’s ID for security checks,
@param ids: List of Event IDs
@param *args: Get Tupple value
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
return self.write(cr, uid, ids, {'state': 'tentative'}, context)
-
+
def do_cancel(self, cr, uid, ids, context=None, *args):
""" Makes event invitation as Tentative
@param self: The object pointer
@@ -1605,7 +1606,7 @@ true, it will allow you to hide the event alarm information without removing it.
@param uid: the current user’s ID for security checks,
@param ids: List of Event IDs
@param *args: Get Tupple value
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
return self.write(cr, uid, ids, {'state': 'cancelled'}, context)
@@ -1616,7 +1617,7 @@ true, it will allow you to hide the event alarm information without removing it.
@param uid: the current user’s ID for security checks,
@param ids: List of Event IDs
@param *args: Get Tupple value
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
return self.write(cr, uid, ids, {'state': 'confirmed'}, context)
@@ -1760,9 +1761,9 @@ class ir_model(osv.osv):
_inherit = 'ir.model'
- def read(self, cr, uid, ids, fields=None, context=None,
+ def read(self, cr, uid, ids, fields=None, context=None,
load='_classic_read'):
- """
+ """
Overrides orm read method.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -1809,7 +1810,7 @@ class res_users(osv.osv):
_inherit = 'res.users'
def _get_user_avail(self, cr, uid, ids, context=None):
- """
+ """
Get User Availability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -1840,7 +1841,7 @@ class res_users(osv.osv):
return res
def _get_user_avail_fun(self, cr, uid, ids, name, args, context=None):
- """
+ """
Get User Availability Function
@param self: The object pointer
@param cr: the current row, from the database cursor,
diff --git a/addons/base_contact/__openerp__.py b/addons/base_contact/__openerp__.py
index 8c58d44ff4c..b5de9b321a3 100644
--- a/addons/base_contact/__openerp__.py
+++ b/addons/base_contact/__openerp__.py
@@ -45,7 +45,7 @@
'update_xml': [
'security/ir.model.access.csv',
'base_contact_view.xml',
- 'base_contact_installer_view.xml',
+# 'base_contact_installer_view.xml',
'process/base_contact_process.xml'
],
'demo_xml': ['base_contact_demo.xml'],
diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml
index c336b3e35fe..a251ca6eb90 100644
--- a/addons/base_contact/base_contact_view.xml
+++ b/addons/base_contact/base_contact_view.xml
@@ -72,8 +72,8 @@
-
-
+
+
@@ -180,7 +180,6 @@
diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml
index ae7ae7f23c7..cfe815fb94e 100644
--- a/addons/base_setup/base_setup_todo.xml
+++ b/addons/base_setup/base_setup_todo.xml
@@ -11,7 +11,7 @@
Main Company Setup
- Information of your company will be used to custiomise your documents like Invoices, Sale Orders,...
+ Information of your company will be used to custiomise your documents like Invoices, Sale Orders and many more.Configure Your Company
@@ -24,23 +24,23 @@
-
-
-
-
+
+
-
-
+
+
-
+
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/addons/base_setup/todo.py b/addons/base_setup/todo.py
index 5f6318ec5a1..8050d220dae 100644
--- a/addons/base_setup/todo.py
+++ b/addons/base_setup/todo.py
@@ -88,7 +88,7 @@ class base_setup_company(osv.osv_memory):
'city':fields.char('City', size=128),
'state_id':fields.selection(_get_all_states, 'State'),
'country_id':fields.selection(_get_all_countries, 'Country'),
- 'email':fields.char('E-mail', size=64),
+ 'email':fields.char('E-mail', size=64, required=True),
'phone':fields.char('Phone', size=64),
'currency':fields.many2one('res.currency', 'Currency', required=True),
'rml_header1':fields.char('Report Header', size=200,
@@ -154,7 +154,7 @@ base_setup_company()
class res_currency(osv.osv):
_inherit = 'res.currency'
-
+
def name_get(self, cr, uid, ids, context=None):
if context is None:
context = {}
@@ -168,7 +168,7 @@ class res_currency(osv.osv):
ids = [ids]
reads = self.read(cr, uid, ids, ['name','code'], context, load='_classic_write')
return [(x['id'], tools.ustr(x['name']) + ' (' + tools.ustr(x['code']) + ')') for x in reads]
-
+
res_currency()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/caldav/caldav_data.xml b/addons/caldav/caldav_data.xml
index 04f5a6004a7..e2ae6624979 100644
--- a/addons/caldav/caldav_data.xml
+++ b/addons/caldav/caldav_data.xml
@@ -1,7 +1,7 @@
-
+
CalendarsTrue
@@ -14,6 +14,11 @@
vevent
+
+ organizer
+ vevent
+
+
uidvevent
@@ -58,12 +63,12 @@
valarmvevent
-
+
vtimezonevevent
-
+
priorityvevent
@@ -181,12 +186,12 @@
seqvtodo
-
+
vtimezonevtodo
-
+
urlvtodo
diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py
index 6dc1e23ea66..a45152501cc 100644
--- a/addons/caldav/calendar.py
+++ b/addons/caldav/calendar.py
@@ -228,6 +228,8 @@ class CalDAV(object):
att_data = []
for cal_data in child.getChildren():
+ if cal_data.name.lower() == 'organizer':
+ self.ical_set(cal_data.name.lower(), {'name':cal_data.params['CN']}, 'value')
if cal_data.name.lower() == 'attendee':
ctx = context.copy()
if cal_children:
@@ -266,7 +268,7 @@ class CalDAV(object):
if not datas:
return
timezones = []
- for data in datas:
+ for data in datas:
tzval = None
vevent = ical.add(name)
for field in self.__attribute__.keys():
@@ -307,6 +309,13 @@ class CalDAV(object):
ical = tz_obj.export_cal(cr, uid, None, \
data[map_field], ical, context=context)
timezones.append(data[map_field])
+ elif field == 'organizer' and data[map_field]:
+ event_org = vevent.add('organizer')
+ organizer_id = data[map_field][0]
+ user_obj = self.pool.get('res.users')
+ organizer = user_obj.browse(cr, uid, organizer_id, context=context)
+ event_org.params['CN'] = [organizer.name]
+ event_org.value = 'MAILTO:' + (organizer.user_email or organizer.name)
elif data[map_field]:
if map_type in ("char", "text"):
if field in ('exdate'):
@@ -414,7 +423,7 @@ class CalDAV(object):
return res
class Calendar(CalDAV, osv.osv):
- _name = 'basic.calendar'
+ _name = 'basic.calendar'
_calname = 'calendar'
__attribute__ = {
@@ -431,13 +440,13 @@ class Calendar(CalDAV, osv.osv):
'vtimezone': None, # Use: O-n, Type: Collection of Timezone class
}
_columns = {
- 'name': fields.char("Name", size=64),
+ 'name': fields.char("Name", size=64),
'user_id': fields.many2one('res.users', 'Owner'),
'collection_id': fields.many2one('document.directory', 'Collection', \
required=True),
'type': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO')], \
string="Type", size=64),
- 'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
+ 'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
'create_date': fields.datetime('Created Date'),
'write_date': fields.datetime('Modifided Date'),
}
@@ -448,8 +457,8 @@ class Calendar(CalDAV, osv.osv):
if not domain:
domain = []
res = []
- ctx_res_id = context.get('res_id', None)
- ctx_model = context.get('model', None)
+ ctx_res_id = context.get('res_id', None)
+ ctx_model = context.get('model', None)
for cal in self.browse(cr, uid, ids):
for line in cal.line_ids:
if ctx_model and ctx_model != line.object_id.model:
@@ -458,13 +467,13 @@ class Calendar(CalDAV, osv.osv):
continue
line_domain = eval(line.domain)
line_domain += domain
- if ctx_res_id:
+ if ctx_res_id:
line_domain += [('id','=',ctx_res_id)]
mod_obj = self.pool.get(line.object_id.model)
- data_ids = mod_obj.search(cr, uid, line_domain, context=context)
+ data_ids = mod_obj.search(cr, uid, line_domain, context=context)
for data in mod_obj.browse(cr, uid, data_ids, context):
ctx = parent and parent.context or None
- node = res_node_calendar('%s' %data.id, parent, ctx, data, line.object_id.model, data.id)
+ node = res_node_calendar('%s' %data.id, parent, ctx, data, line.object_id.model, data.id)
res.append(node)
return res
@@ -478,8 +487,8 @@ class Calendar(CalDAV, osv.osv):
"""
if not context:
context = {}
- ctx_model = context.get('model', None)
- ctx_res_id = context.get('res_id', None)
+ ctx_model = context.get('model', None)
+ ctx_res_id = context.get('res_id', None)
ical = vobject.iCalendar()
for cal in self.browse(cr, uid, ids):
for line in cal.line_ids:
@@ -488,7 +497,7 @@ class Calendar(CalDAV, osv.osv):
if line.name in ('valarm', 'attendee'):
continue
domain = eval(line.domain)
- if ctx_res_id:
+ if ctx_res_id:
domain += [('id','=',ctx_res_id)]
mod_obj = self.pool.get(line.object_id.model)
data_ids = mod_obj.search(cr, uid, domain, context=context)
@@ -496,7 +505,7 @@ class Calendar(CalDAV, osv.osv):
context.update({'model': line.object_id.model,
'calendar_id': cal.id
})
- self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context)
+ self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context)
self.create_ics(cr, uid, datas, line.name, ical, context=context)
return ical.serialize()
@@ -511,16 +520,18 @@ class Calendar(CalDAV, osv.osv):
if not context:
context = {}
- vals = []
+ vals = []
ical_data = base64.decodestring(content)
parsedCal = vobject.readOne(ical_data)
if not data_id:
- data_id = self.search(cr, uid, [])[0]
+ data_id = self.search(cr, uid, [])[0]
cal = self.browse(cr, uid, data_id, context=context)
cal_children = {}
count = 0
for line in cal.line_ids:
cal_children[line.name] = line.object_id.model
+ objs = []
+ checked = True
for child in parsedCal.getChildren():
if child.name.lower() in cal_children:
context.update({'model': cal_children[child.name.lower()],
@@ -528,12 +539,14 @@ class Calendar(CalDAV, osv.osv):
})
self.__attribute__ = get_attribute_mapping(cr, uid, child.name.lower(), context=context)
val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context)
- val.update({'user_id': uid})
vals.append(val)
- obj = self.pool.get(cal_children[child.name.lower()])
- if hasattr(obj, 'check_import'):
- obj.check_import(cr, uid, vals, context=context)
- else:
+ objs.append(cal_children[child.name.lower()])
+ for obj_name in list(set(objs)):
+ obj = self.pool.get(obj_name)
+ if hasattr(obj, 'check_import'):
+ obj.check_import(cr, uid, vals, context=context)
+ checked = True
+ if not checked:
self.check_import(cr, uid, vals, context=context)
return {}
Calendar()
diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml
index ccaf0f7e35c..aec83760a76 100644
--- a/addons/crm/board_crm_view.xml
+++ b/addons/crm/board_crm_view.xml
@@ -29,21 +29,69 @@
+
+
+ My Open Opportunities
+ crm.lead
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ My Open Opportunitiescrm.leadformtree,form
- [('user_id','=',uid),('state','=','open'), ('type', '=', 'opportunity')]
+
+
+
+ tree
+
+
+
+
+
+
+ form
+
+
+ crm.meetingformtree,form
- [('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]
+ [('user_id','=',uid),('state','not in',('cancel','done'))]
@@ -59,7 +107,7 @@
formgraph,tree,form
- ['&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]
+ ['&', ('user_id', '=', uid),'&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]
@@ -84,11 +132,11 @@
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index ba05269c474..743650d5497 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -124,7 +124,7 @@ class crm_case(object):
stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
- st = case.stage_id.id or False
+ st = not context.get('force_domain', False) and case.stage_id.id or False
if st in s[section]:
data = {'stage_id': s[section][st]}
stage = s[section][st]
@@ -141,8 +141,12 @@ class crm_case(object):
if not context:
context = {}
stage_obj = self.pool.get('crm.case.stage')
- sid = stage_obj.search(cr, uid, \
- [('object_id.model', '=', self._name)], context=context)
+ tmp = self.read(cr, uid, ids, ['section_id'], context)[0]['section_id']
+ section_id = tmp and tmp[0] or False
+ domain = [('object_id.model', '=', self._name), ('section_id', '=', section_id)]
+ if 'force_domain' in context and context['force_domain']:
+ domain += context['force_domain']
+ sid = stage_obj.search(cr, uid, domain, context=context)
s = {}
previous = {}
section = self._name
@@ -168,7 +172,7 @@ class crm_case(object):
stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
- st = case.stage_id.id or False
+ st = not context.get('force_domain', False) and case.stage_id.id or False
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
if st in s[section]:
data = {'stage_id': s[section][st]}
@@ -440,7 +444,7 @@ class crm_case_section(osv.osv):
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the sales team without removing it."),
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
- 'change_responsible': fields.boolean('Change Responsible', help="Set responsible of this Sales team on escalation to this team"),
+ 'change_responsible': fields.boolean('Change Responsible', help="Thick this box if you want that on escalation, the responsible of this sale team automatically becomes responsible of the lead/opportunity escaladed"),
'user_id': fields.many2one('res.users', 'Responsible User'),
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
'reply_to': fields.char('Reply-To', size=64, help="The email address put \
diff --git a/addons/crm/crm_installer.py b/addons/crm/crm_installer.py
index 8fb7c02ff85..5f2a4ce63ee 100644
--- a/addons/crm/crm_installer.py
+++ b/addons/crm/crm_installer.py
@@ -30,19 +30,19 @@ import tools
class crm_installer(osv.osv_memory):
_name = 'crm.installer'
_inherit = 'res.config.installer'
-
+
_columns = {
- 'name': fields.char('Name', size=64),
- 'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
- 'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."),
- 'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."),
- 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."),
- 'sale_crm': fields.boolean('Create Quotation from Opportunity', help="This module relates sale to opportunity cases in the CRM."),
+ 'name': fields.char('Name', size=64),
+ 'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
+ 'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."),
+ 'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."),
+ 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."),
+ 'sale_crm': fields.boolean('Opportunity to Quotation', help="This module relates sale to opportunity cases in the CRM."),
'fetchmail': fields.boolean('Fetch Emails', help="Fetchmail Server."),
- 'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."),
- 'wiki_sale_faq': fields.boolean('Sale FAQ', help="Sale FAQ."),
+ 'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."),
+ 'wiki_sale_faq': fields.boolean('Sale FAQ', help="Sale FAQ."),
}
-
+
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = super(crm_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
#Checking sale module is installed or not
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 01c597fcb97..5c7fdb08522 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -139,9 +139,7 @@ and users"),
],'Type', help="Type is used to separate Leads and Opportunities"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
- 'stage_id': fields.many2one('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]"),
+ 'stage_id': fields.many2one('crm.case.stage', 'Stage'),
'user_id': fields.many2one('res.users', 'Salesman',help='By Default Salesman is Administrator when create New User'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
@@ -154,8 +152,10 @@ and users"),
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
- 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
- 'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
+ 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)], readonly=True),
+ 'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)], readonly=True),
+ 'partner_assigned_id': fields.many2one('res.partner', 'Assigned Partner', help="Partner this case has been forwarded/assigned to.", select=True),
+ 'date_assign': fields.date('Assignation Date', help="Last date this case was forwarded/assigned to a partner"),
}
_defaults = {
@@ -169,6 +169,20 @@ and users"),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
}
+ def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
+ """This function returns value of partner email based on Partner Address
+ @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 case IDs
+ @param add: Id of Partner's address
+ @email: Partner's email ID
+ """
+ if not add:
+ return {'value': {'email_from': False, 'country_id': False}}
+ address = self.pool.get('res.partner.address').browse(cr, uid, add)
+ return {'value': {'email_from': address.email, 'phone': address.phone, 'country_id': address.country_id.id}}
+
def case_open(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting Open Date
@param self: The object pointer
@@ -177,10 +191,18 @@ and users"),
@param ids: List of case's Ids
@param *args: Give Tuple Value
"""
+ old_state = self.read(cr, uid, ids, ['state'])[0]['state']
res = super(crm_lead, self).case_open(cr, uid, ids, *args)
- self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
+ if old_state == 'draft':
+ stage_id = super(crm_lead, self).stage_next(cr, uid, ids, *args)
+ if not stage_id:
+ raise osv.except_osv(_('Warning !'), _('There is no stage defined for this Sale Team.'))
+ value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
+ value.update({'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
+ self.write(cr, uid, ids, value)
+
for (id, name) in self.name_get(cr, uid, ids):
- message = _('Lead ') + " '" + name + "' "+ _("is Open.")
+ message = _('The Lead') + " '" + name + "' "+ _("has been written as Open.")
self.log(cr, uid, id, message)
return res
@@ -195,7 +217,7 @@ and users"),
res = super(crm_lead, self).case_close(cr, uid, ids, args)
self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
for (id, name) in self.name_get(cr, uid, ids):
- message = _('Lead ') + " '" + name + "' "+ _("is Closed.")
+ message = _('The Lead') + " '" + name + "' "+ _("has been written as Closed.")
self.log(cr, uid, id, message)
return res
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 7a614a16211..bcc72d74042 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -53,8 +53,8 @@
-
+
-
+
-
-
@@ -223,7 +222,7 @@
-
+
@@ -154,7 +155,9 @@
-
+
+
+
@@ -342,7 +345,7 @@
-
+
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index db5aa168bbb..5869f94e72e 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -46,7 +46,7 @@ class crm_opportunity(osv.osv):
domain="[('partner_id','=',partner_id)]"),
# Opportunity fields
- 'probability': fields.float('Probability (%)'),
+ 'probability': fields.float('Probability (%)',group_operator="avg"),
'planned_revenue': fields.float('Expected Revenue'),
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
@@ -64,9 +64,15 @@ class crm_opportunity(osv.osv):
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
- self.write(cr, uid, ids, {'probability' : 100.0, 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
+ stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 100)]})
+ if not stage_id:
+ raise osv.except_osv(_('Warning !'), _('There is no stage for won oppportunities defined for this Sale Team.'))
+ value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
+ value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
+
+ self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
- message = _('Opportunity ') + " '" + name + "' "+ _("is Won.")
+ message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Won.")
self.log(cr, uid, id, message)
return res
@@ -78,9 +84,16 @@ class crm_opportunity(osv.osv):
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
- res = self.write(cr, uid, ids, {'probability' : 0.0, 'state': 'done'})
+ res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
+ stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 0)]})
+ if not stage_id:
+ raise osv.except_osv(_('Warning !'), _('There is no stage for lost oppportunities defined for this Sale Team.'))
+ value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
+ value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
+
+ res = self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
- message = _('Opportunity ') + " '" + name + "' "+ _("is Lost.")
+ message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Lost.")
self.log(cr, uid, id, message)
return res
@@ -95,9 +108,22 @@ class crm_opportunity(osv.osv):
res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 0.0})
return res
-
+
+ def case_reset(self, cr, uid, ids, *args):
+ """Overrides reset as draft in order to set the stage field as empty
+ @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 case Ids
+ @param *args: Tuple Value for additional Params
+ """
+ res = super(crm_opportunity, self).case_reset(cr, uid, ids, *args)
+ self.write(cr, uid, ids, {'stage_id': False})
+ return True
+
+
def case_open(self, cr, uid, ids, *args):
- """Overrides cancel for crm_case for setting Open Date
+ """Overrides open for crm_case for setting Open Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 5c3f3ffa8e1..700eb4cba5c 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -14,8 +14,7 @@
+ domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
@@ -191,6 +190,21 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index bcdcc2e9bf6..05413ddcd8f 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -24,6 +24,7 @@ from osv import fields, osv
from tools.translate import _
import crm
import time
+from datetime import datetime, timedelta
class crm_phonecall(osv.osv, crm_case):
""" Phonecall Cases """
@@ -65,7 +66,7 @@ class crm_phonecall(osv.osv, crm_case):
('object_id.model', '=', 'crm.phonecall')]"),
'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields
- 'duration': fields.float('Duration'),
+ 'duration': fields.float('Duration', help="Duration in Minutes"),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]"),
@@ -113,10 +114,29 @@ class crm_phonecall(osv.osv, crm_case):
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
- res = super(crm_phonecall, self).case_close(cr, uid, ids, args)
- self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
+ for phone in self.browse(cr, uid, ids):
+ phone_id= phone.id
+ data = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
+ if phone.duration <=0:
+ duration = datetime.now() - datetime.strptime(phone.date, '%Y-%m-%d %H:%M:%S')
+ data.update({'duration': duration.seconds/float(60)})
+ res = super(crm_phonecall, self).case_close(cr, uid, [phone_id], args)
+ self.write(cr, uid, ids, data)
return res
+ def case_reset(self, cr, uid, ids, *args):
+ """Resets case as draft
+ @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 case Ids
+ @param *args: Tuple Value for additional Params
+ """
+ res = super(crm_phonecall, self).case_reset(cr, uid, ids, args)
+ self.write(cr, uid, ids, {'duration': 0.0})
+ return res
+
+
def case_open(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting Open Date
@param self: The object pointer
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 61da1ab6cc9..daf4b118a58 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -374,7 +374,8 @@
+ context="{'user_prefence':True}"
+ readonly="0"/>
diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
index 208054b3f4d..98515b6ab43 100644
--- a/addons/crm/report/crm_lead_report.py
+++ b/addons/crm/report/crm_lead_report.py
@@ -76,6 +76,7 @@ class crm_lead_report(osv.osv):
_columns = {
'name': fields.char('Year', size=64, required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'country_id':fields.many2one('res.country', 'Country', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"),
@@ -141,6 +142,7 @@ class crm_lead_report(osv.osv):
c.section_id,
c.categ_id,
c.partner_id,
+ c.country_id,
c.planned_revenue,
1 as nbr,
0 as avg_answers,
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 4086a04ee9d..150ae5d3849 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -104,6 +104,7 @@
+
-
+
@@ -159,6 +160,7 @@
+
diff --git a/addons/crm/res_partner.py b/addons/crm/res_partner.py
index 2dbae32ad98..db7069af4db 100644
--- a/addons/crm/res_partner.py
+++ b/addons/crm/res_partner.py
@@ -26,11 +26,13 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
- 'Leads and Opportunities'),
+ 'Leads and Opportunities'),
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
- 'Meetings'),
+ 'Meetings'),
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
- 'Phonecalls'),
+ 'Phonecalls'),
+ 'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\
+ 'Assigned Opportunities'),
}
res_partner()
diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml
index 3ae772b2b85..3b23c53efad 100644
--- a/addons/crm/res_partner_view.xml
+++ b/addons/crm/res_partner_view.xml
@@ -44,6 +44,39 @@
icon="gtk-cancel" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py
index 1e323eddedb..1a6e1fb505b 100644
--- a/addons/crm/wizard/crm_forward_to_partner.py
+++ b/addons/crm/wizard/crm_forward_to_partner.py
@@ -22,6 +22,7 @@
import base64
import itertools
+import time
from osv import osv, fields
import tools
@@ -218,6 +219,10 @@ class crm_lead_forward_to_partner(osv.osv_memory):
if result:
case_pool.history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, subject=this.subject, details=body, email_from=email_from, attach=attach)
+ to_write = {'date_assign': time.strftime('%Y-%m-%d')}
+ if (this.name == 'partner' and this.partner_id):
+ to_write['partner_assigned_id'] = this.partner_id.id
+ case_pool.write(cr, uid, case.id, to_write)
else:
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
diff --git a/addons/crm/wizard/crm_phonecall_to_partner_view.xml b/addons/crm/wizard/crm_phonecall_to_partner_view.xml
index c7da406f687..6da8a168b21 100644
--- a/addons/crm/wizard/crm_phonecall_to_partner_view.xml
+++ b/addons/crm/wizard/crm_phonecall_to_partner_view.xml
@@ -30,7 +30,7 @@
-
+
event.event.tree
@@ -134,6 +133,8 @@
+
+
event.event.calendarevent.event
@@ -142,12 +143,12 @@
-
+
Event Graph
@@ -162,6 +163,8 @@
+
+
Eventsevent.event
@@ -169,8 +172,8 @@
-
-
+
+
@@ -294,15 +297,17 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/event/test/test_event.yml b/addons/event/test/test_event.yml
index c5bee3a64d0..32fe487762d 100644
--- a/addons/event/test/test_event.yml
+++ b/addons/event/test/test_event.yml
@@ -51,7 +51,7 @@
property_account_receivable: account.a_recv
- |
- we create it with a "Conference on OpenERP Offshore Business" event and provide "Beginning date", "Ending Date", "Product" as Concert Ticket.
+ we create it with a "Conference on OpenERP Offshore Business" event and provide "Beginning date", "Ending Date" and "Product" as Concert Ticket.
-
!record {model: event.event, id: event_event_conference0}:
code: C/004
@@ -64,9 +64,9 @@
state: draft
type: 'event_type_conference0'
reply_to: 'info@customer.com'
-
+
- |
- we set the limit of registrations to this event using "Minimum Registrations" 2 and "Maximum Registrations" 10
+ we set the limit of registrations to this event using "Minimum Registrations" 2 and "Maximum Registrations" 10.
-
!python {model: event.event}: |
self.write(cr, uid, [ref('event_event_conference0')], {'register_max': 10, 'register_min': 2})
@@ -96,7 +96,6 @@
!record {model: event.registration, id: event_registration_registrationjacot0}:
badge_name: Jacot
badge_partner: Mark Johnson
- badge_title: M.
contact_id: base_contact.res_partner_contact_jacot0
date_deadline: '2010-06-07 13:39:00'
event_id: event.event_event_conference0
@@ -110,11 +109,13 @@
if not then confirmation will fail because its greater then the Maximum registration.
-
!python {model: event.event}: |
+ from tools.translate import _
obj_register = self.pool.get('event.registration')
- event_id1 = self.browse(cr, uid, [ref('event_event_conference0')])[0]
+ event_id1 = self.browse(cr, uid, ref('event_event_conference0'))
register_ids = obj_register.search(cr, uid, [('event_id', '=', event_id1.id)])
register_id = obj_register.browse(cr, uid, register_ids)[0]
- assert register_id.nb_register <= event_id1.register_max
+ assert register_id.nb_register <= event_id1.register_max, _('NO. of Registration for this event is More than Maximum Registration Defined !')
+
- |
And Confirm that Registration by click on "Confirm Registration" button of Registraion form.
@@ -150,7 +151,6 @@
!record {model: event.registration, id: event_registration_registrationpassot0}:
badge_name: Passot
badge_partner: Mediapole SPRL
- badge_title: M.
contact_id: base_contact.res_partner_contact_passot0
date_deadline: '2010-06-07 13:39:00'
email_from: info@mediapole.net
@@ -170,10 +170,10 @@
I Check that the total number of confirmed is 2 and unconfirmed registrations 1.
-
!python {model: event.event}: |
- obj_event = self.browse(cr, uid, [ref('event_event_conference0')])[0]
- assert obj_event.register_current == '2'
- assert obj_event.register_prospect == '1'
-
+ from tools.translate import _
+ obj_event = self.browse(cr, uid, ref('event_event_conference0'))
+ assert obj_event.register_current == 2, "Number of Confirmed Registration for this event is %s"%(obj_event.register_current)
+ assert obj_event.register_prospect == 1, "Number of Unconfirmed Registration for this event is %s" %(obj_event.register_prospect)
- |
This event is finished by click on "Event Done" button of this event form.
-
@@ -186,8 +186,7 @@
!assert {model: event.registration, id: event_registration_registrationjacot0}:
- state == 'open'
- |
- Now, I will invoice the participant who have address using "Make Invoices". This wizard will also give the number of invoices are created and rejected.
- Create invoice will be linked to Invoice Field available on Payments tab of registrations
+ Now, I will invoice the participant who have address using "Make Invoices".Create invoice will be linked to Invoice Field available on Payments tab of registrations.
-
!record {model: event.make.invoice, id: event_make_invoice_0}:
@@ -198,19 +197,9 @@
!python {model: event.make.invoice}: |
self.make_invoice(cr, uid, [ref("event_make_invoice_0")], {"active_ids": [ref("event_registration_registrationzen0")]})
- |
- I check that Invoice for this partner is create or not.
+ I check that Invoice for this partner is created or not.
-
!python {model: event.registration}: |
- obj_event_reg = self.pool.get('event.registration')
- obj_lines = self.pool.get('account.invoice.line')
- inv_obj = self.pool.get('account.invoice')
- data_event_reg = obj_event_reg.browse(cr, uid, [ref('event_registration_registrationzen0')], context=context)[0]
- invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', data_event_reg.partner_invoice_id.id)])
-
- if invoice_ids:
- invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0]
- line_ids = obj_lines.search(cr, uid, [('product_id', '=', data_event_reg.event_id.product_id.id), ('invoice_id', '=', invoice_id.id), ('price_unit', '=', data_event_reg.unit_price)])
- line_id = obj_lines.browse(cr, uid, line_ids)[0]
- assert line_id.product_id == data_event_reg.event_id.product_id
- assert data_event_reg.partner_id == invoice_id.partner_id
- assert invoice_id.address_invoice_id == data_event_reg.partner_address_id
\ No newline at end of file
+ from tools.translate import _
+ data_event_reg = self.browse(cr, uid, ref('event_registration_registrationzen0'), context=context)
+ assert data_event_reg.invoice_id, _("Invoices has not been generated for this partner")
diff --git a/addons/event/wizard/partner_event_registration.py b/addons/event/wizard/partner_event_registration.py
index d78d57f83da..79f92562df9 100644
--- a/addons/event/wizard/partner_event_registration.py
+++ b/addons/event/wizard/partner_event_registration.py
@@ -47,23 +47,29 @@ class partner_event_registration(osv.osv_memory):
}
def open_registration(self, cr, uid, ids, context=None):
+ """This Function Open Registration For Given Event id and Partner.
+
+ """
+
value = {}
res_obj = self.pool.get('res.partner')
+ job_obj = self.pool.get('res.partner.job')
+ event_obj = self.pool.get('event.event')
+ reg_obj = self.pool.get('event.registration')
+ mod_obj = self.pool.get('ir.model.data')
+
record_ids = context and context.get('active_ids', []) or []
addr = res_obj.address_get(cr, uid, record_ids)
contact_id = False
email = False
if addr.has_key('default'):
- job_ids = self.pool.get('res.partner.job').search(cr, uid, [('address_id', '=', addr['default'])])
+ job_ids = job_obj.search(cr, uid, [('address_id', '=', addr['default'])])
if job_ids:
- contact = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0])
+ contact = job_obj.browse(cr, uid, job_ids[0])
if contact:
contact_id = contact.contact_id.id
email = contact.email
-
- event_obj = self.pool.get('event.event')
- reg_obj = self.pool.get('event.registration')
- mod_obj = self.pool.get('ir.model.data')
+
result = mod_obj._get_id(cr, uid, 'event', 'view_registration_search')
res = mod_obj.read(cr, uid, result, ['res_id'])
@@ -123,10 +129,11 @@ class partner_event_registration(osv.osv_memory):
return res
def onchange_event_id(self, cr, uid, ids, event_id, context={}):
- res = {}
+ res = {}
+ event_obj = self.pool.get('event.event')
+
if event_id:
- obj_event = self.pool.get('event.event')
- event = obj_event.browse(cr, uid, event_id)
+ event = event_obj.browse(cr, uid, event_id)
res['value'] = {
'event_type': event.type and event.type.id or False,
'start_date': event.date_begin,
diff --git a/addons/hr/board_hr_view.xml b/addons/hr/board_hr_view.xml
index 873032a4067..3b64c362340 100644
--- a/addons/hr/board_hr_view.xml
+++ b/addons/hr/board_hr_view.xml
@@ -7,7 +7,7 @@
name="Human Resources"
parent="base.dashboard"/>
-
+
board.hr.formboard.board
diff --git a/addons/hr/hr_demo.xml b/addons/hr/hr_demo.xml
index 36a2703717f..572eb3c1060 100644
--- a/addons/hr/hr_demo.xml
+++ b/addons/hr/hr_demo.xml
@@ -2,6 +2,43 @@
+
+
+
+ CEO
+
+
+
+ CTO
+
+
+
+
+ Managers(Tech. Heads)
+
+
+
+
+ Project Managers
+
+
+
+
+ Sr. Executives(Team Leads)
+
+
+
+
+ Jr. Executives(Developers)
+
+
+
+
+ Trainee(Intership)
+
+
+
+
@@ -9,6 +46,7 @@
+
diff --git a/addons/hr/hr_department_view.xml b/addons/hr/hr_department_view.xml
index c0b2e3c53c7..85ffbe0fc2f 100644
--- a/addons/hr/hr_department_view.xml
+++ b/addons/hr/hr_department_view.xml
@@ -101,7 +101,7 @@
form
-
+
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 402df16939e..1b72561ed9c 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -62,7 +62,7 @@
-
+
@@ -88,6 +88,7 @@
+
@@ -102,7 +103,9 @@
-
+
+
+
diff --git a/addons/hr/i18n/tr.po b/addons/hr/i18n/tr.po
index cc217e0d47e..ef1028853a1 100644
--- a/addons/hr/i18n/tr.po
+++ b/addons/hr/i18n/tr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-05-10 13:18+0000\n"
-"Last-Translator: Angel Spy \n"
+"PO-Revision-Date: 2010-07-12 11:46+0000\n"
+"Last-Translator: adsiz_1029@hotmail.com \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-06-22 04:15+0000\n"
+"X-Launchpad-Export-Date: 2010-07-13 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py
index b8892837310..d5667051ae1 100644
--- a/addons/hr_attendance/hr_attendance.py
+++ b/addons/hr_attendance/hr_attendance.py
@@ -60,7 +60,7 @@ class hr_attendance(osv.osv):
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
}
_defaults = {
- 'name': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #Don't remove the lambda, if you remove it then the current time will not change
'employee_id': _employee_get,
}
@@ -119,6 +119,7 @@ class hr_employee(osv.osv):
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
id = False
warning_sign = 'sign'
+ res = {}
#Special case when button calls this method :type=context
if isinstance(type, dict):
@@ -127,7 +128,6 @@ class hr_employee(osv.osv):
warning_sign = "Sign In"
elif type == 'sign_out':
warning_sign = "Sign Out"
-
for emp in self.read(cr, uid, ids, ['id'], context=context):
if not self._action_check(cr, uid, emp['id'], dt, context):
raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
diff --git a/addons/hr_attendance/report/__init__.py b/addons/hr_attendance/report/__init__.py
index 9b27aeb24ae..faa57ad2e95 100644
--- a/addons/hr_attendance/report/__init__.py
+++ b/addons/hr_attendance/report/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,12 +15,12 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
import attendance_errors
-import bymonth
+import attendance_by_month
import timesheet
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_attendance/report/bymonth.py b/addons/hr_attendance/report/attendance_by_month.py
similarity index 96%
rename from addons/hr_attendance/report/bymonth.py
rename to addons/hr_attendance/report/attendance_by_month.py
index fc646e089ac..0710d30faaf 100644
--- a/addons/hr_attendance/report/bymonth.py
+++ b/addons/hr_attendance/report/attendance_by_month.py
@@ -40,12 +40,13 @@ def hour2str(h):
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
+ obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
if context is None:
context = {}
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
user_xml = ['%s' % month2name[month.month], '%s' % month.year]
for employee_id in ids:
- emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['name'])[0]
+ emp = obj_emp.read(cr, uid, [employee_id], ['name'])[0]
stop, days_xml = False, []
user_repr = '''
diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py
index 8b5bbdff5e7..94dc1edcbbd 100644
--- a/addons/hr_attendance/report/timesheet.py
+++ b/addons/hr_attendance/report/timesheet.py
@@ -37,6 +37,7 @@ def to_hour(h):
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
+ obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
@@ -47,7 +48,7 @@ class report_custom(report_rml):
user_xml = []
for employee_id in ids:
- emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0]
+ emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
monday, n_monday = first_monday, first_monday + one_week
stop, week_xml = False, []
user_repr = '''
diff --git a/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml b/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
index 6518202ac36..b7a9a8afab5 100644
--- a/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
+++ b/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
@@ -23,7 +23,7 @@
- Print Timesheet by month
+ Print Attendance by monthir.actions.act_windowhr.attendance.monthform
@@ -34,7 +34,7 @@
- Print Timesheet by month
+ Print Attendance by monthclient_print_multiaction
diff --git a/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml b/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
index 1e536334675..ed7ff7a8bc7 100644
--- a/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
+++ b/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml
index 6b92e792ad5..7e7f17187f6 100644
--- a/addons/hr_expense/hr_expense_view.xml
+++ b/addons/hr_expense/hr_expense_view.xml
@@ -128,7 +128,7 @@
-
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index bd96de3dd82..a6b87304ae5 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -10,7 +10,7 @@
-
+
@@ -69,8 +69,8 @@
-
-
+
+
@@ -113,8 +113,8 @@
-
-
+
+
@@ -168,7 +168,7 @@
-
+
diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml
index a85fcc2462c..962fa844808 100644
--- a/addons/hr_payroll/hr_payroll_view.xml
+++ b/addons/hr_payroll/hr_payroll_view.xml
@@ -505,7 +505,7 @@
-
+
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
index b895ace8a60..98c48e3e124 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
@@ -69,10 +69,10 @@
new
-
+ groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/-->
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 2eb352974d7..65b842bb592 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -718,9 +718,9 @@ class res_company(osv.osv):
_inherit = 'res.company'
_columns = {
'timesheet_range': fields.selection(
- [('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timeshet range'),
- 'timesheet_max_difference': fields.float('Timesheet allowed difference',
- help="Allowed difference between the sign in/out and the timesheet " \
+ [('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timesheet range'),
+ 'timesheet_max_difference': fields.float('Timesheet allowed difference(Hours)',
+ help="Allowed difference in hours between the sign in/out and the timesheet " \
"computation for one sheet. Set this to 0 if you do not want any control."),
}
_defaults = {
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 050b798f16d..ec667e74f75 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -195,7 +195,7 @@
-
+
diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml
index e1da251fb9a..fb5d14e6e75 100644
--- a/addons/knowledge/knowledge_installer.xml
+++ b/addons/knowledge/knowledge_installer.xml
@@ -20,7 +20,7 @@
- From this screen, you can select various OpenERP applications which will help employees store information, distribute it and share it with one another.
+ You can select various OpenERP applications which will help you and your employees to store and share information.
diff --git a/addons/l10n_ch_chart_c2c_pcg/wizard/config.py b/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
index dbef21389bf..a0e080def06 100644
--- a/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
+++ b/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
@@ -62,14 +62,12 @@ class Tax_template(osv.osv_memory):
}
def _on_change(self, cr, uid, id, tax, vals):
- if account:
- self.pool.get('account.tax.template').write(
- cr, uid, tax, vals=vals)
+ if tax:
+ self.pool.get('account.tax.template').write(cr, uid, tax, vals=vals)
return {}
- def on_change_collected(self, cr, uid, id, tax, account):
- return self._on_change(
- cr, uid, ids, tax, vals={'account_collected_id': account})
+ def on_change_collected(self, cr, uid, ids, tax, account):
+ return self._on_change(cr, uid, ids, tax, vals={'account_collected_id': account})
def on_change_paid(self, cr, uid, id, tax, account):
return self._on_change(
diff --git a/addons/l10n_chart_uk_minimal/account_chart.xml b/addons/l10n_chart_uk_minimal/account_chart.xml
index 804568afecc..17eae399ef8 100644
--- a/addons/l10n_chart_uk_minimal/account_chart.xml
+++ b/addons/l10n_chart_uk_minimal/account_chart.xml
@@ -22,21 +22,21 @@
- Assets
- 10
- view
-
-
-
+ Assets
+ 10
+ view
+
+
+
- Liabilities
- 11
- view
-
-
-
+ Liabilities
+ 11
+ view
+
+
+
@@ -156,21 +156,30 @@
- Income
- 20
- view
-
-
-
+ Income
+ 20
+ view
+
+
+
+
+
+
+ Foreign Exchange Gain
+ X201
+ other
+
+
+
- Expense
- 21
- view
-
-
-
+ Expense
+ 21
+ view
+
+
+
@@ -225,10 +234,18 @@
+
+ Foreign Exchange Loss - (test)
+ X2111
+ other
+
+
+
+
+
-
diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py
index 7187de5d1a5..1abda444116 100644
--- a/addons/mail_gateway/mail_gateway.py
+++ b/addons/mail_gateway/mail_gateway.py
@@ -41,8 +41,8 @@ class mailgate_thread(osv.osv):
_description = 'Mailgateway Thread'
_columns = {
- 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True)]),
- 'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False)]),
+ 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True)], readonly=True),
+ 'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False)], readonly=True),
}
def message_new(self, cr, uid, msg, context):
@@ -149,23 +149,23 @@ class mailgate_message(osv.osv):
_description = 'Mailgateway Message'
_order = 'id desc'
_columns = {
- 'name':fields.text('Subject'),
- 'model': fields.char('Object Name', size=128, select=1),
- 'res_id': fields.integer('Resource ID', select=1),
+ 'name':fields.text('Subject', readonly=True),
+ 'model': fields.char('Object Name', size=128, select=1, readonly=True),
+ 'res_id': fields.integer('Resource ID', select=1, readonly=True),
'ref_id': fields.char('Reference Id', size=256, readonly=True, help="Message Id in Email Server.", select=True),
- 'date': fields.datetime('Date'),
- 'history': fields.boolean('Is History?'),
+ 'date': fields.datetime('Date', readonly=True),
+ 'history': fields.boolean('Is History?', readonly=True),
'user_id': fields.many2one('res.users', 'User Responsible', readonly=True),
- 'message': fields.text('Description'),
- 'email_from': fields.char('From', size=128, help="Email From"),
- 'email_to': fields.char('To', help="Email Recipients", size=256),
- 'email_cc': fields.char('Cc', help="Carbon Copy Email Recipients", size=256),
- 'email_bcc': fields.char('Bcc', help='Blind Carbon Copy Email Recipients', size=256),
+ 'message': fields.text('Description', readonly=True),
+ 'email_from': fields.char('From', size=128, help="Email From", readonly=True),
+ 'email_to': fields.char('To', help="Email Recipients", size=256, readonly=True),
+ 'email_cc': fields.char('Cc', help="Carbon Copy Email Recipients", size=256, readonly=True),
+ 'email_bcc': fields.char('Bcc', help='Blind Carbon Copy Email Recipients', size=256, readonly=True),
'message_id': fields.char('Message Id', size=1024, readonly=True, help="Message Id on Email.", select=True),
'references': fields.text('References', readonly=True, help="References emails."),
- 'description': fields.text('Description'),
+ 'description': fields.text('Description', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', required=False),
- 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'),
+ 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments', readonly=True),
}
def init(self, cr):
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 3b72f183f89..83e5ed4f19f 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -152,29 +152,44 @@ you required for the campaign"),
def signal(self, cr, uid, model, res_id, signal, context=None):
+ record = self.pool.get(model).browse(cr, uid, res_id, context)
+ return self._signal(cr, uid, record, signal, context)
+
+ def _signal(self, cr, uid, record, signal, context=None):
if not signal:
raise ValueError('signal cannot be False')
Workitems = self.pool.get('marketing.campaign.workitem')
- domain = [('object_id.model', '=', model),
+ domain = [('object_id.model', '=', record._table._name),
('state', '=', 'running')]
campaign_ids = self.search(cr, uid, domain, context=context)
for campaign in self.browse(cr, uid, campaign_ids, context):
for activity in campaign.activity_ids:
if activity.signal != signal:
continue
- wi_domain = [('activity_id', '=', activity.id),
- ('res_id', '=', res_id),
- ('state', '=', 'todo'),
- ('date', '=', False),
- ]
+
+ data = dict(activity_id=activity.id,
+ res_id=record.id,
+ state='todo')
+ wi_domain = [(k, '=', v) for k, v in data.items()]
+
wi_ids = Workitems.search(cr, uid, wi_domain, context=context)
+ if not wi_ids:
+ partner = self._get_partner_for(campaign, record)
+ if partner:
+ data['partner_id'] = partner.id
+ wi_id = Workitems.create(cr, uid, data, context=context)
+ wi_ids = [wi_id]
Workitems.process(cr, uid, wi_ids, context=context)
return True
- def _signal(self, cr, uid, record, signal, context=None):
- return self.signal(cr, uid, record._table._name,
- record.id, signal, context)
+ def _get_partner_for(self, campaign, record):
+ partner_field = campaign.partner_field_id.name
+ if partner_field:
+ return getattr(record, partner_field)
+ elif campaign.model_id.model == 'res.partner':
+ return record
+ return None
marketing_campaign()
@@ -247,7 +262,6 @@ class marketing_campaign_segment(osv.osv):
uid, [('start', '=', True), ('campaign_id', '=', segment.campaign_id.id)], context=context)
model_obj = self.pool.get(segment.object_id.model)
- partner_field = segment.campaign_id.partner_field_id.name
criteria = []
if segment.sync_last_date:
criteria += [(segment.sync_mode, '>', segment.sync_last_date)]
@@ -269,11 +283,7 @@ class marketing_campaign_segment(osv.osv):
'res_id': o_ids.id
}
- partner = None
- if partner_field:
- partner = getattr(o_ids, partner_field)
- elif model_obj._name == 'res.partner':
- partner = o_ids
+ partner = self.pool.get('marketing.campaign')._get_partner_for(segment.campaign_id, o_ids)
if partner:
wi_vals['partner_id'] = partner.id
@@ -295,9 +305,7 @@ class marketing_campaign_activity(osv.osv):
('email', 'E-mail'),
('paper', 'Paper'),
('action', 'Action'),
- # TODO implement the subcampaigns. The segment_id on woritems must be
- # optional (thus campaign_id must be a real many2one, and a constraint
- # must be set).
+ # TODO implement the subcampaigns.
# TODO implement the subcampaign out. disallow out transitions from
# subcampaign activities ?
#('subcampaign', 'Sub-Campaign'),
@@ -333,8 +341,9 @@ class marketing_campaign_activity(osv.osv):
'variable_cost': fields.float('Variable Cost'),
'revenue': fields.float('Revenue'),
'signal': fields.char('Signal', size=128,
- help='An activity with a signal can be called \
- programmatically'),
+ help='An activity with a signal can be called programmatically. Attention, the workitem is always created when the signal is send'),
+ 'keep_if_condition_not_met': fields.boolean('Keep if condition not met',
+ help="By activating this option, the workitems that aren't processed because the condition is not met are marked as cancelled instead of being deleted.")
}
_defaults = {
@@ -342,20 +351,6 @@ class marketing_campaign_activity(osv.osv):
'condition': lambda *a: 'True',
}
- def _check_signal(self, cr, uid, ids, context=None):
- return all(activity.signal
- for activity in self.browse(cr, uid, ids, context)
- for transition in activity.from_ids
- if transition.trigger == 'signal')
-
- _constraints = [
- (_check_signal,
- "An incoming transition is triggered by a signal but this transition \
- doesn't have one",
- ['signal', 'from_ids']
- ),
- ]
-
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
if context == None:
@@ -431,7 +426,7 @@ class marketing_campaign_transition(osv.osv):
formatters = {
'auto': _('Automatic transition'),
'time': _('After %(interval_nbr)d %(interval_type)s'),
- 'signal': _('On signal'),
+ 'cosmetic': _('Cosmetic'),
}
for tr in self.browse(cr, uid, ids, context=context,
fields_process=translate_selections):
@@ -462,9 +457,10 @@ class marketing_campaign_transition(osv.osv):
'trigger': fields.selection([('auto', 'Automatic'),
('time', 'Time'),
- ('signal','Signal')],
+ ('cosmetic', 'Cosmetic'), # fake plastic transition
+ ],
'Trigger', required=True,
- help="How is trigger the destination workitem"),
+ help="How is triggered the destination workitem"),
}
_defaults = {
@@ -477,20 +473,6 @@ class marketing_campaign_transition(osv.osv):
('interval_positive', 'CHECK(interval_nbr >= 0)', 'The interval must be positive or zero')
]
- def _check_signal(self, cr, uid, ids, context=None):
- return all(tr.activity_to_id.signal
- for tr in self.browse(cr, uid, ids, context)
- if tr.trigger == 'signal')
-
- _constraints = [
- (_check_signal,
- "The transition is triggered by a signal but destination activity \
- doesn't have one",
- ['trigger', 'activity_to_ids']
- ),
- ]
-
-
marketing_campaign_transition()
class marketing_campaign_workitem(osv.osv):
@@ -510,13 +492,12 @@ class marketing_campaign_workitem(osv.osv):
return res
_columns = {
- 'segment_id': fields.many2one('marketing.campaign.segment', 'Segment',
- required=True),
+ 'segment_id': fields.many2one('marketing.campaign.segment', 'Segment'),
'activity_id': fields.many2one('marketing.campaign.activity','Activity',
required=True),
- 'campaign_id': fields.related('segment_id', 'campaign_id',
+ 'campaign_id': fields.related('activity_id', 'campaign_id',
type='many2one', relation='marketing.campaign', string='Campaign', readonly=True),
- 'object_id': fields.related('segment_id', 'campaign_id', 'object_id',
+ 'object_id': fields.related('activity_id', 'campaign_id', 'object_id',
type='many2one', relation='ir.model', string='Object', select=1),
'res_id': fields.integer('Resource ID', select=1, readonly=1),
'res_name': fields.function(_res_name_get, method=True, string='Resource Name', type="char", size=64),
@@ -564,7 +545,10 @@ class marketing_campaign_workitem(osv.osv):
campaign_mode = workitem.campaign_id.mode
if condition:
if not eval(condition, eval_context):
- workitem.write({'state': 'cancelled'}, context=context)
+ if activity.keep_if_condition_not_met:
+ workitem.write({'state': 'cancelled'}, context=context)
+ else:
+ workitem.unlink(context=context)
return
result = True
if campaign_mode in ('manual', 'active'):
@@ -580,6 +564,8 @@ class marketing_campaign_workitem(osv.osv):
if result:
# process _chain
for transition in activity.to_ids:
+ if transition.trigger == 'cosmetic':
+ continue
launch_date = False
if transition.trigger == 'auto':
launch_date = datetime.now()
@@ -605,7 +591,7 @@ class marketing_campaign_workitem(osv.osv):
#
# test test_realtime manual normal (active)
# time Y N N N
- # signal N N N N
+ # cosmetic N N N N
# auto Y Y Y Y
#
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index 4ac70292c32..1d07fc1e99c 100644
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -228,7 +228,12 @@
-
+
+
+
+
+
+
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index a772661bf0c..498c901e7b2 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -140,7 +140,13 @@ class membership_line(osv.osv):
'''Member line'''
def _check_membership_date(self, cr, uid, ids, context=None):
- '''Check if membership product is not in the past'''
+ """Check if membership product is not in the past
+ @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 Membership Line IDs
+ @param context: A standard dictionary for contextual values
+ """
cr.execute('''
SELECT MIN(ml.date_to - ai.date_invoice)
@@ -158,7 +164,15 @@ class membership_line(osv.osv):
return True
def _state(self, cr, uid, ids, name, args, context=None):
- '''Compute the state lines'''
+ """Compute the state lines
+ @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 Membership Line IDs
+ @param name: Field Name
+ @param context: A standard dictionary for contextual values
+ @param return: Dictionary of state Value
+ """
res = {}
for line in self.browse(cr, uid, ids):
cr.execute('''
@@ -221,35 +235,47 @@ class Partner(osv.osv):
_inherit = 'res.partner'
def _get_partner_id(self, cr, uid, ids, context=None):
-
- data_inv = self.pool.get('membership.membership_line').browse(cr, uid, ids, context)
+ member_line_obj = self.pool.get('membership.membership_line')
+ res_obj = self.pool.get('res.partner')
+ data_inv = member_line_obj.browse(cr, uid, ids, context)
list_partner = []
for data in data_inv:
list_partner.append(data.partner.id)
ids2 = list_partner
while ids2:
- ids2 = self.pool.get('res.partner').search(cr, uid, [('associate_member','in',ids2)], context=context)
+ ids2 = res_obj.search(cr, uid, [('associate_member','in',ids2)], context=context)
list_partner += ids2
return list_partner
def _get_invoice_partner(self, cr, uid, ids, context=None):
- data_inv = self.pool.get('account.invoice').browse(cr, uid, ids, context)
+ inv_obj = self.pool.get('account.invoice')
+ res_obj = self.pool.get('res.partner')
+ data_inv = inv_obj.browse(cr, uid, ids, context)
list_partner = []
for data in data_inv:
list_partner.append(data.partner_id.id)
ids2 = list_partner
while ids2:
- ids2 = self.pool.get('res.partner').search(cr, uid, [('associate_member','in',ids2)], context=context)
+ ids2 = res_obj.search(cr, uid, [('associate_member','in',ids2)], context=context)
list_partner += ids2
return list_partner
def _membership_state(self, cr, uid, ids, name, args, context=None):
+ """This Function return Membership State For Given Partner.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Partner IDs
+ @param name: Field Name
+ @param context: A standard dictionary for contextual values
+ @param return: Dictionary of Membership state Value
+ """
res = {}
for id in ids:
res[id] = 'none'
today = time.strftime('%Y-%m-%d')
for id in ids:
- partner_data = self.browse(cr,uid,id)
+ partner_data = self.browse(cr, uid, id)
if partner_data.membership_cancel and today > partner_data.membership_cancel:
res[id] = 'canceled'
continue
@@ -302,7 +328,7 @@ class Partner(osv.osv):
def _membership_date(self, cr, uid, ids, name, args, context=None):
- '''Return date of membership'''
+ """Return date of membership"""
name = name[0]
res = {}
@@ -404,6 +430,8 @@ class Partner(osv.osv):
}
def _check_recursion(self, cr, uid, ids):
+ """Check Recursive for Associated Members.
+ """
level = 100
while len(ids):
cr.execute('select distinct associate_member from res_partner where id IN %s',(tuple(ids),))
@@ -438,9 +466,11 @@ product_template()
class Product(osv.osv):
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+ model_obj = self.pool.get('ir.model.data')
+
if ('product' in context) and (context['product']=='membership_product'):
- model_data_ids_form = self.pool.get('ir.model.data').search(cr,user,[('model','=','ir.ui.view'),('name','in',['membership_products_form','membership_products_tree'])])
- resource_id_form = self.pool.get('ir.model.data').read(cr, user, model_data_ids_form, fields=['res_id','name'])
+ model_data_ids_form = model_obj.search(cr,user,[('model','=','ir.ui.view'),('name','in',['membership_products_form','membership_products_tree'])])
+ resource_id_form = model_obj.read(cr, user, model_data_ids_form, fields=['res_id','name'])
dict_model={}
for i in resource_id_form:
dict_model[i['name']]=i['res_id']
@@ -488,6 +518,8 @@ class account_invoice_line(osv.osv):
_inherit='account.invoice.line'
def write(self, cr, uid, ids, vals, context=None):
+ """Overrides orm write method
+ """
if not context:
context={}
res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context)
@@ -513,6 +545,8 @@ class account_invoice_line(osv.osv):
return res
def unlink(self, cr, uid, ids, context=None):
+ """Remove Membership Line Record for Account Invoice Line
+ """
if not context:
context={}
member_line_obj = self.pool.get('membership.membership_line')
@@ -522,10 +556,13 @@ class account_invoice_line(osv.osv):
return super(account_invoice_line, self).unlink(cr, uid, ids, context=context)
def create(self, cr, uid, vals, context={}):
+ """Overrides orm create method
+ """
result = super(account_invoice_line, self).create(cr, uid, vals, context)
line = self.browse(cr, uid, result)
+ member_line_obj = self.pool.get('membership.membership_line')
if line.invoice_id.type == 'out_invoice':
- member_line_obj = self.pool.get('membership.membership_line')
+
ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)])
if line.product_id and line.product_id.membership and not ml_ids:
# Product line is a membership product
diff --git a/addons/membership/membership_view.xml b/addons/membership/membership_view.xml
index 15d9ec146d9..ddbc81629cf 100644
--- a/addons/membership/membership_view.xml
+++ b/addons/membership/membership_view.xml
@@ -138,7 +138,7 @@
-
+
@@ -169,7 +169,7 @@
form
-
+
diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml
index 6b0dab2a9e5..bbeceed3d89 100644
--- a/addons/membership/test/test_membership.yml
+++ b/addons/membership/test/test_membership.yml
@@ -46,21 +46,9 @@
-
!record {model: membership.invoice, id: membership_invoice_0}:
product_id: membership.product_product_membershipproduct0
-- |
- I check that address is defined or not for this Member.
--
- !python {model: membership.invoice}: |
- partner_ids = [ref('res_partner_markjohnson0')]
- addre_obj = self.pool.get('res.partner.address')
- ids = addre_obj.search(cr, uid, [('partner_id', '=', partner_ids)])
-
- addre_id = addre_obj.browse(cr, uid, ids)[0]
- assert addre_id.partner_id
- assert addre_id.id
- assert addre_id.type
- |
- I click on "Confirm" button of this wizard.
+ I click on "Confirm" button of this wizard. and also check that address is defined or not for this partner in this function.
-
!python {model: membership.invoice}: |
self.membership_invoice(cr, uid, [ref("membership_invoice_0")], {"active_ids": [ref("membership.res_partner_markjohnson0")]})
@@ -69,21 +57,20 @@
I check that Invoice is created for this members.
-
!python {model: res.partner}: |
+
+ from tools.translate import _
invoice_obj = self.pool.get('account.invoice')
partner_obj = self.pool.get('res.partner')
product_obj = self.pool.get('product.product')
- invoice_line_obj = self.pool.get(('account.invoice.line'))
+ invoice_line_obj = self.pool.get('account.invoice.line')
- partner_id = self.browse(cr, uid, [ref('res_partner_markjohnson0')])[0]
- ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
- invoice_id = invoice_obj.browse(cr, uid, ids)[0]
-
- product = product_obj.browse(cr, uid, [ref('product_product_membershipproduct0')], context=context)[0]
+ partner_id = self.browse(cr, uid, ref('res_partner_markjohnson0'))
+ inv_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
+ invoice_id = invoice_obj.browse(cr, uid, inv_ids)[0]
+ product = product_obj.browse(cr, uid, ref('product_product_membershipproduct0'), context=context)
line_ids = invoice_line_obj.search(cr, uid, [('product_id', '=', product.id), ('invoice_id', '=', invoice_id.id)])
- line_id = invoice_line_obj.browse(cr, uid, line_ids)[0]
-
- assert line_id.product_id.id == product.id
- assert invoice_id.partner_id.id == partner_id.id
+
+ assert line_ids, _('Invoices has not been generated for this Member!')
- |
I check that the "Current membership state" will remain same untill opening the invoice.
@@ -96,17 +83,17 @@
So, I check that invoice is in draft state then the "membership state" of a member is "Waiting member".
-
!python {model: membership.membership_line}: |
- partner_id = self.pool.get('res.partner').browse(cr, uid, [ref('res_partner_markjohnson0')])[0]
- ids = self.search(cr, uid, [('partner', '=', partner_id.id)])
- current_id = self.browse(cr, uid, ids)[0]
-
- partner_obj = self.pool.get('res.partner')
+ partner_obj = self.pool.get('res.partner')
inv_obj = self.pool.get('account.invoice')
- ids = inv_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
- inv_id = inv_obj.browse(cr, uid, ids)[0]
+ partner_id = partner_obj.browse(cr, uid, ref('res_partner_markjohnson0'))
+ member_ids = self.search(cr, uid, [('partner', '=', partner_id.id)])
+ current_id = self.browse(cr, uid, member_ids)[0]
+
+ inv_ids = inv_obj.search(cr, uid, [('partner_id', '=', partner_id.id), ('account_id', '=', partner_id.property_account_receivable.id)])
+ inv_id = inv_obj.browse(cr, uid, inv_ids)[0]
if inv_id.state == 'draft':
- assert current_id == 'waiting'
+ assert current_id.state == 'waiting'
- |
When the invoice is in open state it become Invoiced Member, When the invoice is in paid state the same "Current membership state" changed to Paid Member.
Now, If we cancel the invoice "Current membership state" changed to Cancel Member.
diff --git a/addons/membership/wizard/membership_invoice.py b/addons/membership/wizard/membership_invoice.py
index 39589f58e27..a969abf0632 100644
--- a/addons/membership/wizard/membership_invoice.py
+++ b/addons/membership/wizard/membership_invoice.py
@@ -25,56 +25,48 @@ from tools.translate import _
import tools
class membership_invoice(osv.osv_memory):
+ """Membership Invoice"""
+
_name = "membership.invoice"
- _description = "Membership Invoice From Partner"
- _columns ={
+ _description = "Membership Invoice"
+ _columns = {
'product_id': fields.many2one('product.product','Membership Product', required=True),
- }
+ }
- def membership_invoice(self, cr, uid, ids, context={}):
+ def membership_invoice(self, cr, uid, ids, context=None):
invoice_obj = self.pool.get('account.invoice')
partner_obj = self.pool.get('res.partner')
product_obj = self.pool.get('product.product')
- invoice_line_obj = self.pool.get(('account.invoice.line'))
- invoice_tax_obj = self.pool.get(('account.invoice.tax'))
- partner_ids = context['active_ids']
- for data in self.read(cr, uid, ids, context=context):
- product_id = data['product_id']
- cr.execute('''
- SELECT partner_id, id, type
- FROM res_partner_address
- WHERE partner_id IN %s''',(tuple(partner_ids),))
- fetchal = cr.fetchall()
- if not fetchal:
- raise osv.except_osv(_('Error !'), _('No Address defined for this partner'))
- partner_address_ids = {}
- for x in range(len(fetchal)):
- pid = fetchal[x][0]
- id = fetchal[x][1]
- type = fetchal[x][2]
- if partner_address_ids.has_key(pid) and partner_address_ids[pid]['type'] == 'invoice':
- continue
- partner_address_ids[pid] = {'id': id, 'type': type}
-
- invoice_list= []
- product = product_obj.read(cr, uid, product_id, ['uom_id'], context=context)
-
- for partner_id in partner_ids:
- account_id = partner_obj.read(cr, uid, partner_id, ['property_account_receivable'], context=context)['property_account_receivable'][0]
- read_fpos = partner_obj.read(cr, uid, partner_id, ['property_account_position'], context=context)
- fpos_id = read_fpos['property_account_position'] and read_fpos['property_account_position'][0]
+ invoice_line_obj = self.pool.get('account.invoice.line')
+ invoice_tax_obj = self.pool.get('account.invoice.tax')
+ if not context:
+ context={}
+ partner_ids = context.get('active_ids', [])
+ invoice_list = []
+ for partner in partner_obj.browse(cr, uid, partner_ids, context=context):
+ account_id = partner.property_account_receivable and partner.property_account_receivable.id or False
+ fpos_id = partner.property_account_position and partner.property_account_position.id or False
+ addr = partner_obj.address_get(cr, uid, [partner.id], ['invoice'])
+ if not addr.get('invoice', False):
+ continue
+ for data in self.browse(cr, uid, ids, context=context):
+ product_id = data.product_id and data.product_id.id or False
+ product_uom_id = data.product_id and data.product_id.uom_id.id
+ quantity = 1
line_value = {
'product_id' : product_id,
- }
- quantity = 1
- line_dict = invoice_line_obj.product_id_change(cr, uid, {}, product_id, product['uom_id'][0], quantity, '', 'out_invoice', partner_id, fpos_id, context=context)
+ }
+
+ line_dict = invoice_line_obj.product_id_change(cr, uid, {},
+ product_id, product_uom_id, quantity, '', 'out_invoice', partner.id, fpos_id, context=context)
line_value.update(line_dict['value'])
- if line_value['invoice_line_tax_id']:
+ if line_value.get('invoice_line_tax_id', False):
tax_tab = [(6, 0, line_value['invoice_line_tax_id'])]
line_value['invoice_line_tax_id'] = tax_tab
+
invoice_id = invoice_obj.create(cr, uid, {
- 'partner_id' : partner_id,
- 'address_invoice_id': partner_address_ids[partner_id]['id'],
+ 'partner_id' : partner.id,
+ 'address_invoice_id': addr.get('invoice', False),
'account_id': account_id,
'fiscal_position': fpos_id or False
}
@@ -86,16 +78,17 @@ class membership_invoice(osv.osv_memory):
if line_value['invoice_line_tax_id']:
tax_value = invoice_tax_obj.compute(cr, uid, invoice_id).values()
for tax in tax_value:
- invoice_tax_obj.create(cr, uid, tax, context=context)
+ invoice_tax_obj.create(cr, uid, tax, context=context)
+
- return {
- 'domain': [('id', 'in', invoice_list)],
- 'name': 'Membership Invoice',
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'account.invoice',
- 'type': 'ir.actions.act_window',
- }
+ return {
+ 'domain': [('id', 'in', invoice_list)],
+ 'name': 'Membership Invoice',
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'account.invoice',
+ 'type': 'ir.actions.act_window',
+ }
membership_invoice()
diff --git a/addons/membership/wizard/membership_invoice_view.xml b/addons/membership/wizard/membership_invoice_view.xml
index 858ac50425c..a869fa59f2c 100644
--- a/addons/membership/wizard/membership_invoice_view.xml
+++ b/addons/membership/wizard/membership_invoice_view.xml
@@ -9,11 +9,11 @@
-
+
-
+
@@ -39,4 +39,4 @@
-
\ No newline at end of file
+
diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml
index c3929df10af..73fc81af73d 100644
--- a/addons/mrp/mrp_installer.xml
+++ b/addons/mrp/mrp_installer.xml
@@ -16,7 +16,7 @@
- After having installed the core manufacturing application, you can extend it with a few more depending on the needs of your organization
+ After having installed the core manufacturing application, you can extend it depending on the needs of your MRP's organization
diff --git a/addons/mrp/report/order.rml b/addons/mrp/report/order.rml
index 3db5396d444..5ed1af444f1 100644
--- a/addons/mrp/report/order.rml
+++ b/addons/mrp/report/order.rml
@@ -135,14 +135,6 @@
-
-
-
-
-
-
-
-
@@ -186,25 +178,18 @@
+
-
- [[ repeatIn(objects,'o') ]]
-
-
-
-
-
- Production Order N° : [[ o.name ]]
-
+
-
+
+
+
+
+
+
-
-
\ No newline at end of file
+
diff --git a/addons/mrp/wizard/change_production_qty_view.xml b/addons/mrp/wizard/change_production_qty_view.xml
index 63d9dbcb451..b73d8bcc529 100644
--- a/addons/mrp/wizard/change_production_qty_view.xml
+++ b/addons/mrp/wizard/change_production_qty_view.xml
@@ -15,7 +15,7 @@
-
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
index d1e66c92889..84ae3c304b0 100644
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -224,6 +224,8 @@ class mrp_production(osv.osv):
obj = self.browse(cr, uid, ids)[0]
for workcenter_line in obj.workcenter_lines:
tmp = self.pool.get('mrp.production.workcenter.line').action_done(cr, uid, [workcenter_line.id])
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_done', cr)
return super(mrp_production,self).action_production_end(cr, uid, ids)
def action_in_production(self, cr, uid, ids):
@@ -234,6 +236,8 @@ class mrp_production(osv.osv):
workcenter_line_obj = self.pool.get('mrp.production.workcenter.line')
for workcenter_line in obj.workcenter_lines:
workcenter_line_obj.action_start_working(cr, uid, [workcenter_line.id])
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_start_working', cr)
return super(mrp_production,self).action_in_production(cr, uid, ids)
def action_cancel(self, cr, uid, ids):
@@ -243,6 +247,8 @@ class mrp_production(osv.osv):
obj = self.browse(cr, uid, ids)[0]
for workcenter_line in obj.workcenter_lines:
tmp = self.pool.get('mrp.production.workcenter.line').action_cancel(cr, uid, [workcenter_line.id])
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_cancel', cr)
return super(mrp_production,self).action_cancel(cr,uid,ids)
def _compute_planned_workcenter(self, cr, uid, ids, context={}, mini=False):
diff --git a/addons/partner_geo_assign/__openerp__.py b/addons/partner_geo_assign/__openerp__.py
index 2d18649236e..ccfe6ba7c45 100644
--- a/addons/partner_geo_assign/__openerp__.py
+++ b/addons/partner_geo_assign/__openerp__.py
@@ -26,12 +26,14 @@
'category': 'Generic Modules/Production',
'description': """
This is the module used by OpenERP SA to redirect customers to his partners,
-based on geolocalisation.
+based on geolocalization.
""",
'author': 'OpenERP SA',
'depends': ['crm'],
- 'update_xml': ['res_partner_view.xml'],
- 'demo_xml': [],
+ 'data': [
+ 'res_partner_view.xml',
+ 'crm_lead_view.xml',
+ ],
'installable': True,
'active': False,
'certificate': False,
diff --git a/addons/partner_geo_assign/partner_geo_assign.py b/addons/partner_geo_assign/partner_geo_assign.py
index 97bca0b1073..0134dd04e72 100644
--- a/addons/partner_geo_assign/partner_geo_assign.py
+++ b/addons/partner_geo_assign/partner_geo_assign.py
@@ -39,14 +39,14 @@ def geo_find(addr):
except Exception, e:
raise osv.except_osv(_('Network error'),
_('Could not contact geolocation servers, please make sure you have a working internet connection (%s)') % e)
-
+
class res_partner(osv.osv):
_inherit = "res.partner"
_columns = {
'partner_latitude': fields.float('Geo Latitude'),
'partner_longitude': fields.float('Geo Longitude'),
- 'date_assign': fields.date('Assignation Date'),
+ 'date_localization': fields.date('Geo Localization Date'),
'partner_weight': fields.integer('Weight',
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
}
@@ -64,7 +64,7 @@ class res_partner(osv.osv):
self.write(cr, uid, [partner.id], {
'partner_latitude': result[0],
'partner_longitude': result[1],
- 'date_assign': time.strftime('%Y-%m-%d')
+ 'date_localization': time.strftime('%Y-%m-%d')
}, context=context)
return True
res_partner()
@@ -74,33 +74,7 @@ class crm_lead(osv.osv):
_columns = {
'partner_latitude': fields.float('Geo Latitude'),
'partner_longitude': fields.float('Geo Longitude'),
- 'partner_assigned_id': fields.many2one('res.partner','Assigned Partner'),
- 'date_assign': fields.date('Assignation Date')
}
- def forward_to_partner(self, cr, uid, ids, context=None):
- fobj = self.pool.get('crm.lead.forward.to.partner')
- for lead in self.browse(cr, uid, ids, context=context):
- context = {'active_id': lead.id, 'active_ids': [lead.id], 'active_model': 'crm.lead'}
- if lead.partner_assigned_id:
- email = False
- if lead.partner_assigned_id.address:
- email = lead.partner_assigned_id.address[0].email
- if not email:
- raise osv.except_osv(_('Error !'), _('No email on the partner assigned to this opportunity'))
-
- values = fobj.default_get(cr, uid, ['name', 'email_from'], context=context)
- if not values.get('email_from'):
- raise osv.except_osv(_('Error !'), _('Please set an email address in your user preferences'))
- values.update({
- 'history': 'whole',
- 'email_to': email,
- 'message': fobj._get_case_history(cr, uid, 'whole', lead.id, context) or False,
- })
- forward = fobj.create(cr, uid, values, context)
- fobj.action_forward(cr, uid, [forward], context)
- else:
- raise osv.except_osv(_('Error !'), _('No partner assigned to this opportunity'))
- return True
def assign_partner(self, cr, uid, ids, context=None):
ok = False
diff --git a/addons/partner_geo_assign/res_partner_view.xml b/addons/partner_geo_assign/res_partner_view.xml
index 26322f23495..f9310fdfbd0 100644
--- a/addons/partner_geo_assign/res_partner_view.xml
+++ b/addons/partner_geo_assign/res_partner_view.xml
@@ -1,33 +1,6 @@
-
- crm.lead.geo_assign.inherit
- crm.lead
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
res.partner.geo.inheritres.partner
@@ -35,7 +8,7 @@
-
+
-
+
-
diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py
index ffe5d71c18e..6e66b220601 100644
--- a/addons/point_of_sale/pos.py
+++ b/addons/point_of_sale/pos.py
@@ -42,9 +42,9 @@ class pos_config_journal(osv.osv):
pos_config_journal()
class pos_company_discount(osv.osv):
-
- """ Company Discount and Cashboxes """
-
+
+ """ Company Discount and Cashboxes """
+
_inherit = 'res.company'
_columns = {
'company_discount': fields.float('Max Discount(%)', digits_compute= dp.get_precision('Point Of Sale')),
@@ -55,10 +55,10 @@ pos_company_discount()
class pos_order(osv.osv):
-
+
""" Point of sale gives business owners a convenient way of checking out customers
- and of recording sales """
-
+ and of recording sales """
+
_name = "pos.order"
_description = "Point of Sale"
_order = "date_order, create_date desc"
@@ -66,7 +66,7 @@ class pos_order(osv.osv):
def unlink(self, cr, uid, ids, context={}):
-
+
for rec in self.browse(cr, uid, ids, context=context):
for rec_statement in rec.statement_ids:
if (rec_statement.statement_id and rec_statement.statement_id.state=='confirm') or rec.state=='done':
@@ -76,7 +76,7 @@ class pos_order(osv.osv):
def onchange_partner_pricelist(self, cr, uid, ids, part, context={}):
""" Changed price list on_change of partner_id"""
-
+
if not part:
return {}
pricelist = self.pool.get('res.partner').browse(cr, uid, part).property_product_pricelist.id
@@ -108,13 +108,13 @@ class pos_order(osv.osv):
return res
def _get_date_payment2(self, cr, uid, ids, context, *a):
-
- # Todo need to check this function
+
+ # Todo need to check this function
""" Find payment Date
-
+
@param field_names: Names of fields.
@return: Dictionary of values """
-
+
res = {}
pay_obj = self.pool.get('account.bank.statement')
stat_obj_line = self.pool.get('account.bank.statement.line')
@@ -137,12 +137,12 @@ class pos_order(osv.osv):
if val:
res[order.id]=val
return res
-
+
def _get_date_payment(self, cr, uid, ids, context, *a):
-
+
""" Find Validation Date
- @return: Dictionary of values """
-
+ @return: Dictionary of values """
+
res = {}
pay_obj = self.pool.get('pos.payment')
tot =0.0
@@ -172,22 +172,22 @@ class pos_order(osv.osv):
return res
def _amount_all(self, cr, uid, ids, name, args, context=None):
- tax_obj = self.pool.get('account.tax')
- cur_obj = self.pool.get('res.currency')
+ tax_obj = self.pool.get('account.tax')
+ cur_obj = self.pool.get('res.currency')
res={}
for order in self.browse(cr, uid, ids):
res[order.id] = {
'amount_paid': 0.0,
'amount_return':0.0,
'amount_tax':0.0,
- }
- val=0.0
- cur_obj = self.pool.get('res.currency')
- cur = order.pricelist_id.currency_id
+ }
+ val=0.0
+ cur_obj = self.pool.get('res.currency')
+ cur = order.pricelist_id.currency_id
for payment in order.statement_ids:
- res[order.id]['amount_paid'] += payment.amount
+ res[order.id]['amount_paid'] += payment.amount
for payment in order.payments:
- res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0)
+ res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0)
for line in order.lines:
if order.price_type!='tax_excluded':
res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2),
@@ -197,16 +197,16 @@ class pos_order(osv.osv):
res[order.id]['amount_tax'])
elif line.qty != 0.0:
for c in tax_obj.compute_all(cr, uid, line.product_id.taxes_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.qty, line.product_id, line.order_id.partner_id)['taxes']:
- val += c['amount']
+ val += c['amount']
res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val)
return res
-
+
def _sale_journal_get(self, cr, uid, context):
-
- """ To get sale journal for this order"
- @return: journal """
+
+ """ To get sale journal for this order"
+ @return: journal """
journal_obj = self.pool.get('account.journal')
res = journal_obj.search(cr, uid,
@@ -217,10 +217,10 @@ class pos_order(osv.osv):
return False
def _shop_get(self, cr, uid, context):
-
- """ To get Shop for this order"
- @return: Shop id """
-
+
+ """ To get Shop for this order"
+ @return: Shop id """
+
company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id
res = self.pool.get('sale.shop').search(cr, uid, [])
if res:
@@ -228,7 +228,7 @@ class pos_order(osv.osv):
else:
return False
def copy(self, cr, uid, id, default=None, context={}):
-
+
if not default:
default = {}
default.update({
@@ -245,7 +245,7 @@ class pos_order(osv.osv):
return super(pos_order, self).copy(cr, uid, id, default, context)
def _get_v( self, cr, uid, ids,*a):
-
+
""" Changed the Validation state of order
@return: State """
@@ -326,11 +326,11 @@ class pos_order(osv.osv):
def _select_pricelist(self, cr, uid, context):
-
- """ To get default pricelist for the order"
+
+ """ To get default pricelist for the order"
@param name: Names of fields.
@return: pricelist ID
- """
+ """
pricelist = self.pool.get('product.pricelist').search(cr, uid, [('name', '=', 'Public Pricelist')])
if pricelist:
return pricelist[0]
@@ -338,11 +338,11 @@ class pos_order(osv.osv):
return False
def _journal_default(self, cr, uid, context={}):
-
- """ To get default pricelist for the order"
+
+ """ To get default pricelist for the order"
@param name: Names of fields.
@return: journal ID
- """
+ """
journal_list = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')])
if journal_list:
return journal_list[0]
@@ -350,7 +350,7 @@ class pos_order(osv.osv):
return False
_defaults = {
- 'user_salesman_id':lambda self, cr, uid, context: uid,
+ 'user_salesman_id':lambda self, cr, uid, context: uid,
'user_id': lambda self, cr, uid, context: uid,
'sale_manager': lambda self, cr, uid, context: uid,
'state': lambda *a: 'draft',
@@ -369,11 +369,11 @@ class pos_order(osv.osv):
def test_order_lines(self, cr, uid, order, context={}):
-
- """ Test order line is created or not for the order "
+
+ """ Test order line is created or not for the order "
@param name: Names of fields.
@return: True
- """
+ """
if not order.lines:
raise osv.except_osv(_('Error'), _('No order lines defined for this sale.'))
@@ -385,10 +385,10 @@ class pos_order(osv.osv):
return True
def test_paid(self, cr, uid, ids, context=None):
-
- """ Test all amount is paid for this order
+
+ """ Test all amount is paid for this order
@return: True
- """
+ """
for order in self.browse(cr, uid, ids, context):
if order.lines and not order.amount_total:
return True
@@ -398,9 +398,9 @@ class pos_order(osv.osv):
return True
def _get_qty_differences(self, orders, old_picking):
-
+
"""check if the customer changed the product quantity """
-
+
order_dict = {}
for order in orders:
for line in order.lines:
@@ -422,9 +422,9 @@ class pos_order(osv.osv):
return diff_dict
def _split_picking(self, cr, uid, ids, context, old_picking, diff_dict):
-
+
"""if the customer changes the product quantity, split the picking in two"""
-
+
# create a copy of the original picking and adjust the product qty:
picking_model = self.pool.get('stock.picking')
defaults = {
@@ -462,9 +462,9 @@ class pos_order(osv.osv):
line.unlink(context=context)
def create_picking(self, cr, uid, ids, context={}):
-
+
"""Create a picking for each order and validate it."""
-
+
picking_obj = self.pool.get('stock.picking')
pick_name=self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
orders = self.browse(cr, uid, ids, context)
@@ -472,7 +472,7 @@ class pos_order(osv.osv):
if not order.picking_id:
new = True
picking_id = picking_obj.create(cr, uid, {
- 'name':pick_name,
+ 'name':pick_name,
'origin': order.name,
'type': 'out',
'state': 'draft',
@@ -530,8 +530,8 @@ class pos_order(osv.osv):
return True
def set_to_draft(self, cr, uid, ids, *args):
-
- """ Changes order state to draft
+
+ """ Changes order state to draft
@return: True
"""
if not len(ids):
@@ -545,10 +545,10 @@ class pos_order(osv.osv):
return True
def button_invalidate(self, cr, uid, ids, *args):
-
- """ Check the access for the sale order
+
+ """ Check the access for the sale order
@return: True
- """
+ """
res_obj = self.pool.get('res.company')
try:
part_company=res_obj.browse(cr,uid,uid) and res_obj.browse(cr,uid,uid).parent_id and res_obj.browse(cr,uid,uid).parent_id.id or None
@@ -559,10 +559,10 @@ class pos_order(osv.osv):
return True
def button_validate(self, cr, uid, ids, *args):
-
+
""" Check the access for the sale order and update the date_validation
@return: True
- """
+ """
res_obj = self.pool.get('res.company')
try:
part_company=res_obj.browse(cr,uid,uid) and res_obj.browse(cr,uid,uid).parent_id and res_obj.browse(cr,uid,uid).parent_id.id or None
@@ -581,18 +581,18 @@ class pos_order(osv.osv):
def cancel_order(self, cr, uid, ids, context=None):
-
- """ Changes order state to cancel
+
+ """ Changes order state to cancel
@return: True
- """
+ """
self.write(cr, uid, ids, {'state': 'cancel'})
self.cancel_picking(cr, uid, ids, context={})
return True
def add_payment(self, cr, uid, order_id, data, context=None):
-
+
"""Create a new payment for the order"""
-
+
res_obj = self.pool.get('res.company')
statementl_obj = self.pool.get('account.bank.statement.line')
prod_obj = self.pool.get('product.product')
@@ -645,9 +645,9 @@ class pos_order(osv.osv):
return statement_id
def add_product(self, cr, uid, order_id, product_id, qty, context=None):
-
+
"""Create a new order line the order"""
-
+
line_obj = self.pool.get('pos.order.line')
values = self.read(cr, uid, order_id, ['partner_id', 'pricelist_id'])
@@ -669,9 +669,9 @@ class pos_order(osv.osv):
return order_line_id
def refund(self, cr, uid, ids, context={}):
-
- """Create a copy of order for refund order"""
-
+
+ """Create a copy of order for refund order"""
+
clone_list = []
line_obj = self.pool.get('pos.order.line')
@@ -696,7 +696,7 @@ class pos_order(osv.osv):
return clone_list
def action_invoice(self, cr, uid, ids, context={}):
-
+
"""Create a invoice of order """
res_obj = self.pool.get('res.company')
@@ -739,7 +739,7 @@ class pos_order(osv.osv):
'quantity': line.qty,
}
inv_name = product_obj.name_get(cr, uid, [line.product_id.id], context=context)[0][1]
-
+
inv_line.update(inv_line_ref.product_id_change(cr, uid, [],
line.product_id.id,
line.product_id.uom_id.id,
@@ -759,9 +759,9 @@ class pos_order(osv.osv):
return inv_ids
def create_account_move(self, cr, uid, ids, context=None):
-
- """Create a account move line of order """
-
+
+ """Create a account move line of order """
+
account_move_obj = self.pool.get('account.move')
account_move_line_obj = self.pool.get('account.move.line')
account_period_obj = self.pool.get('account.period')
@@ -777,7 +777,7 @@ class pos_order(osv.osv):
to_reconcile = []
group_tax = {}
account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context).id
-
+
order_account = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def or curr_c.account_receivable.id
# Create an entry for the sale
@@ -845,7 +845,7 @@ class pos_order(osv.osv):
# Create a move for the line
account_move_line_obj.create(cr, uid, {
'name': "aa"+order.name,
- 'date': order.date_order,
+ 'date': order.date_order[:10],
'ref': order.contract_number or order.name,
'quantity': line.qty,
'product_id':line.product_id.id,
@@ -873,7 +873,7 @@ class pos_order(osv.osv):
account_move_line_obj.create(cr, uid, {
'name': "bb"+order.name,
- 'date': order.date_order,
+ 'date': order.date_order[:10],
'ref': order.contract_number or order.name,
'product_id':line.product_id.id,
'quantity': line.qty,
@@ -894,7 +894,7 @@ class pos_order(osv.osv):
for key, amount in group_tax.items():
account_move_line_obj.create(cr, uid, {
'name':"cc"+order.name,
- 'date': order.date_order,
+ 'date': order.date_order[:10],
'ref': order.contract_number or order.name,
'move_id': move_id,
'company_id': comp_id,
@@ -912,7 +912,7 @@ class pos_order(osv.osv):
# counterpart
to_reconcile.append(account_move_line_obj.create(cr, uid, {
'name': "dd"+order.name,
- 'date': order.date_order,
+ 'date': order.date_order[:10],
'ref': order.contract_number or order.name,
'move_id': move_id,
'company_id': comp_id,
@@ -963,7 +963,7 @@ class pos_order(osv.osv):
'statement_id': False,
'account_id':order_account
})
-
+
self.write(cr,uid,order.id,{'state':'done'})
return True
@@ -1072,7 +1072,7 @@ class pos_order_line(osv.osv):
else:
res[line.id]=line.price_unit*line.qty
res[line.id] = res[line.id] + tax_amount
-
+
return res
def _amount_line(self, cr, uid, ids, field_name, arg, context):
res = {}
@@ -1093,7 +1093,7 @@ class pos_order_line(osv.osv):
_('You have to select a pricelist in the sale form !\n' \
'Please set one before choosing a product.'))
p_obj = self.pool.get('product.product').browse(cr,uid,[product_id])[0]
- uom_id=p_obj.uom_po_id.id
+ uom_id=p_obj.uom_po_id.id
price = self.pool.get('product.pricelist').price_get(cr, uid,
[pricelist], product_id, qty or 1.0, partner_id,{'uom': uom_id})[pricelist]
unit_price=price or p_obj.list_price
@@ -1102,8 +1102,8 @@ class pos_order_line(osv.osv):
_("Couldn't find a pricelist line matching this product" \
" and quantity.\nYou have to change either the product," \
" the quantity or the pricelist."))
- return unit_price
-
+ return unit_price
+
def onchange_product_id(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False):
price = self.price_by_product(cr, uid, ids, pricelist, product_id, qty, partner_id)
self.write(cr,uid,ids,{'price_unit':price})
@@ -1284,7 +1284,7 @@ class pos_payment(osv.osv):
pos_payment()
class account_move_line(osv.osv):
-
+
_inherit = 'account.move.line'
def create(self, cr, user, vals, context={}):
pos_obj = self.pool.get('pos.order')
@@ -1304,9 +1304,9 @@ account_move_line()
class account_move(osv.osv):
-
+
_inherit = 'account.move'
-
+
def create(self, cr, user, vals, context={}):
pos_obj = self.pool.get('pos.order')
val_name = vals.get('name', '')
diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py
index eb59548758c..66f17562399 100644
--- a/addons/point_of_sale/report/pos_invoice.py
+++ b/addons/point_of_sale/report/pos_invoice.py
@@ -48,7 +48,6 @@ class pos_invoice(report_sxw.rml_parse):
raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.'))
iids.append(order.invoice_id)
nids.append(order.invoice_id.id)
- self.cr.commit()
data['ids'] = nids
self.datas = data
self.ids = nids
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index 57274c89d74..7fb33ba7f09 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -70,7 +70,6 @@ class pos_open_statement(osv.osv_memory):
# })
period = statement_obj._get_period(cr, uid, context) or None
cr.execute("INSERT INTO account_bank_statement(journal_id,company_id,user_id,state,name, period_id,date) VALUES(%d,%d,%d,'open','%s',%d,'%s')"%(journal.id, company_id, uid, number, period, time.strftime('%Y-%m-%d %H:%M:%S')))
- cr.commit()
cr.execute("select id from account_bank_statement where journal_id=%d and company_id=%d and user_id=%d and state='open' and name='%s'"%(journal.id, company_id, uid, number))
statement_id = cr.fetchone()[0]
if st_id:
diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml
index efef1dc3649..84b47128fff 100644
--- a/addons/profile_tools/misc_tools_installer.xml
+++ b/addons/profile_tools/misc_tools_installer.xml
@@ -20,7 +20,10 @@
Here are a few useful applications which, while they don't directly contribute to your business, can improve on it or improve your OpenERP experience
+ >Here are a few useful applications which, while they do not directly contribute to your business, can help you to improve your organization.
+
+
+ Configure
diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py
index 726e87b5979..b5ff85fcc3c 100644
--- a/addons/project/__openerp__.py
+++ b/addons/project/__openerp__.py
@@ -56,7 +56,8 @@ work done on tasks, eso. It is able to render planning, order tasks, eso.
'board_project_demo.xml',
],
'test':[
- 'test/test_project.yml'
+ 'test/test_project.yml',
+ 'test/test_project_delegation.yml',
],
'installable': True,
'active': False,
diff --git a/addons/project/board_project_view.xml b/addons/project/board_project_view.xml
index 6258c85f689..5c216e1eaad 100644
--- a/addons/project/board_project_view.xml
+++ b/addons/project/board_project_view.xml
@@ -23,7 +23,7 @@
-
+
My Open Tasksproject.task
@@ -32,16 +32,16 @@
[('user_id','=',uid),('state','=','open')]
-
-
- My Pending Tasks
+
+
+ My Delegated Tasksproject.taskformtree,form
- [('user_id','=',uid),('state','=','pending')]
-
+ ['|',('parent_ids.user_id','=',uid),('user_id','=',uid)]
+
-
+
My Task's Deadlinesproject.task
@@ -87,7 +87,7 @@
-
+
@@ -95,7 +95,7 @@
-
+
@@ -112,20 +112,20 @@
menu
-
+
-
+
-
+
diff --git a/addons/project/project.py b/addons/project/project.py
index 5ed5f9641ab..168e7db7c7c 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -21,7 +21,7 @@
from lxml import etree
import time
-
+from datetime import date, datetime
from tools.translate import _
from osv import fields, osv
@@ -170,6 +170,9 @@ class project(osv.osv):
return res
def set_done(self, cr, uid, ids, context=None):
+ task_obj = self.pool.get('project.task')
+ task_ids = task_obj.search(cr, uid, [('project_id', 'in', ids), ('state', 'not in', ('cancelled', 'done'))])
+ task_obj.write(cr, uid, task_ids, {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0})
self.write(cr, uid, ids, {'state':'close'}, context=context)
for (id, name) in self.name_get(cr, uid, ids):
message = _('Project ') + " '" + name + "' "+ _("is Closed.")
@@ -177,6 +180,9 @@ class project(osv.osv):
return True
def set_cancel(self, cr, uid, ids, context=None):
+ task_obj = self.pool.get('project.task')
+ task_ids = task_obj.search(cr, uid, [('project_id', 'in', ids), ('state', '!=', 'done')])
+ task_obj.write(cr, uid, task_ids, {'state': 'cancelled', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0})
self.write(cr, uid, ids, {'state':'cancelled'}, context=context)
return True
@@ -198,16 +204,33 @@ class project(osv.osv):
def copy(self, cr, uid, id, default={}, context=None):
if context is None:
context = {}
+
+ task_obj = self.pool.get('project.task')
proj = self.browse(cr, uid, id, context=context)
default = default or {}
context['active_test'] = False
default['state'] = 'open'
if not default.get('name', False):
- default['name'] = proj.name+_(' (copy)')
+ default['name'] = proj.name+_(' (copy)')
res = super(project, self).copy(cr, uid, id, default, context)
+
+ task_ids = task_obj.search(cr, uid, [('project_id','=', res), ('active','=',False)])
+ tasks = task_obj.browse(cr, uid, task_ids)
+ for task in tasks:
+ date_deadline = None
+ date_end = None
+ if task.date_start:
+ ds = date(*time.strptime(task.date_start,'%Y-%m-%d %H:%M:%S')[:3])
+ if task.date_deadline:
+ dd = date(*time.strptime(task.date_deadline,'%Y-%m-%d')[:3])
+ diff = dd-ds
+ date_deadline = (datetime.now()+diff).strftime('%Y-%m-%d %H:%M:%S')
+ task_obj.write(cr, uid, task.id, {'active':True,
+ 'date_start':time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date_deadline':date_deadline,
+ 'date_end':date_end})
+
ids = self.search(cr, uid, [('parent_id','child_of', [res])])
- if ids:
- cr.execute('update project_task set active=True where project_id IN %s',(tuple(ids),))
return res
def duplicate_template(self, cr, uid, ids, context=None):
@@ -322,9 +345,16 @@ class task(osv.osv):
if task['date_start'] > task['date_end']:
return False
return True
+
+ def _check_deadline_date(self, cr, uid, ids, context=None):
+ task = self.read(cr, uid, ids[0], ['date_start', 'date_deadline'])
+ if task['date_start'] and task['date_deadline']:
+ if task['date_deadline'] < task['date_start']:
+ return False
+ return True
_columns = {
- 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the task without removing it."),
+ 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the task without removing it. This is basically used for the management of templates of projects and tasks."),
'name': fields.char('Task Summary', size=128, required=True),
'description': fields.text('Description'),
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
@@ -597,6 +627,15 @@ class config_compute_remaining(osv.osv_memory):
_columns = {
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Put here the remaining hours required to close the task."),
}
+
+ def _get_analytic_account(self, cr, uid, context={}):
+ if context.get('account_id', False):
+ return context.get('account_id')
+ return False
+
+ _defaults = {
+ 'account_id' : _get_analytic_account,
+ }
_defaults = {
'remaining_hours': _get_remaining
diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml
index 43f01c2120d..13127969409 100644
--- a/addons/project/project_demo.xml
+++ b/addons/project/project_demo.xml
@@ -31,7 +31,7 @@
1Open ERP Integration
-
+
@@ -39,21 +39,20 @@
10Study + Prototype
-
+ 20Specific Developments
-
+ 30Install, data import, configuration
-
@@ -100,7 +99,6 @@
Internal testing + Software Install
- 2008-06-0617
@@ -214,7 +212,6 @@
openIn house training
- 2007-06-0650
@@ -257,7 +254,6 @@
Latest in house tests
- 2010-05-27Follow the procedure of Configuration wizard.
diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml
index c989ab50aab..6c760bc65d1 100644
--- a/addons/project/project_installer.xml
+++ b/addons/project/project_installer.xml
@@ -1,6 +1,6 @@
-
+
project.installer.viewproject.installer
@@ -18,7 +18,7 @@
- Various OpenERP applications are available to bring your project management to the next levels of control and flexibility.
+ Various OpenERP applications are available to manage your projects with different level of control and flexibility.Configure
@@ -65,6 +65,6 @@
-
+
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 0c9b2f671ce..8fb488478ec 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -45,7 +45,7 @@
-
+
@@ -117,7 +117,6 @@
-
@@ -322,11 +321,10 @@
-
+
-
@@ -342,18 +340,13 @@
-
+
-
-
-
-
-
+
+
+
@@ -418,18 +414,27 @@
-
+
+
+
-
+
@@ -454,7 +459,7 @@
tree,form,calendar,gantt,graph
- {"search_default_project_id":project_id,'search_default_user_id':uid, 'search_default_current': 1}
+ {"search_default_project_id":project_id, "search_default_user_id":uid, 'search_default_current': 1}
@@ -497,7 +502,8 @@
-
+
+
@@ -515,7 +521,7 @@
- Types
+ Task Stagesproject.task.typeform
@@ -528,6 +534,7 @@
-
+
@@ -652,4 +659,4 @@
-
+
\ No newline at end of file
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index a3ecf0f4ba1..0d373cdff98 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -122,27 +122,31 @@ class report_project_task_user(osv.osv):
report_project_task_user()
#This class is generated for project deshboard purpose
-class project_vs_remaining_hours(osv.osv):
- _name = "project.vs.remaining.hours"
- _description = " Project vs Remaining hours"
+class project_vs_hours(osv.osv):
+ _name = "project.vs.hours"
+ _description = " Project vs hours"
_auto = False
_columns = {
'project': fields.char('Project', size=128, required=True),
'remaining_hours': fields.float('Remaining Hours', readonly=True),
+ 'planned_hours': fields.float('Planned Hours', readonly=True),
+ 'total_hours': fields.float('Total Hours', readonly=True),
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Close'),('template', 'Template')], 'State', required=True, readonly=True)
}
_order = 'project desc'
def init(self, cr):
- tools.sql.drop_view_if_exists(cr, 'project_vs_remaining_hours')
+ tools.sql.drop_view_if_exists(cr, 'project_vs_hours')
cr.execute("""
- CREATE or REPLACE view project_vs_remaining_hours as (
+ CREATE or REPLACE view project_vs_hours as (
select
min(pt.id) as id,
aaa.user_id as uid,
aaa.name as project,
aaa.state,
- sum(pt.remaining_hours) as remaining_hours
+ sum(pt.remaining_hours) as remaining_hours,
+ sum(pt.planned_hours) as planned_hours,
+ sum(pt.total_hours) as total_hours
FROM project_project as pp,
account_analytic_account as aaa,
project_task as pt
@@ -154,17 +158,19 @@ class project_vs_remaining_hours(osv.osv):
pur.uid as uid,
aaa.name as project,
aaa.state,
- sum(pt.remaining_hours) as remaining_hours
+ sum(pt.remaining_hours) as remaining_hours,
+ sum(pt.planned_hours) as planned_hours,
+ sum(pt.total_hours) as total_hours
FROM project_project as pp,
project_user_rel as pur,
account_analytic_account as aaa,
project_task as pt
- WHERE pur.project_id=pp.id and pt.project_id=pp.id and pp.category_id=aaa.id
+ WHERE pur.project_id=pp.id and pt.project_id=pp.id and pp.category_id=aaa.id AND pur.uid != aaa.user_id
GROUP BY pur.uid,aaa.state,aaa.name
)
""")
-project_vs_remaining_hours()
+project_vs_hours()
class task_by_days(osv.osv):
_name = "task.by.days"
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index f22875cee4d..ddd03ebf7b9 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -1,7 +1,7 @@
-
+
@@ -91,7 +91,7 @@
+ help="My Projects" domain="[('project_id','=',uid)]"/>
@@ -151,7 +151,7 @@
project.vs.remaining.hour.tree
- project.vs.remaining.hours
+ project.vs.hourstree
@@ -164,7 +164,7 @@
project.vs.remaining.hour.graph
- project.vs.remaining.hours
+ project.vs.hoursgraph
@@ -177,13 +177,25 @@
Project and remaining hours
- project.vs.remaining.hours
+ project.vs.hoursformgraph,tree
- [('uid','=',uid)]
+ [('uid','=',uid),('state','=','open')]
+
+
+ tree
+
+
+
+
+
+ graph
+
+
+ task.by.days.tree
@@ -222,38 +234,52 @@
-
- task.by.days.vs.planned.hours.tree
- report.project.task.user
+
+ project.vs.planned.total.hour.tree
+ project.vs.hourstree
-
-
-
+
+
+
+
-
- task.by.days.vs.planned.hours.graph
- report.project.task.user
+
+ project.vs.planned.total.hour.graph
+ project.vs.hoursgraph
-
-
-
-
+
+
+
+
-
- Task By Days vs Planned Hours
- report.project.task.user
+
+ My projects: Planned Vs Total hours
+ project.vs.hoursformgraph,tree
-
+ [('uid','=',uid),('state','=','open')]
+
+
+
+ tree
+
+
+
+
+
+ graph
+
+
+
diff --git a/addons/project/security/ir.model.access.csv b/addons/project/security/ir.model.access.csv
index 99ff1ea3629..b418b0a0dbf 100644
--- a/addons/project/security/ir.model.access.csv
+++ b/addons/project/security/ir.model.access.csv
@@ -11,7 +11,7 @@
"access_project_task_work_manager","project.task.work.manager","model_project_task_work","project.group_project_manager",1,1,1,1
"access_project_message","project.message","model_project_message","project.group_project_user",1,1,1,1
"access_report_project_task_user","report.project.task.user","model_report_project_task_user","project.group_project_manager",1,0,0,0
-"access_project_vs_remaining_hours","project.vs.remaining.hours","model_project_vs_remaining_hours","project.group_project_user",1,1,1,1
+"access_project_vs_hours","project.vs.hours","model_project_vs_hours","project.group_project_user",1,1,1,1
"access_task_by_days","task.by.days","model_task_by_days","project.group_project_user",1,1,1,1
"access_partner_task user","base.res.partner user","base.model_res_partner","project.group_project_user",1,0,0,0
"access_partner_task manager","base.res.partner manager","base.model_res_partner","project.group_project_manager",1,0,0,0
diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml
index 6071e644f34..8afe7de090c 100644
--- a/addons/project/security/project_security.xml
+++ b/addons/project/security/project_security.xml
@@ -36,7 +36,7 @@
Tasks According to User and Project
- ['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','=',user.id),('project_id.user_id','=',user.id)]
+ ['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','in', [user.id]),('project_id.user_id','=',user.id)]
diff --git a/addons/project/test/test_project.yml b/addons/project/test/test_project.yml
index 25b3e94b57f..ac5fe54ea0b 100644
--- a/addons/project/test/test_project.yml
+++ b/addons/project/test/test_project.yml
@@ -109,23 +109,24 @@
- state == "open"
-
-
Test for task work allocation
--
- Check if task 'Technical Training' in draft state
--
- !assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Project is in draft state}:
- - state == "draft"
--
- Open task 'Technical Training'
--
- !python {model: project.task}: |
- self.do_open(cr, uid, [ref("project_task_technicaltraining0")], {"lang": "en_US", "active_ids": [ref("project.menu_action_view_task")],
- "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
- False, "search_default_user_id": 1, "search_default_current": 1, "project_id":
- False, "active_id": ref("project.menu_action_view_task"), })
--
+-
+ As i cancelled my project before, i check if the task 'Technical Training' is in cancelled state
+-
+ !assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Task is in cancelled state}:
+ - state == "cancelled"
+-
+ Now in order to reactivate the task 'Technical Training', i click on the "Reactivate" button and fill the remaining hour field
+-
+ !record {model: config.compute.remaining, id: project_task_technicaltraining_remainingwiz0}:
+ remaining_hours: 30.0
+- |
+ I click the apply button
+-
+ !python {model: config.compute.remaining}: |
+ self.compute_hours(cr, uid, [ref('project_task_technicaltraining_remainingwiz0')], {'active_id': ref("project_task_technicaltraining0"),'button_reactivate': True})
+- |
Check if task 'Technical Training' in open state and for other initial values
-
!assert {model: project.task, id: project_task_technicaltraining0, severity: error, string: Project is in open state}:
@@ -231,10 +232,7 @@
Close the task
-
!python {model: project.task}: |
- self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {"lang": "en_US", "active_ids": [ref("project.menu_action_view_task")],
- "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
- False, "search_default_user_id": 1, "search_default_current": 1, "project_id":
- False, "active_id": ref("project.menu_action_view_task"), })
+ self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {'mail_send': False})
-
Check if task in done state
-
@@ -289,10 +287,7 @@
Close the task
-
!python {model: project.task}: |
- self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {"lang": "en_US", "active_ids": [ref("project.menu_action_view_task")],
- "tz": False, "active_model": "ir.ui.menu", "search_default_project_id":
- False, "search_default_user_id": 1, "search_default_current": 1, "project_id":
- False, "active_id": ref("project.menu_action_view_task"), })
+ self.do_close(cr, uid, [ref("project_task_technicaltraining0")], {'mail_send': False})
-
Check if task in done state
-
@@ -319,4 +314,4 @@
-
!assert {model: project.project, id: project_project_openerptrainingprogramme0, severity: error}:
- state == "close"
-
\ No newline at end of file
+
diff --git a/addons/project/wizard/project_close_task.py b/addons/project/wizard/project_close_task.py
index 715e70e59d0..5532d699a3b 100644
--- a/addons/project/wizard/project_close_task.py
+++ b/addons/project/wizard/project_close_task.py
@@ -98,6 +98,8 @@ class project_close_task(osv.osv_memory):
body = u'%s\n%s\n%s\n\n-- \n%s' % (header, description, footer, signature)
email(from_adr, [to_adr], subject, body.encode('utf-8'), email_bcc=[from_adr])
task_obj.write(cr, uid, [task.id], {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0})
+ message = _('Task ') + " '" + task.name + "' "+ _("is Done.")
+ self.log(cr, uid, task.id, message)
else:
raise osv.except_osv(_('Error'), _("Please specify the email address of partner."))
return {}
diff --git a/addons/project/wizard/project_task_delegate_view.xml b/addons/project/wizard/project_task_delegate_view.xml
index 762810eba64..68ebb1692d2 100644
--- a/addons/project/wizard/project_task_delegate_view.xml
+++ b/addons/project/wizard/project_task_delegate_view.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/addons/project_caldav/project_caldav.py b/addons/project_caldav/project_caldav.py
index b6a87516194..65e61c6e4cd 100644
--- a/addons/project_caldav/project_caldav.py
+++ b/addons/project_caldav/project_caldav.py
@@ -30,7 +30,13 @@ class project_task(osv.osv):
'create_date': fields.datetime('Create Date'),
'attendee_ids': fields.many2many('calendar.attendee', \
'task_attendee_rel', 'task_id', 'attendee_id', 'Attendees'),
- }
+ 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
+ help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
+ \n If the task is over, the states is set to \'Done\'.'),
+ }
+ _defaults = {
+ 'state': 'draft',
+ }
def import_cal(self, cr, uid, data, data_id=None, context=None):
todo_obj = self.pool.get('basic.calendar.todo')
@@ -43,7 +49,7 @@ class project_task(osv.osv):
ids = []
for val in vals:
obj_tm = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.project_time_mode_id
- if not val.has_key('planned_hours'):
+ if not val.get('planned_hours', False):
# 'Computes duration' in days
plan = 0.0
if val.get('date') and val.get('date_deadline'):
diff --git a/addons/project_caldav/project_caldav_data.xml b/addons/project_caldav/project_caldav_data.xml
index a6b7ef870f4..e5e2ce0578d 100644
--- a/addons/project_caldav/project_caldav_data.xml
+++ b/addons/project_caldav/project_caldav_data.xml
@@ -3,7 +3,7 @@
- Todo
+ Tasksvtodo
diff --git a/addons/project_caldav/project_caldav_view.xml b/addons/project_caldav/project_caldav_view.xml
index 3055fee85bc..01133108b6d 100644
--- a/addons/project_caldav/project_caldav_view.xml
+++ b/addons/project_caldav/project_caldav_view.xml
@@ -17,7 +17,9 @@
-
+
+
+
diff --git a/addons/project_gtd/__openerp__.py b/addons/project_gtd/__openerp__.py
index ba46d295234..971b2e8e324 100644
--- a/addons/project_gtd/__openerp__.py
+++ b/addons/project_gtd/__openerp__.py
@@ -43,10 +43,8 @@ performing those tasks.
'update_xml': [
'project_gtd_data.xml',
'project_gtd_view.xml',
- 'project_gtd_wizard.xml',
'security/ir.model.access.csv',
'wizard/project_gtd_empty_view.xml',
- 'wizard/project_gtd_daily_view.xml',
'wizard/project_gtd_fill_view.xml',
],
'demo_xml': ['project_gtd_demo.xml'],
diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py
index c2222fdb5d6..002b2af4e1b 100644
--- a/addons/project_gtd/project_gtd.py
+++ b/addons/project_gtd/project_gtd.py
@@ -174,7 +174,7 @@ class project_task(osv.osv):
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
search_extended ='''''' % (len(tt)+7,_('Getting Things Done'))
search_extended += '''''' % (_('Inbox'),)
- search_extended += '''''' % (_('All'),)
+ search_extended += '''''' % (_('Editable'),)
search_extended += ''''''
for time in tt:
if time.icon:
diff --git a/addons/project_gtd/project_gtd_view.xml b/addons/project_gtd/project_gtd_view.xml
index 919412cd27d..66a7cca01e3 100644
--- a/addons/project_gtd/project_gtd_view.xml
+++ b/addons/project_gtd/project_gtd_view.xml
@@ -80,8 +80,8 @@
-
+
@@ -96,7 +96,7 @@
-
+
diff --git a/addons/project_gtd/project_gtd_wizard.xml b/addons/project_gtd/project_gtd_wizard.xml
deleted file mode 100644
index e01db8218c6..00000000000
--- a/addons/project_gtd/project_gtd_wizard.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/project_gtd/wizard/__init__.py b/addons/project_gtd/wizard/__init__.py
index e92fa265ed3..aa2bbc22c45 100644
--- a/addons/project_gtd/wizard/__init__.py
+++ b/addons/project_gtd/wizard/__init__.py
@@ -19,8 +19,8 @@
#
##############################################################################
-import project_gtd_daily
import project_gtd_empty
import project_gtd_fill
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_gtd/wizard/project_gtd_daily.py b/addons/project_gtd/wizard/project_gtd_daily.py
deleted file mode 100644
index bacc1af85d9..00000000000
--- a/addons/project_gtd/wizard/project_gtd_daily.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 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 osv import osv, fields
-from tools.translate import _
-
-class project_timebox_open(osv.osv_memory):
-
- _name = 'project.timebox.open'
- _description = 'Project Timebox Open'
-
- def open_tb(self, cr, uid, data, context=None):
- ids = self.pool.get('project.gtd.timebox').search(cr, uid, [])
- if not len(ids):
- raise osv.except_osv(_('Error !'), _('No timebox of the type defined !'))
- if len(ids) >= 1:
- domain = "[('id','in',["+','.join(map(str, ids))+"])]"
- value = {
- 'domain': domain,
- 'name': 'My Daily Timebox',
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'project.gtd.timebox',
- 'view_id': False,
- 'type': 'ir.actions.act_window'
- }
- if len(ids) == 1:
- value['res_id'] = ids[0]
- value['context'] = {'record_id':ids[0]}
- return value
-
-project_timebox_open()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/project_gtd/wizard/project_gtd_daily_view.xml b/addons/project_gtd/wizard/project_gtd_daily_view.xml
deleted file mode 100644
index c49585f9112..00000000000
--- a/addons/project_gtd/wizard/project_gtd_daily_view.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
- My Daily Timebox
- project.timebox.open
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- My Daily Timebox
- ir.actions.act_window
- project.timebox.open
- form
- form
-
- {'record_id' : active_id}
- new
-
-
-
-
-
- My Daily Timebox
- client_action_multi
-
- action
- project.gtd.timebox
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/project_gtd/wizard/project_gtd_fill_view.xml b/addons/project_gtd/wizard/project_gtd_fill_view.xml
index 1c3d221c6ac..6206a0a5d89 100644
--- a/addons/project_gtd/wizard/project_gtd_fill_view.xml
+++ b/addons/project_gtd/wizard/project_gtd_fill_view.xml
@@ -8,8 +8,8 @@
form
-
-
+
+
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index ed648fb2969..473d67750e0 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -183,7 +183,7 @@ class project_issue(osv.osv, crm.crm_case):
method=True, multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True),
- 'assigned_to': fields.many2one('res.users', 'Assigned to'),
+ 'assigned_to': fields.related('task_id', 'user_id', type='many2one', relation='res.users', string='Assigned to', help='This is the current user to whom the related task have been assigned', readonly=True),
'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \
method=True, multi='working_days_open', type="float", store=True),
'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \
@@ -301,6 +301,8 @@ class project_issue(osv.osv, crm.crm_case):
data['project_id'] = case.project_id.project_escalation_id.id
if case.project_id.project_escalation_id.user_id:
data['user_id'] = case.project_id.project_escalation_id.user_id.id
+ if case.task_id:
+ self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
else:
raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
self.write(cr, uid, [case.id], data)
diff --git a/addons/project_issue_sheet/project_issue_sheet.py b/addons/project_issue_sheet/project_issue_sheet.py
index 132fa50189b..d4c9240cae1 100644
--- a/addons/project_issue_sheet/project_issue_sheet.py
+++ b/addons/project_issue_sheet/project_issue_sheet.py
@@ -48,6 +48,15 @@ class hr_analytic_issue(osv.osv):
_columns = {
'issue_id' : fields.many2one('project.issue', 'Issue'),
}
+
+ def _get_analytic_account(self, cr, uid, context={}):
+ if context.get('account_id', False):
+ return context.get('account_id')
+ return False
+
+ _defaults = {
+ 'account_id' : _get_analytic_account,
+ }
hr_analytic_issue()
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index 0ff6413b226..4e224ee0428 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -10,13 +10,13 @@
-
+
+
+
+
-
-
-
@@ -29,4 +29,4 @@
-
\ No newline at end of file
+
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index f76ab413e23..e1233bc413e 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -93,8 +93,8 @@ class project_phase(osv.osv):
_columns = {
'name': fields.char("Name", size=64, required=True),
- 'date_start': fields.datetime('Start Date', help="Starting Date of the phase"),
- 'date_end': fields.datetime('End Date', help="Ending Date of the phase"),
+ 'date_start': fields.date('Start Date', help="Starting Date of the phase"),
+ 'date_end': fields.date('End Date', help="Ending Date of the phase"),
'constraint_date_start': fields.datetime('Start Date', help='force the phase to start after this date'),
'constraint_date_end': fields.datetime('End Date', help='force the phase to finish before this date'),
'project_id': fields.many2one('project.project', 'Project', required=True),
@@ -114,7 +114,7 @@ class project_phase(osv.osv):
'responsible_id': lambda obj,cr,uid,context: uid,
'state': 'draft',
'sequence': 10,
- 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', 'day')], context=c)[0]
+ 'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0]
}
_order = "name"
_constraints = [
@@ -247,6 +247,8 @@ class project_resource_allocation(osv.osv):
_columns = {
'resource_id': fields.many2one('resource.resource', 'Resource', required=True),
'phase_id': fields.many2one('project.phase', 'Project Phase', required=True),
+ 'phase_id_date_start': fields.related('phase_id', 'date_start', type='date', string='Starting Date of the phase'),
+ 'phase_id_date_end': fields.related('phase_id', 'date_end', type='date', string='Ending Date of the phase'),
'useability': fields.float('Usability', help="Usability of this resource for this project phase in percentage (=50%)"),
}
_defaults = {
diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml
index 4170c0064d0..323e0b13fe2 100644
--- a/addons/project_long_term/project_long_term_view.xml
+++ b/addons/project_long_term/project_long_term_view.xml
@@ -8,6 +8,20 @@
# Project Resource Allocation
# ------------------------------------------------------
+
+ project.resource.allocation.gantt
+ project.resource.allocation
+ gantt
+
+
+
+
+
+
+
+
+
+
project.resource.allocation.formproject.resource.allocation
@@ -58,7 +72,7 @@
Resource Allocationsproject.resource.allocationform
- tree,form
+ gantt,tree,form{'search_default_resource': 1}
diff --git a/addons/purchase/wizard/purchase_installer.py b/addons/purchase/wizard/purchase_installer.py
index 3e195935f3a..2c0a24d0f65 100644
--- a/addons/purchase/wizard/purchase_installer.py
+++ b/addons/purchase/wizard/purchase_installer.py
@@ -26,6 +26,7 @@ class purchase_installer(osv.osv_memory):
_columns = {
'purchase_requisition':fields.boolean('Purchase Requisition',help="Manages your Purchase Requisition and allow you to easily keep track and manage all your purchase orders."),
+ 'purchase_analytic_plans': fields.boolean('Purchase Analytic Plans',help="Manages analytic distribution and purchase orders.")
}
purchase_installer()
diff --git a/addons/purchase/wizard/purchase_installer.xml b/addons/purchase/wizard/purchase_installer.xml
index 635297d0f21..dc10beacd98 100644
--- a/addons/purchase/wizard/purchase_installer.xml
+++ b/addons/purchase/wizard/purchase_installer.xml
@@ -20,13 +20,14 @@
- After having installed the core purchase application, you can extend it with more modules on needs of your organization
+ In this page, you can extend your purchase system with purchase requisition facility and analytic distribution of purchase orders.Configure
+
diff --git a/addons/report_designer/installer.py b/addons/report_designer/installer.py
index 2eb061d1344..1dd9797a68b 100644
--- a/addons/report_designer/installer.py
+++ b/addons/report_designer/installer.py
@@ -26,9 +26,17 @@ class report_designer_installer(osv.osv_memory):
_columns = {
# Reporting
- 'base_report_designer':fields.boolean('OpenOffice Report Designer'),
- 'base_report_creator':fields.boolean('Query Builder'),
- 'olap':fields.boolean('Business Intelligence Report'),
+ 'base_report_designer':fields.boolean('OpenOffice Report Designer',help="This module adds wizards to import/export .SXW report that "
+ "you can modify in OpenOffice.Once you have modified it you can "
+ "upload the report using the same wizard."),
+ 'base_report_creator':fields.boolean('Query Builder',help="his module allows you to create any statistic "
+ "reports on several objects. It's a SQL query builder and browser for and users. "
+ "After installation, it adds a menu to define custom report in the Dashboard menu."),
+ 'olap':fields.boolean('Business Intelligence Report',help="Olap module is used to install BI module in client. Olap provides Online "
+ "Analytical Process with the mdx query. BI provides Cube Browsing and Cube Designing. "
+ "After installation you will get Cube Browser and Cube Desinger in Reporting Menu. "
+ "Cube Browser is used to generate the reports with table view (mdx view) of mdx query "
+ "and Cube designer is used to make cubes in BI."),
}
report_designer_installer()
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 4e2309e13e0..172fe1226ef 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -785,8 +785,8 @@ class sale_order_line(osv.osv):
res = {}
context = context or {}
for line in self.browse(cr, uid, ids, context=context):
- price = line.price_unit * line.product_uom_qty * (1 - (line.discount or 0.0) / 100.0)
- taxes = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty)
+ price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
+ taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty, line.order_id.partner_invoice_id.id, line.product_id, line.order_id.partner_id)
cur = line.order_id.pricelist_id.currency_id
res[line.id] = cur_obj.round(cr, uid, cur, taxes['total'])
return res
@@ -851,17 +851,18 @@ class sale_order_line(osv.osv):
'type': 'make_to_stock',
'product_packaging': False
}
-
- def create_sale_order_line_invoice(self, cr, uid, ids, context):
- line_make_invoice_obj = self.pool.get("sale.order.line.make.invoice")
+
+ def create_sale_order_line_invoice(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
context.update({'active_ids' : ids,'active_id' : ids})
- invoice_id = line_make_invoice_obj.make_invoices(cr, uid, ids, context)
+ self.pool.get('sale.order.line.make.invoice').make_invoices(cr, uid, ids, context=context)
return True
-
+
def invoice_line_create(self, cr, uid, ids, context=None):
if context is None:
context = {}
-
+
def _get_line_qty(line):
if (line.order_id.invoice_quantity=='order') or not line.procurement_id:
if line.product_uos:
@@ -931,17 +932,17 @@ class sale_order_line(osv.osv):
for sid in sales.keys():
wf_service.trg_write(uid, 'sale.order', sid, cr)
return create_ids
-
+
def button_cancel(self, cr, uid, ids, context=None):
if context is None:
context = {}
for line in self.browse(cr, uid, ids, context=context):
if line.invoiced:
raise osv.except_osv(_('Invalid action !'), _('You cannot cancel a sale order line that has already been invoiced !'))
- if line.order_id.picking_ids:
- raise osv.except_osv(
- _('Could not cancel sale order line!'),
- _('You must first cancel stock move attached to this sale order line.'))
+# if line.order_id.picking_ids:
+# raise osv.except_osv(
+# _('Could not cancel sale order line!'),
+# _('You must first cancel stock move attached to this sale order line.'))
message = _('Sale order line') + " '" + line.name + "' "+_("is cancelled")
self.log(cr, uid, id, message)
return self.write(cr, uid, ids, {'state': 'cancel'})
diff --git a/addons/sale/wizard/sale_make_invoice.xml b/addons/sale/wizard/sale_make_invoice.xml
index 9884aa1f021..b3f121b8c40 100644
--- a/addons/sale/wizard/sale_make_invoice.xml
+++ b/addons/sale/wizard/sale_make_invoice.xml
@@ -1,30 +1,39 @@
-
+ Create invoicessale.make.invoiceform
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+ Make Invoices
+ ir.actions.act_window
+ sale.make.invoice
+ form
+ form
+ new
+
+
+
+ id="action_view_sale_order_make_invoice"/>
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index e54d5d2a374..683d050b454 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -22,6 +22,8 @@
from osv import fields, osv
from tools.translate import _
from mx.DateTime import now
+import time
+import decimal_precision as dp
class crm_make_sale(osv.osv_memory):
""" Make sale order for crm """
@@ -100,7 +102,6 @@ class crm_make_sale(osv.osv_memory):
vals = {
'origin': 'Opportunity:%s' % str(case.id),
'section_id': case.section_id and case.section_id.id or False,
- 'picking_policy': make.picking_policy,
'shop_id': make.shop_id.id,
'partner_id': partner_id,
'pricelist_id': pricelist,
@@ -119,14 +120,16 @@ class crm_make_sale(osv.osv_memory):
if make.analytic_account.id:
vals['project_id'] = make.analytic_account.id
new_id = sale_obj.create(cr, uid, vals)
- for product_id in make.product_ids:
+ for line in make.sale_order_line:
value = sale_line_obj.product_id_change(cr, uid, [], pricelist,
- product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
- value['product_id'] = product_id.id
+ line.product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
+ value['product_id'] =line.product_id.id
value['order_id'] = new_id
- value['tax_id'] = [(6,0,value['tax_id'])]
+ value['tax_id'] = [(6,0,line['tax_id'])]
+ value['product_uom_qty']=line.product_uom_qty
+ value['discount']=line.discount
+ value['product_uom']=line.product_uom.id
sale_line_obj.create(cr, uid, value)
-
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
new_ids.append(new_id)
message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Sales Quotation.")
@@ -163,10 +166,7 @@ class crm_make_sale(osv.osv_memory):
_columns = {
'shop_id': fields.many2one('sale.shop', 'Shop', required=True),
'partner_id': fields.many2one('res.partner', 'Customer', required=True, help='Use this partner if there is no partner on the Opportunity'),
- 'picking_policy': fields.selection([('direct','Partial Delivery'),
- ('one','Complete Delivery')], 'Picking Policy', required=True),
- 'product_ids': fields.many2many('product.product', 'product_sale_rel',\
- 'sale_id', 'product_id', 'Products'),
+ 'sale_order_line': fields.one2many('sale.order.make.line', 'order_line', 'Product Line', readonly=True, states={'draft': [('readonly', False)]}),
'analytic_account': fields.many2one('account.analytic.account', 'Analytic Account'),
'close': fields.boolean('Close Case', help='Check this to close the case after having created the sale order.'),
}
@@ -174,6 +174,160 @@ class crm_make_sale(osv.osv_memory):
'partner_id': _selectPartner,
'close': 1
}
+
crm_make_sale()
+
+class sale_order_make_line(osv.osv_memory):
+
+
+ def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
+ uom=False, qty_uos=0, uos=False, name='', partner_id=False,
+ lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False):
+ if not partner_id:
+ raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.'))
+ warning = {}
+ product_uom_obj = self.pool.get('product.uom')
+ partner_obj = self.pool.get('res.partner')
+ product_obj = self.pool.get('product.product')
+ if partner_id:
+ lang = partner_obj.browse(cr, uid, partner_id).lang
+ context = {'lang': lang, 'partner_id': partner_id}
+
+ if not product:
+ return {'value': {'th_weight': 0, 'product_packaging': False,
+ 'product_uos_qty': qty}, 'domain': {'product_uom': [],
+ 'product_uos': []}}
+
+ if not date_order:
+ date_order = time.strftime('%Y-%m-%d')
+
+ result = {}
+ product_obj = product_obj.browse(cr, uid, product, context=context)
+ if not packaging and product_obj.packaging:
+ packaging = product_obj.packaging[0].id
+ result['product_packaging'] = packaging
+
+ if packaging:
+ default_uom = product_obj.uom_id and product_obj.uom_id.id
+ pack = self.pool.get('product.packaging').browse(cr, uid, packaging, context=context)
+ q = product_uom_obj._compute_qty(cr, uid, uom, pack.qty, default_uom)
+# qty = qty - qty % q + q
+ if qty and (q and not (qty % q) == 0):
+ ean = pack.ean
+ qty_pack = pack.qty
+ type_ul = pack.ul
+ warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty)
+ warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
+ warning = {
+ 'title': _('Picking Information !'),
+ 'message': warn_msg
+ }
+ result['product_uom_qty'] = qty
+
+ uom2 = False
+ if uom:
+ uom2 = product_uom_obj.browse(cr, uid, uom)
+ if product_obj.uom_id.category_id.id != uom2.category_id.id:
+ uom = False
+
+ if uos:
+ if product_obj.uos_id:
+ uos2 = product_uom_obj.browse(cr, uid, uos)
+ if product_obj.uos_id.category_id.id != uos2.category_id.id:
+ uos = False
+ else:
+ uos = False
+ if product_obj.description_sale:
+ result['notes'] = product_obj.description_sale
+ fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
+ if update_tax: #The quantity only have changed
+ result['delay'] = (product_obj.sale_delay or 0.0)
+ partner = partner_obj.browse(cr, uid, partner_id)
+ result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
+ result.update({'type': product_obj.procure_method})
+
+ if not flag:
+ result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context)[0][1]
+ domain = {}
+ if (not uom) and (not uos):
+ result['product_uom'] = product_obj.uom_id.id
+ if product_obj.uos_id:
+ result['product_uos'] = product_obj.uos_id.id
+ result['product_uos_qty'] = qty * product_obj.uos_coeff
+ uos_category_id = product_obj.uos_id.category_id.id
+ else:
+ result['product_uos'] = False
+ result['product_uos_qty'] = qty
+ uos_category_id = False
+ domain = {'product_uom':
+ [('category_id', '=', product_obj.uom_id.category_id.id)],
+ 'product_uos':
+ [('category_id', '=', uos_category_id)]}
+
+ elif uos and not uom: # only happens if uom is False
+ result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id
+ result['product_uom_qty'] = qty_uos / product_obj.uos_coeff
+ elif uom: # whether uos is set or not
+ default_uom = product_obj.uom_id and product_obj.uom_id.id
+ q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
+ if product_obj.uos_id:
+ result['product_uos'] = product_obj.uos_id.id
+ result['product_uos_qty'] = qty * product_obj.uos_coeff
+ else:
+ result['product_uos'] = False
+ result['product_uos_qty'] = qty
+
+ if not uom2:
+ uom2 = product_obj.uom_id
+ return {'value': result, 'domain': domain, 'warning': warning}
+
+ def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,
+ uom=False, qty_uos=0, uos=False, name='', partner_id=False,
+ lang=False, update_tax=True, date_order=False):
+ res = self.product_id_change(cursor, user, ids, pricelist, product,
+ qty=qty, uom=uom, qty_uos=qty_uos, uos=uos, name=name,
+ partner_id=partner_id, lang=lang, update_tax=update_tax,
+ date_order=date_order)
+ if 'product_uom' in res['value']:
+ del res['value']['product_uom']
+ if not uom:
+ res['value']['price_unit'] = 0.0
+ return res
+
+ _name = 'sale.order.make.line'
+ _description = 'Sale Order Line'
+ _columns = {
+ 'order_line': fields.many2one('crm.make.sale', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
+ 'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
+ 'name': fields.char('Description', size=256, required=True, select=True, readonly=True, ),
+ 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
+ 'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, ),
+ 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
+ 'procurement_id': fields.many2one('procurement.order', 'Procurement'),
+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, ),
+ 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft':[('readonly',False)]}),
+ 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uos_qty': fields.float('Quantity (UoS)', readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uos': fields.many2one('product.uom', 'Product UoS'),
+ 'product_packaging': fields.many2one('product.packaging', 'Packaging'),
+ 'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
+ 'notes': fields.text('Notes'),
+ }
+ _order = 'sequence, id'
+ _defaults = {
+ 'discount': 0.0,
+ 'delay': 0.0,
+ 'product_uom_qty': 1,
+ 'product_uos_qty': 1,
+ 'type': 'make_to_stock',
+ 'product_packaging': False
+ }
+
+sale_order_make_line()
+
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/wizard/crm_make_sale_view.xml b/addons/sale_crm/wizard/crm_make_sale_view.xml
index a1da3ed1fec..17e743987f0 100644
--- a/addons/sale_crm/wizard/crm_make_sale_view.xml
+++ b/addons/sale_crm/wizard/crm_make_sale_view.xml
@@ -9,21 +9,66 @@
form
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale_layout/__init__.py b/addons/sale_layout/__init__.py
new file mode 100755
index 00000000000..e0a5a2b9f9c
--- /dev/null
+++ b/addons/sale_layout/__init__.py
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# 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 .
+#
+##############################################################################
+
+import sale_layout
+import report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/__openerp__.py b/addons/sale_layout/__openerp__.py
new file mode 100755
index 00000000000..c8868de9c2b
--- /dev/null
+++ b/addons/sale_layout/__openerp__.py
@@ -0,0 +1,48 @@
+##############################################################################
+#
+# 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 .
+#
+##############################################################################
+
+{
+ "name" : "Sale Order Layout Improvement",
+ "version" : "1.0",
+ "depends" : ["base", "sale"],
+ "author" : "Tiny",
+ "description": """
+ This module provides some features to improve the layout of the Sale Order.
+
+ It gives you the possibility to
+ * order all the lines of an sale order
+ * add titles, comment lines, sub total lines
+ * draw horizontal lines and put page breaks
+
+ """,
+ "website" : "http://www.openerp.com",
+ "category" : "Generic Modules/Sales & Purchases",
+ "init_xml" : [],
+ "demo_xml" : [],
+ "update_xml" : [
+# "security/ir.model.access.csv",
+ "sale_layout_view.xml",
+ "sale_layout_report.xml",
+ ],
+ "active": False,
+ "installable": True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/i18n/fr.po b/addons/sale_layout/i18n/fr.po
new file mode 100755
index 00000000000..41c3115135c
--- /dev/null
+++ b/addons/sale_layout/i18n/fr.po
@@ -0,0 +1,291 @@
+# translation of fr_FR.po to Français
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+# Numerigraphe , 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr_FR\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 08:45+0000\n"
+"PO-Revision-Date: 2010-01-19 05:23+0000\n"
+"Last-Translator: Numérigraphe \n"
+"Language-Team: Français\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-21 03:45+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr "Sous-total"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr "Titre"
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_meta_information
+msgid "sale_layout"
+msgstr "sale_layout"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc. (%)"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr "Remarque"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Order N°"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc.(%)"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr "Mise en page"
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr "Séq."
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr "Produit"
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_meta_information
+msgid ""
+"\n"
+" This module provides some features to improve the layout of the Sale "
+"Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+"\n"
+" Ce module ajoute des options pour améliorer la mise en page des "
+"commandes de vente.\n"
+"\n"
+" Il vous permet :\n"
+" * de réordonner toutes les lignes d'une commande\n"
+" * d'ajouter des titres, des lignes de remarques, des sous-totaux\n"
+" * de tracer des lignes horizontales et de faire des sauts de page "
+"\n"
+"\n"
+" "
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Description"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr "Description manuelle"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Our Salesman"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr "Déclaration automatique"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr "Lignes de facture"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quantity"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quotation N°"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "VAT"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr "Créer facture"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr "Propriétés"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Invoice address :"
+msgstr ""
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr "Saut de page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr "Notes"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Date Ordered"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Shipping address :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Net Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Tel. :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Payment Terms"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr "Historique"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr "Ligne de séparation"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr "Qté"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr "États"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "TVA :"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr "Commande avec mise en page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr "Info supplémentaires"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr "UDM"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Fax :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr "Commande client"
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr "Mouvements de stocks"
diff --git a/addons/sale_layout/i18n/fr_BE.po b/addons/sale_layout/i18n/fr_BE.po
new file mode 100755
index 00000000000..6a44937a3d3
--- /dev/null
+++ b/addons/sale_layout/i18n/fr_BE.po
@@ -0,0 +1,276 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 08:45:52+0000\n"
+"PO-Revision-Date: 2009-11-26 08:45:52+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_meta_information
+msgid "sale_layout"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc. (%)"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Order N°"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc.(%)"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_meta_information
+msgid "\n"
+" This module provides some features to improve the layout of the Sale Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Description"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Our Salesman"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quantity"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quotation N°"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "VAT"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Invoice address :"
+msgstr ""
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Date Ordered"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Shipping address :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Net Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Tel. :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Payment Terms"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "TVA :"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Fax :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr ""
+
diff --git a/addons/sale_layout/i18n/fr_FR.po b/addons/sale_layout/i18n/fr_FR.po
new file mode 100755
index 00000000000..349a32e2c84
--- /dev/null
+++ b/addons/sale_layout/i18n/fr_FR.po
@@ -0,0 +1,179 @@
+# translation of fr_FR.po to Français
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+# Numerigraphe , 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr_FR\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-03-25 10:13:19+0000\n"
+"PO-Revision-Date: 2009-03-25 11:25+0100\n"
+"Last-Translator: Numerigraphe \n"
+"Language-Team: Français\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr "Sous-total"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr "Titre"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_name_translation
+msgid ""
+"\n"
+" This module provides some features to improve the layout of the Sale Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+"\n"
+" Ce module ajoute des options pour améliorer la mise en page des commandes de vente.\n"
+"\n"
+" Il vous permet :\n"
+" * de réordonner toutes les lignes d'une commande\n"
+" * d'ajouter des titres, des lignes de remarques, des sous-totaux\n"
+" * de tracer des lignes horizontales et de faire des sauts de page \n"
+"\n"
+" "
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr "Mise en page"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr "Produit"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr "Description manuelle"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr "Déclaration automatique"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr "Lignes de facture"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr "Créer facture"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr "Propriétés"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr "UDM"
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue"
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr "Séq."
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr "Notes"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr "Historique"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr "Remarque"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr "Ligne de séparation"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr "Lignes de commande"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr "Qté"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr "États"
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr "Commande avec mise en page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr "Info supplémentaires"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr "Saut de page"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr "Commande client"
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_name_translation
+msgid "sale_layout"
+msgstr "sale_layout"
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr "Mouvements de stocks"
+
diff --git a/addons/sale_layout/i18n/sale_layout.pot b/addons/sale_layout/i18n/sale_layout.pot
new file mode 100755
index 00000000000..6a44937a3d3
--- /dev/null
+++ b/addons/sale_layout/i18n/sale_layout.pot
@@ -0,0 +1,276 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * sale_layout
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-26 08:45:52+0000\n"
+"PO-Revision-Date: 2009-11-26 08:45:52+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Sub Total"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Title"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,shortdesc:sale_layout.module_meta_information
+msgid "sale_layout"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc. (%)"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Note"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Unit Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Order N°"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order,abstract_line_ids:0
+msgid "Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Disc.(%)"
+msgstr ""
+
+#. module: sale_layout
+#: field:sale.order.line,layout_type:0
+msgid "Layout Type"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+#: view:sale.order.line:0
+msgid "Seq."
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Product"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.module.module,description:sale_layout.module_meta_information
+msgid "\n"
+" This module provides some features to improve the layout of the Sale Order.\n"
+"\n"
+" It gives you the possibility to\n"
+" * order all the lines of an sale order\n"
+" * add titles, comment lines, sub total lines\n"
+" * draw horizontal lines and put page breaks \n"
+"\n"
+" "
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Description"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Manual Description"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Our Salesman"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Automatic Declaration"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Invoice Lines"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quantity"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Quotation N°"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "VAT"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Make Invoice"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Properties"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Invoice address :"
+msgstr ""
+
+#. module: sale_layout
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Page Break"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Notes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Date Ordered"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Shipping address :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Net Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Tel. :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Total :"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Payment Terms"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "History"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sale Order Lines"
+msgstr ""
+
+#. module: sale_layout
+#: selection:sale.order.line,layout_type:0
+msgid "Separator Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Sales order lines"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Qty"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "States"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "TVA :"
+msgstr ""
+
+#. module: sale_layout
+#: model:ir.actions.report.xml,name:sale_layout.sale_order_1
+msgid "Order with Layout"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Extra Info"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "UoM"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Fax :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Order Line"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Price"
+msgstr ""
+
+#. module: sale_layout
+#: rml:sale.order.layout:0
+msgid "Taxes :"
+msgstr ""
+
+#. module: sale_layout
+#: view:sale.order:0
+msgid "Stock Moves"
+msgstr ""
+
diff --git a/addons/sale_layout/report/__init__.py b/addons/sale_layout/report/__init__.py
new file mode 100755
index 00000000000..21b30a51454
--- /dev/null
+++ b/addons/sale_layout/report/__init__.py
@@ -0,0 +1,24 @@
+##############################################################################
+#
+# 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 .
+#
+##############################################################################
+
+import report_sale_layout
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/report/order.rml b/addons/sale_layout/report/order.rml
new file mode 100755
index 00000000000..8c7cfaa0d2d
--- /dev/null
+++ b/addons/sale_layout/report/order.rml
@@ -0,0 +1,378 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ repeatIn(objects,'o') ]]
+ [[ setLang(o.partner_id.lang) ]]
+
+
+
+ Shipping address :
+ [[ o.partner_id.title or '' ]][[ o.partner_id.name ]]
+ [[ o.partner_shipping_id.title or '' ]][[ o.partner_shipping_id.name ]]
+ [[ o.partner_shipping_id.street ]]
+ [[ o.partner_shipping_id.street2 or '' ]]
+ [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.zip or '' ]]
+ [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]][[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]]
+
+
+
+ Invoice address :
+ [[ o.partner_invoice_id.street ]][[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]]
+ [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.zip or '' ]]
+ [[ o.partner_invoice_id.country_id and ('%s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]]
+
+
+
+
+
+
+
+ [[ o.partner_id.title or '' ]][[ o.partner_id.name ]]
+ [[ o.partner_order_id.title or '' ]][[ o.partner_order_id.name ]]
+ [[ o.partner_order_id.street ]]
+ [[ o.partner_order_id.street2 or '' ]]
+ [[ o.partner_order_id.city or '' ]] [[ o.partner_order_id.zip or '' ]]
+ [[ o.partner_order_id.state_id and o.partner_order_id.state_id.name or '' ]][[ o.partner_order_id.country_id and o.partner_order_id.country_id.name or '' ]]
+
+
+
+ Tel. : [[ o.partner_order_id.phone or removeParentNode('para') ]]
+ Fax : [[ o.partner_order_id.fax or removeParentNode('para') ]]
+ TVA : [[ o.partner_id.vat or removeParentNode('para') ]]
+
+
+
+
+ [[ a['layout_type']=='text' and removeParentNode('blockTable')]]
+
+
+ [[ (a['layout_type']=='title' or a['layout_type']=='subtotal') and ( setTag('para','para',{'fontName':'Helvetica-bold'})) or removeParentNode('font') ]][[ a['name'] ]]
+
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['tax_id'] ]]
+
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom_qty'] ]]
+
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom'] ]]
+
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ a['price_unit'] ]]
+
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['discount'] ]]
+
+
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['price_subtotal'] ]]
+
+
+
+
+
+
+ [[ a['layout_type']=='text' and a['name'] or removeParentNode('blockTable') ]]
+
+
+
+
+
+
+
+
+
+
+ [[ a['note']=='' and removeParentNode('blockTable') ]][[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]
+
+
+ [[ a['note'] and note or removeParentNode('blockTable') ]]
+
+
+
+ [[ a['layout_type']!='break' and removeParentNode('pageBreak')]]
+
+
+
+ Description [[ a['layout_type']!='break' and removeParentNode('blockTable')]]
+
+
+ Taxes
+
+
+ Quantity
+
+
+ Unit Price
+
+
+ Disc. (%)
+
+
+ Price
+
+
+
+
+
+
+
diff --git a/addons/sale_layout/sale_layout.py b/addons/sale_layout/sale_layout.py
new file mode 100755
index 00000000000..d493b7d6840
--- /dev/null
+++ b/addons/sale_layout/sale_layout.py
@@ -0,0 +1,160 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
+# $Id$
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+from osv import fields,osv
+from tools import config
+import decimal_precision as dp
+from tools.translate import _
+class sale_order_line(osv.osv):
+
+ def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
+ tax_obj = self.pool.get('account.tax')
+ cur_obj = self.pool.get('res.currency')
+ res = {}
+ context = context or {}
+ for line in self.browse(cr, uid, ids, context=context):
+ if line.layout_type=='article':
+ return super(sale_order_line, self)._amount_line(cr, uid, ids, field_name, arg, context)
+ return res
+ def invoice_line_create(self, cr, uid, ids, context={}):
+ new_ids = []
+ list_seq = []
+ for line in self.browse(cr, uid, ids, context):
+ if line.layout_type == 'article':
+ new_ids.append(line.id)
+ list_seq.append(line.sequence)
+ invoice_line_ids = super(sale_order_line, self).invoice_line_create(cr, uid, new_ids, context)
+ pool_inv_line = self.pool.get('account.invoice.line')
+ seq = 0
+ for obj_inv_line in pool_inv_line.browse(cr, uid, invoice_line_ids, context=context):
+ pool_inv_line.write(cr, uid, [obj_inv_line.id], {'sequence': list_seq[seq]}, context=context)
+ seq += 1
+ return invoice_line_ids
+
+ def onchange_sale_order_line_view(self, cr, uid, id, type, context={}, *args):
+ temp ={}
+ temp['value']= {}
+ if (not type):
+ return {}
+ if type != 'article':
+ temp = {'value': {
+ 'product_id': False,
+ 'uos_id': False,
+ 'account_id': False,
+ 'price_unit': 0.0,
+ 'price_subtotal': 0.0,
+ 'quantity': 0,
+ 'discount': 0.0,
+ 'invoice_line_tax_id': False,
+ 'account_analytic_id': False,
+ 'product_uom_qty':0.0,
+ },
+ }
+ if type == 'line':
+ temp['value']['name'] = ' '
+ if type == 'break':
+ temp['value']['name'] = ' '
+ if type == 'subtotal':
+ temp['value']['name'] = 'Sub Total'
+ return temp
+ return {}
+
+ def create(self, cr, user, vals, context=None):
+ if vals.has_key('layout_type'):
+ if vals['layout_type'] == 'line':
+ vals['name'] = ' '
+ if vals['layout_type'] == 'break':
+ vals['name'] = ' '
+ if vals['layout_type'] != 'article':
+ vals['product_uom_qty']= 0
+ return super(sale_order_line, self).create(cr, user, vals, context)
+
+ def write(self, cr, user, ids, vals, context=None):
+ if vals.has_key('layout_type'):
+ if vals['layout_type'] == 'line':
+ vals['name'] = ' '
+ if vals['layout_type'] == 'break':
+ vals['name'] = ' '
+ return super(sale_order_line, self).write(cr, user, ids, vals, context)
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if default is None:
+ default = {}
+ default['layout_type'] = self.browse(cr, uid, id).layout_type
+ return super(sale_order_line, self).copy(cr, uid, id, default, context)
+
+
+ _name = "sale.order.line"
+ _order = "order_id, sequence asc"
+ _description = "Sale Order line"
+ _inherit = "sale.order.line"
+ _columns = {
+ 'layout_type': fields.selection([
+ ('article','Product'),
+ ('title','Title'),
+ ('text','Note'),
+ ('subtotal','Sub Total'),
+ ('line','Separator Line'),
+ ('break','Page Break'),]
+ ,'Layout Type', select=True, required=True),
+ 'sequence': fields.integer('Sequence Number'),
+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2)),
+ 'product_uom': fields.many2one('product.uom', 'Product UoM'),
+ }
+
+ _defaults = {
+ 'layout_type': lambda *a: 'article',
+ }
+sale_order_line()
+
+
+class one2many_mod2(fields.one2many):
+ def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
+ if not context:
+ context = {}
+ if not values:
+ values = {}
+ res = {}
+ for id in ids:
+ res[id] = []
+ ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',ids),('layout_type','=','article')], limit=self._limit)
+ for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
+ res[r[self._fields_id]].append( r['id'] )
+ return res
+
+
+class sale_order(osv.osv):
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if default is None:
+ default = {}
+ default['order_line'] = False
+ return super(sale_order, self).copy(cr, uid, id, default, context)
+
+ _inherit = "sale.order"
+ _columns = {
+ 'abstract_line_ids': fields.one2many('sale.order.line', 'order_id', 'Order Lines',readonly=True, states={'draft':[('readonly',False)]}),
+ 'order_line': one2many_mod2('sale.order.line', 'order_id', 'Order Lines',readonly=True, states={'draft':[('readonly',False)]}),
+ }
+sale_order()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/sale_layout/sale_layout_report.xml b/addons/sale_layout/sale_layout_report.xml
new file mode 100755
index 00000000000..53775fdb149
--- /dev/null
+++ b/addons/sale_layout/sale_layout_report.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
diff --git a/addons/sale_layout/sale_layout_view.xml b/addons/sale_layout/sale_layout_view.xml
new file mode 100755
index 00000000000..2cfd109f52d
--- /dev/null
+++ b/addons/sale_layout/sale_layout_view.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+ sale.order.line.form2.inherit_1
+ sale.order.line
+
+ form
+
+
+
+
+
+
+
+
+
+ sale.order.line.tree.inherit_1
+ sale.order.line
+
+ tree
+
+
+
+
+
+
+
+
+
+
+ sale.order.form.inherit_1
+ sale.order
+
+ form
+
+
+
+