Khushboo Bhatt(openerp) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1081073-kbh into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1081073 in OpenERP Addons: "6.1, 7.0 can not copy tax "
  https://bugs.launchpad.net/openobject-addons/+bug/1081073

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1081073-kbh/+merge/137484

Hello,

 added copy method to duplicate tax.

Thanks,
khushboo.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1081073-kbh/+merge/137484
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1081073-kbh.
=== modified file 'account/account.py'
--- account/account.py	2012-12-02 17:26:51 +0000
+++ account/account.py	2012-12-03 06:17:29 +0000
@@ -1931,6 +1931,13 @@
             vals.update({'amount': 0.0})
         return super(account_tax, self).write(cr, uid, ids, vals, context=context)
 
+    def copy(self, cr, uid, id, default=None, context=None):
+        if default is None:
+            default = {}
+        tax = self.browse(cr, uid, id, context=context)
+        default.update({'name': (tax['name'] ) + ' (copy)'})
+        return super(account_tax, self).copy(cr, uid, id, default, context=context)
+
     def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
         journal_pool = self.pool.get('account.journal')
 

_______________________________________________
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