Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-927550-mma into
lp:openobject-addons.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
Related bugs:
Bug #927550 in OpenERP Addons: "Delays should use decimal precision "Shipping
Delay""
https://bugs.launchpad.net/openobject-addons/+bug/927550
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-927550-mma/+merge/91766
Hello,
product,sale: set decimal precision Shipping Delay in all delay fields
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-927550-mma/+merge/91766
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-927550-mma.
=== modified file 'product/product.py'
--- product/product.py 2012-01-31 13:36:57 +0000
+++ product/product.py 2012-02-07 06:26:20 +0000
@@ -292,8 +292,8 @@
'description_sale': fields.text('Sale Description',translate=True),
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumable are product where you don't manage stock."),
'supply_method': fields.selection([('produce','Produce'),('buy','Buy')], 'Supply method', required=True, help="Produce will generate production order or tasks, according to the product type. Buy will trigger purchase orders when requested."),
- 'sale_delay': fields.float('Customer Lead Time', help="This is the average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
- 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
+ 'sale_delay': fields.float('Customer Lead Time', digits_compute=dp.get_precision('Shipping Delay'), help="This is the average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
+ 'produce_delay': fields.float('Manufacturing Lead Time', digits_compute=dp.get_precision('Shipping Delay'), help="Average delay in days to produce this product. This is only for the production order and, if it is a multi-level bill of material, it's only for the level of this product. Different lead times will be summed for all levels and purchase orders."),
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'rental': fields.boolean('Can be Rent'),
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
@@ -321,7 +321,7 @@
' uos = uom * coeff'),
'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type', required=True),
'seller_info_id': fields.function(_calc_seller, type='many2one', relation="product.supplierinfo", multi="seller_info"),
- 'seller_delay': fields.function(_calc_seller, type='integer', string='Supplier Lead Time', multi="seller_info", help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),
+ 'seller_delay': fields.function(_calc_seller, type='integer', string='Supplier Lead Time', multi="seller_info", digits_compute=dp.get_precision('Shipping Delay'), help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),
'seller_qty': fields.function(_calc_seller, type='float', string='Supplier Quantity', multi="seller_info", help="This is minimum quantity to purchase from Main Supplier."),
'seller_id': fields.function(_calc_seller, type='many2one', relation="res.partner", string='Main Supplier', help="Main Supplier who has highest priority in Supplier List.", multi="seller_info"),
'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Partners'),
=== modified file 'sale/company.py'
--- sale/company.py 2011-09-29 11:08:56 +0000
+++ sale/company.py 2012-02-07 06:26:20 +0000
@@ -20,11 +20,12 @@
##############################################################################
from osv import osv, fields
+import decimal_precision as dp
class company(osv.osv):
_inherit = 'res.company'
_columns = {
- 'security_lead': fields.float('Security Days', required=True,
+ 'security_lead': fields.float('Security Days', digits_compute=dp.get_precision('Shipping Delay'), required=True,
help="This is the days added to what you promise to customers "\
"for security purpose"),
}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp