Merge lp:~openerp-dev/openobject-addons/trunk-bug-740596-ara into lp:openobject-addons

Proposed by Ashvin Rathod (OpenERP)
Status: Merged
Merged at revision: 4706
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-740596-ara
Merge into: lp:openobject-addons
Diff against target: 28 lines (+5/-2)
2 files modified
account/account.py (+1/-1)
account/data/account_data2.xml (+4/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-740596-ara
Reviewer Review Type Date Requested Status
Mustufa Rangwala (Open ERP) (community) Approve
Ashvin Rathod (OpenERP) (community) Needs Resubmitting
qdp (OpenERP) Pending
Review via email: mp+54830@code.launchpad.net

Description of the change

Hello,

FIX: #740596 payment term line need at least 5 to 6 digits precision

Thanks,
ara

To post a comment you must log in.
Revision history for this message
xrg (xrg) wrote :

On Friday 25 March 2011, you wrote:
> Ashvin Rathod (OpenERP) has proposed merging
> lp:~openerp-dev/openobject-addons/trunk-bug-740596-ara into
> lp:openobject-addons.
>

There is something I don't like there: Aren't all these precision settings
supposed to be configurable through the "decimal_precision"?
Is it correct to hard-code values there?

--
Say NO to spam and viruses. Stop using Microsoft Windows!

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

I agree with xrg we can not have hard coded values for precision.

review: Needs Fixing
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello,

I have changed as per xrg suggestion.

Thank you,
ara

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve

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 2011-04-19 10:45:57 +0000
3+++ account/account.py 2011-04-27 07:07:18 +0000
4@@ -102,7 +102,7 @@
5 ('fixed', 'Fixed Amount')], 'Valuation',
6 required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be threated."""),
7
8- 'value_amount': fields.float('Value Amount', help="For Value percent enter % ratio between 0-1."),
9+ 'value_amount': fields.float('Value Amount', digits_compute=dp.get_precision('Payment Term'), help="For Value percent enter % ratio between 0-1."),
10 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
11 "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
12 'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
13
14=== modified file 'account/data/account_data2.xml'
15--- account/data/account_data2.xml 2011-02-03 10:16:30 +0000
16+++ account/data/account_data2.xml 2011-04-27 07:07:18 +0000
17@@ -21,7 +21,10 @@
18 <field eval="-1" name="days2"/>
19 <field eval="account_payment_term" name="payment_id"/>
20 </record>
21-
22+ <record forcecreate="True" id="decimal_payment" model="decimal.precision">
23+ <field name="name">Payment Term</field>
24+ <field name="digits">6</field>
25+ </record>
26 <!--
27 Account Journal View
28 -->

Subscribers

People subscribed via source and target branches

to all changes: