[MERGE]upstream

bzr revid: dle@openerp.com-20130723141356-5lgimgx0vxmvx1h3
bzr revid: dle@openerp.com-20130724120435-o99sa0t5x91ytxp0
This commit is contained in:
Denis Ledoux 2013-07-24 14:04:35 +02:00
commit d5539ec96c
22 changed files with 435 additions and 195 deletions

View File

@ -612,6 +612,13 @@
</field>
</page>
</notebook>
<group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
<div class="oe_subtotal_footer_separator oe_inline">
<label for="balance_end" />
</div>
<field name="balance_end" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
</group>
<div class="oe_clear"/>
</sheet>
</form>
</field>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2012-12-19 07:22+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2013-07-23 03:21+0000\n"
"Last-Translator: fanvil <fanvil@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: 2013-03-16 05:10+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-07-24 05:31+0000\n"
"X-Generator: Launchpad (build 16700)\n"
#. module: crm
#: view:crm.lead.report:0
@ -29,7 +29,7 @@ msgid ""
msgstr "允许你设置接收邮件服务器,并从收到的邮件中创建线索"
#. module: crm
#: code:addons/crm/crm_lead.py:881
#: code:addons/crm/crm_lead.py:898
#: selection:crm.case.stage,type:0
#: view:crm.lead:0
#: selection:crm.lead,type:0
@ -54,6 +54,11 @@ msgid ""
"Description: [[object.description]]\n"
" "
msgstr ""
"警告收到的新线索已超过5天未处理\n"
"名称:[[object.name]]\n"
"编号:[[object.id]]\n"
"描述:[[object.description]]\n"
" "
#. module: crm
#: field:crm.opportunity2phonecall,action:0
@ -64,7 +69,7 @@ msgstr "动作"
#. module: crm
#: model:ir.actions.server,name:crm.action_set_team_sales_department
msgid "Set team to Sales Department"
msgstr ""
msgstr "设置团队 到销售部"
#. module: crm
#: view:crm.lead2opportunity.partner.mass:0
@ -151,7 +156,7 @@ msgstr "规则名称"
#: code:addons/crm/crm_phonecall.py:280
#, python-format
msgid "It's only possible to convert one phonecall at a time."
msgstr ""
msgstr "每次只能转换一个电话呼叫"
#. module: crm
#: view:crm.case.resource.type:0
@ -180,11 +185,11 @@ msgstr "预计结束月份"
msgid ""
"Holds the Chatter summary (number of messages, ...). This summary is "
"directly in html format in order to be inserted in kanban views."
msgstr ""
msgstr "保留复杂的摘要(消息数量,……等)。为了插入到看板视图这一摘要直接是是HTML格式。"
#. module: crm
#: code:addons/crm/crm_lead.py:624
#: code:addons/crm/crm_lead.py:744
#: code:addons/crm/crm_lead.py:640
#: code:addons/crm/crm_lead.py:761
#: code:addons/crm/crm_phonecall.py:280
#, python-format
msgid "Warning!"
@ -232,7 +237,7 @@ msgstr "状态"
#. module: crm
#: field:res.partner,meeting_count:0
msgid "# Meetings"
msgstr ""
msgstr "#会议"
#. module: crm
#: model:ir.actions.server,name:crm.action_email_reminder_lead
@ -252,7 +257,7 @@ msgstr "排除的答案:"
#. module: crm
#: model:ir.model,name:crm.model_crm_merge_opportunity
msgid "Merge opportunities"
msgstr ""
msgstr "合并商机"
#. module: crm
#: view:crm.lead.report:0
@ -265,7 +270,7 @@ msgstr "线索分析"
#: code:addons/crm/crm_lead.py:1010
#, python-format
msgid "<b>%s a call</b> for the <em>%s</em>."
msgstr ""
msgstr "<b>%s 一个电话</b> 为了 <em>%s</em>."
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_resource_type_act
@ -293,7 +298,7 @@ msgid "Prospect Partner"
msgstr "潜在业务伙伴"
#. module: crm
#: code:addons/crm/crm_lead.py:982
#: code:addons/crm/crm_lead.py:1002
#, python-format
msgid "No Subject"
msgstr "无主题"
@ -323,6 +328,18 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" "
"点击创建新客户分组\n"
" </p><p>\n"
" "
"创建指定的分类用于赋值给你的联系人\n"
" "
"以便更好管理你和他们的联系。分组工具\n"
" "
"可以根据你预设的条件给联系人分配组。\n"
" </p>\n"
" "
#. module: crm
#: field:crm.opportunity2phonecall,contact_name:0
@ -445,16 +462,16 @@ msgid "#Opportunities"
msgstr "#商机"
#. module: crm
#: code:addons/crm/crm_lead.py:624
#: code:addons/crm/crm_lead.py:640
#, python-format
msgid ""
"Please select more than one element (lead or opportunity) from the list view."
msgstr ""
msgstr "请从列表视图中选择一个以上元素(线索或机会)。"
#. module: crm
#: view:crm.lead:0
msgid "Leads that are assigned to one of the sale teams I manage, or to me"
msgstr ""
msgstr "分配给我锁管理的某个销售队伍,或给我的线索。"
#. module: crm
#: field:crm.lead,partner_address_email:0
@ -473,6 +490,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" "
"点击创建新的销售团队\n"
" <p></p>\n"
" "
"使用销售团队,把不同销售员或部门组织成独立的团队。\n"
" "
"每个团队会使用自己的商机列表工作。\n"
" </p>\n"
" "
#. module: crm
#: model:process.transition,note:crm.process_transition_opportunitymeeting0
@ -511,7 +538,7 @@ msgstr "邮件"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_stage
msgid "Stage changed"
msgstr ""
msgstr "任务阶段已改变"
#. module: crm
#: selection:crm.lead.report,creation_month:0
@ -572,7 +599,7 @@ msgstr "合并"
#. module: crm
#: model:email.template,subject:crm.email_template_opportunity_mail
msgid "Opportunity ${object.name | h})"
msgstr ""
msgstr "商机${object.name | h})"
#. module: crm
#: view:crm.case.categ:0
@ -590,6 +617,8 @@ msgid ""
"Reminder on Lead: [[object.id ]] [[object.partner_id and 'of ' "
"+object.partner_id.name or '']]"
msgstr ""
"线索:[[object.id ]] [[object.partner_id and 'of ' +object.partner_id.name or "
"'']]的提醒"
#. module: crm
#: view:crm.segmentation:0
@ -630,6 +659,13 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建新类型\n"
" </p><p>\n"
" "
"创建指定的电话类型,更好地定义系统中记录的电话类型\n"
" </p>\n"
" "
#. module: crm
#: help:crm.case.section,reply_to:0
@ -712,7 +748,7 @@ msgid "Statistics Dashboard"
msgstr "统计控制台"
#. module: crm
#: code:addons/crm/crm_lead.py:861
#: code:addons/crm/crm_lead.py:878
#: model:crm.case.stage,name:crm.stage_lead2
#: selection:crm.case.stage,type:0
#: view:crm.lead:0
@ -738,7 +774,7 @@ msgstr "转为商机"
#. module: crm
#: model:ir.model,name:crm.model_sale_config_settings
msgid "sale.config.settings"
msgstr ""
msgstr "sale.config.settings"
#. module: crm
#: view:crm.segmentation:0
@ -759,7 +795,7 @@ msgstr "查询电话访问"
#: view:crm.lead.report:0
msgid ""
"Leads/Opportunities that are assigned to one of the sale teams I manage"
msgstr ""
msgstr "分配给我所管理的某个销售团队的线索/商机。"
#. module: crm
#: field:calendar.attendee,categ_id:0
@ -772,7 +808,7 @@ msgid "Exclusive"
msgstr "唯一的"
#. module: crm
#: code:addons/crm/crm_lead.py:584
#: code:addons/crm/crm_lead.py:600
#, python-format
msgid "From %s : %s"
msgstr "发自: %s:%s"
@ -866,7 +902,7 @@ msgstr "标记为已赢得"
#. module: crm
#: model:ir.filters,name:crm.filter_usa_lead
msgid "Leads from USA"
msgstr ""
msgstr "来自USA的线索"
#. module: crm
#: view:crm.lead:0
@ -917,7 +953,7 @@ msgstr "参考"
msgid ""
"Opportunities that are assigned to either me or one of the sale teams I "
"manage"
msgstr ""
msgstr "分配给我或者我管理的某个销售团队的商机。"
#. module: crm
#: help:crm.case.section,resource_calendar_id:0
@ -940,7 +976,7 @@ msgid "Next Action"
msgstr "下一动作"
#. module: crm
#: code:addons/crm/crm_lead.py:763
#: code:addons/crm/crm_lead.py:780
#, python-format
msgid "<b>Partner</b> set to <em>%s</em>."
msgstr ""
@ -983,6 +1019,8 @@ msgid ""
"Allows you to track your customers/suppliers claims and grievances.\n"
" This installs the module crm_claim."
msgstr ""
"允许你记录客户/供应商的索赔和抱怨。\n"
" 将安装crm_claim模块"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead6
@ -1030,10 +1068,10 @@ msgid "Creation Date"
msgstr "创建日期"
#. module: crm
#: code:addons/crm/crm_lead.py:698
#: code:addons/crm/crm_lead.py:715
#, python-format
msgid "Lead <b>converted into an Opportunity</b>"
msgstr ""
msgstr "线索 <b>已转换成商机</b>"
#. module: crm
#: selection:crm.segmentation.line,expr_name:0
@ -1094,7 +1132,7 @@ msgstr "删除"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_create
msgid "Opportunity created"
msgstr ""
msgstr "商机已创建"
#. module: crm
#: view:crm.lead:0
@ -1123,6 +1161,17 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建新的商机\n"
" </p><p>\n"
" OpenERP帮你记录你的销售管道\n"
" 跟踪潜在销售并更好地预测未来收益\n"
" </p><p>\n"
" 你可以对商机安排会议或电话,\n"
" 将他们转化成报价单,附上相关\n"
" 文档,跟踪所有的讨论等等。\n"
" </p>\n"
" "
#. module: crm
#: field:crm.segmentation,partner_id:0
@ -1186,13 +1235,13 @@ msgstr "如果你勾选了这里,这个阶段会作为每个销售团队的默
msgid ""
"This field is used to distinguish stages related to Leads from stages "
"related to Opportunities, or to specify stages available for both types."
msgstr ""
msgstr "此域用于区分用于线索的阶段和用于商机的阶段,或者指示同时可用于两个类型。"
#. module: crm
#: model:mail.message.subtype,name:crm.mt_lead_create
#: model:mail.message.subtype,name:crm.mt_salesteam_lead
msgid "Lead Created"
msgstr ""
msgstr "线索已创建"
#. module: crm
#: help:crm.segmentation,sales_purchase_active:0
@ -1217,7 +1266,9 @@ msgid "Days to Close"
msgstr "结束日期"
#. module: crm
#: code:addons/crm/crm_lead.py:1057
#: field:crm.case.section,complete_name:0
#, python-format
msgid "unknown"
msgstr "未知"
@ -1264,7 +1315,7 @@ msgid ""
"progress the Status is set to 'Open'. When the case is over, the Status is "
"set to 'Done'. If the case needs to be reviewed then the Status is set to "
"'Pending'."
msgstr ""
msgstr "当一个创建时,状态设为‘草稿’。如果此案在进行中,被设为‘打开‘。当案子结束,状态被设为’结束‘。如果需要被审阅,状态被设为’等待‘"
#. module: crm
#: model:crm.case.section,name:crm.crm_case_section_1
@ -1300,7 +1351,7 @@ msgid "Lead Description"
msgstr "销售线索描述"
#. module: crm
#: code:addons/crm/crm_lead.py:565
#: code:addons/crm/crm_lead.py:581
#, python-format
msgid "Merged opportunities"
msgstr "合并商机"
@ -1373,7 +1424,7 @@ msgstr "待办事项"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_lost
msgid "Opportunity lost"
msgstr ""
msgstr "丢掉的商机"
#. module: crm
#: field:crm.lead2opportunity.partner,action:0
@ -1422,7 +1473,7 @@ msgstr "用户"
#. module: crm
#: model:mail.message.subtype,name:crm.mt_lead_stage
msgid "Stage Changed"
msgstr ""
msgstr "阶段已改变"
#. module: crm
#: field:crm.case.stage,section_ids:0
@ -1495,7 +1546,7 @@ msgstr "信息和通信历史记录"
#. module: crm
#: view:crm.lead:0
msgid "Show Countries"
msgstr ""
msgstr "显示国家"
#. module: crm
#: view:crm.lead:0
@ -1567,7 +1618,7 @@ msgid ""
"The status of your document will automatically change regarding the selected "
"stage. For example, if a stage is related to the status 'Close', when your "
"document reaches this stage, it is automatically closed."
msgstr ""
msgstr "文档的状态会根据选中的阶段自动改变。如果一个阶段关联了‘关闭’状态,当文档到达这个阶段就自动被关闭。"
#. module: crm
#: view:crm.lead2opportunity.partner.mass:0
@ -1588,7 +1639,7 @@ msgstr "通话月份"
#: code:addons/crm/crm_phonecall.py:290
#, python-format
msgid "Partner has been <b>created</b>."
msgstr ""
msgstr "合作伙伴已<b>创建</b>"
#. module: crm
#: field:sale.config.settings,module_crm_claim:0
@ -1602,6 +1653,7 @@ msgid ""
"the treatment delays or number of leads per state. You can sort out your "
"leads analysis by different groups to get accurate grained analysis."
msgstr ""
"线索分析允许你检查不同的关联CRM的信息例如延迟或每个状态的线索的数量。你可以使用不同的分组对线索分析进行整理已获得精确细致的分析结果。"
#. module: crm
#: model:crm.case.categ,name:crm.categ_oppor3
@ -1822,7 +1874,7 @@ msgstr "销售团队"
#. module: crm
#: field:crm.case.stage,case_default:0
msgid "Default to New Sales Team"
msgstr ""
msgstr "默认分配给新建销售团队"
#. module: crm
#: view:crm.lead:0
@ -1861,10 +1913,10 @@ msgid "Leads"
msgstr "线索"
#. module: crm
#: code:addons/crm/crm_lead.py:563
#: code:addons/crm/crm_lead.py:579
#, python-format
msgid "Merged leads"
msgstr ""
msgstr "合并的线索"
#. module: crm
#: model:crm.case.categ,name:crm.categ_oppor5
@ -1887,7 +1939,7 @@ msgstr "待办"
#: model:mail.message.subtype,name:crm.mt_lead_convert_to_opportunity
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_opportunity
msgid "Lead to Opportunity"
msgstr ""
msgstr "线索到商机"
#. module: crm
#: field:crm.lead,user_email:0
@ -1955,7 +2007,6 @@ msgid "Global CC"
msgstr "完整抄送"
#. module: crm
#: view:crm.lead:0
#: view:crm.phonecall:0
#: model:ir.actions.act_window,name:crm.crm_case_categ_phone0
#: model:ir.ui.menu,name:crm.menu_crm_case_phone
@ -2089,7 +2140,7 @@ msgstr "转换选项"
msgid ""
"Follow this salesteam to automatically track the events associated to users "
"of this team."
msgstr ""
msgstr "跟踪此销售团队,自动跟踪此团队中用户关联的事件。"
#. module: crm
#: view:crm.lead:0
@ -2101,7 +2152,7 @@ msgstr "地址"
msgid ""
"The email address associated with this team. New emails received will "
"automatically create new leads assigned to the team."
msgstr ""
msgstr "此邮件地址关联此团队。收到的新邮件将自动创建线索并分配给此团队。"
#. module: crm
#: view:crm.lead:0
@ -2193,13 +2244,24 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击安排一个销售电话\n"
" </p><p>\n"
" "
"OpenERP允许你容易地定义销售团队要打的\n"
" 电话并根据跟踪处理。 "
" \n"
" </p><p> \n"
" 你可以使用导入功能来导入新列表\n"
" </p>\n"
" "
#. module: crm
#: help:crm.case.stage,fold:0
msgid ""
"This stage is not visible, for example in status bar or kanban view, when "
"there are no records in that stage to display."
msgstr ""
msgstr "此阶段无记录可显示时,在状态栏或看板视图等处不可见。"
#. module: crm
#: field:crm.lead.report,nbr:0
@ -2245,7 +2307,7 @@ msgstr "运行中"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_convert_to_opportunity
msgid "Lead converted into an opportunity"
msgstr ""
msgstr "装换成商机的线索"
#. module: crm
#: view:crm.lead:0
@ -2255,7 +2317,7 @@ msgstr "未分配的线索"
#. module: crm
#: model:mail.message.subtype,description:crm.mt_lead_won
msgid "Opportunity won"
msgstr ""
msgstr "获胜的商机"
#. module: crm
#: field:crm.case.categ,object_id:0
@ -2321,7 +2383,7 @@ msgstr "在这报表中,你能分析你的销售团队在电话访问上的业
#. module: crm
#: field:crm.case.stage,fold:0
msgid "Fold by Default"
msgstr ""
msgstr "默认折叠"
#. module: crm
#: field:crm.case.stage,state:0
@ -2357,7 +2419,7 @@ msgstr "已确认"
#. module: crm
#: model:ir.model,name:crm.model_crm_partner_binding
msgid "Handle partner binding or generation in CRM wizards."
msgstr ""
msgstr "在CRM向导中处理合作伙伴的绑定或生成。"
#. module: crm
#: model:ir.actions.act_window,name:crm.act_oppor_stage_user
@ -2408,11 +2470,23 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建一个未验证的线索。\n"
" </p><p>\n"
" 如果你在创建一个商机或者客户前\n"
" 需要验证,使用线索。可以是一张收到的\n"
" 名片,网站上收到的一个联系方式,或者\n"
" 你导入系统的一个文件数据。\n"
" </p><p>\n"
" 一旦被确定,线索可以被装换成商机\n"
" 以及/或者你的地址簿中的新客户。\n"
" </p>\n"
" "
#. module: crm
#: field:sale.config.settings,fetchmail_lead:0
msgid "Create leads from incoming mails"
msgstr ""
msgstr "从收到的邮件创建线索"
#. module: crm
#: view:crm.lead:0
@ -2480,6 +2554,19 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建电话总结\n"
" </p><p>\n"
" OpenERP "
"允许你快速记录打入的电话,用来\n"
" "
"跟踪与用户沟通的历史,或通知另一个销售团队。\n"
" </p><p>\n"
" "
"为了跟踪处理一个电话,你可以触发请求另一次电话,\n"
" 一次会议或者一个商机。\n"
" </p>\n"
" "
#. module: crm
#: model:process.node,note:crm.process_node_leads0
@ -2526,6 +2613,20 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" "
"点击新建一个销售标签\n"
" </p><p>\n"
" "
"创建指定的适合公司活动的标签\n"
" "
"用于更好地分析你的线索和商机。\n"
" "
"标签分类可以反映你的商品结构或者\n"
" "
"不同的销售类型。\n"
" </p>\n"
" "
#. module: crm
#: selection:crm.lead.report,creation_month:0
@ -2538,7 +2639,7 @@ msgstr "8月"
#: model:mail.message.subtype,name:crm.mt_lead_lost
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_lost
msgid "Opportunity Lost"
msgstr ""
msgstr "丢失的商机"
#. module: crm
#: field:crm.lead.report,deadline_month:0
@ -2634,7 +2735,7 @@ msgstr "通话日志"
#: model:mail.message.subtype,name:crm.mt_lead_won
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_won
msgid "Opportunity Won"
msgstr ""
msgstr "获胜的商机"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_section_act_tree
@ -2773,7 +2874,7 @@ msgstr "电话访问"
#. module: crm
#: view:crm.phonecall.report:0
msgid "Phone calls that are assigned to one of the sale teams I manage"
msgstr ""
msgstr "分配给某个我所管理的销售团队的电话。"
#. module: crm
#: view:crm.lead:0
@ -2848,6 +2949,19 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" "
"点击定义一个新渠道\n"
" </p><p>\n"
" "
"使用渠道来记录你的线索和商机的来源。\n"
" "
"主要用于市场工作相关的销售分析报告。\n"
" </p><p>\n"
" "
"渠道例子:公司网站,电话,市场活动,经销商等\n"
" <p>\n"
" "
#. module: crm
#: view:crm.lead:0
@ -2885,7 +2999,7 @@ msgid "Working Hours"
msgstr "工作时间"
#. module: crm
#: code:addons/crm/crm_lead.py:968
#: code:addons/crm/crm_lead.py:986
#: view:crm.lead:0
#: field:crm.lead2opportunity.partner,partner_id:0
#: field:crm.lead2opportunity.partner.mass,partner_id:0
@ -3007,7 +3121,7 @@ msgstr "时事通信"
#. module: crm
#: model:mail.message.subtype,name:crm.mt_salesteam_lead_stage
msgid "Opportunity Stage Changed"
msgstr ""
msgstr "商机状态已改变"
#. module: crm
#: model:ir.actions.act_window,help:crm.crm_lead_stage_act
@ -3021,6 +3135,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" "
"点击设置你的线索/商机管道的新阶段。\n"
" </p><p>\n"
" "
"阶段允许销售人员记录特定的线索或商机\n"
" "
"在销售循环中的位置。\n"
" </p>\n"
" "
#~ msgid "My Draft "
#~ msgstr "我的草稿 "

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-12-14 13:50+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@163.com>\n"
"PO-Revision-Date: 2013-07-23 06:22+0000\n"
"Last-Translator: fanvil <fanvil@hotmail.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-03-16 05:47+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-07-24 05:31+0000\n"
"X-Generator: Launchpad (build 16700)\n"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,delay_close:0
@ -37,7 +37,7 @@ msgstr "计划收入"
msgid ""
"Message type: email for email message, notification for system message, "
"comment for other messages such as user replies"
msgstr ""
msgstr "消息类型Email 用于 邮件消息, 通知用户系统消息,评论用于其他消息,例如用户回复。"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,nbr:0
@ -53,7 +53,7 @@ msgstr "分组..."
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,body:0
msgid "Automatically sanitized HTML contents"
msgstr ""
msgstr "自动整理HTML内容"
#. module: crm_partner_assign
#: view:crm.lead:0
@ -68,7 +68,7 @@ msgstr "geolocalization定位"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,starred:0
msgid "Starred"
msgstr ""
msgstr "加星号的邮件"
#. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0
@ -80,7 +80,7 @@ msgstr "正文"
msgid ""
"Email address of the sender. This field is set when no matching partner is "
"found for incoming emails."
msgstr ""
msgstr "发送者的Email地址。当收取的email没有对应的合作伙伴时此字段被设置"
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
@ -111,7 +111,7 @@ msgstr "公司"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,notification_ids:0
msgid "Notifications"
msgstr ""
msgstr "通知"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,date_assign:0
@ -123,7 +123,7 @@ msgstr "业务伙伴日期"
#: view:crm.partner.report.assign:0
#: view:res.partner:0
msgid "Salesperson"
msgstr ""
msgstr "销售员"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,priority:0
@ -170,7 +170,7 @@ msgstr "指派的geolocalization"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead_forward_to_partner
msgid "Email composition wizard"
msgstr ""
msgstr "Email撰写向导"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,turnover:0
@ -192,7 +192,7 @@ msgstr "为线索指定一个业务伙伴的概率0表示没指派"
#. module: crm_partner_assign
#: view:res.partner:0
msgid "Partner Activation"
msgstr ""
msgstr "激活合作伙伴"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,type:0
@ -203,7 +203,7 @@ msgstr "系统通知"
#: code:addons/crm_partner_assign/wizard/crm_forward_to_partner.py:74
#, python-format
msgid "Lead forward"
msgstr ""
msgstr "转发的线索"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,probability:0
@ -284,7 +284,7 @@ msgstr "最低"
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
msgid "Date Invoice"
msgstr ""
msgstr "发票排程"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,template_id:0
@ -309,7 +309,7 @@ msgstr "创建日期"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_res_partner_activation
msgid "res.partner.activation"
msgstr ""
msgstr "res.partner.activation"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,parent_id:0
@ -344,7 +344,7 @@ msgstr "7月"
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
msgid "Date Review"
msgstr ""
msgstr "回顾排程"
#. module: crm_partner_assign
#: view:crm.lead.report.assign:0
@ -356,12 +356,12 @@ msgstr "阶段"
#: view:crm.lead.report.assign:0
#: field:crm.lead.report.assign,state:0
msgid "Status"
msgstr ""
msgstr "状态"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,to_read:0
msgid "To read"
msgstr ""
msgstr "查看"
#. module: crm_partner_assign
#: code:addons/crm_partner_assign/wizard/crm_forward_to_partner.py:74
@ -416,12 +416,12 @@ msgstr "到期天数"
#: help:crm.lead.forward.to.partner,notified_partner_ids:0
msgid ""
"Partners that have a notification pushing this message in their mailboxes"
msgstr ""
msgstr "推送此通知消息进他们邮箱的合作伙伴"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,type:0
msgid "Comment"
msgstr ""
msgstr "评论"
#. module: crm_partner_assign
#: field:res.partner,partner_weight:0
@ -449,7 +449,7 @@ msgstr "12月"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,vote_user_ids:0
msgid "Users that voted for this message"
msgstr ""
msgstr "投票给这条消息的用户"
#. module: crm_partner_assign
#: view:crm.lead.report.assign:0
@ -465,13 +465,13 @@ msgstr "开启日期"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,child_ids:0
msgid "Child Messages"
msgstr ""
msgstr "子信息"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,date_review:0
#: field:res.partner,date_review:0
msgid "Latest Partner Review"
msgstr ""
msgstr "最新合作伙伴评论"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,subject:0
@ -481,17 +481,17 @@ msgstr "主题"
#. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0
msgid "or"
msgstr ""
msgstr ""
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,body:0
msgid "Contents"
msgstr ""
msgstr "内容"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,vote_user_ids:0
msgid "Votes"
msgstr ""
msgstr "投票"
#. module: crm_partner_assign
#: view:crm.lead.report.assign:0
@ -501,13 +501,13 @@ msgstr "#商机"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,starred:0
msgid "Current user has a starred notification linked to this message"
msgstr ""
msgstr "当前用户用 星号 提醒关联到这条消息"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,date_partnership:0
#: field:res.partner,date_partnership:0
msgid "Partnership Date"
msgstr ""
msgstr "合作关系日期"
#. module: crm_partner_assign
#: view:crm.lead:0
@ -661,7 +661,7 @@ msgstr ""
#. module: crm_partner_assign
#: field:crm.partner.report.assign,period_id:0
msgid "Invoice Period"
msgstr ""
msgstr "发票期间"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_res_partner_grade
@ -682,7 +682,7 @@ msgstr "附件"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,record_name:0
msgid "Message Record Name"
msgstr ""
msgstr "消息记录名称"
#. module: crm_partner_assign
#: field:res.partner.activation,sequence:0
@ -696,7 +696,7 @@ msgstr "序列"
msgid ""
"Cannot contact geolocation servers. Please make sure that your internet "
"connection is up and running (%s)."
msgstr ""
msgstr "无法连接地理信息服务器。请确保你的互联网链接畅通(%s)。"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,month:0
@ -722,7 +722,7 @@ msgstr "开启"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,subtype_id:0
msgid "Subtype"
msgstr ""
msgstr "子类型"
#. module: crm_partner_assign
#: field:res.partner,date_localization:0
@ -737,12 +737,12 @@ msgstr "当前的"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead
msgid "Lead/Opportunity"
msgstr ""
msgstr "线索/商机"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,notified_partner_ids:0
msgid "Notified partners"
msgstr ""
msgstr "已通知的合作伙伴"
#. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0
@ -773,7 +773,7 @@ msgstr "可能收入"
#: field:res.partner,activation:0
#: view:res.partner.activation:0
msgid "Activation"
msgstr ""
msgstr "激活"
#. module: crm_partner_assign
#: view:crm.lead:0
@ -784,12 +784,12 @@ msgstr "指定的业务伙伴"
#. module: crm_partner_assign
#: field:res.partner,grade_id:0
msgid "Partner Level"
msgstr ""
msgstr "合作伙伴级别"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,to_read:0
msgid "Current user has an unread notification linked to this message"
msgstr ""
msgstr "当前用户有关联到这条消息的未读的提醒"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,type:0
@ -815,7 +815,7 @@ msgstr "名称"
#: model:ir.actions.act_window,name:crm_partner_assign.res_partner_activation_act
#: model:ir.ui.menu,name:crm_partner_assign.res_partner_activation_config_mi
msgid "Partner Activations"
msgstr ""
msgstr "合作伙伴激活"
#. module: crm_partner_assign
#: view:crm.lead.report.assign:0
@ -872,7 +872,7 @@ msgstr "客户关系管理 线索报表"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,composition_mode:0
msgid "Composition mode"
msgstr ""
msgstr "写作模式"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,model:0

