diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index fba1bd8736f..764d9410d43 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -136,6 +136,9 @@ module named account_voucher. 'demo/account_invoice_demo.xml', # 'account_unit_test.xml', ], + 'data_xml':['data/configurable_account_chart.xml' + ], + 'test': [ 'test/account_customer_invoice.yml', 'test/account_supplier_invoice.yml', diff --git a/addons/account/configurable_account_chart.xml b/addons/account/data/configurable_account_chart.xml similarity index 100% rename from addons/account/configurable_account_chart.xml rename to addons/account/data/configurable_account_chart.xml diff --git a/addons/account/installer.py b/addons/account/installer.py index f0111d6645a..dc072787f96 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -123,11 +123,6 @@ class account_installer(osv.osv_memory): context = {} fy_obj = self.pool.get('account.fiscalyear') for res in self.read(cr, uid, ids, context=context): - if 'charts' in res and res['charts'] == 'configurable': - #load generic chart of account - fp = tools.file_open(opj('account', 'configurable_account_chart.xml')) - tools.convert_xml_import(cr, 'account', fp, {}, 'init', True, None) - fp.close() if 'date_start' in res and 'date_stop' in res: f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context) if not f_ids: diff --git a/addons/account/res_config.py b/addons/account/res_config.py index 9be969ace8a..b70e3ec3a18 100644 --- a/addons/account/res_config.py +++ b/addons/account/res_config.py @@ -36,9 +36,10 @@ class account_config_settings(osv.osv_memory): _columns = { 'company_id': fields.many2one('res.company', 'Company', required=True), 'has_default_company': fields.boolean('Has default company', readonly=True), - + 'decimal_precision_account': fields.integer('Decimal Precision on Account'), 'expects_chart_of_accounts': fields.related('company_id', 'expects_chart_of_accounts', type='boolean', - string='Chart of Accounts for this Company'), + string='Chart of Accounts for this Company', + help=""" Check this box if this company is a legal entity."""), 'currency_id': fields.related('company_id', 'currency_id', type='many2one', relation='res.currency', required=True, string='Default Company Currency', help="Default Company Currency of the company."), 'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128, @@ -78,8 +79,7 @@ class account_config_settings(osv.osv_memory): help="""This allows you to check writing and printing. This installs the module account_check_writing."""), 'module_account_accountant': fields.boolean('Accountant Features', - help="""This allows you to access all the accounting features, like the journal items and the chart of accounts. - This installs the module account_accountant."""), + help="""If you do not check this box, you will be able to do Invoicing & Payments, but not accounting (Journal Items, Chart of Accounts, ...)."""), 'module_account_asset': fields.boolean('Assets Management', help="""This allows you to manage the assets owned by a company or a person. It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines. @@ -101,9 +101,6 @@ class account_config_settings(osv.osv_memory): 'module_account_followup': fields.boolean('Manage Customer Payment Follow-Ups', help="""This allows to automate letters for unpaid invoices, with multi-level recalls. This installs the module account_followup."""), - 'module_account_analytic_plans': fields.boolean('Support Multiple Analytic Plans', - help="""This allows to use several analytic plans, according to the general journal. - This installs the module account_analytic_plans."""), 'module_account_invoice_layout': fields.boolean('Allow notes and subtotals', help="""This provides some features to improve the layout of invoices. It gives you the possibility to: @@ -115,7 +112,6 @@ class account_config_settings(osv.osv_memory): 'group_proforma_invoices': fields.boolean('Allow Pro-forma Invoices', implied_group='account.group_proforma_invoices', help="Allows you to put invoices in pro-forma state."), - 'default_sale_tax': fields.many2one('account.tax', 'Default Sale Tax'), 'default_purchase_tax': fields.many2one('account.tax', 'Default Purchase Tax'), } @@ -137,6 +133,21 @@ class account_config_settings(osv.osv_memory): 'period': 'month', } + def get_default_dp(self, cr, uid, fields, context=None): + acc_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product','decimal_account')[1] + dec_id =self.pool.get('decimal.precision').browse(cr, uid, acc_id,context=context) + return { + 'decimal_precision_account': dec_id.digits, + } + + def set_default_dp(self, cr, uid, ids, context=None): + config = self.browse(cr, uid, ids[0], context) + acc_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_account')[1] + dec_id =self.pool.get('decimal.precision').browse(cr, uid, acc_id,context=context) + dec_id.write({ + 'digits': config.decimal_precision_account, + }) + def create(self, cr, uid, values, context=None): id = super(account_config_settings, self).create(cr, uid, values, context) # Hack: to avoid some nasty bug, related fields are not written upon record creation. diff --git a/addons/account/res_config_view.xml b/addons/account/res_config_view.xml index 946c776a28b..14134dea8ab 100644 --- a/addons/account/res_config_view.xml +++ b/addons/account/res_config_view.xml @@ -22,11 +22,11 @@ + - @@ -97,10 +98,9 @@ - - - - + + + diff --git a/addons/delivery/__init__.py b/addons/delivery/__init__.py index cfe7327dded..e5dbee77135 100644 --- a/addons/delivery/__init__.py +++ b/addons/delivery/__init__.py @@ -25,6 +25,7 @@ import wizard import report import sale import stock +import res_config # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/delivery/__openerp__.py b/addons/delivery/__openerp__.py index 3a190bffd89..351bc674e40 100644 --- a/addons/delivery/__openerp__.py +++ b/addons/delivery/__openerp__.py @@ -41,7 +41,8 @@ When creating invoices from picking, OpenERP is able to add and compute the ship 'wizard/delivery_sale_order_view.xml', 'delivery_report.xml', 'delivery_view.xml', - 'partner_view.xml' + 'partner_view.xml', + 'res_config_view.xml' ], 'demo_xml': ['delivery_demo.xml'], 'test': [ diff --git a/addons/delivery/res_config.py b/addons/delivery/res_config.py new file mode 100644 index 00000000000..34cbb1176d2 --- /dev/null +++ b/addons/delivery/res_config.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Business Applications +# Copyright (C) 2004-2012 OpenERP S.A. (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields, osv + +class delivery_configuration(osv.osv_memory): + _inherit = 'stock.config.settings' + _columns = { + 'decimal_precision_stock': fields.integer('Decimal Precision on Stock Weight'), + } + + def get_default_dp(self, cr, uid, fields, context=None): + stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_stock_weight')[1] + dec_id =self.pool.get('decimal.precision').browse(cr, uid, stock_id, context=context) + return { + 'decimal_precision_stock': dec_id.digits, + } + + def set_default_dp(self, cr, uid, ids, context=None): + config = self.browse(cr, uid, ids[0], context) + stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'decimal_stock_weight')[1] + dec_id =self.pool.get('decimal.precision').browse(cr, uid, stock_id, context=context) + dec_id.write({ + 'digits': config.decimal_precision_stock, + }) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/delivery/res_config_view.xml b/addons/delivery/res_config_view.xml new file mode 100644 index 00000000000..2edb985eeb2 --- /dev/null +++ b/addons/delivery/res_config_view.xml @@ -0,0 +1,18 @@ + + + + + + delivery settings + stock.config.settings + form + + + + + + + + + + diff --git a/addons/hr/res_config.py b/addons/hr/res_config.py index 5f92f2db5a6..df328a4b2df 100644 --- a/addons/hr/res_config.py +++ b/addons/hr/res_config.py @@ -26,18 +26,23 @@ class hr_config_settings(osv.osv_memory): _inherit = 'res.config.settings' _columns = { - 'module_hr_timesheet_sheet': fields.boolean('Manage Timesheets and Attendances', + 'module_hr_timesheet_sheet': fields.boolean('Timesheet Validation by Manager', help ="""This installs the module hr_timesheet_sheet."""), - 'module_hr_holidays': fields.boolean('Manage Holidays', + 'module_hr_attendance': fields.boolean('Track Attendances', + help ="""This installs the module hr_attendance."""), + 'module_hr_timesheet': fields.boolean('Manage Timesheets', + help ="""This installs the module hr_timesheet."""), + 'module_hr_holidays': fields.boolean('Leaves & Holidays', help ="""This installs the module hr_holidays."""), - 'module_hr_expense': fields.boolean('Manage Employees Expenses', + 'module_hr_expense': fields.boolean('Expenses', help ="""This installs the module hr_expense."""), - 'module_hr_recruitment': fields.boolean('Manage Recruitment Process', + 'module_hr_recruitment': fields.boolean('Recruitment', help ="""This installs the module hr_recruitment."""), - 'module_hr_contract': fields.boolean('Manage Employees Contracts', + 'module_hr_contract': fields.boolean('Employees Contracts', help ="""This installs the module hr_contract."""), - 'module_hr_evaluation': fields.boolean('Manage Appraisals Process', + 'module_hr_evaluation': fields.boolean('Periodic Appraisals', help ="""This installs the module hr_evaluation."""), + } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/res_config_view.xml b/addons/hr/res_config_view.xml index 38764fd6d73..0fc259e051f 100644 --- a/addons/hr/res_config_view.xml +++ b/addons/hr/res_config_view.xml @@ -19,23 +19,18 @@