-
+
+
+
diff --git a/addons/account/report/account_partner_balance.py b/addons/account/report/account_partner_balance.py
index 8759f11a349..ab1c6f656f2 100644
--- a/addons/account/report/account_partner_balance.py
+++ b/addons/account/report/account_partner_balance.py
@@ -20,8 +20,7 @@
##############################################################################
import time
-import re
-import copy
+
from tools.translate import _
from report import report_sxw
from common_report_header import common_report_header
diff --git a/addons/account/report/account_print_overdue.py b/addons/account/report/account_print_overdue.py
index 2d2b8ed5f94..0a03801d409 100644
--- a/addons/account/report/account_print_overdue.py
+++ b/addons/account/report/account_print_overdue.py
@@ -20,8 +20,7 @@
##############################################################################
import time
-import ir
-from osv import osv
+
from report import report_sxw
import pooler
diff --git a/addons/account/report/account_profit_horizontal.rml b/addons/account/report/account_profit_horizontal.rml
index f92f9e07983..89cbc4f8502 100644
--- a/addons/account/report/account_profit_horizontal.rml
+++ b/addons/account/report/account_profit_horizontal.rml
@@ -199,7 +199,7 @@
Code
|
- Perticular
+ Particular
|
Balance
@@ -208,7 +208,7 @@
Code
|
- Perticular
+ Particular
|
Balance
@@ -250,19 +250,19 @@
|
- [[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or '' ]]
+ [[ final_result()['type'] == 'Net Profit' and final_result()['type'] or '' ]]
|
- [[ final_result()['balance'] and final_result()['type'] == 'Net Profit C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ company.currency_id.symbol ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Profit' and formatLang(abs(final_result()['balance'])) ]] [[ company.currency_id.symbol ]]
|
|
- [[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or '' ]]
+ [[ final_result()['type'] == 'Net Loss' and final_result()['type'] or '' ]]
|
- [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]
|
diff --git a/addons/account/report/account_profit_loss.py b/addons/account/report/account_profit_loss.py
index ea2f077f843..80dd10c91cc 100644
--- a/addons/account/report/account_profit_loss.py
+++ b/addons/account/report/account_profit_loss.py
@@ -22,6 +22,7 @@ import time
import pooler
from report import report_sxw
from common_report_header import common_report_header
+from tools.translate import _
class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
@@ -60,12 +61,12 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
return self.res_pl
def sum_dr(self):
- if self.res_pl['type'] == 'Net Profit C.F.B.L.':
+ if self.res_pl['type'] == _('Net Profit'):
self.result_sum_dr += self.res_pl['balance']
return self.result_sum_dr
def sum_cr(self):
- if self.res_pl['type'] == 'Net Loss C.F.B.L.':
+ if self.res_pl['type'] == _('Net Loss'):
self.result_sum_cr += self.res_pl['balance']
return self.result_sum_cr
@@ -112,10 +113,10 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
else:
accounts_temp.append(account)
if self.result_sum_dr > self.result_sum_cr:
- self.res_pl['type'] = 'Net Loss C.F.B.L.'
+ self.res_pl['type'] = _('Net Loss')
self.res_pl['balance'] = (self.result_sum_dr - self.result_sum_cr)
else:
- self.res_pl['type'] = 'Net Profit C.F.B.L.'
+ self.res_pl['type'] = _('Net Profit')
self.res_pl['balance'] = (self.result_sum_cr - self.result_sum_dr)
self.result[typ] = accounts_temp
cal_list[typ] = self.result[typ]
diff --git a/addons/account/report/account_profit_loss.rml b/addons/account/report/account_profit_loss.rml
index 2d85dc590e6..c371ab4c638 100644
--- a/addons/account/report/account_profit_loss.rml
+++ b/addons/account/report/account_profit_loss.rml
@@ -228,10 +228,10 @@
- [[ final_result()['type'] == 'Net Profit C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]
+ [[ final_result()['type'] == 'Net Profit' and final_result()['type'] or removeParentNode('blockTable') ]]
|
- [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]
|
@@ -283,10 +283,10 @@
- [[ final_result()['type'] == 'Net Loss C.F.B.L.' and final_result()['type'] or removeParentNode('blockTable') ]]
+ [[ final_result()['type'] == 'Net Loss' and final_result()['type'] or removeParentNode('blockTable') ]]
|
- [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss C.F.B.L.' and company.currency_id.symbol ]]
+ [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and formatLang(abs(final_result()['balance'])) ]] [[ final_result()['balance'] and final_result()['type'] == 'Net Loss' and company.currency_id.symbol ]]
|
diff --git a/addons/account/report/account_tax_code.py b/addons/account/report/account_tax_code.py
index 7d66a955fc8..32c395dec1a 100644
--- a/addons/account/report/account_tax_code.py
+++ b/addons/account/report/account_tax_code.py
@@ -21,8 +21,7 @@
##############################################################################
import time
-import pooler
-import copy
+
from report import report_sxw
import re
diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py
index c79139a56cc..0c824283512 100644
--- a/addons/account/report/account_tax_report.py
+++ b/addons/account/report/account_tax_report.py
@@ -20,53 +20,53 @@
##############################################################################
import time
-import copy
-from report import report_sxw
+
from common_report_header import common_report_header
+from report import report_sxw
class tax_report(report_sxw.rml_parse, common_report_header):
_name = 'report.account.vat.declaration'
- def __init__(self, cr, uid, name, context={}):
- super(tax_report, self).__init__(cr, uid, name, context=context)
- self.localcontext.update({
- 'time': time,
- 'get_account': self._get_account,
- 'get_period': self._get_period,
- 'get_codes': self._get_codes,
- 'get_general': self._get_general,
- 'get_company': self._get_company,
- 'get_currency': self._get_currency,
- 'get_lines': self._get_lines,
- 'get_years': self.get_years,
- })
+ def set_context(self, objects, data, ids, report_type=None):
+ new_ids = ids
+ res = {}
+ self.period_ids = []
+ period_obj = self.pool.get('account.period')
+ res['periods'] = ''
+ res['fiscalyear'] = data['form']['fiscalyear_id']
-
-# def _get_account(self, form):
-# if data['model']=='account.account':
-# return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
-# return super(tax_report ,self)._get_account(form)
-
-
- def get_years(self,form):
- res={}
- fiscal_year_name = self.pool.get('account.fiscalyear').name_get(self.cr,self.uid,form['fiscalyear_id'])
-
- if fiscal_year_name:
- res['fname'] = fiscal_year_name[0][1]
- res['periods'] = ''
- if form['periods']:
- periods_l = self.pool.get('account.period').read(self.cr, self.uid, form['periods'], ['name'])
+ if data['form']['period_from'] and data['form']['period_to']:
+ self.period_ids = period_obj.build_ctx_periods(self.cr, self.uid, data['form']['period_from'], data['form']['period_to'])
+ periods_l = period_obj.read(self.cr, self.uid, self.period_ids, ['name'])
for period in periods_l:
- if res['periods']=='':
+ if res['periods'] == '':
res['periods'] = period['name']
else:
res['periods'] += ", "+ period['name']
- return res
+ return super(tax_report, self).set_context(objects, data, new_ids, report_type=report_type)
- def _get_lines(self, based_on, period_list, company_id=False, parent=False, level=0, context={}):
+ def __init__(self, cr, uid, name, context=None):
+ super(tax_report, self).__init__(cr, uid, name, context=context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_codes': self._get_codes,
+ 'get_general': self._get_general,
+ 'get_currency': self._get_currency,
+ 'get_lines': self._get_lines,
+ 'get_fiscalyear': self._get_fiscalyear,
+ 'get_account': self._get_account,
+ 'get_start_period': self.get_start_period,
+ 'get_end_period': self.get_end_period,
+ 'get_basedon': self._get_basedon,
+ })
+
+
+ def _get_basedon(self, form):
+ return form['form']['based_on']
+
+ def _get_lines(self, based_on, company_id=False, parent=False, level=0, context=None):
+ period_list = self.period_ids
res = self._get_codes(based_on, company_id, parent, level, period_list, context=context)
-
if period_list:
res = self._add_codes(based_on, res, period_list, context=context)
else:
@@ -103,13 +103,9 @@ class tax_report(report_sxw.rml_parse, common_report_header):
ind_general+=1
i+=1
return top_result
- #return array_result
- def _get_period(self, period_id, context={}):
- return self.pool.get('account.period').browse(self.cr, self.uid, period_id, context=context).name
-
- def _get_general(self, tax_code_id, period_list,company_id, based_on, context={}):
- res=[]
+ def _get_general(self, tax_code_id, period_list, company_id, based_on, context=None):
+ res = []
obj_account = self.pool.get('account.account')
periods_ids = tuple(period_list)
if based_on == 'payments':
@@ -162,7 +158,7 @@ class tax_report(report_sxw.rml_parse, common_report_header):
i+=1
return res
- def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context={}):
+ def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None):
obj_tc = self.pool.get('account.tax.code')
ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], context=context)
@@ -173,7 +169,7 @@ class tax_report(report_sxw.rml_parse, common_report_header):
res += self._get_codes(based_on, company_id, code.id, level+1, context=context)
return res
- def _add_codes(self, based_on, account_list=[], period_list=[], context={}):
+ def _add_codes(self, based_on, account_list=[], period_list=[], context=None):
res = []
obj_tc = self.pool.get('account.tax.code')
for account in account_list:
@@ -188,16 +184,10 @@ class tax_report(report_sxw.rml_parse, common_report_header):
res.append((account[0], code))
return res
+ def _get_currency(self, form, context=None):
+ return self.pool.get('res.company').browse(self.cr, self.uid, form['company_id'], context=context).currency_id.name
- def _get_company(self, form, context={}):
- obj_company = self.pool.get('res.company')
- return obj_company.browse(self.cr, self.uid, form['company_id'], context=context).name
-
- def _get_currency(self, form, context={}):
- obj_company = self.pool.get('res.company')
- return obj_company.browse(self.cr, self.uid, form['company_id'], context=context).currency_id.name
-
- def sort_result(self, accounts, context={}):
+ def sort_result(self, accounts, context=None):
# On boucle sur notre rapport
result_accounts = []
ind=0
@@ -240,4 +230,4 @@ class tax_report(report_sxw.rml_parse, common_report_header):
report_sxw.report_sxw('report.account.vat.declaration', 'account.tax.code',
'addons/account/report/account_tax_report.rml', parser=tax_report, header="internal")
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account/report/account_tax_report.rml b/addons/account/report/account_tax_report.rml
index 52f19147ef2..41790ea6f07 100644
--- a/addons/account/report/account_tax_report.rml
+++ b/addons/account/report/account_tax_report.rml
@@ -2,7 +2,34 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ company.name ]]
+ Tax Report
+
+
+
+ [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]
+ Page
+
+
+
+
+ 1cm 27.7cm 20cm 27.7cm
+
+
+
@@ -10,191 +37,151 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+ Tax Statement
+
+
- |
- Tax Report
- |
+ Chart of Tax |
+ Fiscal Year |
+ Periods |
+ Based On |
-
-
-
-
-
-
- |
- Chart of Account
- |
-
- Compute Method
- |
-
- Periods
- |
-
- Printing Date
- |
-
-
-
-
- |
- [[ get_account(data) or removeParentNode('para') ]]
- |
-
- [[data['form']['based_on'] ]]
- |
-
- [[ get_years(data['form'])['periods'] or removeParentNode('para')]]
- |
-
- [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S')]]
- |
-
-
-
-
-
-
-
-
-
-
- |
- Tax Name
- |
-
- Debit
- |
-
- Credit
- |
-
- Tax Amount
- |
-
-
-
-
-
-
- [[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]]
-
-
- |
- [[ '...'*len(o['level']) ]] [[o['type']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))]] [[ o['code'] ]] [[ o['name'] ]]
- |
-
- [[ len(o['level'])==2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]] [[ formatLang(o['debit']) ]]
- |
-
- [[ len(o['level'])==2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]] [[ formatLang(o['credit'])]]
- |
-
- [[ len(o['level'])==2 and setTag('para','para',{'fontName':"Helvetica-Bold"}) ]] [[ formatLang(o['tax_amount']) ]]
- |
-
-
-
-
-
-
-
-
-
+
+ | [[ get_account(data) or removeParentNode('para') ]] |
+ [[ get_fiscalyear(data) or '' ]] |
+
+
+
+ | Start Period |
+ End Period |
+
+
+ | [[ get_start_period(data) or '' ]] |
+ [[ get_end_period(data) or '' ]] |
+
+
+ |
+ [[ get_basedon(data) or '' ]] |
+
+
+
+
+
+ | Tax Name |
+ Debit |
+ Credit |
+ Tax Amount |
+
+
+ | [[ repeatIn(get_lines(data['form']['based_on'], data['form']['company_id']), 'o') ]][[ (o['level']) ]] [[ (len(o['level'])<5 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ o['code'] ]] [[ o['name'] ]] |
+ [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] |
+ [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]] |
+ [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]] |
+
+
diff --git a/addons/account/test/account_cash_statement.yml b/addons/account/test/account_cash_statement.yml
index 0932e214560..03d0d54db83 100644
--- a/addons/account/test/account_cash_statement.yml
+++ b/addons/account/test/account_cash_statement.yml
@@ -1,5 +1,5 @@
-
- In order to test Cash statement I create a Cash statement and and confirm it and check it's move created
+ In order to test Cash statement I create a Cash statement and confirm it and check it's move created
-
!record {model: account.bank.statement, id: account_bank_statement_1}:
date: '2010-10-16'
@@ -13,9 +13,9 @@
subtotal: 20.0
- pieces: 100.0
number: 1
- subtotal: 200.0
- balance_start: 220.0
- balance_end: 220.0
+ subtotal: 100.0
+ balance_start: 120.0
+ balance_end: 120.0
-
I check that Initially bank statement is in the "Draft" state
-
@@ -46,18 +46,18 @@
partner_id: base.res_partner_4
sequence: 0.0
type: general
- balance_end: 1220.0
+ balance_end: 1120.0
ending_details_ids:
- pieces: 10.0
number: 2
subtotal: 20.0
- pieces: 100.0
number: 1
- subtotal: 200.0
+ subtotal: 100.0
- pieces: 500.0
number: 2
subtotal: 1000.0
- balance_end_cash: 1220.0
+ balance_end_cash: 1120.0
-
I clicked on Close CashBox button to close the cashbox
diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml
index 26888cc69c1..c780bf94682 100644
--- a/addons/account/test/account_report.yml
+++ b/addons/account/test/account_report.yml
@@ -1,9 +1,22 @@
+-
+ In order to test the PDF reports defined on an invoice, we will create a Invoice Record
+-
+ !record {model: account.invoice, id: test_invoice_1}:
+ currency_id: base.EUR
+ company_id: base.main_company
+ address_invoice_id: base.res_partner_address_tang
+ partner_id: base.res_partner_asus
+ state: draft
+ type: out_invoice
+ account_id: account.a_recv
+ name: Test invoice 1
+ address_contact_id: base.res_partner_address_tang
-
In order to test the PDF reports defined on an invoice, we will print an Invoice Report
-
!python {model: account.invoice}: |
import netsvc, tools, os
- (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
+ (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data)
@@ -56,7 +69,7 @@
-
!python {model: account.invoice}: |
import netsvc, tools, os
- (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
+ (data, format) = netsvc.LocalService('report.account.invoice').create(cr, uid, [ref('test_invoice_1')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data)
diff --git a/addons/account/wizard/account_chart.py b/addons/account/wizard/account_chart.py
index b87c11f02f3..fdf684b2522 100644
--- a/addons/account/wizard/account_chart.py
+++ b/addons/account/wizard/account_chart.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import time
from osv import fields, osv
class account_chart(osv.osv_memory):
diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py
index 0c866853594..4adc25a049d 100644
--- a/addons/account/wizard/account_invoice_refund.py
+++ b/addons/account/wizard/account_invoice_refund.py
@@ -36,7 +36,7 @@ class account_invoice_refund(osv.osv_memory):
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the refund invoice that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Description', size=128, required=True),
- 'filter_refund': fields.selection([('modify', 'Modify'), ('refund', 'Refund'), ('cancel', 'Cancel')], "Refund Type", required=True, help='Refund invoice base on this type. You can not Modify and Cancel if the invoice is already rencociled'),
+ 'filter_refund': fields.selection([('modify', 'Modify'), ('refund', 'Refund'), ('cancel', 'Cancel')], "Refund Type", required=True, help='Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):
@@ -179,7 +179,6 @@ class account_invoice_refund(osv.osv_memory):
invoice_lines = inv_obj._refund_cleanup_lines(cr, uid, invoice_lines)
tax_lines = inv_tax_obj.read(cr, uid, invoice['tax_line'], context=context)
tax_lines = inv_obj._refund_cleanup_lines(cr, uid, tax_lines)
-
invoice.update({
'type': inv.type,
'date_invoice': date,
@@ -190,33 +189,32 @@ class account_invoice_refund(osv.osv_memory):
'period_id': period,
'name': description
})
-
for field in ('address_contact_id', 'address_invoice_id', 'partner_id',
'account_id', 'currency_id', 'payment_term', 'journal_id'):
invoice[field] = invoice[field] and invoice[field][0]
-
inv_id = inv_obj.create(cr, uid, invoice, {})
if inv.payment_term.id:
data = inv_obj.onchange_payment_term_date_invoice(cr, uid, [inv_id], inv.payment_term.id, date)
if 'value' in data and data['value']:
inv_obj.write(cr, uid, [inv_id], data['value'])
created_inv.append(inv_id)
-
if inv.type in ('out_invoice', 'out_refund'):
xml_id = 'action_invoice_tree3'
else:
xml_id = 'action_invoice_tree4'
-
result = mod_obj._get_id(cr, uid, 'account', xml_id)
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)['res_id']
result = act_obj.read(cr, uid, id, context=context)
- result['res_id'] = created_inv
+ invoice_domain = eval(result['domain'])
+ invoice_domain.append(('id', 'in', created_inv))
+ result['domain'] = invoice_domain
return result
def invoice_refund(self, cr, uid, ids, context=None):
data_refund = self.read(cr, uid, ids, [],context=context)[0]['filter_refund']
return self.compute_refund(cr, uid, ids, data_refund, context=context)
+
account_invoice_refund()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py
index 5756fed4264..7f64f52c100 100644
--- a/addons/account/wizard/account_move_journal.py
+++ b/addons/account/wizard/account_move_journal.py
@@ -19,6 +19,8 @@
#
##############################################################################
+from lxml import etree
+
from osv import osv
from tools.translate import _
import tools
@@ -103,8 +105,11 @@ class account_move_journal(osv.osv_memory):
""" % (tools.ustr(journal), tools.ustr(period))
+ view = etree.fromstring(view.encode('utf8'))
+ xarch, xfields = self._view_look_dom_arch(cr, uid, view, view_id, context=context)
+ view = xarch
res.update({
- 'arch':view
+ 'arch': view
})
return res
diff --git a/addons/account/wizard/account_move_line_select.py b/addons/account/wizard/account_move_line_select.py
index 86345703f6f..556a688f867 100644
--- a/addons/account/wizard/account_move_line_select.py
+++ b/addons/account/wizard/account_move_line_select.py
@@ -19,8 +19,7 @@
#
##############################################################################
-from osv import fields, osv
-from tools.translate import _
+from osv import osv
class account_move_line_select(osv.osv_memory):
"""
diff --git a/addons/account/wizard/account_move_line_unreconcile_select.py b/addons/account/wizard/account_move_line_unreconcile_select.py
index c445828d0ae..826a5a654b1 100644
--- a/addons/account/wizard/account_move_line_unreconcile_select.py
+++ b/addons/account/wizard/account_move_line_unreconcile_select.py
@@ -20,8 +20,6 @@
##############################################################################
from osv import fields, osv
-from tools.translate import _
-import tools
class account_move_line_unreconcile_select(osv.osv_memory):
_name = "account.move.line.unreconcile.select"
diff --git a/addons/account/wizard/account_state_open.py b/addons/account/wizard/account_state_open.py
index 4703ea18c61..2a03a80aefa 100644
--- a/addons/account/wizard/account_state_open.py
+++ b/addons/account/wizard/account_state_open.py
@@ -18,7 +18,7 @@
# along with this program. If not, see