Merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-decimal_precision_tax-dev-julio into lp:addons-vauxoo

Proposed by Julio Serna-http://www.vauxoo.com
Status: Merged
Merged at revision: 357
Proposed branch: lp:~vauxoo/addons-vauxoo/addons-vauxoo-decimal_precision_tax-dev-julio
Merge into: lp:addons-vauxoo
Diff against target: 149 lines (+128/-0)
4 files modified
decimal_precision_tax/__init__.py (+26/-0)
decimal_precision_tax/__openerp__.py (+45/-0)
decimal_precision_tax/data/decimal_precision_tax.xml (+10/-0)
decimal_precision_tax/decimal_pre_tax.py (+47/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-decimal_precision_tax-dev-julio
Reviewer Review Type Date Requested Status
Gabriela Quilarque Approve
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+117145@code.launchpad.net

Description of the change

agrega las decimales al campo amount de account.tax

To post a comment you must log in.
Revision history for this message
Gabriela Quilarque (gabrielaquilarque97) wrote :

Listo, Merge realizado y probado.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'decimal_precision_tax'
2=== added file 'decimal_precision_tax/__init__.py'
3--- decimal_precision_tax/__init__.py 1970-01-01 00:00:00 +0000
4+++ decimal_precision_tax/__init__.py 2012-07-27 23:23:19 +0000
5@@ -0,0 +1,26 @@
6+# -*- encoding: utf-8 -*-
7+###########################################################################
8+# Module Writen to OpenERP, Open Source Management Solution
9+#
10+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
11+# All Rights Reserved.
12+# info@vauxoo.com
13+############################################################################
14+# Coded by: julio (julio@vauxoo.com)
15+############################################################################
16+#
17+# This program is free software: you can redistribute it and/or modify
18+# it under the terms of the GNU Affero General Public License as
19+# published by the Free Software Foundation, either version 3 of the
20+# License, or (at your option) any later version.
21+#
22+# This program is distributed in the hope that it will be useful,
23+# but WITHOUT ANY WARRANTY; without even the implied warranty of
24+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+# GNU Affero General Public License for more details.
26+#
27+# You should have received a copy of the GNU Affero General Public License
28+# along with this program. If not, see <http://www.gnu.org/licenses/>.
29+#
30+##############################################################################
31+import decimal_pre_tax
32
33=== added file 'decimal_precision_tax/__openerp__.py'
34--- decimal_precision_tax/__openerp__.py 1970-01-01 00:00:00 +0000
35+++ decimal_precision_tax/__openerp__.py 2012-07-27 23:23:19 +0000
36@@ -0,0 +1,45 @@
37+# -*- encoding: utf-8 -*-
38+###########################################################################
39+# Module Writen to OpenERP, Open Source Management Solution
40+#
41+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
42+# All Rights Reserved.
43+# info@vauxoo.com
44+############################################################################
45+# Coded by: julio (julio@vauxoo.com)
46+############################################################################
47+#
48+# This program is free software: you can redistribute it and/or modify
49+# it under the terms of the GNU Affero General Public License as
50+# published by the Free Software Foundation, either version 3 of the
51+# License, or (at your option) any later version.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU Affero General Public License for more details.
57+#
58+# You should have received a copy of the GNU Affero General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+#
61+##############################################################################
62+{
63+ "name" : "Decimal Precision to Rate Tax",
64+ "version" : "0.1",
65+ "depends" : ["base","decimal_precision"],
66+ "author" : "Vauxoo",
67+ "description" : """
68+ This module, add decimal precision format to Rate Tax.
69+ """,
70+ "website" : "http://vauxoo.com",
71+ "category" : "Administracion/Personalizacion/Estructura de la base de datos/Precision Decimal",
72+ "init_xml" : [
73+ ],
74+ "demo_xml" : [
75+ ],
76+ "update_xml" : [
77+ "data/decimal_precision_tax.xml",
78+ ],
79+ "active": False,
80+ "installable": True,
81+}
82
83=== added directory 'decimal_precision_tax/data'
84=== added file 'decimal_precision_tax/data/decimal_precision_tax.xml'
85--- decimal_precision_tax/data/decimal_precision_tax.xml 1970-01-01 00:00:00 +0000
86+++ decimal_precision_tax/data/decimal_precision_tax.xml 2012-07-27 23:23:19 +0000
87@@ -0,0 +1,10 @@
88+<?xml version="1.0"?>
89+<openerp>
90+ <data noupdate="1">
91+ <!-- Decimal Precision -->
92+ <record forcecreate="True" id="decimal_precision_tax" model="decimal.precision">
93+ <field name="name">Tax</field>
94+ <field name="digits">2</field>
95+ </record>
96+ </data>
97+</openerp>
98
99=== added file 'decimal_precision_tax/decimal_pre_tax.py'
100--- decimal_precision_tax/decimal_pre_tax.py 1970-01-01 00:00:00 +0000
101+++ decimal_precision_tax/decimal_pre_tax.py 2012-07-27 23:23:19 +0000
102@@ -0,0 +1,47 @@
103+# -*- encoding: utf-8 -*-
104+###########################################################################
105+# Module Writen to OpenERP, Open Source Management Solution
106+#
107+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
108+# All Rights Reserved.
109+# info@vauxoo.com
110+############################################################################
111+# Coded by: julio (julio@vauxoo.com)
112+############################################################################
113+#
114+# This program is free software: you can redistribute it and/or modify
115+# it under the terms of the GNU Affero General Public License as
116+# published by the Free Software Foundation, either version 3 of the
117+# License, or (at your option) any later version.
118+#
119+# This program is distributed in the hope that it will be useful,
120+# but WITHOUT ANY WARRANTY; without even the implied warranty of
121+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122+# GNU Affero General Public License for more details.
123+#
124+# You should have received a copy of the GNU Affero General Public License
125+# along with this program. If not, see <http://www.gnu.org/licenses/>.
126+#
127+##############################################################################
128+from osv import osv
129+from osv import fields
130+from tools.translate import _
131+from tools import config
132+import time
133+import datetime
134+import decimal_precision as dp
135+
136+class account_tax(osv.osv):
137+
138+ _inherit = "account.tax"
139+ _columns= {
140+ 'amount': fields.float('Amount', digits_compute= dp.get_precision('Tax'), required=True, help="For taxes of type percentage, enter % ratio between 0-1."),
141+ }
142+account_tax()
143+
144+
145+
146+
147+
148+
149+