Merge lp:~anybox/account-analytic/decimal_precision into lp:account-analytic/6.1

Proposed by Georges Racinet on 2012-12-21
Status: Merged
Merged at revision: 12
Proposed branch: lp:~anybox/account-analytic/decimal_precision
Merge into: lp:account-analytic/6.1
Diff against target: 27 lines (+3/-2)
1 file modified
analytic_multicurrency/account_analytic_line.py (+3/-2)
To merge this branch: bzr merge lp:~anybox/account-analytic/decimal_precision
Reviewer Review Type Date Requested Status
Joël Grand-Guillaume @ camptocamp 2012-12-21 Approve on 2012-12-21
Review via email: mp+141041@code.launchpad.net

Description of the change

Branch made to fix the problem in tests (which it does) by switching to the now standard decimal_precision.

Not tested in real life, though.

To post a comment you must log in.

Hi Georges,

Thanks for the contrib. It' looks good to me, though we should use : import openerp.addons.decimal_precision as dp now.

I merge it.

Have a nice Christmas,

Joël

review: Approve
Georges Racinet (gracinet) wrote :

Thanks, and import idiom noted !

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'analytic_multicurrency/account_analytic_line.py'
2--- analytic_multicurrency/account_analytic_line.py 2011-08-12 13:27:15 +0000
3+++ analytic_multicurrency/account_analytic_line.py 2012-12-21 09:42:21 +0000
4@@ -35,6 +35,7 @@
5 from tools.translate import _
6
7 from tools import config
8+import decimal_precision as dp
9
10 class account_analytic_line(osv.osv):
11 _inherit = 'account.analytic.line'
12@@ -82,7 +83,7 @@
13 'account.analytic.line': (lambda self,cr,uid,ids,c={}: ids, ['amount','unit_amount','product_uom_id'],10),
14 },
15 help="The related analytic account currency."),
16- 'aa_amount_currency': fields.function(_amount_currency, method=True, digits=(16, int(config['price_accuracy'])), string='Amount currency',
17+ 'aa_amount_currency': fields.function(_amount_currency, method=True, digits_compute=dp.get_precision('Account'), string='Amount currency',
18 store={
19 'account.analytic.account': (_get_account_line, ['currency_id','company_id'], 50),
20 'account.analytic.line': (lambda self,cr,uid,ids,c={}: ids, ['amount','unit_amount','product_uom_id'],10),
21@@ -103,4 +104,4 @@
22 return res
23
24
25-account_analytic_line()
26\ No newline at end of file
27+account_analytic_line()

Subscribers

People subscribed via source and target branches

to status/vote changes: