[FIX] purchase: Use the price_accuracy
authorStephane Wirtel <stephane@openerp.com>
Tue, 20 Oct 2009 16:22:54 +0000 (18:22 +0200)
committerStephane Wirtel <stephane@openerp.com>
Tue, 20 Oct 2009 16:22:54 +0000 (18:22 +0200)
bzr revid: stephane@openerp.com-20091020162254-4tqmgq8d8toau15b

addons/purchase/purchase.py

index 5661dee..521549c 100644 (file)
@@ -442,7 +442,7 @@ class purchase_order_line(osv.osv):
         'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
         'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
         'price_unit': fields.float('Unit Price', required=True, digits=(16, int(config['price_accuracy']))),
-        'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal'),
+        'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits=(16, int(config['price_accuracy']))),
         'notes': fields.text('Notes'),
         'order_id': fields.many2one('purchase.order', 'Order Ref', select=True, required=True, ondelete='cascade'),
         'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),