diff --git a/account_move_template/account_document_template.py b/account_move_template/account_document_template.py index 0a035ed7f..cdbfe18b1 100644 --- a/account_move_template/account_document_template.py +++ b/account_move_template/account_document_template.py @@ -20,8 +20,8 @@ # ############################################################################## -from osv import fields, osv -from tools.translate import _ +from openerp.osv import fields, osv +from openerp.tools.translate import _ import re class account_document_template(osv.osv): diff --git a/account_move_template/account_move_template.py b/account_move_template/account_move_template.py index fff164f9e..9722c7a79 100644 --- a/account_move_template/account_move_template.py +++ b/account_move_template/account_move_template.py @@ -20,8 +20,8 @@ # ############################################################################## -from osv import fields, osv -from tools.translate import _ +from openerp.osv import fields, osv +from openerp.tools.translate import _ class account_move_template(osv.osv): @@ -55,7 +55,10 @@ class account_move_template(osv.osv): else: return len(journal_ids)==1 - _constraints = [(_check_different_journal,'If the template is "cross-journals", the Journals must be different, if the template does not "cross-journals" the Journals must be the same!',['journal_id'])] + _constraints = [(_check_different_journal, + 'If the template is "cross-journals", the Journals must be different,' \ + 'if the template does not "cross-journals" the Journals must be the same!', + ['journal_id'])] account_move_template() diff --git a/account_move_template/wizard/select_template.py b/account_move_template/wizard/select_template.py index 3e03671bc..792b7953f 100644 --- a/account_move_template/wizard/select_template.py +++ b/account_move_template/wizard/select_template.py @@ -20,9 +20,9 @@ # ############################################################################## -from osv import fields,osv +from openerp.osv import fields,osv import time -from tools.translate import _ +from openerp.tools.translate import _ class wizard_select_template(osv.osv_memory): @@ -132,7 +132,9 @@ class wizard_select_template(osv.osv_memory): analytic_account_id = False if line.analytic_account_id: if not line.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (line.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal !'), + _("You have to define an analytic journal on the '%s' journal!") + % (line.journal_id.name,)) analytic_account_id = line.analytic_account_id.id val = { 'name': line.name, @@ -160,7 +162,9 @@ class wizard_select_template(osv.osv_memory): analytic_account_id = False if line.analytic_account_id: if not line.journal_id.analytic_journal_id: - raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (wizard.template_id.journal_id.name,)) + raise osv.except_osv(_('No Analytic Journal !'), + _("You have to define an analytic journal on the '%s' journal!") + % (wizard.template_id.journal_id.name,)) analytic_account_id = line.analytic_account_id.id val = { 'name': 'transitory',