[MERGE] Merged with addons/trunk.
bzr revid: tde@openerp.com-20120914073751-ktvno4481v5x32pg
This commit is contained in:
@@ -27,13 +27,15 @@ import time
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
from base.res.res_partner import format_address
|
||||
|
||||
CRM_LEAD_PENDING_STATES = (
|
||||
crm.AVAILABLE_STATES[2][0], # Cancelled
|
||||
crm.AVAILABLE_STATES[3][0], # Done
|
||||
crm.AVAILABLE_STATES[4][0], # Pending
|
||||
)
|
||||
|
||||
class crm_lead(base_stage, osv.osv):
|
||||
class crm_lead(base_stage, format_address, osv.osv):
|
||||
""" CRM Lead Case """
|
||||
_name = "crm.lead"
|
||||
_description = "Lead/Opportunity"
|
||||
@@ -105,6 +107,12 @@ class crm_lead(base_stage, osv.osv):
|
||||
|
||||
return result, fold
|
||||
|
||||
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
res = super(crm_lead,self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
|
||||
if view_type == 'form':
|
||||
res['arch'] = self.fields_view_get_address(cr, user, res['arch'], context=context)
|
||||
return res
|
||||
|
||||
_group_by_full = {
|
||||
'stage_id': _read_group_stage_ids
|
||||
}
|
||||
|
||||
@@ -72,6 +72,9 @@ class res_users(osv.Model):
|
||||
|
||||
def create(self, cr, uid, data, context=None):
|
||||
# create default alias same as the login
|
||||
if not data.get('login', False):
|
||||
raise osv.except_osv(_('Invalid Action!'), _('You may not create a user.'))
|
||||
|
||||
mail_alias = self.pool.get('mail.alias')
|
||||
alias_id = mail_alias.create_unique_alias(cr, uid, {'alias_name': data['login']}, model_name=self._name, context=context)
|
||||
data['alias_id'] = alias_id
|
||||
|
||||
@@ -30,7 +30,7 @@ class sale_advance_payment_inv(osv.osv_memory):
|
||||
'advance_payment_method':fields.selection(
|
||||
[('all', 'Invoice the whole sale order'), ('percentage','Percentage'), ('fixed','Fixed price (deposit)'),
|
||||
('lines', 'Some order lines')],
|
||||
'Invoice Method', required=True,
|
||||
'What do you want to invoice?', required=True,
|
||||
help="""Use All to create the final invoice.
|
||||
Use Percentage to invoice a percentage of the total amount.
|
||||
Use Fixed Price to invoice a specific amound in advance.
|
||||
|
||||
Reference in New Issue
Block a user