[IMP] address format of leads according to country

bzr revid: fp@tinyerp.com-20120913181952-h19q4v0vu6geungq
This commit is contained in:
Fabien Pinckaers 2012-09-13 20:19:52 +02:00
parent bd2ccbfd8e
commit 30872ea9da
2 changed files with 10 additions and 2 deletions

View File

@ -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
}

View File

@ -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.