diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index aa3bf57da31..066c5bee06c 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1620,8 +1620,6 @@ - - diff --git a/addons/account/report/account_balance_landscape.rml b/addons/account/report/account_balance_landscape.rml old mode 100755 new mode 100644 diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 448f2abaf6d..e3f1321d02f 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -18,8 +18,6 @@ - - @@ -29,6 +27,8 @@ + + @@ -57,31 +57,31 @@ - - - - + + + + - - - + + + @@ -89,14 +89,14 @@ + string="My Invoices" + help="My Invoices" + domain="[('user_id','=',uid)]"/> - - + + - + @@ -111,9 +111,9 @@ - - - + + + @@ -139,11 +139,19 @@ account.invoice.report form tree,graph - {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]} + {'search_default_month':1,'search_default_product':1,'group_by_no_leaf':1,'group_by':[]} + + diff --git a/addons/account/report/compare_account_balance.rml b/addons/account/report/compare_account_balance.rml old mode 100755 new mode 100644 diff --git a/addons/account/report/voucher_print.py b/addons/account/report/voucher_print.py old mode 100755 new mode 100644 diff --git a/addons/account/report/voucher_print.rml b/addons/account/report/voucher_print.rml old mode 100755 new mode 100644 diff --git a/addons/analytic/project.py b/addons/analytic/project.py index f52dd23caa0..77a881744bc 100644 --- a/addons/analytic/project.py +++ b/addons/analytic/project.py @@ -153,13 +153,15 @@ class account_analytic_account(osv.osv): def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] - reads = self.read(cr, uid, ids, ['name','parent_id'], context) res = [] - for record in reads: - name = record['name'] - if record['parent_id']: - name = record['parent_id'][1]+' / '+name - res.append((record['id'], name)) + for account in self.browse(cr, uid, ids, context=context): + data = [] + acc = account + while acc: + data.insert(0, acc.name) + acc = acc.parent_id + data = ' / '.join(data) + res.append((account.id, data)) return res def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict): @@ -197,7 +199,7 @@ class account_analytic_account(osv.osv): 'date': fields.date('Date End'), 'company_id': fields.many2one('res.company', 'Company', required=True), 'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'), - 'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,readonly=True, + 'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True, help='* When an account is created its in \'Draft\' state.\ \n* If any associated partner is there, it can be in \'Open\' state.\ \n* If any pending balance is there it can be in \'Pending\'. \ @@ -314,7 +316,7 @@ class account_analytic_line(osv.osv): _columns = { 'name' : fields.char('Description', size=256, required=True), - 'date' : fields.date('Date', required=True), + 'date' : fields.date('Date', required=True, select=1), 'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price.'), 'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'), 'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True), diff --git a/addons/auction/board_auction_demo.xml b/addons/auction/board_auction_demo.xml index 504a02263da..f260f8bb1fc 100644 --- a/addons/auction/board_auction_demo.xml +++ b/addons/auction/board_auction_demo.xml @@ -2,13 +2,13 @@ - - Auction dashboard - - ir.ui.menu - 4 - - + + + + + + + diff --git a/addons/base_contact/base_contact_demo.xml b/addons/base_contact/base_contact_demo.xml index 6acdd08cf14..2c76b1844e8 100644 --- a/addons/base_contact/base_contact_demo.xml +++ b/addons/base_contact/base_contact_demo.xml @@ -179,7 +179,7 @@ CTO - + diff --git a/addons/crm/crm.py b/addons/crm/crm.py index feb49ba7ae7..c46519cdb97 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -118,20 +118,18 @@ class crm_case(object): @param context: A standard dictionary for contextual values""" if not context: context = {} - s = self.get_stage_dict(cr, uid, ids, context=context) section = self._name + stage = False stage_pool = self.pool.get('crm.case.stage') for case in self.browse(cr, uid, ids, context): if section in s: st = case.stage_id.id or False if st in s[section]: data = {'stage_id': s[section][st]} - stage = stage_pool.browse(cr, uid, s[section][st], context=context) - if stage.on_change: - data.update({'probability': stage.probability}) + stage = s[section][st] self.write(cr, uid, [case.id], data) - return True + return stage def get_stage_dict(self, cr, uid, ids, context=None): """This function gives dictionary for stage according to stage levels @@ -174,9 +172,10 @@ class crm_case(object): s[section] = dict([(v, k) for (k, v) in s[section].iteritems()]) if st in s[section]: data = {'stage_id': s[section][st]} - stage = stage_pool.browse(cr, uid, s[section][st], context=context) - if stage.on_change: - data.update({'probability': stage.probability}) + if s[section][st]: + stage = stage_pool.browse(cr, uid, s[section][st], context=context) + if stage.on_change: + data.update({'probability': stage.probability}) self.write(cr, uid, [case.id], data) return True diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 2700581d6cc..0ecfdca357e 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -120,8 +120,8 @@ and users by email"), domain="[('section_id','=',section_id),\ ('object_id.model', '=', 'crm.lead')]"), 'partner_name': fields.char("Partner Name", size=64), - 'optin': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-In'), - 'optout': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-Out'), + 'optin': fields.boolean('Opt-In'), + 'optout': fields.boolean('Opt-Out'), 'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), @@ -153,8 +153,6 @@ and users by email"), 'user_id': crm_case._get_default_user, 'email_from': crm_case._get_default_email, 'state': lambda *a: 'draft', - 'optin': lambda *a: 'unknown', - 'optout': lambda *a: 'unknown', 'section_id': crm_case._get_section, 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c), 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], @@ -238,6 +236,15 @@ and users by email"), } return value + def stage_next(self, cr, uid, ids, context=None): + stage = super(crm_lead, self).stage_next(cr, uid, ids, context) + if stage: + stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context) + if stage_obj.on_change: + data = {'probability': stage_obj.probability} + self.write(cr, uid, ids, data) + return stage + def message_new(self, cr, uid, msg, context): """ Automatically calls when new email message arrives @@ -361,7 +368,6 @@ and users by email"), @param **args: Return Dictionary of Keyword Value """ return True - crm_lead() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/crm_opportunity_demo.xml b/addons/crm/crm_opportunity_demo.xml index aa965a07594..3c06d16dc19 100644 --- a/addons/crm/crm_opportunity_demo.xml +++ b/addons/crm/crm_opportunity_demo.xml @@ -55,7 +55,7 @@ - + diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index 4060337bdd7..23d3ffcbe58 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -154,6 +154,8 @@ + + diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 790debb007f..ef068e122a3 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -38,7 +38,6 @@ crm.phonecall tree - diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py index a70bd45875d..f9c39c92403 100644 --- a/addons/crm/report/crm_lead_report.py +++ b/addons/crm/report/crm_lead_report.py @@ -77,7 +77,6 @@ class crm_lead_report(osv.osv): 'name': fields.char('Year', size=64, required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), - 'nbr': fields.integer('# of Cases', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True), 'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"), 'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"), @@ -92,10 +91,10 @@ class crm_lead_report(osv.osv): 'create_date': fields.datetime('Create Date', readonly=True), 'day': fields.char('Day', size=128, readonly=True), 'email': fields.integer('# of Emails', size=128, readonly=True), - 'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"), + 'delay_open': fields.float('Delay to Open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"), + 'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"), 'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"), - 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"), - 'probability': fields.float('Probability',digits=(16,2),readonly=True), + 'probability': fields.float('Probability',digits=(16,2),readonly=True, group_operator="avg"), 'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True), 'categ_id': fields.many2one('crm.case.categ', 'Category',\ domain="[('section_id','=',section_id),\ @@ -107,6 +106,7 @@ class crm_lead_report(osv.osv): 'opening_date': fields.date('Opening Date', readonly=True), 'creation_date': fields.date('Creation Date', readonly=True), 'date_closed': fields.date('Close Date', readonly=True), + 'nbr': fields.integer('# of Cases', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), 'type':fields.selection([ diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index 014a08299e2..43092ccd6c6 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -23,35 +23,15 @@ - - - + + + - - - - crm.lead.report.form - crm.lead.report - form - -
- - - - - - - - - - -
- @@ -75,37 +55,49 @@ search - - - + + + + + + - + domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/> + - - - - - + + + + + + - + - @@ -133,19 +125,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -187,10 +179,9 @@ Leads Analysis crm.lead.report form - {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]} + {'search_default_opportunity':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]} tree,graph - ['|',('type', '=', 'lead'),('type', '=', False)] - + [] @@ -211,10 +202,9 @@ Opportunities Analysis crm.lead.report form - {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]} + {"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]} tree,graph - [('type', '=', 'opportunity')] - + [] diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml index d5bd5c1a3e9..5f3fa8472c0 100644 --- a/addons/crm/res_partner_view.xml +++ b/addons/crm/res_partner_view.xml @@ -4,62 +4,92 @@ - - res.partner.crm.info.inherit + + res.partner.crm.info.inherit1 res.partner form - - - - - - - - - - - - + + + + + + + + + + + + - - - + + res.partner.crm.info.inherit2 + res.partner + form + + + + + + + + + + +