diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
index e68a17b2123..87bfbf525c5 100644
--- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
+++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
@@ -18,10 +18,10 @@
# along with this program. If not, see .
#
##############################################################################
-
import time
import datetime
import base64
+
from osv import osv, fields
from tools.translate import _
@@ -33,8 +33,8 @@ class l10n_be_vat_declaration(osv.osv_memory):
_columns = {
'period_id': fields.many2one('account.period','Period', required=True),
'msg': fields.text('File created', size=64, readonly=True),
- 'file_save' : fields.binary('Save File'),
- }
+ 'file_save': fields.binary('Save File'),
+ }
_defaults = {
'msg': lambda *a:'''Save the File with '".xml"' extension.''',
@@ -66,8 +66,6 @@ class l10n_be_vat_declaration(osv.osv_memory):
address = post_code = city = ''
city, post_code, address = obj_comp._get_default_ad(obj_company.partner_id.address)
-
-
year_id = obj_fyear.find(cr, uid)
account_period = obj_acc_period.browse(cr, uid, data['period_id'], context=context)
@@ -98,7 +96,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
for item in tax_info:
if item['code']:
if item['code'] == '71-72':
- item['code']='71'
+ item['code'] = '71'
if item['code'] in list_of_tags:
data_of_file +='\n\t\t\t\t' + str(int(item['sum_period']*100)) + ''
@@ -107,7 +105,6 @@ class l10n_be_vat_declaration(osv.osv_memory):
self.write(cr, uid, ids, {'file_save':data['file_save']}, context=context)
return True
-
l10n_be_vat_declaration()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/l10n_be/wizard/l10n_be_vat_intra.py b/addons/l10n_be/wizard/l10n_be_vat_intra.py
index 437cea03b5a..a5617e21017 100644
--- a/addons/l10n_be/wizard/l10n_be_vat_intra.py
+++ b/addons/l10n_be/wizard/l10n_be_vat_intra.py
@@ -18,26 +18,24 @@
# along with this program. If not, see .
#
##############################################################################
-
-from osv import osv, fields
import time
import datetime
import base64
+from osv import osv, fields
class partner_vat_intra(osv.osv_memory):
""" Partner Vat Intra"""
_name = "partner.vat.intra"
+ _description = 'Partner VAT Intra'
def _get_europe_country(self, cursor, user, context={}):
obj_country = self.pool.get('res.country')
- country_ids = obj_country.search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])
- return country_ids
+ return obj_country.search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])
_columns = {
- 'trimester': fields.selection(
- [('1','Jan/Feb/Mar'),
+ 'trimester': fields.selection( [('1','Jan/Feb/Mar'),
('2','Apr/May/Jun'),
('3','Jul/Aug/Sep'),
('4','Oct/Nov/Dec')],
@@ -48,13 +46,13 @@ class partner_vat_intra(osv.osv_memory):
'msg': fields.text('File created', size=64, readonly=True),
'file_save' : fields.binary('Save File', readonly=True),
'country_ids': fields.many2many('res.country', 'vat_country_rel', 'vat_id', 'country_id', 'European Countries'),
- }
+ }
_defaults = {
'country_ids': _get_europe_country,
}
- def create_xml(self, cursor, user, ids, context):
+ def create_xml(self, cursor, user, ids, context={}):
obj_user = self.pool.get('res.users')
obj_fyear = self.pool.get('account.fiscalyear')
obj_sequence = self.pool.get('ir.sequence')