From 0624eddfc34cd6e5314c63bb560cf813a8761895 Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Mon, 18 Jun 2012 15:56:13 +0530 Subject: [PATCH] [FIX]: Fix typo for warehouse and set default company time unit. bzr revid: atp@tinyerp.com-20120618102613-5gd35uk0bbwvptn3 --- addons/project/res_config.py | 7 ++++--- addons/sale/res_config_view.xml | 36 ++++++++++++++++----------------- addons/stock/res_config.py | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/addons/project/res_config.py b/addons/project/res_config.py index ff8d108741d..035ef600c4f 100644 --- a/addons/project/res_config.py +++ b/addons/project/res_config.py @@ -65,14 +65,15 @@ class project_configuration(osv.osv_memory): def _get_default_time_unit(self, cr, uid, context=None): + res = {} product_uom_obj = self.pool.get('product.uom') - ids = product_uom_obj.search(cr, uid, [('name', '=', _('Hour'))], context=context) - return ids and ids[0] or False + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + res['time_unit'] = user.company_id.project_time_mode_id.id + return res.get('time_unit', False) _defaults = { 'time_unit': _get_default_time_unit, } - def set_project_defaults(self, cr, uid, ids, context=None): wizard = self.browse(cr, uid, ids)[0] if wizard.time_unit: diff --git a/addons/sale/res_config_view.xml b/addons/sale/res_config_view.xml index 55ec2ee781f..4a3773691b2 100644 --- a/addons/sale/res_config_view.xml +++ b/addons/sale/res_config_view.xml @@ -9,11 +9,24 @@ - - - - - + + + + + + + + + + + + + + + + + @@ -21,19 +34,6 @@ - - - - - - - - - - - - diff --git a/addons/stock/res_config.py b/addons/stock/res_config.py index 173d27690a1..3ad4b8e5914 100644 --- a/addons/stock/res_config.py +++ b/addons/stock/res_config.py @@ -65,7 +65,7 @@ class stock_config_settings(osv.osv_memory): help="""Allows you to get the upstream or downstream traceability of the products contained in lot."""), 'group_stock_inventory_valuation': fields.boolean("Generate Accounting Entries per Stock Movement", implied_group='stock.group_inventory_valuation', - help="""This allows to configure Inventory valuation on product and product categories."""), + help="""Allows to configure inventory valuations on products and product categories."""), 'group_stock_multiple_locations': fields.boolean("Manage Multiple Locations and Warehouses", implied_group='stock.group_locations', help="""This allows to configure and use multiple stock locations and warehouses,