diff --git a/addons/account/account.py b/addons/account/account.py index b01da6b1425..d145f0308b0 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -836,6 +836,8 @@ class account_journal(osv.osv): @return: Returns a list of tupples containing id, name """ + if not ids: + return [] if isinstance(ids, (int, long)): ids = [ids] result = self.browse(cr, user, ids, context=context) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 095d461ff3b..2dc7f96768f 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -304,7 +304,7 @@ class account_bank_statement(osv.osv): 'date': st_line.date, 'ref': st_line.ref, 'move_id': move_id, - 'partner_id': partner_id, + 'partner_id': par_id, 'account_id': acc_id, 'credit': credit, 'debit': debit, diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index bbcb25fefa9..aff38d71cfe 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1103,10 +1103,10 @@ class account_invoice(osv.osv): if not ids: return [] types = { - 'out_invoice': 'CI: ', - 'in_invoice': 'SI: ', - 'out_refund': 'OR: ', - 'in_refund': 'SR: ', + 'out_invoice': 'Invoice ', + 'in_invoice': 'Sup. Invoice ', + 'out_refund': 'Refund ', + 'in_refund': 'Supplier Refund ', } return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')] diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml index 480d5ec76a6..a2fbf11963b 100644 --- a/addons/account/account_menuitem.xml +++ b/addons/account/account_menuitem.xml @@ -30,7 +30,7 @@ - + diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 18ab1a779a3..69b1bef08e6 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -215,8 +215,10 @@ class account_move_line(osv.osv): def _default_get(self, cr, uid, fields, context=None): if context is None: context = {} - if not context.get('journal_id', False) and context.get('search_default_journal_id', False): + if not context.get('journal_id', False): context['journal_id'] = context.get('search_default_journal_id') + if not context.get('period_id', False): + context['period_id'] = context.get('search_default_period_id') account_obj = self.pool.get('account.account') period_obj = self.pool.get('account.period') journal_obj = self.pool.get('account.journal') @@ -226,6 +228,9 @@ class account_move_line(osv.osv): partner_obj = self.pool.get('res.partner') currency_obj = self.pool.get('res.currency') context = self.convert_to_period(cr, uid, context) + #pass the right context when search_defaul_journal_id + if context.get('search_default_journal_id',False): + context['journal_id'] = context.get('search_default_journal_id') # Compute simple values data = super(account_move_line, self).default_get(cr, uid, fields, context=context) # Starts: Manual entry from account.move form @@ -926,6 +931,8 @@ class account_move_line(osv.osv): return res if (not context.get('journal_id', False)) or (not context.get('period_id', False)): return False + if context.get('search_default_journal_id', False): + context['journal_id'] = context.get('search_default_journal_id') cr.execute('SELECT code FROM account_journal WHERE id = %s', (context['journal_id'], )) j = cr.fetchone()[0] or '' cr.execute('SELECT code FROM account_period WHERE id = %s', (context['period_id'], )) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index d1b19910365..874adb417d3 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -102,6 +102,7 @@
+
@@ -252,16 +253,6 @@ - - account.treasury.graph - account.account - - - - - - - Accounts account.account @@ -1728,8 +1719,10 @@ account.payment.term.line - - + + + + @@ -1777,12 +1770,11 @@ account.payment.term - + - - + @@ -2537,7 +2529,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml index 563c3f5fc6c..abbc81ade2b 100644 --- a/addons/account/board_account_view.xml +++ b/addons/account/board_account_view.xml @@ -12,16 +12,6 @@ [('year','=',time.strftime('%Y'))]
- - Treasury - account.account - form - graph,tree - [('type','=','liquidity')] - {'default_type': 'liquidity'} - - - board.account.form board.board @@ -31,9 +21,6 @@ - - -
diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index d83571b314e..7ac1efd4f9f 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -12,7 +12,7 @@ - + @@ -23,6 +23,7 @@ + @@ -93,8 +94,10 @@
- - + + + + diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 1353efca1f5..da6a142972b 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -92,14 +92,14 @@ class account_move_journal(osv.osv_memory): journal = False if journal_id: - journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name'] + journal = journal_pool.read(cr, uid, journal_id, ['name'], context=context).get('name',False) journal_string = _("Journal: %s") % tools.ustr(journal) else: journal_string = _("Journal: All") period = False if period_id: - period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] + period = period_pool.browse(cr, uid, period_id, context=context).name period_string = _("Period: %s") % tools.ustr(period) open_string = _("Open") diff --git a/addons/account_analytic_analysis/__openerp__.py b/addons/account_analytic_analysis/__openerp__.py index 40b67289fb1..3e8c579b729 100644 --- a/addons/account_analytic_analysis/__openerp__.py +++ b/addons/account_analytic_analysis/__openerp__.py @@ -36,6 +36,7 @@ Adds menu to show relevant information to each manager.You can also view the rep 'depends': ['hr_timesheet_invoice', 'sale'], #although sale is technically not required to install this module, all menuitems are located under 'Sales' application 'data': [ 'security/ir.model.access.csv', + 'security/account_analytic_analysis_security.xml', 'account_analytic_analysis_view.xml', 'account_analytic_analysis_menu.xml', 'account_analytic_analysis_cron.xml', diff --git a/addons/account_analytic_analysis/security/account_analytic_analysis_security.xml b/addons/account_analytic_analysis/security/account_analytic_analysis_security.xml new file mode 100644 index 00000000000..8bcc7f2d7f0 --- /dev/null +++ b/addons/account_analytic_analysis/security/account_analytic_analysis_security.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/addons/account_asset/account_asset_view.xml b/addons/account_asset/account_asset_view.xml index bb0222d5e4f..3fab306863c 100644 --- a/addons/account_asset/account_asset_view.xml +++ b/addons/account_asset/account_asset_view.xml @@ -129,7 +129,7 @@ - + @@ -159,11 +159,6 @@ - - - - -