Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Delta Between Two Patch Sets: opportunity.py

Issue 195047: Code after refactoring
Left Patch Set: Fixed email id Created 15 years, 2 months ago
Right Patch Set: changed open lead to lead Created 15 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « __tryton__.py ('k') | opportunity.xml » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #This file is part of Tryton. The COPYRIGHT file at the top level of 1 #This file is part of Tryton. The COPYRIGHT file at the top level of
2 #this repository contains the full copyright notices and license terms. 2 #this repository contains the full copyright notices and license terms.
3 "Sales extension for managing leads and opportunities" 3 "Sales extension for managing leads and opportunities"
4 from trytond.model import ModelView, ModelSQL, ModelWorkflow, fields 4 from trytond.model import ModelView, ModelSQL, ModelWorkflow, fields
5 from trytond.pyson import Equal, Eval, Not, In, If, Get 5 from trytond.pyson import Equal, Eval, Not, In, If, Get
6 import datetime 6 import datetime
7 7
8 STATES = [('lead', 'Open Lead'), 8 STATES = [('lead', 'Lead'),
9 ('opportunity', 'Opportunity'), 9 ('opportunity', 'Opportunity'),
10 ('converted', 'Converted'), 10 ('converted', 'Converted'),
11 ('cancel', 'Cancelled'), 11 ('cancel', 'Cancelled'),
12 ('lost', 'Lost'), 12 ('lost', 'Lost'),
13 ] 13 ]
14 _STATES_LEAD = {'readonly': Not(Equal(Eval('state'), 'lead')), } 14 _STATES_LEAD = {'readonly': Not(Equal(Eval('state'), 'lead')), }
15 _STATES_CONVERTED = {'readonly': Equal(Eval('state'), 'converted'), } 15 _STATES_CONVERTED = {'readonly': Equal(Eval('state'), 'converted'), }
16 16
17 class SaleOpportunity(ModelWorkflow, ModelSQL, ModelView): 17 class SaleOpportunity(ModelWorkflow, ModelSQL, ModelView):
18 'Sale Opportunity' 18 'Sale Opportunity'
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 write_uid, 158 write_uid,
159 COALESCE(write_date, create_date) AS date, 159 COALESCE(write_date, create_date) AS date,
160 COALESCE(write_uid,create_uid) AS user, 160 COALESCE(write_uid,create_uid) AS user,
161 title,· 161 title,·
162 state,· 162 state,·
163 probability """ 163 probability """
164 'FROM "%s__history"' % opportunity_object._table 164 'FROM "%s__history"' % opportunity_object._table
165 , []) 165 , [])
166 166
167 SaleOpportunityHistoryLines() 167 SaleOpportunityHistoryLines()
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b