diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 95ecdc8c35a..1a222b2f83c 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -49,7 +49,7 @@ for a particular financial year and for preparation of vouchers there is a modul """, 'website': 'http://www.openerp.com', 'images' : ['images/accounts.jpeg','images/bank_statement.jpeg','images/cash_register.jpeg','images/chart_of_accounts.jpeg','images/customer_invoice.jpeg','images/journal_entries.jpeg'], - 'depends' : ['base_setup', 'product', 'analytic', 'process', 'board', 'edi'], + 'depends' : ['base_setup', 'product', 'analytic', 'process', 'board', 'edi', 'report'], 'data': [ 'security/account_security.xml', 'security/ir.model.access.csv', @@ -126,6 +126,24 @@ for a particular financial year and for preparation of vouchers there is a modul 'account_pre_install.yml', 'views/report_vat.xml', + 'views/report_invoice.xml', + 'views/report_trialbalance.xml', + 'views/report_centraljournal.xml', + 'views/report_overdue.xml', + 'views/report_generaljournal.xml', + 'views/report_journal.xml', + 'views/report_salepurchasejournal.xml', + 'views/report_partnerbalance.xml', + 'views/report_agedpartnerbalance.xml', + 'views/report_partnerledger.xml', + 'views/report_partnerledgerother.xml', + 'views/report_financial.xml', + 'views/report_generalledger.xml', + 'project/views/report_analyticbalance.xml', + 'project/views/report_analyticjournal.xml', + 'project/views/report_analyticcostledgerquantity.xml', + 'project/views/report_analyticcostledger.xml', + 'project/views/report_invertedanalyticbalance.xml', ], 'js': [ 'static/src/js/account_move_reconciliation.js', @@ -157,8 +175,6 @@ for a particular financial year and for preparation of vouchers there is a modul 'test/account_period_close.yml', 'test/account_use_model.yml', 'test/account_validate_account_move.yml', - #'test/account_bank_statement.yml', - #'test/account_cash_statement.yml', 'test/test_edi_invoice.yml', 'test/account_report.yml', 'test/account_fiscalyear_close.yml', #last test, as it will definitively close the demo fiscalyear @@ -166,4 +182,5 @@ for a particular financial year and for preparation of vouchers there is a modul 'installable': True, 'auto_install': False, } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account.py b/addons/account/account.py index 4d9baf36a17..3537c4f4c55 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -30,7 +30,7 @@ from openerp import SUPERUSER_ID from openerp import tools from openerp.osv import fields, osv, expression from openerp.tools.translate import _ -from openerp.tools.float_utils import float_round +from openerp.tools.float_utils import float_round as round import openerp.addons.decimal_precision as dp @@ -1937,15 +1937,15 @@ class account_tax(osv.osv): # 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the tax declaration."), 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the tax declaration."), - 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), - 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), + 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), + 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), # Same fields for refund invoices 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."), 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."), - 'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1."), - 'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1."), + 'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), + 'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), 'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"), 'company_id': fields.many2one('res.company', 'Company', required=True), 'description': fields.char('Tax Code'), @@ -2143,7 +2143,7 @@ class account_tax(osv.osv): tax_compute_precision = precision if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally': tax_compute_precision += 5 - totalin = totalex = float_round(price_unit * quantity, precision) + totalin = totalex = round(price_unit * quantity, precision) tin = [] tex = [] for tax in taxes: diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 06e59232ac9..effc2b03f61 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -409,17 +409,9 @@ class account_invoice(osv.osv): ''' assert len(ids) == 1, 'This option should only be used for a single id at a time.' self.write(cr, uid, ids, {'sent': True}, context=context) - datas = { - 'ids': ids, - 'model': 'account.invoice', - 'form': self.read(cr, uid, ids[0], context=context) - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.invoice', - 'datas': datas, - 'nodestroy' : True - } + context2 = context.copy() + context2['active_ids'] = ids + return self.pool['report'].get_action(cr, uid, [], 'account.report_invoice', context=context2) def action_invoice_sent(self, cr, uid, ids, context=None): ''' diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index faa2aaee3be..e58cf7721c7 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -168,7 +168,7 @@ on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" domain="[('supplier', '=', True)]"/> - +