Merge lp:~numerigraphe/openobject-addons/6.0-product-weight-accuracy into lp:openobject-addons/6.0

Proposed by Numérigraphe
Status: Needs review
Proposed branch: lp:~numerigraphe/openobject-addons/6.0-product-weight-accuracy
Merge into: lp:openobject-addons/6.0
Diff against target: 29 lines (+4/-4)
2 files modified
product/product.py (+2/-2)
product/product_view.xml (+2/-2)
To merge this branch: bzr merge lp:~numerigraphe/openobject-addons/6.0-product-weight-accuracy
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+90839@code.launchpad.net

Description of the change

Backport of a fix from lp:~openerp-dev/openobject-addons/trunk-bug-794817-mma : use decimal config in weights

To post a comment you must log in.

Unmerged revisions

4947. By Mayur Maheshwari(OpenERP)

[IMP]product:Remove a digits in view file

4946. By Mayur Maheshwari(OpenERP)

[FIX]product:putting a decimal_precision In weight and net weight Field

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'product/product.py'
2--- product/product.py 2011-09-05 10:26:44 +0000
3+++ product/product.py 2012-01-31 09:37:25 +0000
4@@ -275,8 +275,8 @@
5 'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Sale Price'), help="Base price for computing the customer price. Sometimes called the catalog price."),
6 'standard_price': fields.float('Cost Price', required=True, digits_compute=dp.get_precision('Purchase Price'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price."),
7 'volume': fields.float('Volume', help="The volume in m3."),
8- 'weight': fields.float('Gross weight', help="The gross weight in Kg."),
9- 'weight_net': fields.float('Net weight', help="The net weight in Kg."),
10+ 'weight': fields.float('Gross weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
11+ 'weight_net': fields.float('Net weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
12 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
13 help="Standard Price: the cost price is fixed and recomputed periodically (usually at the end of the year), Average Price: the cost price is recomputed at each reception of products."),
14 'warranty': fields.float('Warranty (months)'),
15
16=== modified file 'product/product_view.xml'
17--- product/product_view.xml 2011-04-26 14:33:13 +0000
18+++ product/product_view.xml 2012-01-31 09:37:25 +0000
19@@ -103,8 +103,8 @@
20 <group colspan="2" col="2" groups="base.group_extended">
21 <separator string="Weights" colspan="2"/>
22 <field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
23- <field digits="(14, 3)" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
24- <field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
25+ <field name="weight" attrs="{'readonly':[('type','=','service')]}"/>
26+ <field name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
27 </group>
28
29 <group colspan="2" col="2" name="status" groups="base.group_extended">