diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 73ffe59f4f6..d3a58272b89 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -119,7 +119,6 @@ module named account_vouchers "wizard/account_bs_report_view.xml" ], 'demo_xml': [ - #'demo/price_accuracy00.yml', 'account_demo.xml', 'project/project_demo.xml', 'project/analytic_account_demo.xml', diff --git a/addons/account/account.py b/addons/account/account.py index 22c234dd0ad..a461cbe5bb7 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1230,13 +1230,7 @@ class account_move(osv.osv): if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id or line.currency_id): raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name))) - # Check that the move balances, the tolerance for debit/credit must - # be smaller than the smallest value according to price accuracy - # (hence the +1 below) - # Example: - # difference == 0.01 is OK iff price_accuracy <= 1! - # difference == 0.0001 is OK iff price_accuracy <= 3! - if abs(amount) < 10 ** -(int(config['price_accuracy'])+1): + if abs(amount) < 10 ** -4: if not len(line_draft_ids): continue self.pool.get('account.move.line').write(cr, uid, line_draft_ids, { diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index b40c859385f..90dbcca468f 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -51,7 +51,7 @@ ir_sequence_type() class account_journal(osv.osv): _inherit = "account.journal" _columns = { - 'max_amount': fields.float('Verify Transaction', digits=(16, int(config['price_accuracy'])), help="Validate voucher entry twice before posting it, if transection amount more then entered here"), + 'max_amount': fields.float('Verify Transaction', digits=(16, 2), help="Validate voucher entry twice before posting it, if transection amount more then entered here"), } account_journal() diff --git a/addons/auction/wizard/auction_pay_buy.py b/addons/auction/wizard/auction_pay_buy.py index 28028f45538..ef8d5a98887 100644 --- a/addons/auction/wizard/auction_pay_buy.py +++ b/addons/auction/wizard/auction_pay_buy.py @@ -29,14 +29,14 @@ class auction_pay_buy(osv.osv_memory): _description = "Pay buy" _columns= { - 'amount': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy']))), + 'amount': fields.float('Amount paid', digits= (16, 2)), 'buyer_id':fields.many2one('res.partner', 'Buyer'), 'statement_id1':fields.many2one('account.bank.statement', 'Statement', required=True), - 'amount2': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy']))), + 'amount2': fields.float('Amount paid', digits= (16, 2)), 'statement_id2':fields.many2one('account.bank.statement', 'Statement'), - 'amount3': fields.float('Amount paid', digits = (16, int(tools.config['price_accuracy']))), + 'amount3': fields.float('Amount paid', digits = (16, 2)), 'statement_id3':fields.many2one('account.bank.statement', 'Statement'), - 'total': fields.float('Amount paid', digits = (16, int(tools.config['price_accuracy'])), readonly =True), + 'total': fields.float('Amount paid', digits = (16, 2), readonly =True), } def default_get(self, cr, uid, fields, context): diff --git a/addons/auction/wizard/auction_pay_sel.py b/addons/auction/wizard/auction_pay_sel.py index 6873092c7e9..711cb8dcedc 100644 --- a/addons/auction/wizard/auction_pay_sel.py +++ b/addons/auction/wizard/auction_pay_sel.py @@ -27,7 +27,7 @@ class auction_pay_sel(osv.osv_memory): _description = "Pay Invoice" _columns= { - 'amount': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy'])), required=True), + 'amount': fields.float('Amount paid', digits= (16, 2), required=True), 'dest_account_id':fields.many2one('account.account', 'Payment to Account', required=True, domain= [('type', '=', 'cash')]), 'journal_id':fields.many2one('account.journal', 'Journal', required=True), 'period_id':fields.many2one('account.period', 'Period', required=True),