Skip to content

Commit

Permalink
[ADD] crm: Display 'Expected Revenue' currency on quick create form
Browse files Browse the repository at this point in the history
Purpose
=======

Expected revenue field on pop up have no any indication of currency due to that people enter a dollar sign in the field. Eg: $1234

then an error appears when trying to save saying that the field is invalid but the user doesn’t know why. If the currency symbol was displayed it would solve the problem.

Specification
=============

'Expected Revenue' field on wizard should be monetary in order to display the currency symbol.
  • Loading branch information
kme-odoo authored and tivisse committed Oct 18, 2017
1 parent f1f3a8c commit 733306f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/crm/models/crm_lead.py
Expand Up @@ -106,7 +106,7 @@ def _default_stage_id(self):

# Only used for type opportunity
probability = fields.Float('Probability', group_operator="avg", default=lambda self: self._default_probability())
planned_revenue = fields.Float('Expected Revenue', track_visibility='always')
planned_revenue = fields.Monetary('Expected Revenue', currency_field='company_currency', track_visibility='always')
date_deadline = fields.Date('Expected Closing', help="Estimate of the date on which the opportunity will be won.")
color = fields.Integer('Color Index', default=0)
partner_address_name = fields.Char('Partner Contact Name', related='partner_id.name', readonly=True)
Expand Down
3 changes: 2 additions & 1 deletion addons/crm/views/crm_lead_views.xml
Expand Up @@ -253,10 +253,11 @@
<field name="partner_id" domain="[('customer', '=', True)]" context="{'search_default_customer': 1}"/>
<field name="email_from" invisible="1"/>
<field name="phone" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="company_currency" invisible="1"/>
<label for="planned_revenue"/>
<div class="o_row">
<field name="planned_revenue"/>
<field name="company_currency" options="{'no_create': True, 'no_open': True}"/>
</div>
<field name="priority" widget="priority"/>
</group>
Expand Down

0 comments on commit 733306f

Please sign in to comment.