summaryrefslogtreecommitdiff
path: root/addons/analytic
diff options
context:
space:
mode:
authorAntonin Bourguignon <abo@openerp.com>2012-09-21 15:14:24 +0200
committerAntonin Bourguignon <abo@openerp.com>2012-09-21 15:14:24 +0200
commitc3a346fed03ef417e87e7e2233fa307c04652ebd (patch)
tree502768eabcd1d08b3d7f163f8534e3a2b7aabd7e /addons/analytic
parent3a83c2903d6f33b49052af446c48c1bdecdb6a3d (diff)
[IMP] skip a verification on a mandatory field and add l10n support for 'copy'
since the analytic account's name is mandatory, it's not necessary to check whether or not it's empty bzr revid: abo@openerp.com-20120921131424-92c5vsz3s5kzog8i
Diffstat (limited to 'addons/analytic')
-rw-r--r--addons/analytic/analytic.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index ca475fafc3d..d3a22782a68 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -140,7 +140,7 @@ class account_analytic_account(osv.osv):
'name': fields.char('Account/Contract Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
'code': fields.char('Reference', size=24, select=True),
- 'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Project')], 'Type of Account', required=True,
+ 'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Project')], 'Type of Account', required=True,
help="If you select the View Type, it means you won\'t allow to create journal entries using that account.\n"\
"The type 'Analytic account' stands for usual accounts that you only want to use in accounting.\n"\
"If you select Contract or Project, it offers you the possibility to manage the validity and the invoicing options for this account.\n"\
@@ -168,7 +168,7 @@ class account_analytic_account(osv.osv):
'res.company': (_get_analytic_account, ['currency_id'], 10),
}, string='Currency', type='many2one', relation='res.currency'),
}
-
+
def on_change_template(self, cr, uid, ids, template_id, context=None):
if not template_id:
return {}
@@ -179,7 +179,7 @@ class account_analytic_account(osv.osv):
res['value']['quantity_max'] = template.quantity_max
res['value']['description'] = template.description
return res
-
+
def on_change_partner_id(self, cr, uid, ids,partner_id, name, context={}):
res={}
if partner_id:
@@ -225,7 +225,7 @@ class account_analytic_account(osv.osv):
analytic = self.browse(cr, uid, id, context=context)
default['code'] = False
default['line_ids'] = []
- default['name'] = (analytic['name'] or '') + '(copy)'
+ default['name'] = analytic['name'] + ' (' + _('copy') + ')'
return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
def on_change_company(self, cr, uid, id, company_id):