Merge lp:~sebastien.beau/openobject-addons/openobject-addons-account-duplicate-tax into lp:openobject-addons/6.1

Proposed by Sébastien BEAU - http://www.akretion.com
Status: Needs review
Proposed branch: lp:~sebastien.beau/openobject-addons/openobject-addons-account-duplicate-tax
Merge into: lp:openobject-addons/6.1
Diff against target: 19 lines (+9/-0)
1 file modified
account/account.py (+9/-0)
To merge this branch: bzr merge lp:~sebastien.beau/openobject-addons/openobject-addons-account-duplicate-tax
Reviewer Review Type Date Requested Status
qdp (OpenERP) Pending
OpenERP Core Team Pending
Review via email: mp+117897@code.launchpad.net

Description of the change

Fix this bug : https://bugs.launchpad.net/openobject-addons/+bug/1032196

If you try to duplicate an existing tax using the button 'duplicate' on the form view, OpenERP will raise an error.

Thanks for merging it.

To post a comment you must log in.

Unmerged revisions

6807. By Sébastien BEAU - http://www.akretion.com

[FIX] account : fix an error when trying to duplicate a tax

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account.py'
--- account/account.py 2012-07-23 09:09:44 +0000
+++ account/account.py 2012-08-02 14:10:29 +0000
@@ -1852,6 +1852,15 @@
1852 Ex: result=round(price_unit*0.21,4)1852 Ex: result=round(price_unit*0.21,4)
1853 """1853 """
18541854
1855
1856 def copy(self, cr, uid, id, default=None, context=None):
1857 if not default:
1858 default = {}
1859 tax = self.browse(cr, uid, id, context=context)
1860 default['name'] = tax['name'] + ' (copy)'
1861 return super(account_tax, self).copy(cr, uid, id, default=default, context=context)
1862
1863
1855 def get_precision_tax():1864 def get_precision_tax():
1856 def change_digit_tax(cr):1865 def change_digit_tax(cr):
1857 res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, 'Account')1866 res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, 'Account')