[MERGE] trunk
bzr revid: sle@openerp.com-20140417150308-xuhxfxb8d45j3yfq
This commit is contained in:
commit
9f6182b311
|
@ -72,20 +72,18 @@ Dashboard for CRM will include:
|
|||
|
||||
'wizard/crm_phonecall_to_phonecall_view.xml',
|
||||
|
||||
'wizard/crm_opportunity_to_phonecall_view.xml',
|
||||
|
||||
'wizard/crm_merge_opportunities_view.xml',
|
||||
|
||||
'crm_view.xml',
|
||||
|
||||
'crm_phonecall_view.xml',
|
||||
'crm_phonecall_menu.xml',
|
||||
|
||||
'crm_lead_view.xml',
|
||||
'crm_lead_menu.xml',
|
||||
|
||||
'calendar_event_menu.xml',
|
||||
|
||||
'crm_phonecall_view.xml',
|
||||
'crm_phonecall_menu.xml',
|
||||
|
||||
'report/crm_lead_report_view.xml',
|
||||
'report/crm_phonecall_report_view.xml',
|
||||
|
||||
|
|
|
@ -898,21 +898,22 @@ class crm_lead(format_address, osv.osv):
|
|||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
|
||||
def action_makeMeeting(self, cr, uid, ids, context=None):
|
||||
def action_schedule_meeting(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Open meeting's calendar view to schedule meeting on current opportunity.
|
||||
:return dict: dictionary value for created Meeting view
|
||||
"""
|
||||
opportunity = self.browse(cr, uid, ids[0], context)
|
||||
lead = self.browse(cr, uid, ids[0], context)
|
||||
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
|
||||
partner_ids = [self.pool['res.users'].browse(cr, uid, uid, context=context).partner_id.id]
|
||||
if lead.partner_id:
|
||||
partner_ids.append(lead.partner_id.id)
|
||||
res['context'] = {
|
||||
'default_opportunity_id': opportunity.id,
|
||||
'default_partner_id': opportunity.partner_id and opportunity.partner_id.id or False,
|
||||
'default_partner_ids' : opportunity.partner_id and [opportunity.partner_id.id] or False,
|
||||
'default_user_id': uid,
|
||||
'default_section_id': opportunity.section_id and opportunity.section_id.id or False,
|
||||
'default_email_from': opportunity.email_from,
|
||||
'default_name': opportunity.name,
|
||||
'default_opportunity_id': lead.type == 'opportunity' and lead.id or False,
|
||||
'default_partner_id': lead.partner_id and lead.partner_id.id or False,
|
||||
'default_partner_ids': partner_ids,
|
||||
'default_section_id': lead.section_id and lead.section_id.id or False,
|
||||
'default_name': lead.name,
|
||||
}
|
||||
return res
|
||||
|
||||
|
|
|
@ -103,9 +103,9 @@
|
|||
</header>
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box" name="buttons">
|
||||
<button string="Schedule/Log Call"
|
||||
name="%(opportunity2phonecall_act)d"
|
||||
type="action"/>
|
||||
<button class="oe_inline" type="action" string="Calls"
|
||||
name="%(crm.crm_case_categ_phone_incoming0)d"
|
||||
context="{'default_opportunity_id': active_id, 'search_default_opportunity_id': active_id, 'default_partner_id': partner_id, 'default_duration': 1.0}"/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
@ -278,8 +278,8 @@
|
|||
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
|
||||
<t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
|
||||
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
|
||||
<li><a name="%(opportunity2phonecall_act)d" type="action">Schedule/Log Call</a></li>
|
||||
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
|
||||
<li><a type="action" name="%(crm.crm_case_categ_phone_incoming0)d" >Calls</a></li>
|
||||
<li><a name="action_schedule_meeting" type="object">Schedule Meeting</a></li>
|
||||
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -389,11 +389,11 @@
|
|||
</header>
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button string="Schedule/Log Call" type="action"
|
||||
name="%(opportunity2phonecall_act)d"/>
|
||||
<button string="Meeting" type="object"
|
||||
name="action_makeMeeting"
|
||||
context="{'search_default_attendee_id': active_id, 'default_attendee_id' : active_id}"/>
|
||||
<button class="oe_inline" type="action" string="Calls"
|
||||
name="%(crm.crm_case_categ_phone_incoming0)d"
|
||||
context="{'default_opportunity_id': active_id, 'search_default_opportunity_id': active_id, 'default_partner_id': partner_id, 'default_duration': 1.0}"/>
|
||||
<button class="oe_inline" string="Schedule a Meeting" type="object"
|
||||
name="action_schedule_meeting" context="{'partner_id': partner_id}"/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
|
|
@ -144,7 +144,8 @@
|
|||
|
||||
<menuitem name="Scheduled Calls" id="menu_crm_case_phone_outbound"
|
||||
parent="crm.menu_crm_case_phone"
|
||||
action="crm_case_categ_phone_outgoing0" />
|
||||
groups="crm.group_scheduled_calls"
|
||||
action="crm_case_categ_phone_outgoing0"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -178,6 +178,7 @@
|
|||
help="Phone Calls Assigned to the current user or with a team having the current user as team leader"/>
|
||||
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
|
||||
<field name="user_id"/>
|
||||
<field name="opportunity_id"/>
|
||||
<field name="section_id" string="Sales Team"
|
||||
groups="base.group_multi_salesteams"/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
|
|
@ -69,6 +69,9 @@ class crm_configuration(osv.TransientModel):
|
|||
help="""Allows you to use Sales Teams to manage your leads and opportunities."""),
|
||||
'alias_prefix': fields.char('Default Alias Name for Leads'),
|
||||
'alias_domain' : fields.char('Alias Domain'),
|
||||
'group_scheduled_calls': fields.boolean("Schedule calls to manage call center",
|
||||
implied_group='crm.group_scheduled_calls',
|
||||
help="""This adds the menu 'Scheduled Calls' under 'Sales / Phone Calls'""")
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -9,9 +9,18 @@
|
|||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<div name="config_sale" position="before">
|
||||
<separator string="After-Sale Services"/>
|
||||
<separator string="Sale Services"/>
|
||||
<group>
|
||||
<label for="id" string="Pre-Sale Services"/>
|
||||
<div>
|
||||
<div>
|
||||
<field name="group_scheduled_calls" class="oe_inline"/>
|
||||
<label for="group_scheduled_calls"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<label for="id" string="Features"/>
|
||||
<label for="id" string="After-Sale Services"/>
|
||||
<div>
|
||||
<div>
|
||||
<field name="module_crm_claim" class="oe_inline"/>
|
||||
|
|
|
@ -92,5 +92,17 @@ class res_partner(osv.osv):
|
|||
opportunity_ids[partner_id] = opportunity_id
|
||||
return opportunity_ids
|
||||
|
||||
def schedule_meeting(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
partner_ids = list(ids)
|
||||
partner_ids.append(self.pool.get('res.users').browse(cr, uid, uid).partner_id.id)
|
||||
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
|
||||
res['context'] = {
|
||||
'default_partner_id': ids and ids[0] or False,
|
||||
'default_partner_ids': partner_ids,
|
||||
}
|
||||
return res
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -94,13 +94,11 @@
|
|||
attrs="{'invisible': [('customer', '=', False)]}"
|
||||
name="%(crm.crm_case_category_act_oppor11)d"
|
||||
context="{'search_default_partner_id': active_id}"/>
|
||||
<button class="oe_inline" type="action"
|
||||
string="Meetings"
|
||||
name="%(calendar.action_calendar_event)d"
|
||||
context="{'search_default_partner_ids': active_id, 'default_partner_ids' : [active_id]}"/>
|
||||
<button class="oe_inline" string="Schedule a Meeting" type="object"
|
||||
name="schedule_meeting" context="{'partner_id': active_id}"/>
|
||||
<button class="oe_inline" type="action" string="Calls"
|
||||
name="%(crm.crm_case_categ_phone_incoming0)d"
|
||||
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}" />
|
||||
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
|
|
|
@ -42,6 +42,11 @@
|
|||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="group_scheduled_calls" model="res.groups">
|
||||
<field name="name">Show Scheduled Calls Menu</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record model="res.users" id="base.user_root">
|
||||
<field eval="[(4,ref('base.group_partner_manager'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
|
|
@ -19,9 +19,7 @@ openerp.crm = function(openerp) {
|
|||
dataset.read_slice(['id', 'name']).done(function(result) {
|
||||
_.each(result, function(v, k) {
|
||||
// Set the proper value in the DOM
|
||||
self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tipsy({
|
||||
offset: 10
|
||||
});
|
||||
self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tooltip();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -31,23 +31,17 @@
|
|||
-
|
||||
Now I begin communication and schedule a phone call with the customer.
|
||||
-
|
||||
!python {model: crm.opportunity2phonecall}: |
|
||||
!python {model: crm.phonecall2phonecall}: |
|
||||
import time
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_3')]})
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_3')],'active_id': ref('crm_case_3')})
|
||||
call_id = self.create(cr, uid, {'date': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'name': "Bonjour M. Jean, Comment allez-vous? J'ai bien reçu votre demande, pourrions-nous en parler quelques minutes?"}, context=context)
|
||||
self.action_schedule(cr, uid, [call_id], context=context)
|
||||
-
|
||||
I check that phonecall is scheduled for that opportunity.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
ids = self.search(cr, uid, [('opportunity_id', '=', ref('crm_case_3'))])
|
||||
assert len(ids), 'Phonecall is not scheduled'
|
||||
-
|
||||
Now I schedule meeting with customer.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.action_makeMeeting(cr, uid, [ref('crm_case_3')])
|
||||
self.action_schedule_meeting(cr, uid, [ref('crm_case_3')])
|
||||
-
|
||||
After communicated with customer, I put some notes with contract details.
|
||||
-
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
import crm_partner_binding
|
||||
import crm_phonecall_to_phonecall
|
||||
import crm_opportunity_to_phonecall
|
||||
import crm_lead_to_opportunity
|
||||
import crm_merge_opportunities
|
||||
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
|
||||
import time
|
||||
|
||||
class crm_opportunity2phonecall(osv.osv_memory):
|
||||
"""Converts Opportunity to Phonecall"""
|
||||
_inherit = 'crm.phonecall2phonecall'
|
||||
_name = 'crm.opportunity2phonecall'
|
||||
_description = 'Opportunity to Phonecall'
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
opp_obj = self.pool.get('crm.lead')
|
||||
categ_id = False
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
try:
|
||||
res_id = data_obj._get_id(cr, uid, 'crm', 'categ_phone2')
|
||||
categ_id = data_obj.browse(cr, uid, res_id, context=context).res_id
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
record_ids = context and context.get('active_ids', []) or []
|
||||
res = {}
|
||||
res.update({'action': 'log', 'date': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
for opp in opp_obj.browse(cr, uid, record_ids, context=context):
|
||||
if 'name' in fields:
|
||||
res.update({'name': opp.name})
|
||||
if 'user_id' in fields:
|
||||
res.update({'user_id': opp.user_id and opp.user_id.id or False})
|
||||
if 'section_id' in fields:
|
||||
res.update({'section_id': opp.section_id and opp.section_id.id or False})
|
||||
if 'categ_id' in fields:
|
||||
res.update({'categ_id': categ_id})
|
||||
if 'partner_id' in fields:
|
||||
res.update({'partner_id': opp.partner_id and opp.partner_id.id or False})
|
||||
if 'contact_name' in fields:
|
||||
res.update({'contact_name': opp.partner_id and opp.partner_id.name or False})
|
||||
if 'phone' in fields:
|
||||
res.update({'phone': opp.phone or (opp.partner_id and opp.partner_id.phone or False)})
|
||||
return res
|
||||
|
||||
def action_schedule(self, cr, uid, ids, context=None):
|
||||
value = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
phonecall = self.pool.get('crm.phonecall')
|
||||
opportunity_ids = context and context.get('active_ids') or []
|
||||
opportunity = self.pool.get('crm.lead')
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
call_ids = opportunity.schedule_phonecall(cr, uid, opportunity_ids, data.date, data.name, \
|
||||
data.note, data.phone, data.contact_name, data.user_id and data.user_id.id or False, \
|
||||
data.section_id and data.section_id.id or False, \
|
||||
data.categ_id and data.categ_id.id or False, \
|
||||
action=data.action, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Opportunity to Phonecall view -->
|
||||
|
||||
<record model="ir.ui.view" id="opportunity2phonecall_view">
|
||||
<field name="name">crm.opportunity2phonecall.form</field>
|
||||
<field name="model">crm.opportunity2phonecall</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Schedule/Log a Call" version="7.0">
|
||||
<group>
|
||||
<group>
|
||||
<field name="action"/>
|
||||
<field name="name"/>
|
||||
<field name="categ_id" string="Type"
|
||||
widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.phonecall')]"
|
||||
groups="base.group_no_one"/>
|
||||
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_id" readonly="True"/>
|
||||
<field name="phone"/>
|
||||
<field name="user_id" attrs="{'invisible': [('action','=','log')]}" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
|
||||
<field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}" groups="base.group_multi_salesteams"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="note" placeholder="Call Description" />
|
||||
<footer>
|
||||
<button name="action_schedule" type="object" string="Log call" attrs="{'invisible' : [('action', '!=', 'log')]}" class="oe_highlight"/>
|
||||
<button name="action_schedule" type="object" string="Schedule Call" attrs="{'invisible' : [('action', '!=', 'schedule')]}" class="oe_highlight" />
|
||||
or
|
||||
<button name="action_cancel" string="Cancel" class="oe_link" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Opportunity to Phonecall action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="opportunity2phonecall_act">
|
||||
<field name="name">Schedule/Log Call</field>
|
||||
<field name="res_model">crm.opportunity2phonecall</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="opportunity2phonecall_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -33,7 +33,7 @@ actions(Sign in/Sign out) performed by them.
|
|||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'images': ['images/hr_attendances.jpeg'],
|
||||
'depends': ['hr'],
|
||||
'depends': ['hr', 'report'],
|
||||
'data': [
|
||||
'security/ir_rule.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
|
|
@ -25,7 +25,7 @@ openerp.hr_attendance = function (instance) {
|
|||
this.$(".oe_attendance_signout").click(function() {
|
||||
self.do_update_attendance();
|
||||
});
|
||||
this.$el.tipsy({
|
||||
this.$el.tooltip({
|
||||
title: function() {
|
||||
var last_text = instance.web.format_value(self.last_sign, {type: "datetime"});
|
||||
var current_text = instance.web.format_value(new Date(), {type: "datetime"});
|
||||
|
@ -36,7 +36,6 @@ openerp.hr_attendance = function (instance) {
|
|||
return _.str.sprintf(_t("Click to Sign In at %s."), current_text);
|
||||
}
|
||||
},
|
||||
html: true,
|
||||
});
|
||||
return this.check_attendance();
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<t t-name="AttendanceSlider">
|
||||
<div class="oe_attendance_status oe_attendance_nosigned" data-tipsy="true">
|
||||
<div class="oe_attendance_status oe_attendance_nosigned" data-toggle="tooltip">
|
||||
<div class="oe_attendance_signin"></div>
|
||||
<div class="oe_attendance_signout"></div>
|
||||
</div>
|
||||
|
|
|
@ -46,7 +46,7 @@ This module also uses analytic accounting and is compatible with the invoice on
|
|||
'author': 'OpenERP SA',
|
||||
'website': 'http://www.openerp.com',
|
||||
'images': ['images/hr_expenses_analysis.jpeg', 'images/hr_expenses.jpeg'],
|
||||
'depends': ['hr', 'account_accountant'],
|
||||
'depends': ['hr', 'account_accountant', 'report'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'hr_expense_data.xml',
|
||||
|
|
|
@ -51,6 +51,7 @@ Generic Payroll system.
|
|||
'hr_contract',
|
||||
'hr_holidays',
|
||||
'decimal_precision',
|
||||
'report',
|
||||
],
|
||||
'data': [
|
||||
'security/hr_security.xml',
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_hr_applicant_user,hr.applicant.user,model_hr_applicant,base.group_hr_user,1,1,1,1
|
||||
access_hr_recruitment_report,hr.recruitment.report,model_hr_recruitment_report,base.group_hr_manager,1,1,1,1
|
||||
access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_stage,base.group_hr_user,1,1,1,1
|
||||
access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_stage,base.group_hr_user,1,0,0,0
|
||||
access_hr_recruitment_stage_manager,hr.recruitment.stage.manager,model_hr_recruitment_stage,base.group_hr_manager,1,1,1,1
|
||||
access_hr_recruitment_degree,hr.recruitment.degree,model_hr_recruitment_degree,base.group_hr_user,1,1,1,1
|
||||
access_res_partner_hr_user,res.partner.user,base.model_res_partner,base.group_hr_user,1,1,1,1
|
||||
access_survey_hr_user,survey.hr.user,survey.model_survey_survey,base.group_hr_user,1,1,1,0
|
||||
|
|
|
|
@ -35,7 +35,7 @@ reports.""",
|
|||
'author': 'OpenERP SA',
|
||||
'website': 'http://www.openerp.com',
|
||||
'images': ['images/hr_bill_task_work.jpeg','images/hr_type_of_invoicing.jpeg'],
|
||||
'depends': ['account', 'hr_timesheet'],
|
||||
'depends': ['account', 'hr_timesheet', 'report'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'hr_timesheet_invoice_data.xml',
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<!-- Admin should not receivve emails at creation -->
|
||||
<record id="base.partner_root" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Catchall Email Alias -->
|
||||
|
|
|
@ -4,76 +4,76 @@
|
|||
|
||||
<!-- Update 'Demo user' and partners email preferences to avoid mail bombing -->
|
||||
<record id="base.partner_demo" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_1" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_2" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_3" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_4" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_5" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_6" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_7" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_8" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_9" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_10" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_11" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_12" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_13" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_14" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_15" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_16" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_17" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_18" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_19" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_20" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_21" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_22" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
<record id="base.res_partner_23" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Discussion: attachments and spec [DEMO: search on has_attachments -->
|
||||
|
|
|
@ -96,13 +96,7 @@ class mail_notification(osv.Model):
|
|||
if message.author_id and message.author_id.email == partner.email:
|
||||
continue
|
||||
# Partner does not want to receive any emails or is opt-out
|
||||
if partner.notification_email_send == 'none':
|
||||
continue
|
||||
# Partner wants to receive only emails and comments
|
||||
if partner.notification_email_send == 'comment' and message.type not in ('email', 'comment'):
|
||||
continue
|
||||
# Partner wants to receive only emails
|
||||
if partner.notification_email_send == 'email' and message.type != 'email':
|
||||
if partner.notify_email == 'none':
|
||||
continue
|
||||
notify_pids.append(partner.id)
|
||||
return notify_pids
|
||||
|
|
|
@ -31,21 +31,18 @@ class res_partner_mail(osv.Model):
|
|||
_mail_mass_mailing = _('Customers')
|
||||
|
||||
_columns = {
|
||||
'notification_email_send': fields.selection([
|
||||
'notify_email': fields.selection([
|
||||
('none', 'Never'),
|
||||
('email', 'Incoming Emails only'),
|
||||
('comment', 'Incoming Emails and Discussions'),
|
||||
('all', 'All Messages (discussions, emails, followed system notifications)'),
|
||||
], 'Receive Messages by Email', required=True,
|
||||
('always', 'All Messages'),
|
||||
], 'Receive Inbox Notifications by Email', required=True,
|
||||
oldname='notification_email_send',
|
||||
help="Policy to receive emails for new messages pushed to your personal Inbox:\n"
|
||||
"- Never: no emails are sent\n"
|
||||
"- Incoming Emails only: for messages received by the system via email\n"
|
||||
"- Incoming Emails and Discussions: for incoming emails along with internal discussions\n"
|
||||
"- All Messages: for every notification you receive in your Inbox"),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'notification_email_send': lambda *args: 'comment'
|
||||
'notify_email': lambda *args: 'always'
|
||||
}
|
||||
|
||||
def message_get_suggested_recipients(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='active']" position="after">
|
||||
<field name='notification_email_send'/>
|
||||
<field name='notify_email' widget="radio"/>
|
||||
</xpath>
|
||||
<xpath expr="//sheet" position="after">
|
||||
<div class="oe_chatter">
|
||||
|
|
|
@ -54,10 +54,10 @@ class res_users(osv.Model):
|
|||
init_res = super(res_users, self).__init__(pool, cr)
|
||||
# duplicate list to avoid modifying the original reference
|
||||
self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
|
||||
self.SELF_WRITEABLE_FIELDS.extend(['notification_email_send', 'display_groups_suggestions'])
|
||||
self.SELF_WRITEABLE_FIELDS.extend(['notify_email', 'display_groups_suggestions'])
|
||||
# duplicate list to avoid modifying the original reference
|
||||
self.SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS)
|
||||
self.SELF_READABLE_FIELDS.extend(['notification_email_send', 'alias_domain', 'alias_name', 'display_groups_suggestions'])
|
||||
self.SELF_READABLE_FIELDS.extend(['notify_email', 'alias_domain', 'alias_name', 'display_groups_suggestions'])
|
||||
return init_res
|
||||
|
||||
def _auto_init(self, cr, context=None):
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="email" position="before">
|
||||
<field name="notification_email_send" readonly="0"/>
|
||||
<field name="notify_email" widget="radio" readonly="0"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="signature" position="before">
|
||||
<field name="notification_email_send"/>
|
||||
<field name="notify_email" widget="radio"/>
|
||||
</field>
|
||||
<field name="signature" position="before">
|
||||
<label for="alias_id" string="Messaging Alias" class="oe_read_only"
|
||||
|
|
|
@ -44,7 +44,7 @@ instance.web.form.FieldMany2ManyTagsEmail = instance.web.form.FieldMany2ManyTags
|
|||
new instance.web.Model('res.partner').call("search", [[
|
||||
["id", "in", ids],
|
||||
["email", "=", false],
|
||||
["notification_email_send", "in", ['all', 'comment']] ]],
|
||||
["notify_email", "=", 'always'] ]],
|
||||
{context: this.build_context()})
|
||||
.then(function (record_ids) {
|
||||
// valid partner
|
||||
|
|
|
@ -189,17 +189,6 @@
|
|||
</td>
|
||||
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
|
||||
</tr>
|
||||
<tr class="oe_header_row" t-if="widget.action.params.view_inbox and widget.action.params.show_compose_message" >
|
||||
<td colspan="2">
|
||||
<button type="button" class="oe_write_full oe_highlight">
|
||||
Compose a new message
|
||||
</button>
|
||||
<span class='oe_alternative'>
|
||||
or
|
||||
<a href='#' class='oe_write_onwall oe_bold' help='Your followers can read this message'>Write to my followers</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="oe_mail-placeholder"></div>
|
||||
|
|
|
@ -77,7 +77,7 @@ class TestMail(common.TransactionCase):
|
|||
'alias_name': 'ernest',
|
||||
'email': 'e.e@example.com',
|
||||
'signature': '--\nErnest',
|
||||
'notification_email_send': 'comment',
|
||||
'notify_email': 'always',
|
||||
'groups_id': [(6, 0, [self.group_employee_id])]
|
||||
}, {'no_reset_password': True})
|
||||
self.user_noone_id = self.res_users.create(cr, uid, {
|
||||
|
@ -86,7 +86,7 @@ class TestMail(common.TransactionCase):
|
|||
'alias_name': 'noemie',
|
||||
'email': 'n.n@example.com',
|
||||
'signature': '--\nNoemie',
|
||||
'notification_email_send': 'comment',
|
||||
'notify_email': 'always',
|
||||
'groups_id': [(6, 0, [])]
|
||||
}, {'no_reset_password': True})
|
||||
|
||||
|
|
|
@ -348,14 +348,14 @@ class test_mail(TestMail):
|
|||
# Data creation
|
||||
# --------------------------------------------------
|
||||
# 0 - Update existing users-partners
|
||||
self.res_users.write(cr, uid, [uid], {'email': 'a@a', 'notification_email_send': 'comment'})
|
||||
self.res_users.write(cr, uid, [uid], {'email': 'a@a', 'notify_email': 'always'})
|
||||
self.res_users.write(cr, uid, [self.user_raoul_id], {'email': 'r@r'})
|
||||
# 1 - Bert Tartopoils, with email, should receive emails for comments and emails
|
||||
p_b_id = self.res_partner.create(cr, uid, {'name': 'Bert Tartopoils', 'email': 'b@b'})
|
||||
# 2 - Carine Poilvache, with email, should receive emails for emails
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notification_email_send': 'email'})
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notify_email': 'none'})
|
||||
# 3 - Dédé Grosbedon, without email, to test email verification; should receive emails for every message
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notification_email_send': 'all'})
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notify_email': 'always'})
|
||||
# 4 - Attachments
|
||||
attach1_id = self.ir_attachment.create(cr, user_raoul.id, {
|
||||
'name': 'Attach1', 'datas_fname': 'Attach1',
|
||||
|
@ -582,9 +582,9 @@ class test_mail(TestMail):
|
|||
# 1 - Bert Tartopoils, with email, should receive emails for comments and emails
|
||||
p_b_id = self.res_partner.create(cr, uid, {'name': 'Bert Tartopoils', 'email': 'b@b'})
|
||||
# 2 - Carine Poilvache, with email, should receive emails for emails
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notification_email_send': 'email'})
|
||||
p_c_id = self.res_partner.create(cr, uid, {'name': 'Carine Poilvache', 'email': 'c@c', 'notify_email': 'always'})
|
||||
# 3 - Dédé Grosbedon, without email, to test email verification; should receive emails for every message
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notification_email_send': 'all'})
|
||||
p_d_id = self.res_partner.create(cr, uid, {'name': 'Dédé Grosbedon', 'email': 'd@d', 'notify_email': 'always'})
|
||||
# 4 - Create a Bird mail.group, that will be used to test mass mailing
|
||||
group_bird_id = self.mail_group.create(cr, uid,
|
||||
{
|
||||
|
|
|
@ -943,8 +943,6 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
|
|||
start: function() {
|
||||
var self = this;
|
||||
return self.pos.ready.done(function() {
|
||||
$('.oe_tooltip').remove(); // remove tooltip from the start session button
|
||||
|
||||
// remove default webclient handlers that induce click delay
|
||||
$(document).off();
|
||||
$(window).off();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="email">demo.portal@yourcompany.example.com</field>
|
||||
<field name="supplier" eval="False"/>
|
||||
<field name="customer" eval="True"/>
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
<field name="city">Vivegnis</field>
|
||||
<field name="zip">4683</field>
|
||||
<field name="country_id" ref="base.be"/>
|
||||
|
|
|
@ -41,9 +41,6 @@ class project_configuration(osv.osv_memory):
|
|||
'the timesheet line entries for particular date and user, with the effect of creating, '
|
||||
'editing and deleting either ways.\n'
|
||||
'-This installs the module project_timesheet.'),
|
||||
'module_project_long_term': fields.boolean("Manage resources planning on gantt view",
|
||||
help='A long term project management module that tracks planning, scheduling, and resource allocation.\n'
|
||||
'-This installs the module project_long_term.'),
|
||||
'module_project_issue': fields.boolean("Track issues and bugs",
|
||||
help='Provides management of issues/bugs in projects.\n'
|
||||
'-This installs the module project_issue.'),
|
||||
|
|
|
@ -61,10 +61,6 @@
|
|||
<field name="group_tasks_work_on_tasks" class="oe_inline"/>
|
||||
<label for="group_tasks_work_on_tasks" />
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_project_long_term" class="oe_inline"/>
|
||||
<label for="module_project_long_term"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<separator string="Helpdesk & Support"/>
|
||||
|
|
|
@ -3,7 +3,8 @@ access_project_project,project.project,model_project_project,project.group_proje
|
|||
access_project_project_manager,project.project,model_project_project,project.group_project_manager,1,1,1,1
|
||||
access_account_analytic_account_user,account.analytic.account,analytic.model_account_analytic_account,project.group_project_user,1,0,0,0
|
||||
access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,project.group_project_manager,1,1,1,1
|
||||
access_project_task_type_user,project.task.type user,model_project_task_type,project.group_project_user,1,1,1,1
|
||||
access_project_task_type_user,project.task.type user,model_project_task_type,project.group_project_user,1,0,0,0
|
||||
access_project_task_type_manager,project.task.type manager,model_project_task_type,project.group_project_manager,1,1,1,1
|
||||
access_project_task,project.task,model_project_task,project.group_project_user,1,1,1,1
|
||||
access_project_task_work,project.task.work,model_project_task_work,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,1,1,1
|
||||
|
@ -11,7 +12,7 @@ access_partner_task user,base.res.partner user,base.model_res_partner,project.gr
|
|||
access_task_on_partner,project.task on partners,model_project_task,base.group_user,1,0,0,0
|
||||
access_project_on_partner,project.project on partners,model_project_project,base.group_user,1,0,0,0
|
||||
access_project_task_sale_user,project.task salesman,model_project_task,base.group_sale_salesman,1,1,1,1
|
||||
access_project_task_type_sale_user,project.task.type salesman,project.model_project_task_type,base.group_sale_salesman,1,1,1,1
|
||||
access_project_task_type_sale_user,project.task.type salesman,project.model_project_task_type,base.group_sale_salesman,1,0,0,0
|
||||
access_project_task_history_sale_user,project.task.history salesman,project.model_project_task_history,base.group_sale_salesman,1,1,1,1
|
||||
access_project_project_sale_user,project.project salesman,model_project_project,base.group_sale_salesman,1,0,0,0
|
||||
access_account_analytic_line_project,account.analytic.line project,analytic.model_account_analytic_line,project.group_project_manager,1,1,1,1
|
||||
|
|
|
|
@ -19,9 +19,7 @@ openerp.project = function(openerp) {
|
|||
dataset.read_slice(['id', 'name']).done(function(result) {
|
||||
_.each(result, function(v, k) {
|
||||
// Set the proper value in the DOM
|
||||
self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tipsy({
|
||||
offset: 10
|
||||
});
|
||||
self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tooltip();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1,'default_supplier':1,'default_customer':0}" domain="[('supplier','=',True)]"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1, 'default_supplier':1, 'default_customer':0}" domain="[('supplier','=',True)]"/>
|
||||
<field name="partner_ref"/>
|
||||
<field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
|
|
|
@ -358,7 +358,7 @@
|
|||
<field name="name">sale.order.line.tree</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Sales Order Lines">
|
||||
<tree string="Sales Order Lines" create="false">
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="order_id"/>
|
||||
<field name="order_partner_id"/>
|
||||
|
@ -376,7 +376,7 @@
|
|||
<field name="name">sale.order.line.form2</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order Lines" version="7.0">
|
||||
<form string="Sales Order Lines" version="7.0" create="false">
|
||||
<header>
|
||||
<button name="%(action_view_sale_order_line_make_invoice)d" string="Create Invoice" type="action" attrs="{'invisible': ['|',('invoiced', '=', 1), ('state', 'not in', ('confirmed', 'draft'))]}" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="button_cancel" string="Cancel Line" type="object" states="confirmed,exception" groups="base.group_user"/>
|
||||
|
|
|
@ -241,15 +241,15 @@ Best Designers has now emerged serving the Small and Medium Business – SMB’s
|
|||
</record>
|
||||
|
||||
<record id="base.res_partner_24" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<record id="base.res_partner_25" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
|
||||
<record id="base.res_partner_26" model="res.partner">
|
||||
<field name="notification_email_send">none</field>
|
||||
<field name="notify_email">none</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue