[IMP] add direct currency_id field insted of related field.
bzr revid: tpa@tinyerp.com-20131023061053-3avp9mp31v7vl9o6
This commit is contained in:
parent
dcc739abed
commit
44eaa430cc
|
@ -200,7 +200,8 @@ class crm_case_section(osv.osv):
|
|||
'monthly_planned_revenue': fields.function(_get_opportunities_data,
|
||||
type="string", readonly=True, multi='_get_opportunities_data',
|
||||
string='Planned Revenue per Month'),
|
||||
'currency_symbol': fields.function(_get_currency_symbol, string='Currency Symbol', method=True, type='char'),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
|
||||
'currency_symbol': fields.function(_get_currency_symbol, string="Current User's Currency Symbol", method=True, type='char'),
|
||||
}
|
||||
|
||||
def _get_stage_common(self, cr, uid, context):
|
||||
|
@ -211,6 +212,7 @@ class crm_case_section(osv.osv):
|
|||
'active': 1,
|
||||
'stage_ids': _get_stage_common,
|
||||
'use_leads': True,
|
||||
'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
|
|
|
@ -88,8 +88,6 @@ class crm_case_section(osv.osv):
|
|||
type='string', readonly=True,
|
||||
string='Rate of sent invoices per duration'),
|
||||
'create_uid': fields.many2one('res.users', 'Create User'),
|
||||
'company_id': fields.related('create_uid', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
'currency_id': fields.related('company_id', 'currency_id', type='many2one', relation='res.currency', required=True, readonly=True, string='Currency'),
|
||||
}
|
||||
|
||||
def action_forecast(self, cr, uid, id, value, context=None):
|
||||
|
|
Loading…
Reference in New Issue