diff --git a/addons/account/account.py b/addons/account/account.py index e11479e4dc0..bfc16a4c419 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -111,7 +111,7 @@ class account_payment_term_line(osv.osv): 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \ "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."), 'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."), - 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True), + 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True, ondelete='cascade'), } _defaults = { 'value': 'balance', @@ -1375,7 +1375,7 @@ class account_move(osv.osv): balance = 0.0 for line in line_ids: if line[2]: - balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00) + balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00))) return {'value': {'balance': balance}} def write(self, cr, uid, ids, vals, context=None): diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml index 630c551c5ca..563c3f5fc6c 100644 --- a/addons/account/board_account_view.xml +++ b/addons/account/board_account_view.xml @@ -29,7 +29,6 @@
- diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index 02da9a6ab1f..9acc09e9026 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -30,9 +30,11 @@ class account_common_report(osv.osv_memory): _description = "Account Common Report" def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None): + res = {} if chart_account_id: company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id - return {'value': {'company_id': company_id}} + res['value'] = {'company_id': company_id} + return res _columns = { 'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]), diff --git a/addons/board/__openerp__.py b/addons/board/__openerp__.py index f07878717fd..2690012f3b4 100644 --- a/addons/board/__openerp__.py +++ b/addons/board/__openerp__.py @@ -28,9 +28,7 @@ Lets the user create a custom dashboard. ======================================== -This module also creates the Administration Dashboard. - -The user can also publish notes. +Allows users to create custom dashboard. """, 'author': 'OpenERP SA', 'depends': ['base'], diff --git a/addons/board/static/src/css/Makefile b/addons/board/static/src/css/Makefile new file mode 100644 index 00000000000..0cb5ae70f4a --- /dev/null +++ b/addons/board/static/src/css/Makefile @@ -0,0 +1,3 @@ +dashboard.css: dashboard.sass + sass --trace -t expanded dashboard.sass dashboard.css + diff --git a/addons/board/static/src/css/dashboard.css b/addons/board/static/src/css/dashboard.css index 6907b4271a0..38e224daf42 100644 --- a/addons/board/static/src/css/dashboard.css +++ b/addons/board/static/src/css/dashboard.css @@ -5,6 +5,11 @@ .openerp .oe_dashboard { width: 100%; } +.openerp .oe_dashboard .oe_dashboard_layout_selector ul, .openerp .oe_dashboard .oe_dashboard_layout_selector li { + margin: 0; + padding: 0; + list-style-type: none; +} .openerp .oe_dashboard .oe_action { margin: 0 8px 8px 0; background-color: white; diff --git a/addons/board/static/src/css/dashboard.sass b/addons/board/static/src/css/dashboard.sass index 4bacc7bd892..1bfc01a3809 100644 --- a/addons/board/static/src/css/dashboard.sass +++ b/addons/board/static/src/css/dashboard.sass @@ -14,6 +14,11 @@ margin: 0 4px 6px 0 .oe_dashboard width: 100% + .oe_dashboard_layout_selector + ul, li + margin: 0 + padding: 0 + list-style-type: none .oe_action margin: 0 8px 8px 0 background-color: white diff --git a/addons/board/static/src/xml/board.xml b/addons/board/static/src/xml/board.xml index 3cd7090f1e0..b2363cafd53 100644 --- a/addons/board/static/src/xml/board.xml +++ b/addons/board/static/src/xml/board.xml @@ -36,7 +36,7 @@ -
+

Choose dashboard layout

diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml index 16ed1e4c5ad..d80183b80c9 100644 --- a/addons/crm/board_crm_view.xml +++ b/addons/crm/board_crm_view.xml @@ -2,22 +2,6 @@ - - My Opportunities - crm.lead - tree - [('user_id','=',uid),('type', '=', 'opportunity'),('state','not in',('cancel','done'))] - - - - - New Leads - crm.lead - tree - [('user_id','=',uid),('state','=','draft'),('type','=','lead')] - - - Opportunities By Stage - Graph crm.lead.report @@ -70,11 +54,9 @@ - - + - diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 881c0ace3cc..ddfdb05ca66 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -87,8 +87,8 @@ class crm_lead(base_stage, osv.osv): search_domain = [] section_id = self._resolve_section_id_from_context(cr, uid, context=context) if section_id: - search_domain += ['|', '&', ('section_ids', '=', section_id), ('fold', '=', False)] - search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)] + search_domain += ['|', ('section_ids', '=', section_id)] + search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)] # retrieve type from the context (if set: choose 'type' or 'both') type = self._resolve_type_from_context(cr, uid, context=context) if type: @@ -98,7 +98,12 @@ class crm_lead(base_stage, osv.osv): result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) # restore order of the search result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0]))) - return result + + fold = {} + for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context): + fold[stage.id] = stage.fold or False + + return result, fold _group_by_full = { 'stage_id': _read_group_stage_ids @@ -200,7 +205,7 @@ class crm_lead(base_stage, osv.osv): 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), 'date_closed': fields.datetime('Closed', readonly=True), 'stage_id': fields.many2one('crm.case.stage', 'Stage', - domain="['&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"), + domain="['&', ('fold', '=', False), '&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"), 'user_id': fields.many2one('res.users', 'Salesperson'), 'referred': fields.char('Referred By', size=64), 'date_open': fields.datetime('Opened', readonly=True), diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml index 04f91933f66..f734a839ff4 100644 --- a/addons/crm/crm_lead_data.xml +++ b/addons/crm/crm_lead_data.xml @@ -55,7 +55,7 @@ Dead - + cancel diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index f763f0a598a..3546d641184 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -257,7 +257,7 @@ - + @@ -297,17 +297,9 @@ - -
    -
  • Phone:
  • -
  • Probability: %%
  • -
  • Creation date:
  • -
  • Date Deadline:
  • -
-
-
+
í