Merge lp:~openerp-dev/openobject-addons/trunk-bug-1081073-kbh into lp:openobject-addons

Proposed by Khushboo Bhatt(openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1081073-kbh
Merge into: lp:openobject-addons
Diff against target: 16 lines (+7/-0)
1 file modified
account/account.py (+7/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1081073-kbh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+137484@code.launchpad.net

Description of the change

Hello,

 added copy method to duplicate tax.

Thanks,
khushboo.

To post a comment you must log in.
8185. By Cedric Snauwaert (OpenERP)

[MERGE]merge with latest addons

Unmerged revisions

8185. By Cedric Snauwaert (OpenERP)

[MERGE]merge with latest addons

8184. By Khushboo Bhatt(openerp)

[IMP]account:copy method to copy tax

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2012-12-09 19:43:52 +0000
3+++ account/account.py 2012-12-14 12:56:30 +0000
4@@ -1932,6 +1932,13 @@
5 vals.update({'amount': 0.0})
6 return super(account_tax, self).write(cr, uid, ids, vals, context=context)
7
8+ def copy(self, cr, uid, id, default=None, context=None):
9+ if default is None:
10+ default = {}
11+ tax = self.browse(cr, uid, id, context=context)
12+ default.update({'name': (tax['name'] ) + ' (copy)'})
13+ return super(account_tax, self).copy(cr, uid, id, default, context=context)
14+
15 def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
16 journal_pool = self.pool.get('account.journal')
17

Subscribers

People subscribed via source and target branches

to all changes: