-
- Click to create a new opportunity.
-
+
OpenERP helps you keep track of your sales pipeline to follow
up potential sales and better forecast your future revenues.
diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml
index 1f1bd74391a..231a7124824 100644
--- a/addons/crm/crm_data.xml
+++ b/addons/crm/crm_data.xml
@@ -30,7 +30,7 @@
Direct Sales
DM
True
- info
+ sales
@@ -56,6 +56,14 @@
+
+
+ info
+
+
+
+
+
mail.group
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index a3bf47ee62a..b89c04a7d36 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -950,6 +950,14 @@ class crm_lead(format_address, osv.osv):
default['stage_id'] = self._get_default_stage_id(cr, uid, local_context)
return super(crm_lead, self).copy(cr, uid, id, default, context=context)
+ def get_empty_list_help(self, cr, uid, help, context=None):
+ context['empty_list_help_model'] = 'crm.case.section'
+ context['empty_list_help_id'] = context.get('default_section_id', None)
+ context['empty_list_help_document_name'] = _("opportunity")
+ if context.get('default_type') == 'lead':
+ context['empty_list_help_document_name'] = _("lead")
+ return super(crm_lead, self).get_empty_list_help(cr, uid, help, context=context)
+
# ----------------------------------------
# Mail Gateway
# ----------------------------------------
diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml
index 2f1a2ca16cd..dffe03dd4b3 100644
--- a/addons/crm/crm_lead_menu.xml
+++ b/addons/crm/crm_lead_menu.xml
@@ -44,9 +44,7 @@
-
- Click to create a new opportunity.
-
+
OpenERP helps you keep track of your sales pipeline to follow
up potential sales and better forecast your future revenues.
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index 71654912ac0..19bc98c585a 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -264,14 +264,16 @@ class crm_phonecall(osv.osv):
Open meeting's calendar view to schedule a meeting on current phonecall.
:return dict: dictionary value for created meeting view
"""
+ partner_ids = []
phonecall = self.browse(cr, uid, ids[0], context)
+ if phonecall.partner_id and phonecall.partner_id.email:
+ partner_ids.append(phonecall.partner_id.id)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
res['context'] = {
'default_phonecall_id': phonecall.id,
- 'default_partner_id': phonecall.partner_id and phonecall.partner_id.id or False,
+ 'default_partner_ids': partner_ids,
'default_user_id': uid,
'default_email_from': phonecall.email_from,
- 'default_state': 'open',
'default_name': phonecall.name,
}
return res
diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml
index 294e2b1702d..6380f80c89f 100644
--- a/addons/crm/crm_phonecall_menu.xml
+++ b/addons/crm/crm_phonecall_menu.xml
@@ -58,7 +58,7 @@
tree,calendar
[]
- {'default_state': 'done'}
+ {}
@@ -106,7 +106,7 @@
tree,calendar
[('state','!=','done')]
-
+ {}
diff --git a/addons/crm/res_config.py b/addons/crm/res_config.py
index 5f3ffe272e7..6af3dc93fce 100644
--- a/addons/crm/res_config.py
+++ b/addons/crm/res_config.py
@@ -19,6 +19,7 @@
#
##############################################################################
+from openerp import SUPERUSER_ID
from openerp.osv import fields, osv
@@ -66,7 +67,42 @@ class crm_configuration(osv.TransientModel):
'group_multi_salesteams': fields.boolean("Organize Sales activities into multiple Sales Teams",
implied_group='base.group_multi_salesteams',
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'),
}
+ _defaults = {
+ 'alias_domain': lambda self, cr, uid, context: self.pool['mail.alias']._get_alias_domain(cr, SUPERUSER_ID, [1], None, None)[1],
+ }
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+ def _find_default_lead_alias_id(self, cr, uid, context=None):
+ alias_id = self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, 'crm.mail_alias_lead_info')
+ if not alias_id:
+ alias_ids = self.pool['mail.alias'].search(
+ cr, uid, [
+ ('alias_model_id.model', '=', 'crm.lead'),
+ ('alias_force_thread_id', '=', False),
+ ('alias_parent_model_id.model', '=', 'crm.case.section'),
+ ('alias_parent_thread_id', '=', False),
+ ('alias_defaults', '=', '{}')
+ ], context=context)
+ alias_id = alias_ids and alias_ids[0] or False
+ return alias_id
+
+ def get_default_alias_prefix(self, cr, uid, ids, context=None):
+ alias_name = False
+ alias_id = self._find_default_lead_alias_id(cr, uid, context=context)
+ if alias_id:
+ alias_name = self.pool['mail.alias'].browse(cr, uid, alias_id, context=context).alias_name
+ return {'alias_prefix': alias_name}
+
+ def set_default_alias_prefix(self, cr, uid, ids, context=None):
+ mail_alias = self.pool['mail.alias']
+ for record in self.browse(cr, uid, ids, context=context):
+ alias_id = self._find_default_lead_alias_id(cr, uid, context=context)
+ if not alias_id:
+ create_ctx = dict(context, alias_model_name='crm.lead', alias_parent_model_name='crm.case.section')
+ alias_id = self.pool['mail.alias'].create(cr, uid, {'alias_name': record.alias_prefix}, context=create_ctx)
+ else:
+ mail_alias.write(cr, uid, alias_id, {'alias_name': record.alias_prefix}, context=context)
+ return True
diff --git a/addons/crm/res_config_view.xml b/addons/crm/res_config_view.xml
index 9fd542c9dbd..b964cca5c7f 100644
--- a/addons/crm/res_config_view.xml
+++ b/addons/crm/res_config_view.xml
@@ -7,6 +7,7 @@
sale.config.settings
+
+
+
+
+
+
+
+ @
+
+
+
+ All emails sent to this address and processed by the mailgateway
+ will create a new lead.
+
+
+
+
+
diff --git a/addons/hr_recruitment/res_config.py b/addons/hr_recruitment/res_config.py
index 5f71d1f9bba..09d818d3ff2 100644
--- a/addons/hr_recruitment/res_config.py
+++ b/addons/hr_recruitment/res_config.py
@@ -50,9 +50,9 @@ class hr_applicant_settings(osv.TransientModel):
alias_ids = self.pool['mail.alias'].search(
cr, uid, [
('alias_model_id.model', '=', 'hr.applicant'),
- ('alias_force_thread_id', '=', 0),
+ ('alias_force_thread_id', '=', False),
('alias_parent_model_id.model', '=', 'hr.job'),
- ('alias_parent_thread_id', '=', 0),
+ ('alias_parent_thread_id', '=', False),
('alias_defaults', '=', '{}')
], context=context)
alias_id = alias_ids and alias_ids[0] or False
diff --git a/addons/hw_scanner/controllers/main.py b/addons/hw_scanner/controllers/main.py
index 8fbdae62db6..64daf20fccb 100644
--- a/addons/hw_scanner/controllers/main.py
+++ b/addons/hw_scanner/controllers/main.py
@@ -129,10 +129,6 @@ class Scanner(Thread):
self.set_status('error',str(e))
return None
- @http.route('/hw_proxy/Vis_scanner_connected', type='json', auth='none', cors='*')
- def is_scanner_connected(self):
- return self.get_device() != None
-
def get_barcode(self):
""" Returns a scanned barcode. Will wait at most 5 seconds to get a barcode, and will
return barcode scanned in the past if they are not older than 5 seconds and have not
diff --git a/addons/mrp/i18n/zh_TW.po b/addons/mrp/i18n/zh_TW.po
index f66377a704a..d4a183a0a2a 100644
--- a/addons/mrp/i18n/zh_TW.po
+++ b/addons/mrp/i18n/zh_TW.po
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-02-12 05:29+0000\n"
+"X-Launchpad-Export-Date: 2014-02-13 05:48+0000\n"
"X-Generator: Launchpad (build 16916)\n"
#. module: mrp
diff --git a/addons/project/project_data.xml b/addons/project/project_data.xml
index 93e3ea51285..7ddc983bf1c 100644
--- a/addons/project/project_data.xml
+++ b/addons/project/project_data.xml
@@ -20,7 +20,7 @@
Projects
- 3
+ PP001
view
diff --git a/addons/report_webkit/header_view.xml b/addons/report_webkit/header_view.xml
index 30407f89385..833e813ba4e 100644
--- a/addons/report_webkit/header_view.xml
+++ b/addons/report_webkit/header_view.xml
@@ -48,7 +48,8 @@
form
tree,form
-
+
+
-
+
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py
index eac1f163cf6..5a5226cef81 100644
--- a/addons/website/controllers/main.py
+++ b/addons/website/controllers/main.py
@@ -378,20 +378,25 @@ class Website(openerp.addons.web.controllers.main.Home):
#------------------------------------------------------
# Server actions
#------------------------------------------------------
- @http.route(['/website/action/'], type='http', auth="public", website=True)
- def actions_server(self, id_or_xml_id, **post):
+
+ @http.route('/website/action/', type='http', auth="public", website=True)
+ def actions_server(self, path_or_xml_id_or_id, **post):
cr, uid, context = request.cr, request.uid, request.context
res, action_id, action = None, None, None
ServerActions = request.registry['ir.actions.server']
- # find the action_id, either an int, an int into a basestring, or an xml_id
- if isinstance(id_or_xml_id, basestring) and '.' in id_or_xml_id:
- action_id = request.registry['ir.model.data'].xmlid_to_res_id(request.cr, request.uid, id_or_xml_id, raise_if_not_found=False)
- else:
+ # find the action_id: either an xml_id, the path, or an ID
+ if isinstance(path_or_xml_id_or_id, basestring) and '.' in path_or_xml_id_or_id:
+ action_id = request.registry['ir.model.data'].xmlid_to_res_id(request.cr, request.uid, path_or_xml_id_or_id, raise_if_not_found=False)
+ if not action_id:
+ action_ids = ServerActions.search(cr, uid, [('website_path', '=', path_or_xml_id_or_id), ('website_published', '=', True)], context=context)
+ action_id = action_ids and action_ids[0] or None
+ if not action_id:
try:
- action_id = int(id_or_xml_id)
+ action_id = int(path_or_xml_id_or_id)
except ValueError:
pass
+
# check it effectively exists
if action_id:
action_ids = ServerActions.exists(cr, uid, [action_id], context=context)
diff --git a/addons/website/data/website_demo.xml b/addons/website/data/website_demo.xml
index a7fa4d76a07..6f37b871100 100644
--- a/addons/website/data/website_demo.xml
+++ b/addons/website/data/website_demo.xml
@@ -43,6 +43,7 @@
Website Partner Post and Thanks Demo
True
+ partner_thanks
partner_id, partner = False, None
@@ -118,6 +119,7 @@ response = request.website.render("website.template_partner_post", values)
Website Partners Comment Form
True
+ partner_comment
partner_ids = pool['res.partner'].search(cr, uid, [('customer', '=', True)], context=context)
diff --git a/addons/website/models/ir_actions.py b/addons/website/models/ir_actions.py
index 731ee4c47e6..5f627eec54a 100644
--- a/addons/website/models/ir_actions.py
+++ b/addons/website/models/ir_actions.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
+import urlparse
+
from openerp.addons.web.http import request
from openerp.osv import fields, osv
@@ -9,15 +11,43 @@ class actions_server(osv.Model):
_name = 'ir.actions.server'
_inherit = ['ir.actions.server']
+ def _compute_website_url(self, cr, uid, id, website_path, xml_id, context=None):
+ base_url = self.pool['ir.config_parameter'].get_param(cr, uid, 'web.base.url', context=context)
+ link = website_path or xml_id or (id and '%d' % id) or ''
+ if base_url and link:
+ path = '%s/%s' % ('/website/action', link)
+ return '%s' % urlparse.urljoin(base_url, path)
+ return ''
+
+ def _get_website_url(self, cr, uid, ids, name, args, context=None):
+ res = dict.fromkeys(ids, False)
+ for action in self.browse(cr, uid, ids, context=context):
+ if action.state == 'code' and action.website_published:
+ res[action.id] = self._compute_website_url(cr, uid, action.id, action.website_path, action.xml_id, context=context)
+ return res
+
_columns = {
+ 'xml_id': fields.function(
+ osv.osv.get_xml_id, type='char', string="External ID",
+ help="ID of the action if defined in a XML file"),
+ 'website_path': fields.char('Website Path'),
+ 'website_url': fields.function(
+ _get_website_url, type='char', string='Website URL',
+ help='The full URL to access the server action through the website.'),
'website_published': fields.boolean(
'Available on the Website',
help='A code server action can be executed from the website, using a dedicated'
- 'controller. The address is /website/action/.'
+ 'controller. The address is /website/action/.'
'Set this field as True to allow users to run this action. If it'
'set to is False the action cannot be run through the website.'),
}
+ def on_change_website_path(self, cr, uid, ids, website_path, xml_id, context=None):
+ values = {
+ 'website_url': self._compute_website_url(cr, uid, ids[0], website_path, xml_id, context=context)
+ }
+ return {'value': values}
+
def _get_eval_context(self, cr, uid, action, context=None):
""" Override to add the request object in eval_context. """
eval_context = super(actions_server, self)._get_eval_context(cr, uid, action, context=context)
diff --git a/addons/website/views/ir_actions.xml b/addons/website/views/ir_actions.xml
index 0b017a43192..0573c87af31 100644
--- a/addons/website/views/ir_actions.xml
+++ b/addons/website/views/ir_actions.xml
@@ -6,10 +6,43 @@
ir.actions.server.form.website
ir.actions.server
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ir.actions.server.tree.website
+ ir.actions.server
+
+
+
+
+
+
+
+
+
+ ir.actions.server.search.website
+ ir.actions.server
+
-
+