View File

@ -51,9 +51,9 @@ class hr_employee_category(osv.osv):
_name = "hr.employee.category"
_description = "Employee Category"
_columns = {
'name': fields.char("Category", size=64, required=True),
'name': fields.char("Employee Tag", size=64, required=True),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True),
'parent_id': fields.many2one('hr.employee.category', 'Parent Employee Tag', select=True),
'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories'),
'employee_ids': fields.many2many('hr.employee', 'employee_category_rel', 'category_id', 'emp_id', 'Employees'),
}
@ -129,7 +129,7 @@ class hr_job(osv.osv):
}
_sql_constraints = [
('name_company_uniq', 'unique(name, company_id)', 'The name of the job position must be unique per company!'),
('name_company_uniq', 'unique(name, company_id, department_id)', 'The name of the job position must be unique per department in company!'),
]
@ -156,6 +156,8 @@ class hr_employee(osv.osv):
_inherits = {'resource.resource': "resource_id"}
_inherit = ['mail.thread']
_mail_post_access = 'read'
def _get_image(self, cr, uid, ids, name, args, context=None):
result = dict.fromkeys(ids, False)
for obj in self.browse(cr, uid, ids, context=context):
@ -324,22 +326,6 @@ class hr_employee(osv.osv):
(_check_recursion, 'Error! You cannot create recursive hierarchy of Employee(s).', ['parent_id']),
]
# ---------------------------------------------------
# Mail gateway
# ---------------------------------------------------
def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
""" mail.message document permission rule: can post a new message if can read
because of portal document. """
if not model_obj:
model_obj = self
employee_ids = model_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
if employee_ids and operation == 'create':
model_obj.check_access_rights(cr, uid, 'read')
model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
else:
return super(hr_employee, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
class hr_department(osv.osv):
_description = "Department"

View File

@ -79,7 +79,7 @@ class hr_holidays_status(osv.osv):
'categ_id': fields.many2one('crm.meeting.type', 'Meeting Type',
help='Once a leave is validated, OpenERP will create a corresponding meeting of this type in the calendar.'),
'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Department.'),
'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and take them into account for the "Remaining Legal Leaves" defined on the employee form.'),
'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and will not take them into account for the "Remaining Legal Leaves" defined on the employee form.'),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves': fields.function(_user_left_days, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken': fields.function(_user_left_days, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),

View File

@ -35,7 +35,7 @@
new_id = self.create(cr, uid, {'account_id': ref('account.analytic_nebula'),'analytic_amount': 7.0,
'date': (datetime.now()+timedelta(1)).strftime('%Y-%m-%d %H:%M:%S') ,
'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module',
'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'action'})
'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'present'})
self.sign_out_result(cr, uid, [new_id], context)
-
My work for this project "Sednacom" is over and I stop working by clicking on "Stop Work" button of this wizard.

View File

@ -32,8 +32,8 @@ class hr_so_project(osv.osv_memory):
'date_start': fields.datetime('Starting Date', readonly=True),
'date': fields.datetime('Closing Date'),
'analytic_amount': fields.float('Minimum Analytic Amount'),
'name': fields.char('Employees name', size=32, required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='char', required=True, readonly=True),
'name': fields.char('Employee\'s Name', size=32, required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='selection', selection=[('present', 'Present'), ('absent', 'Absent')], required=True, readonly=True),
'server_date': fields.datetime('Current Date', required=True, readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID')
}
@ -109,8 +109,8 @@ class hr_si_project(osv.osv_memory):
_name = 'hr.sign.in.project'
_description = 'Sign In By Project'
_columns = {
'name': fields.char('Employees name', size=32, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='char', required=True, readonly=True),
'name': fields.char('Employee\'s Name', size=32, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='selection', selection=[('present', 'Present'), ('absent', 'Absent')], required=True, readonly=True),
'date': fields.datetime('Starting Date'),
'server_date': fields.datetime('Current Date', readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID')

View File

@ -43,7 +43,7 @@
</record>
<record id="action_hr_timesheet_sign_in" model="ir.actions.act_window">
<field name="name">Sign in / Sign out by project</field>
<field name="name">Sign in / Sign out by Project</field>
<field name="res_model">hr.sign.in.project</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -67,7 +67,7 @@
<field name="account_id" colspan="2"/>
<field name="info" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current_time)" colspan="2"/>
<label string="(Keep empty for current time)" colspan="2"/>
<field name="analytic_amount"/>
</group>
@ -82,7 +82,7 @@
</record>
<record id="action_hr_timesheet_sign_out" model="ir.actions.act_window">
<field name="name">Sign in / Sign out by project</field>
<field name="name">Sign in / Sign out by Project</field>
<field name="res_model">hr.sign.out.project</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

View File

@ -0,0 +1,11 @@
.. _changelog:
Changelog
=========
`trunk (saas-2)`
----------------
- added ``_mail_post_access`` attribute that specifies the access right that
should have the user in order to post a new message on a given model. Values
are ``read`` (portal documents), ``write`` (default value), ``unlink`` or ``create``.

View File

@ -12,3 +12,12 @@ Mail Module documentation topics
mail_partner
mail_state
mail_subtype
Changelog
'''''''''
.. toctree::
:maxdepth: 1
changelog.rst

View File

@ -70,6 +70,7 @@ class mail_thread(osv.AbstractModel):
_name = 'mail.thread'
_description = 'Email Thread'
_mail_flat_thread = True
_mail_post_access = 'write'
# Automatic logging system if mail installed
# _track = {
@ -156,12 +157,26 @@ class mail_thread(osv.AbstractModel):
res[id]['message_summary'] = "<span class='oe_kanban_mail_new' title='%s'><span class='oe_e'>9</span> %d %s</span>" % (title, res[id].pop('message_unread_count'), _("New"))
return res
def _get_subscription_data(self, cr, uid, ids, name, args, context=None):
def read_followers_data(self, cr, uid, follower_ids, context=None):
result = []
technical_group = self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'group_no_one')
for follower in self.pool.get('res.partner').browse(cr, uid, follower_ids, context=context):
is_editable = uid in map(lambda x: x.id, technical_group.users)
is_uid = uid in map(lambda x: x.id, follower.user_ids)
data = (follower.id,
follower.name,
{'is_editable': is_editable, 'is_uid': is_uid},
)
result.append(data)
return result
def _get_subscription_data(self, cr, uid, ids, name, args, user_pid=None, context=None):
""" Computes:
- message_subtype_data: data about document subtypes: which are
available, which are followed if any """
res = dict((id, dict(message_subtype_data='')) for id in ids)
user_pid = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0]
if user_pid is None:
user_pid = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0]
# find current model subtypes, add them to a dictionary
subtype_obj = self.pool.get('mail.message.subtype')
@ -495,12 +510,22 @@ class mail_thread(osv.AbstractModel):
access rule on the document, for portal document such as issues. """
if not model_obj:
model_obj = self
if operation in ['create', 'write', 'unlink']:
model_obj.check_access_rights(cr, uid, 'write')
model_obj.check_access_rule(cr, uid, mids, 'write', context=context)
if hasattr(self, '_mail_post_access'):
create_allow = self._mail_post_access
else:
model_obj.check_access_rights(cr, uid, operation)
model_obj.check_access_rule(cr, uid, mids, operation, context=context)
create_allow = 'write'
if operation in ['write', 'unlink']:
check_operation = 'write'
elif operation == 'create' and create_allow in ['create', 'read', 'write', 'unlink']:
check_operation = create_allow
elif operation == 'create':
check_operation = 'write'
else:
check_operation = operation
model_obj.check_access_rights(cr, uid, check_operation)
model_obj.check_access_rule(cr, uid, mids, check_operation, context=context)
def _get_formview_action(self, cr, uid, id, model=None, context=None):
""" Return an action to open the document. This method is meant to be
@ -1401,9 +1426,9 @@ class mail_thread(osv.AbstractModel):
# Followers API
#------------------------------------------------------
def message_get_subscription_data(self, cr, uid, ids, context=None):
def message_get_subscription_data(self, cr, uid, ids, user_pid=None, context=None):
""" Wrapper to get subtypes data. """
return self._get_subscription_data(cr, uid, ids, None, None, context=context)
return self._get_subscription_data(cr, uid, ids, None, None, user_pid=user_pid, context=context)
def message_subscribe_users(self, cr, uid, ids, user_ids=None, subtype_ids=None, context=None):
""" Wrapper on message_subscribe, using users. If user_ids is not

View File

@ -14,11 +14,22 @@
<record id="mail_followers_read_write_own" model="ir.rule">
<field name="name">mail.followers: read and write its own entries</field>
<field name="model_id" ref="model_mail_followers"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="domain_force">[('partner_id', '=', user.partner_id.id)]</field>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
<!-- If technical rights then read and write others subscriptions -->
<record id="mail_followers_read_write_others" model="ir.rule">
<field name="name">mail.followers: read and write others entries</field>
<field name="model_id" ref="model_mail_followers"/>
<field name="groups" eval="[(4, ref('base.group_no_one'))]"/>
<field name="domain_force">[]</field>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
<record id="mail_notification_read_write_own" model="ir.rule">
<field name="name">mail.notification: read and write its own entries</field>
<field name="model_id" ref="model_mail_notification"/>

View File

@ -632,11 +632,10 @@
}
.openerp .oe_followers .oe_partner {
height: 32px;
margin-right: 8px;
margin-right: 24px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: 10px;
}
.openerp .oe_followers .oe_partner img{
width: 32px;
@ -649,7 +648,18 @@
right: 0px;
line-height: 20px;
}
.openerp .oe_followers .oe_edit_subtype{
cursor: pointer;
position: absolute;
right: 12px;
line-height: 20px;
}
.openerp .oe_followers .oe_partner .oe_hidden{
display: none;
}
.openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title{
padding-right: 20px;
}
.openerp .oe_followers .oe_show_more{
cursor: pointer;
}

View File

@ -29,7 +29,6 @@ openerp_mail_followers = function(session, mail) {
this.displayed_limit = this.node.attrs.displayed_nb || 10;
this.displayed_nb = this.displayed_limit;
this.ds_model = new session.web.DataSetSearch(this, this.view.model);
this.ds_follow = new session.web.DataSetSearch(this, this.field.relation);
this.ds_users = new session.web.DataSetSearch(this, 'res.users');
this.value = [];
@ -74,10 +73,33 @@ openerp_mail_followers = function(session, mail) {
this.$el.on('click', '.oe_subtype_list input', self.do_update_subscription);
// event: click on 'invite' button, that opens the invite wizard
this.$('.oe_invite').on('click', self.on_invite_follower);
// event: click on 'edit_subtype(pencil)' button to edit subscription
this.$el.on('click', '.oe_edit_subtype', self.on_edit_subtype);
this.$el.on('click', '.oe_remove_follower', self.on_remove_follower);
this.$el.on('click', '.oe_show_more', self.on_show_more_followers)
},
on_edit_subtype: function(event) {
var self = this;
var $currentTarget = $(event.currentTarget);
var user_pid = $currentTarget.data('id');
$('div.oe_edit_actions').remove();
self.$dialog = new session.web.dialog($('<div class="oe_edit_actions">'), {
modal: true,
width: 'auto',
height: 'auto',
title: _t('Edit Subscription of ') + $currentTarget.siblings('a').text(),
buttons: [
{ text: _t("Apply"), click: function() {
self.do_update_subscription(event, user_pid);
$(this).dialog("close");
}},
{ text: _t("Cancel"), click: function() { $(this).dialog("close"); }}
],
});
return self.fetch_subtypes(user_pid);
},
on_invite_follower: function (event) {
var self = this;
var action = {
@ -130,7 +152,7 @@ openerp_mail_followers = function(session, mail) {
fetch_followers: function (value_) {
this.value = value_ || {};
return this.ds_follow.call('read', [this.value, ['name', 'user_ids']])
return this.ds_model.call('read_followers_data', [this.value])
.then(this.proxy('display_followers'), this.proxy('fetch_generic'))
.then(this.proxy('display_buttons'))
.then(this.proxy('fetch_subtypes'));
@ -147,6 +169,7 @@ openerp_mail_followers = function(session, mail) {
self.message_is_follower = (_.indexOf(self.value, pid) != -1);
}).then(self.proxy('display_generic'));
},
_format_followers: function(count){
var str = '';
if(count <= 0){
@ -158,6 +181,7 @@ openerp_mail_followers = function(session, mail) {
}
return str;
},
/* Display generic info about follower, for people not having access to res_partner */
display_generic: function () {
var self = this;
@ -168,16 +192,32 @@ openerp_mail_followers = function(session, mail) {
/** Display the followers */
display_followers: function (records) {
var self = this;
this.message_is_follower = false;
this.followers = records || this.followers;
this.message_is_follower = this.set_is_follower(this.followers);
// clean and display title
var node_user_list = this.$('.oe_follower_list').empty();
this.$('.oe_follower_title').html(this._format_followers(this.followers.length));
// truncate number of displayed followers
var truncated = this.followers.slice(0, this.displayed_nb);
_(truncated).each(function (record) {
record.avatar_url = mail.ChatterUtils.get_image(self.session, 'res.partner', 'image_small', record.id);
$(session.web.qweb.render('mail.followers.partner', {'record': record, 'widget': self})).appendTo(node_user_list);
partner = {
'id': record[0],
'name': record[1],
'is_uid': record[2]['is_uid'],
'is_editable': record[2]['is_editable'],
'avatar_url': mail.ChatterUtils.get_image(self.session, 'res.partner', 'image_small', record[0]),
}
if (partner.is_uid) {
self.message_is_follower = partner.is_uid;
}
$(session.web.qweb.render('mail.followers.partner', {'record': partner, 'widget': self})).appendTo(node_user_list);
// On mouse-enter it will show the edit_subtype pencil.
if (partner.is_editable) {
self.$('.oe_follower_list').on('mouseenter mouseleave', function(e) {
self.$('.oe_edit_subtype').toggleClass('oe_hidden', e.type == 'mouseleave');
self.$('.oe_follower_list').find('.oe_partner').toggleClass('oe_partner_name', e.type == 'mouseenter');
});
}
});
// FVA note: be sure it is correctly translated
if (truncated.length < this.followers.length) {
@ -185,12 +225,6 @@ openerp_mail_followers = function(session, mail) {
}
},
/** Computes whether the current user is in the followers */
set_is_follower: function (records) {
var user_ids = _.pluck(_.pluck(records, 'user_ids'), 0);
return _.indexOf(user_ids, this.session.uid) != -1;
},
display_buttons: function () {
if (this.message_is_follower) {
this.$('button.oe_follower').removeClass('oe_notfollow').addClass('oe_following');
@ -206,25 +240,37 @@ openerp_mail_followers = function(session, mail) {
},
/** Fetch subtypes, only if current user is follower */
fetch_subtypes: function () {
fetch_subtypes: function (user_pid) {
var self = this;
var subtype_list_ul = this.$('.oe_subtype_list').empty();
if (! this.message_is_follower) return;
var dialog = false;
if (user_pid) {
dialog = true;
} else {
var subtype_list_ul = this.$('.oe_subtype_list').empty();
if (! this.message_is_follower) return;
}
var id = this.view.datarecord.id;
this.ds_model.call('message_get_subscription_data', [[id], new session.web.CompoundContext(this.build_context(), {})])
.then(function (data) {self.display_subtypes(data, id);});
this.ds_model.call('message_get_subscription_data', [[id], user_pid, new session.web.CompoundContext(this.build_context(), {})])
.then(function (data) {self.display_subtypes(data, id, dialog);});
},
/** Display subtypes: {'name': default, followed} */
display_subtypes:function (data, id) {
display_subtypes:function (data, id, dialog) {
var self = this;
var $list = this.$('.oe_subtype_list');
if (dialog) {
var $list = self.$dialog;
}
else {
var $list = this.$('.oe_subtype_list');
}
$list.empty().hide();
var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
this.records_length = $.map(records, function(value, index) { return index; }).length;
if (this.records_length > 1) { self.display_followers(); }
_(records).each(function (record, record_name) {
record.name = record_name;
record.followed = record.followed || undefined;
$(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( self.$('.oe_subtype_list') );
$(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo($list);
});
if (_.size(records) > 1) {
$list.show();
@ -241,35 +287,49 @@ openerp_mail_followers = function(session, mail) {
});
},
do_unfollow: function () {
do_unfollow: function (user_pid) {
if (confirm(_t("Warning! \nYou won't be notified of any email or discussion on this document. Do you really want to unfollow this document ?"))) {
_(this.$('.oe_msg_subtype_check')).each(function (record) {
$(record).attr('checked',false);
});
var action_unsubscribe = 'message_unsubscribe_users';
var follower_ids = [this.session.uid];
if (user_pid) {
action_unsubscribe = 'message_unsubscribe';
follower_ids = [user_pid];
}
var context = new session.web.CompoundContext(this.build_context(), {});
return this.ds_model.call('message_unsubscribe_users', [[this.view.datarecord.id], [this.session.uid], context])
.then(this.proxy('read_value'));
return this.ds_model.call(action_unsubscribe, [[this.view.datarecord.id], follower_ids, context])
.then(this.proxy('read_value'));
}
return false;
},
do_update_subscription: function (event) {
do_update_subscription: function (event, user_pid) {
var self = this;
var action_subscribe = 'message_subscribe_users';
var follower_ids = [this.session.uid];
var oe_action = this.$('.oe_actions input[type="checkbox"]');
if (user_pid) {
action_subscribe = 'message_subscribe';
follower_ids = [user_pid];
oe_action = $('.oe_edit_actions input[type="checkbox"]');
}
var checklist = new Array();
_(this.$('.oe_actions input[type="checkbox"]')).each(function (record) {
_(oe_action).each(function (record) {
if ($(record).is(':checked')) {
checklist.push(parseInt($(record).data('id')));
}
});
if (!checklist.length) {
if (!this.do_unfollow()) {
if (!this.do_unfollow(user_pid)) {
$(event.target).attr("checked", "checked");
}
} else {
var context = new session.web.CompoundContext(this.build_context(), {});
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], checklist, context])
return this.ds_model.call(action_subscribe, [[this.view.datarecord.id], follower_ids, checklist, context])
.then(this.proxy('read_value'));
}
},

View File

@ -31,6 +31,7 @@
<div t-name="mail.followers.partner" class='oe_partner'>
<img class="oe_mail_thumbnail oe_mail_frame" t-attf-src="{record.avatar_url}"/>
<a t-attf-href="#model=res.partner&amp;id=#{record.id}" t-att-title="record.name"><t t-esc="record.name"/></a>
<span t-if="record.is_editable and (widget.records_length &gt; 1)" class="oe_edit_subtype oe_e oe_hidden" title="Edit subscription" t-att-data-id="record.id">&amp;</span>
<span t-if="widget.view_is_editable" class="oe_remove_follower oe_e" title="Remove this follower" t-att-data-id="record.id">X</span>
</div>

View File

@ -376,11 +376,26 @@ class product_pricelist_item(osv.osv):
result.append((-2, _('Supplier Prices on the product form')))
return result
# Added default function to fetch the Price type Based on Pricelist type.
def _get_default_base(self, cr, uid, fields, context=None):
product_price_type_obj = self.pool.get('product.price.type')
if fields.get('type') == 'purchase':
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field', '=', 'standard_price')], context=context)
elif fields.get('type') == 'sale':
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context=context)
else:
return -1
if not product_price_type_ids:
return False
else:
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
return pricetype.id
_name = "product.pricelist.item"
_description = "Pricelist item"
_order = "sequence, min_quantity desc"
_defaults = {
'base': lambda *a: -1,
'base': _get_default_base,
'min_quantity': lambda *a: 0,
'sequence': lambda *a: 5,
'price_discount': lambda *a: 0,

View File

@ -152,7 +152,7 @@
<field name="currency_id" groups="base.group_multi_currency"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<field name="version_id">
<field name="version_id" context="{'type':type}">
<form string="Pricelist Version" version="7.0">
<group col="4">
<field name="name"/>
@ -160,7 +160,7 @@
<field name="date_start"/>
<field name="date_end"/>
</group>
<field name="items_id"/>
<field name="items_id" context="{'type':type}"/>
</form>
<tree string="Pricelist Version">
<field name="name"/>

View File

@ -545,6 +545,7 @@ class task(osv.osv):
_date_name = "date_start"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_mail_post_access = 'read'
_track = {
'stage_id': {
'project.mt_task_new': lambda self, cr, uid, obj, ctx=None: obj.stage_id and obj.stage_id.sequence == 1,
@ -1106,17 +1107,6 @@ class task(osv.osv):
return [task.project_id.message_get_reply_to()[0] if task.project_id else False
for task in self.browse(cr, uid, ids, context=context)]
def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
""" mail.message document permission rule: can post a new message if can read
because of portal document. """
if not model_obj:
model_obj = self
if operation == 'create':
model_obj.check_access_rights(cr, uid, 'read')
model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
else:
return super(task, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
def message_new(self, cr, uid, msg, custom_values=None, context=None):
""" Override to updates the document according to the email. """
if custom_values is None: custom_values = {}

View File

@ -135,6 +135,7 @@
<div style="position: relative">
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
<div class="oe_module_vignette">
<img t-att-src="kanban_image('res.users', 'image_small', record.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>
<div class="oe_module_desc">
<field name="name"/>
</div>

View File

@ -45,6 +45,7 @@ class project_issue(osv.Model):
_order = "priority, create_date desc"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_mail_post_access = 'read'
_track = {
'stage_id': {
'project_issue.mt_issue_new': lambda self, cr, uid, obj, ctx=None: obj.stage_id and obj.stage_id.sequence == 1,
@ -477,17 +478,6 @@ class project_issue(osv.Model):
return [issue.project_id.message_get_reply_to()[0] if issue.project_id else False
for issue in self.browse(cr, uid, ids, context=context)]
def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
""" mail.message document permission rule: can post a new message if can read
because of portal document. """
if not model_obj:
model_obj = self
if operation == 'create':
model_obj.check_access_rights(cr, uid, 'read')
model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
else:
return super(project_issue, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
recipients = super(project_issue, self).message_get_suggested_recipients(cr, uid, ids, context=context)
try:

View File

@ -174,8 +174,8 @@
<button name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
<button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/>
<button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','=','picking'), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
<button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" />
<button name="purchase_cancel" states="draft,confirmed,sent" string="Cancel Order"/>
<button name="action_cancel_draft" states="cancel,confirmed" string="Set to Draft" type="object" />
<button name="purchase_cancel" states="draft,confirmed,sent" string="Cancel"/>
<field name="state" widget="statusbar" statusbar_visible="draft,sent,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/>
</header>
<sheet>
@ -292,7 +292,7 @@
<field name="name" string="Reference"/>
<filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','=','draft')]" help="Purchase orders which are in draft state"/>
<filter icon="terp-document-new" name="draft" string="Quotations" domain="[('state','in',('draft','sent'))]" help="Purchase orders that haven't yet been confirmed"/>
<filter icon="terp-check" name="approved" string="Purchase Orders" domain="[('state','not in',('draft','cancel'))]" help="Approved purchase orders"/>
<filter icon="terp-emblem-important" name="exception" string="Exception" domain="[('state','in',('except_invoice','except_picking'))]" help="Purchase orders which are in exception state"/>
<separator/>

View File

@ -95,7 +95,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title">
<blockTable colWidths="349.0,90.0,92.0" repeatRows="1" style="Table_Product_Header_Title">
<tr>
<td>
<para style="terp_tblheader_Details"><b>Description</b></para>
@ -110,7 +110,7 @@
</blockTable>
<section>
<para style="terp_default_9">[[ repeatIn(order.order_line,'order_line') ]]</para>
<blockTable colWidths="371.0,98.0,61.0" style="Table_Product_Line">
<blockTable colWidths="349.0,89.0,49.0,43.0" style="Table_Product_Line">
<tr>
<td>
<para style="terp_default_9">[[ order_line.name ]]</para>
@ -119,10 +119,10 @@
<para style="terp_default_Centre_9">[[ formatLang(order_line.date_planned, date = True) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">
[[ formatLang(order_line.product_qty )]]
<i>[[ (order_line.product_uom and order_line.product_uom.name) or '' ]]</i>
</para>
<para style="terp_default_Right_9">[[ formatLang(order_line.product_qty )]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ (order_line.product_uom and order_line.product_uom.name) or '' ]]</para>
</td>
</tr>
</blockTable>