Amit Parik (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-707359-amp into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #707359 in OpenERP Addons: "[trunk] Analytic account: duplication "copy 
of""
  https://bugs.launchpad.net/openobject-addons/+bug/707359

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-707359-amp/+merge/119313

Hello,

Improved the Analytic Account 's copy method. Name will be add a 'copy' after 
this fix.

Thank you!
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-707359-amp/+merge/119313
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-707359-amp.
=== modified file 'analytic/analytic.py'
--- analytic/analytic.py	2012-08-07 11:31:37 +0000
+++ analytic/analytic.py	2012-08-13 08:45:27 +0000
@@ -238,8 +238,10 @@
     def copy(self, cr, uid, id, default=None, context=None):
         if not default:
             default = {}
+        analytic = self.browse(cr, uid, id, context=context)
         default['code'] = False
         default['line_ids'] = []
+        default['name'] = (analytic['name'] or '') + '(copy)'
         return super(account_analytic_account, self).copy(cr, uid, id, default, context=context)
 
     def on_change_company(self, cr, uid, id, company_id):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to