diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 343512dc271..95ecdc8c35a 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -123,7 +123,9 @@ for a particular financial year and for preparation of vouchers there is a modul 'edi/invoice_action_data.xml', 'account_bank_view.xml', 'res_config_view.xml', - 'account_pre_install.yml' + 'account_pre_install.yml', + + 'views/report_vat.xml', ], 'js': [ 'static/src/js/account_move_reconciliation.js', diff --git a/addons/account/account.py b/addons/account/account.py index 2fbc32b1bfd..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 @@ -729,8 +729,7 @@ class account_journal(osv.osv): 'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'), 'entry_posted': fields.boolean('Autopost Created Moves', help='Check this box to automatically post entries of this journal. Note that legally, some entries may be automatically posted when the source document is validated (Invoices), whatever the status of this field.'), 'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"), - 'allow_date':fields.boolean('Check Date in Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'), - + 'allow_date':fields.boolean('Check Date in Period', help= 'If checked, the entry won\'t be created if the entry date is not included into the selected period'), 'profit_account_id' : fields.many2one('account.account', 'Profit Account'), 'loss_account_id' : fields.many2one('account.account', 'Loss Account'), 'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1), @@ -1938,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'), @@ -2144,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_bank_statement.py b/addons/account/account_bank_statement.py index d437074023a..cf8bb5133fd 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -495,6 +495,7 @@ class account_bank_statement(osv.osv): ctx = (context or {}).copy() ctx['journal_id'] = self.browse(cr, uid, ids[0], context=context).journal_id.id return { + 'name': _('Journal Items'), 'view_type':'form', 'view_mode':'tree', 'res_model':'account.move.line', diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 42f3effd6f9..06e59232ac9 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -114,7 +114,7 @@ class account_invoice(osv.osv): #we check if the invoice is partially reconciled and if there are other invoices #involved in this partial reconciliation (and we sum these invoices) for line in aml.reconcile_partial_id.line_partial_ids: - if line.invoice: + if line.invoice and invoice.type == line.invoice.type: nb_inv_in_partial_rec += 1 #store the max invoice id as for this invoice we will make a balance instead of a simple division max_invoice_id = max(max_invoice_id, line.invoice.id) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 3cf10f477e2..e58cf7721c7 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -125,7 +125,7 @@ - + @@ -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)]"/> - +