From 05cb32962c67cee707619a793cc86cd3dd7e5ea9 Mon Sep 17 00:00:00 2001 From: Benoit Guillot Date: Tue, 10 Jul 2012 14:28:46 +0200 Subject: [PATCH] [REF] ref decimal precision on expense fields bzr revid: benoit.guillot@akretion.com.br-20120710122846-8582vh8p8bimgufo --- addons/hr_expense/hr_expense.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index b1192701dfb..dbf3c34f4c1 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -72,7 +72,7 @@ class hr_expense_expense(osv.osv): 'account_move_id': fields.many2one('account.move', 'Ledger Posting'), 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ), 'note': fields.text('Note'), - 'amount': fields.function(_amount, string='Total Amount'), + 'amount': fields.function(_amount, string='Total Amount', digits_compute= dp.get_precision('Account')), 'invoice_id': fields.many2one('account.invoice', "Employee's Invoice"), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), 'department_id':fields.many2one('hr.department','Department'), @@ -258,8 +258,8 @@ class hr_expense_line(osv.osv): 'date_value': fields.date('Date', required=True), 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True), 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')), - 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Account')), - 'unit_quantity': fields.float('Quantities' ), + 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Price Unit')), + 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')), 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]), 'uom_id': fields.many2one('product.uom', 'Unit of Measure'), 'description': fields.text('Description'),