~vauxoo/addons-vauxoo/7.0-project_issue_conf-dev_luis

« back to all changes in this revision

Viewing changes to decimal_precision_currency/decimal_pre_currency.py

  • Committer: Gabriela
  • Author(s): Vauxoo
  • Date: 2012-05-18 20:37:26 UTC
  • Revision ID: gabriela@openerp.com.ve-20120518203726-9c4jvikl8ew08dg2
  
[ADD] Added new module decimal_precision currency, 
add decimal  precision format to Rate Currency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# -*- encoding: utf-8 -*-
 
3
###########################################################################
 
4
#    Module Writen to OpenERP, Open Source Management Solution
 
5
#    Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
 
6
#    All Rights Reserved
 
7
###############Credits######################################################
 
8
#    Coded by: Maria Gabriela Quilarque  <gabriela@openerp.com.ve>
 
9
#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
 
10
#    Audited by: Maria Gabriela Quilarque  <gabriela@openerp.com.ve>
 
11
#############################################################################
 
12
#    This program is free software: you can redistribute it and/or modify
 
13
#    it under the terms of the GNU Affero General Public License as published by
 
14
#    the Free Software Foundation, either version 3 of the License, or
 
15
#    (at your option) any later version.
 
16
#
 
17
#    This program is distributed in the hope that it will be useful,
 
18
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
#    GNU Affero General Public License for more details.
 
21
#
 
22
#    You should have received a copy of the GNU Affero General Public License
 
23
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
24
##############################################################################
 
25
from osv import osv
 
26
from osv import fields
 
27
from tools.translate import _
 
28
from tools import config
 
29
import time
 
30
import datetime
 
31
import decimal_precision as dp
 
32
 
 
33
class res_currency_rate(osv.osv):
 
34
 
 
35
    _inherit = "res.currency.rate"
 
36
    _columns= {
 
37
        'rate': fields.float('Rate', digits_compute= dp.get_precision('Currency'), required=True, help='The rate of the currency to the currency of rate 1'),
 
38
    }
 
39
 
 
40
res_currency_rate()
 
41
 
 
42
 
 
43
 
 
44
 
 
45
 
 
46