summaryrefslogtreecommitdiff
path: root/addons/l10n_br
diff options
context:
space:
mode:
authorRohan Patel <rop@odoo.com>2016-05-24 11:55:16 +0530
committerYannick Tivisse <yti@odoo.com>2016-07-06 11:01:26 +0200
commitad7ca14d1b8efb5c1a4d574012bb2492914fb446 (patch)
tree12d4be9df9349160a0389508de7619c5c32a6385 /addons/l10n_br
parent180126755e7969559f719d6f445f0c4414dfcaad (diff)
[MIG] l10n_* : Migrated to new API
[MIG] l10n_ae : Migrated to new API. [MIG] l10n_ar : Migrated to new API. [MIG] l10n_at : Migrated to new API. [MIG] l10n_au : Migrated to new API. [MIG] l10n_be : Migrated to new API. [MIG] l10n_bo : Migrated to new API. [MIG] l10n_br : Migrated to new API. [MIG] l10n_ca : Migrated to new API. [MIG] l10n_ch : Migrated to new API. [MIG] l10n_cl : Migrated to new API. [MIG] l10n_cn : Migrated to new API. [MIG] l10n_co : Migrated to new API. [MIG] l10n_cr : Migrated to new API. [MIG] l10n_de : Migrated to new API. [MIG] l10n_de_skr03 : Migrated to new API. [MIG] l10n_de_skr04 : Migrated to new API. [MIG] l10n_cn_small_business : Migrated to new API. [MIG] l10n_cn_standard : Migrated to new API. [MIG] l10n_do : Migrated to new API. [MIG] l10n_ec : Migrated to new API. [MIG] l10n_es : Migrated to new API. [MIG] l10n_et : Migrated to new API. [MIG] l10n_fr : Migrated to new API. [MIG] l10n_generic_coa : Migrated to new API. [MIG] l10n_gr : Migrated to new API. [MIG] l10n_gt : Migrated to new API. [MIG] l10n_hn : Migrated to new API. [MIG] l10n_hr : Migrated to new API. [MIG] l10n_hu : Migrated to new API. [MIG] l10n_in : Migrated to new API. [MIG] l10n_it : Migrated to new API. [MIG] l10n_jp : Migrated to new API. [MIG] l10n_lu : Migrated to new API. [MIG] l10n_ma : Migrated to new API. [MIG] l10n_mx : Migrated to new API. [MIG] l10n_nl : Migrated to new API. [MIG] l10n_no : Migrated to new API. [MIG] l10n_nz : Migrated to new API. [MIG] l10n_pa : Migrated to new API. [MIG] l10n_pe : Migrated to new API. [MIG] l10n_pl : Migrated to new API. [MIG] l10n_ro : Migrated to new API. [MIG] l10n_sa : Migrated to new API. [MIG] l10n_sg : Migrated to new API. [MIG] l10n_si : Migrated to new API. [MIG] l10n_syscohada : Migrated to new API. [MIG] l10n_th : Migrated to new API. [MIG] l10n_tr : Migrated to new API. [MIG] l10n_uk : Migrated to new API. [MIG] l10n_us : Migrated to new API. [MIG] l10n_uy : Migrated to new API. [MIG] l10n_ve : Migrated to new API. [MIG] l10n_vn : Migrated to new API.
Diffstat (limited to 'addons/l10n_br')
-rw-r--r--addons/l10n_br/__init__.py2
-rw-r--r--addons/l10n_br/__openerp__.py14
-rw-r--r--addons/l10n_br/data/l10n_br_chart_data.xml2
-rw-r--r--addons/l10n_br/models/__init__.py2
-rw-r--r--addons/l10n_br/models/account.py71
-rw-r--r--addons/l10n_br/views/account_view.xml10
6 files changed, 39 insertions, 62 deletions
diff --git a/addons/l10n_br/__init__.py b/addons/l10n_br/__init__.py
index 8afc3410083..f064263f79a 100644
--- a/addons/l10n_br/__init__.py
+++ b/addons/l10n_br/__init__.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
diff --git a/addons/l10n_br/__openerp__.py b/addons/l10n_br/__openerp__.py
index 94f6c247908..3305735e2f5 100644
--- a/addons/l10n_br/__openerp__.py
+++ b/addons/l10n_br/__openerp__.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
@@ -45,14 +45,12 @@ come with any additional paid permission for online use of 'private modules'.
""",
'author': 'Akretion, Odoo Brasil',
'website': 'http://openerpbrasil.org',
- 'version': '1.0',
'depends': ['account'],
'data': [
- 'data/l10n_br_chart_data.xml',
- 'data/account.account.template.csv',
- 'data/account_tax_template_data.xml',
- 'views/account_view.xml',
- 'data/account_chart_template_data.yml',
+ 'data/l10n_br_chart_data.xml',
+ 'data/account.account.template.csv',
+ 'data/account_tax_template_data.xml',
+ 'views/account_view.xml',
+ 'data/account_chart_template_data.yml',
],
- 'installable': True,
}
diff --git a/addons/l10n_br/data/l10n_br_chart_data.xml b/addons/l10n_br/data/l10n_br_chart_data.xml
index a828a551001..92d40fef0e1 100644
--- a/addons/l10n_br/data/l10n_br_chart_data.xml
+++ b/addons/l10n_br/data/l10n_br_chart_data.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem id="account_reports_br_statements_menu" name="Brazilian Statements" parent="account.menu_finance_reports" sequence="3" groups="account.group_account_user"/>
diff --git a/addons/l10n_br/models/__init__.py b/addons/l10n_br/models/__init__.py
index 6cfaaa7a3ae..e29eb0b071d 100644
--- a/addons/l10n_br/models/__init__.py
+++ b/addons/l10n_br/models/__init__.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
diff --git a/addons/l10n_br/models/account.py b/addons/l10n_br/models/account.py
index e9f3111f742..b88cd4465e0 100644
--- a/addons/l10n_br/models/account.py
+++ b/addons/l10n_br/models/account.py
@@ -1,53 +1,38 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
-import openerp
-from openerp.osv import fields, osv
+from odoo import fields, models
-TAX_DEFAULTS = {
- 'base_reduction': 0,
- 'amount_mva': 0,
- 'amount_type': 'percent',
- }
-
-class account_tax_template(osv.osv):
+class AccountTaxTemplate(models.Model):
""" Add fields used to define some brazilian taxes """
_inherit = 'account.tax.template'
- _columns = {
- 'tax_discount': fields.boolean('Discount this Tax in Prince',
- help="Mark it for (ICMS, PIS e etc.)."),
- 'base_reduction': fields.float('Redution', required=True,
- digits=0,
- help="Um percentual decimal em % entre 0-1."),
- 'amount_mva': fields.float('MVA Percent', required=True,
- digits=0,
- help="Um percentual decimal em % entre 0-1."),
- 'amount_type': fields.selection([('group', 'Group of Taxes'),
- ('fixed', 'Fixed'),
- ('percent', 'Percentage of Price'),
- ('division', 'Percentage of Price Tax Included')],
- string="Tax Computation", required=True)
- }
- _defaults = TAX_DEFAULTS
+ tax_discount = fields.Boolean(string='Discount this Tax in Prince',
+ help="Mark it for (ICMS, PIS e etc.).")
+ base_reduction = fields.Float(string='Redution', digits=0, required=True,
+ help="Um percentual decimal em % entre 0-1.", default=0)
+ amount_mva = fields.Float(string='MVA Percent', digits=0, required=True,
+ help="Um percentual decimal em % entre 0-1.", default=0)
+ amount_type = fields.Selection([('group', 'Group of Taxes'),
+ ('fixed', 'Fixed'),
+ ('percent', 'Percentage of Price'),
+ ('division', 'Percentage of Price Tax Included')],
+ string='Tax Computation', required=True, default='percent')
+
-class account_tax(osv.osv):
+class AccountTax(models.Model):
""" Add fields used to define some brazilian taxes """
_inherit = 'account.tax'
- _columns = {
- 'tax_discount': fields.boolean('Discount this Tax in Prince',
- help="Mark it for (ICMS, PIS e etc.)."),
- 'base_reduction': fields.float('Redution', required=True,
- digits=0,
- help="Um percentual decimal em % entre 0-1."),
- 'amount_mva': fields.float('MVA Percent', required=True,
- digits=0,
- help="Um percentual decimal em % entre 0-1."),
- 'amount_type': fields.selection([('group', 'Group of Taxes'),
- ('fixed', 'Fixed'),
- ('percent', 'Percentage of Price'),
- ('division', 'Percentage of Price Tax Included')],
- string="Tax Computation", required=True)
- }
- _defaults = TAX_DEFAULTS
+ tax_discount = fields.Boolean(string='Discount this Tax in Prince',
+ help="Mark it for (ICMS, PIS e etc.).")
+ base_reduction = fields.Float(string='Redution', digits=0, required=True,
+ help="Um percentual decimal em % entre 0-1.", default=0)
+ amount_mva = fields.Float(string='MVA Percent', digits=0, required=True,
+ help="Um percentual decimal em % entre 0-1.", default=0)
+ amount_type = fields.Selection([('group', 'Group of Taxes'),
+ ('fixed', 'Fixed'),
+ ('percent', 'Percentage of Price'),
+ ('division', 'Percentage of Price Tax Included')],
+ string='Tax Computation', required=True, default='percent')
diff --git a/addons/l10n_br/views/account_view.xml b/addons/l10n_br/views/account_view.xml
index de7dad9d5cb..4e6783f2b55 100644
--- a/addons/l10n_br/views/account_view.xml
+++ b/addons/l10n_br/views/account_view.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data>
-
-
+<odoo>
<!-- Include fields created in account.tax and account.tax.template form views -->
<record model="ir.ui.view" id="view_l10n_br_account_tax_template_form">
<field name="name">l10n_br_account.tax.template.form</field>
@@ -33,7 +30,4 @@
</field>
</field>
</record>
-
- </data>
-</openerp>
-
+</odoo>