mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] minor fixes
This commit is contained in:
@@ -20,8 +20,8 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
from tools.translate import _
|
from openerp.tools.translate import _
|
||||||
import re
|
import re
|
||||||
|
|
||||||
class account_document_template(osv.osv):
|
class account_document_template(osv.osv):
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
from tools.translate import _
|
from openerp.tools.translate import _
|
||||||
|
|
||||||
class account_move_template(osv.osv):
|
class account_move_template(osv.osv):
|
||||||
|
|
||||||
@@ -55,7 +55,10 @@ class account_move_template(osv.osv):
|
|||||||
else:
|
else:
|
||||||
return len(journal_ids)==1
|
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()
|
account_move_template()
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from osv import fields,osv
|
from openerp.osv import fields,osv
|
||||||
import time
|
import time
|
||||||
from tools.translate import _
|
from openerp.tools.translate import _
|
||||||
|
|
||||||
class wizard_select_template(osv.osv_memory):
|
class wizard_select_template(osv.osv_memory):
|
||||||
|
|
||||||
@@ -132,7 +132,9 @@ class wizard_select_template(osv.osv_memory):
|
|||||||
analytic_account_id = False
|
analytic_account_id = False
|
||||||
if line.analytic_account_id:
|
if line.analytic_account_id:
|
||||||
if not line.journal_id.analytic_journal_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
|
analytic_account_id = line.analytic_account_id.id
|
||||||
val = {
|
val = {
|
||||||
'name': line.name,
|
'name': line.name,
|
||||||
@@ -160,7 +162,9 @@ class wizard_select_template(osv.osv_memory):
|
|||||||
analytic_account_id = False
|
analytic_account_id = False
|
||||||
if line.analytic_account_id:
|
if line.analytic_account_id:
|
||||||
if not line.journal_id.analytic_journal_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
|
analytic_account_id = line.analytic_account_id.id
|
||||||
val = {
|
val = {
|
||||||
'name': 'transitory',
|
'name': 'transitory',
|
||||||
|
|||||||
Reference in New Issue
Block a user