From f672183ff142178f78df8ec70686bb9ff43057c3 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Tue, 1 Mar 2011 12:51:34 +0530 Subject: [PATCH 001/276] [IMP] Rework-Addons :Improvement Config wiz , ON Addonse Side bzr revid: aag@tinyerp.co.in-20110301072134-3rrx10e53csav102 --- addons/account/account_installer.xml | 4 +-- .../account_sequence_installer_view.xml | 2 +- addons/base_setup/base_setup_todo.xml | 2 +- addons/base_setup/installer.py | 33 +++++++++++++++++++ addons/crm/crm_installer_view.xml | 2 +- .../wizard/document_configuration_view.xml | 2 +- addons/hr/hr_installer.xml | 2 +- addons/knowledge/knowledge_installer.xml | 2 +- addons/l10n_be/l10n_be_wizard.xml | 2 +- .../data/l10n_br_account_chart_template.xml | 2 +- addons/l10n_cr/l10n_wizard.xml | 2 +- addons/l10n_es/l10n_es_wizard.xml | 2 +- addons/l10n_fr/l10n_fr_wizard.xml | 2 +- addons/l10n_lu/l10n_lu_wizard.xml | 2 +- addons/l10n_ma/l10n_ma_wizard.xml | 2 +- addons/l10n_uk/l10n_uk_wizard.xml | 2 +- addons/mrp/mrp_installer.xml | 2 +- addons/profile_tools/misc_tools_installer.xml | 2 +- addons/project/project_installer.xml | 2 +- .../purchase_double_validation_installer.xml | 2 +- .../report_designer_installer.xml | 2 +- addons/sale/sale_installer.xml | 2 +- 22 files changed, 55 insertions(+), 22 deletions(-) diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml index 6ebdf74b977..7e3836340b9 100644 --- a/addons/account/account_installer.xml +++ b/addons/account/account_installer.xml @@ -116,13 +116,13 @@ 3 - onskip + on_trigger 5 - always + on_trigger diff --git a/addons/account_sequence/account_sequence_installer_view.xml b/addons/account_sequence/account_sequence_installer_view.xml index 1051b133045..3a812a187c4 100644 --- a/addons/account_sequence/account_sequence_installer_view.xml +++ b/addons/account_sequence/account_sequence_installer_view.xml @@ -50,7 +50,7 @@ 3 - onskip + on_trigger diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml index 7cd0563aafe..c3a1bc24a8b 100644 --- a/addons/base_setup/base_setup_todo.xml +++ b/addons/base_setup/base_setup_todo.xml @@ -67,7 +67,7 @@ 1 - onskip + on_trigger diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index e23f1171752..bb2626a59ae 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -19,6 +19,7 @@ # ############################################################################## from osv import fields, osv +import re class base_setup_installer(osv.osv_memory): _name = 'base.setup.installer' @@ -101,5 +102,37 @@ class base_setup_installer(osv.osv_memory): value.update({'progress':progress}) if progress < 10.: progress = 10. + return {'value':value} + + def execute(self, cr, uid, ids, context=None): + if context is None: + context = {} + modules = self.pool.get('ir.module.module') + modules_selected = [] + datas = self.read(cr, uid, ids, context=context)[0] + key = datas.keys() + key.remove("id") + key.remove("progress") + name_list = [] + for mod in key: + if datas[mod] == 1: + modules_selected.append(mod) + inst = modules.browse( + cr, uid, + modules.search(cr, uid, + [('name','in',modules_selected) + ], + context=context), + context=context) + for i in inst: + if i.state == 'uninstalled': + sect_mod_id = i.id + modules.button_install(cr, uid, [sect_mod_id], context=context) + elif i.state == 'installed': + if modules_selected: + for instl in modules_selected: + cr.execute("update ir_actions_todo set restart='on_trigger' , state='open' from ir_model_data as data where data.res_id = ir_actions_todo.id and data.model = 'ir.actions.todo' and data.module like '%"+instl+"%'") + + return base_setup_installer() diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index 35ff5a0a7cc..778ebd5646a 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -61,7 +61,7 @@ 3 - always + on_trigger diff --git a/addons/document/wizard/document_configuration_view.xml b/addons/document/wizard/document_configuration_view.xml index 156af432b0e..8aa874782b9 100644 --- a/addons/document/wizard/document_configuration_view.xml +++ b/addons/document/wizard/document_configuration_view.xml @@ -46,7 +46,7 @@ - + diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml index 5ccbaefa3f5..3d04abf00e3 100644 --- a/addons/hr/hr_installer.xml +++ b/addons/hr/hr_installer.xml @@ -52,7 +52,7 @@ 3 - always + on_trigger diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml index 068fa9b413b..79f6cfb178e 100644 --- a/addons/knowledge/knowledge_installer.xml +++ b/addons/knowledge/knowledge_installer.xml @@ -53,7 +53,7 @@ 3 - always + on_trigger diff --git a/addons/l10n_be/l10n_be_wizard.xml b/addons/l10n_be/l10n_be_wizard.xml index 0e691260425..5b3c42b22fa 100644 --- a/addons/l10n_be/l10n_be_wizard.xml +++ b/addons/l10n_be/l10n_be_wizard.xml @@ -4,7 +4,7 @@ - onskip + on_trigger diff --git a/addons/l10n_br/data/l10n_br_account_chart_template.xml b/addons/l10n_br/data/l10n_br_account_chart_template.xml index dd714bacab8..4b548f65c8c 100644 --- a/addons/l10n_br/data/l10n_br_account_chart_template.xml +++ b/addons/l10n_br/data/l10n_br_account_chart_template.xml @@ -19,7 +19,7 @@ This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template. open - onskip + on_trigger diff --git a/addons/l10n_cr/l10n_wizard.xml b/addons/l10n_cr/l10n_wizard.xml index 0e691260425..5b3c42b22fa 100644 --- a/addons/l10n_cr/l10n_wizard.xml +++ b/addons/l10n_cr/l10n_wizard.xml @@ -4,7 +4,7 @@ - onskip + on_trigger diff --git a/addons/l10n_es/l10n_es_wizard.xml b/addons/l10n_es/l10n_es_wizard.xml index 294f0a5e668..3bbda51e00c 100644 --- a/addons/l10n_es/l10n_es_wizard.xml +++ b/addons/l10n_es/l10n_es_wizard.xml @@ -4,7 +4,7 @@ - onskip + on_trigger diff --git a/addons/l10n_fr/l10n_fr_wizard.xml b/addons/l10n_fr/l10n_fr_wizard.xml index 985c3b81195..48147ac172d 100644 --- a/addons/l10n_fr/l10n_fr_wizard.xml +++ b/addons/l10n_fr/l10n_fr_wizard.xml @@ -4,7 +4,7 @@ - onskip + on_trigger diff --git a/addons/l10n_lu/l10n_lu_wizard.xml b/addons/l10n_lu/l10n_lu_wizard.xml index f0655f3dc99..5942e7800d0 100644 --- a/addons/l10n_lu/l10n_lu_wizard.xml +++ b/addons/l10n_lu/l10n_lu_wizard.xml @@ -4,7 +4,7 @@ - onskip + on_trigger diff --git a/addons/l10n_ma/l10n_ma_wizard.xml b/addons/l10n_ma/l10n_ma_wizard.xml index 4524c36fb10..4768ed60dee 100644 --- a/addons/l10n_ma/l10n_ma_wizard.xml +++ b/addons/l10n_ma/l10n_ma_wizard.xml @@ -4,7 +4,7 @@ - onskip + on_trigger diff --git a/addons/l10n_uk/l10n_uk_wizard.xml b/addons/l10n_uk/l10n_uk_wizard.xml index 63a56521bd8..62fe38a1642 100644 --- a/addons/l10n_uk/l10n_uk_wizard.xml +++ b/addons/l10n_uk/l10n_uk_wizard.xml @@ -8,7 +8,7 @@ This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template. open - onskip + on_trigger diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml index ff0c01f8e18..4008385ff32 100644 --- a/addons/mrp/mrp_installer.xml +++ b/addons/mrp/mrp_installer.xml @@ -48,7 +48,7 @@ 3 - always + on_trigger diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml index 235d2d6e392..c21f703b291 100644 --- a/addons/profile_tools/misc_tools_installer.xml +++ b/addons/profile_tools/misc_tools_installer.xml @@ -48,7 +48,7 @@ - always + on_trigger 3 diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml index 32b235e4691..7200986beb2 100644 --- a/addons/project/project_installer.xml +++ b/addons/project/project_installer.xml @@ -50,7 +50,7 @@ - always + on_trigger 3 diff --git a/addons/purchase_double_validation/purchase_double_validation_installer.xml b/addons/purchase_double_validation/purchase_double_validation_installer.xml index c3369f68554..2cafbd7cd9a 100644 --- a/addons/purchase_double_validation/purchase_double_validation_installer.xml +++ b/addons/purchase_double_validation/purchase_double_validation_installer.xml @@ -44,7 +44,7 @@ - onskip + on_trigger diff --git a/addons/report_designer/report_designer_installer.xml b/addons/report_designer/report_designer_installer.xml index 2f838c0b74c..31f6d16ae22 100644 --- a/addons/report_designer/report_designer_installer.xml +++ b/addons/report_designer/report_designer_installer.xml @@ -45,7 +45,7 @@ - always + on_trigger 3 diff --git a/addons/sale/sale_installer.xml b/addons/sale/sale_installer.xml index 4149871ad36..ad707a1abec 100644 --- a/addons/sale/sale_installer.xml +++ b/addons/sale/sale_installer.xml @@ -47,7 +47,7 @@ - always + on_trigger 3 From 165ac138532350c8e4ab064e7d618d7d7d88136f Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Tue, 1 Mar 2011 14:11:36 +0530 Subject: [PATCH 002/276] [IMP] Rework-Addons :Remove import file bzr revid: aag@tinyerp.co.in-20110301084136-s42s9y4zyk6c9u6g --- addons/base_setup/installer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index bb2626a59ae..a1605fa55bb 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -19,7 +19,6 @@ # ############################################################################## from osv import fields, osv -import re class base_setup_installer(osv.osv_memory): _name = 'base.setup.installer' From 1a809c2f4893d5381fb47326ea122a3f0bd42810 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Wed, 16 Mar 2011 17:33:38 +0530 Subject: [PATCH 003/276] [IMP]: base_setup: Improvement for the main application: like HR, we want them to be able to re-thick an installed application but in HRs configuration, if hr_holidays is already installed, the boolean "holidays management" should be thick and readonly bzr revid: rpa@tinyerp.com-20110316120338-zbdm1a6zo0rw76to --- addons/base_setup/installer.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index a1605fa55bb..50653e20be7 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -104,6 +104,17 @@ class base_setup_installer(osv.osv_memory): return {'value':value} + + def default_get(self, cr, uid, fields_list, context=None): + #Skipping default value as checked for main application, if already installed + return super(osv.osv_memory, self).default_get( + cr, uid, fields_list, context=context) + + def fields_get(self, cr, uid, fields=None, context=None, write_access=True): + #Skipping readonly value for main application, if already installed + return super(osv.osv_memory, self).fields_get( + cr, uid, fields, context, write_access) + def execute(self, cr, uid, ids, context=None): if context is None: context = {} From c05a79ed07027874dd71573d937dd1a6f359d1a9 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Tue, 29 Mar 2011 13:54:14 +0530 Subject: [PATCH 004/276] [IMP]: TASK of REWORK- UPdate Account chart view bzr revid: aag@tinyerp.co.in-20110329082414-6deyci0icaqfw78w --- addons/account/configurable_account_chart.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index 1a0a21d3971..c4b3899b772 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -617,7 +617,7 @@ Generate Chart of Accounts from a Chart Template open - onskip + on_trigger From 8a4485f2f62164031d376e151bfa8c8e8b629a3c Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Tue, 29 Mar 2011 16:02:07 +0530 Subject: [PATCH 005/276] [IMP]BASE_SETUP: TASK of REWORK-Remove call of Install btn bzr revid: aag@tinyerp.co.in-20110329103207-o872ckzew5j7ja8g --- addons/base_setup/installer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index 50653e20be7..6c0367816b8 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -119,6 +119,7 @@ class base_setup_installer(osv.osv_memory): if context is None: context = {} modules = self.pool.get('ir.module.module') + upgrade_obj = self.pool.get('base.module.upgrade') modules_selected = [] datas = self.read(cr, uid, ids, context=context)[0] key = datas.keys() @@ -138,7 +139,8 @@ class base_setup_installer(osv.osv_memory): for i in inst: if i.state == 'uninstalled': sect_mod_id = i.id - modules.button_install(cr, uid, [sect_mod_id], context=context) + modules.state_update(cr, uid, [sect_mod_id], 'to install', ['uninstalled'], context) + upgrade_obj.upgrade_module(cr, uid, [sect_mod_id], context=context) elif i.state == 'installed': if modules_selected: for instl in modules_selected: From 527ba1280951490884f453d1de53df015063327e Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Thu, 31 Mar 2011 12:22:42 +0530 Subject: [PATCH 006/276] [IMP]base_setup:Optimize Code bzr revid: aag@tinyerp.co.in-20110331065242-hlr92ir0emadiyad --- addons/base_setup/installer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index d324cba2e3f..34c68fcf9f9 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -120,7 +120,6 @@ class base_setup_installer(osv.osv_memory): if context is None: context = {} modules = self.pool.get('ir.module.module') - upgrade_obj = self.pool.get('base.module.upgrade') modules_selected = [] datas = self.read(cr, uid, ids, context=context)[0] key = datas.keys() From 233084fdc645d939282abef9e452b4c1daa83dea Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 31 Mar 2011 10:39:19 +0200 Subject: [PATCH 007/276] [IMP] base_setup: set restart=never and state=skip on the 'configure your company' wizard bzr revid: qdp-launchpad@openerp.com-20110331083919-01lwi0uxtbra167f --- addons/base_setup/base_setup_todo.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml index c3a1bc24a8b..234571b458e 100644 --- a/addons/base_setup/base_setup_todo.xml +++ b/addons/base_setup/base_setup_todo.xml @@ -67,7 +67,8 @@ 1 - on_trigger + never + skip From 0e8b7de8a97918d8f737d627bdece1de63770720 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Mon, 4 Apr 2011 16:22:50 +0530 Subject: [PATCH 008/276] [IMP]product:ADD Create some products confg wiz bzr revid: aag@tinyerp.co.in-20110404105250-bn3mw3w7hivp6v2x --- addons/product/__openerp__.py | 1 + addons/product/wizard/__init__.py | 1 + .../product/wizard/res_product_installer.py | 54 ++++++++++++++++ .../product/wizard/res_product_installer.xml | 61 +++++++++++++++++++ 4 files changed, 117 insertions(+) create mode 100644 addons/product/wizard/res_product_installer.py create mode 100644 addons/product/wizard/res_product_installer.xml diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index a1ee0d144b5..5ce1730c8c5 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -55,6 +55,7 @@ Print product labels with barcode. 'product_data.xml', 'product_report.xml', 'product_view.xml', + 'wizard/res_product_installer.xml', 'product_shortcut_data.xml', 'pricelist_view.xml', 'partner_view.xml', diff --git a/addons/product/wizard/__init__.py b/addons/product/wizard/__init__.py index 47f5f2641fc..b18565e932b 100644 --- a/addons/product/wizard/__init__.py +++ b/addons/product/wizard/__init__.py @@ -19,6 +19,7 @@ # ############################################################################## import product_price +import res_product_installer # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/wizard/res_product_installer.py b/addons/product/wizard/res_product_installer.py new file mode 100644 index 00000000000..9aa382ecda8 --- /dev/null +++ b/addons/product/wizard/res_product_installer.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 +import pooler + +class res_product_installer(osv.osv_memory): + _name = 'res.product.installer' + _inherit = 'res.config' + _columns = { + } + _defaults = { + } + + def execute(self, cr, uid, ids, context=None): + if context is None: + context = {} + data_obj = self.pool.get('ir.model.data') + id2 = data_obj._get_id(cr, uid, 'product', 'product_normal_form_view') + if id2: + id2 = data_obj.browse(cr, uid, id2, context=context).res_id + return { + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'product.product', + 'views': [(id2, 'form')], +# 'view_id': False, + 'type': 'ir.actions.act_window', + 'target': 'new', + 'nodestroy':True, + } + +res_product_installer() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/product/wizard/res_product_installer.xml b/addons/product/wizard/res_product_installer.xml new file mode 100644 index 00000000000..66cebf9c0a1 --- /dev/null +++ b/addons/product/wizard/res_product_installer.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create some products + ir.actions.act_window + product.product + form + + + + + + + new + on_trigger + + + + From eec8920438bcda73cc9923010bca9cf6c176957e Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Mon, 4 Apr 2011 19:03:00 +0530 Subject: [PATCH 009/276] [IMP]product:Create some products confg wiz -modify bzr revid: aag@tinyerp.co.in-20110404133300-gf3ge382gpg1iwpf --- addons/product/wizard/res_product_installer.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/product/wizard/res_product_installer.xml b/addons/product/wizard/res_product_installer.xml index 66cebf9c0a1..a9434640707 100644 --- a/addons/product/wizard/res_product_installer.xml +++ b/addons/product/wizard/res_product_installer.xml @@ -47,14 +47,15 @@ ir.actions.act_window product.product form + form - new - on_trigger + current + never From 55968077fcc4b92f846c2a57655de61582e33036 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Tue, 5 Apr 2011 14:14:15 +0530 Subject: [PATCH 010/276] [IMP]product:skip Create some products confg wiz bzr revid: aag@tinyerp.co.in-20110405084415-ua061g9jh8tp7azu --- addons/product/wizard/res_product_installer.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/product/wizard/res_product_installer.xml b/addons/product/wizard/res_product_installer.xml index a9434640707..a92699bffb4 100644 --- a/addons/product/wizard/res_product_installer.xml +++ b/addons/product/wizard/res_product_installer.xml @@ -56,6 +56,7 @@ current never + skip From 656c2f2b53a2882c22e3e56f52191529d1db9aab Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 6 Apr 2011 14:44:54 +0530 Subject: [PATCH 011/276] [IMP]sale:Improve sales wizard -Configure Picking Policy for Sales Order bzr revid: aag@tinyerp.co.in-20110406091454-3jbbhyskp2icruh4 --- addons/sale/sale.py | 8 +------- addons/sale/sale_view.xml | 6 ++---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index f80d610eb03..0758fac6c19 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1177,14 +1177,10 @@ class sale_config_picking_policy(osv.osv_memory): _columns = { 'name': fields.char('Name', size=64), - 'picking_policy': fields.selection([ - ('direct', 'Direct Delivery'), - ('one', 'All at Once') - ], 'Picking Default Policy', required=True, help="The Shipping Policy is used to configure per order if you want to deliver as soon as possible when one product is available or you wait that all products are available.."), 'order_policy': fields.selection([ ('manual', 'Invoice Based on Sales Orders'), ('picking', 'Invoice Based on Deliveries'), - ], 'Shipping Default Policy', required=True, + ], 'Invoice Method', required=True, help="You can generate invoices based on sales orders or based on shippings."), 'step': fields.selection([ ('one', 'Delivery Order Only'), @@ -1196,7 +1192,6 @@ class sale_config_picking_policy(osv.osv_memory): "in one or two operations by the worker.") } _defaults = { - 'picking_policy': 'direct', 'order_policy': 'manual', 'step': 'one' } @@ -1204,7 +1199,6 @@ class sale_config_picking_policy(osv.osv_memory): def execute(self, cr, uid, ids, context=None): for o in self.browse(cr, uid, ids, context=context): ir_values_obj = self.pool.get('ir.values') - ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy) ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy) if o.step == 'two': md = self.pool.get('ir.model.data') diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 9925354346b..61cb347655d 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -545,18 +545,16 @@ Configure Sales Order Logistics - Setup your sales workflow and default values. + Define your invoice method. A services company usually invoices based on sale orders while a retailer usually invoices based on deliveries. 15 - - - + From 9ac23402f0d0c01bf749192251595dec35ef371e Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:31:42 +0530 Subject: [PATCH 012/276] [ADD]: account_analytic_plans for config wizard bzr revid: ksa@tinyerp.co.in-20110407050142-5xkt2t1fd03qac03 --- addons/account_analytic_plans/__init__.py | 4 ++-- addons/account_analytic_plans/__openerp__.py | 3 ++- .../account_analytic_plans/installer_view.xml | 22 +++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 addons/account_analytic_plans/installer_view.xml diff --git a/addons/account_analytic_plans/__init__.py b/addons/account_analytic_plans/__init__.py index 067aa84d267..6f0609db41d 100644 --- a/addons/account_analytic_plans/__init__.py +++ b/addons/account_analytic_plans/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## diff --git a/addons/account_analytic_plans/__openerp__.py b/addons/account_analytic_plans/__openerp__.py index dab9e83c75a..1404f8e9a92 100644 --- a/addons/account_analytic_plans/__openerp__.py +++ b/addons/account_analytic_plans/__openerp__.py @@ -69,7 +69,8 @@ of distribution models. 'account_analytic_plans_view.xml', 'account_analytic_plans_report.xml', 'wizard/analytic_plan_create_model_view.xml', - 'wizard/account_crossovered_analytic_view.xml' + 'wizard/account_crossovered_analytic_view.xml', + 'installer_view.xml' ], 'demo_xml' : [], 'test' : ['test/acount_analytic_plans_report.yml'], diff --git a/addons/account_analytic_plans/installer_view.xml b/addons/account_analytic_plans/installer_view.xml new file mode 100644 index 00000000000..6249c3ab7ca --- /dev/null +++ b/addons/account_analytic_plans/installer_view.xml @@ -0,0 +1,22 @@ + + + + + + Analytic Plan + ir.actions.act_window + account.analytic.plan + form + tree,form + + + + + 3 + always + + + + + + From 859e620f0acd21dd837c275cfa5f34eb2a8f4295 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:33:12 +0530 Subject: [PATCH 013/276] [ADD]: config wizard for crm bzr revid: ksa@tinyerp.co.in-20110407050312-0qyqxjwdffxlnrcr --- addons/crm/crm_installer_view.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index 35ff5a0a7cc..b75a105559f 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -64,5 +64,36 @@ always + + + Sales Team + ir.actions.act_window + crm.case.section + form + tree,form + + + + + + 3 + always + + + + Sales Stages + ir.actions.act_window + crm.case.stage + form + tree,form + + + + + + 3 + always + + From fd7f8d0226973c360d760635955db16b28fabfbe Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:34:08 +0530 Subject: [PATCH 014/276] [ADD]: config wizard for fetchmail bzr revid: ksa@tinyerp.co.in-20110407050408-02ysimrgtex3irtz --- addons/fetchmail/__openerp__.py | 1 + addons/fetchmail/installer_view.xml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 addons/fetchmail/installer_view.xml diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py index 1ffe731996e..49215ed12d0 100644 --- a/addons/fetchmail/__openerp__.py +++ b/addons/fetchmail/__openerp__.py @@ -42,6 +42,7 @@ Fetch email from POP / IMAP servers. "fetchmail_view.xml", "fetchmail_data.xml", 'security/ir.model.access.csv', + 'installer_view.xml' ], 'demo_xml': [ diff --git a/addons/fetchmail/installer_view.xml b/addons/fetchmail/installer_view.xml new file mode 100644 index 00000000000..74b9b898d71 --- /dev/null +++ b/addons/fetchmail/installer_view.xml @@ -0,0 +1,19 @@ + + + + + POP/IMAP Server + ir.actions.act_window + email.server + form + tree,form + + + + + + 4 + always + + + \ No newline at end of file From 5ea5e93f4aede2e1dcc8ce0357c31a5b89b0669a Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:35:12 +0530 Subject: [PATCH 015/276] [ADD]: config wizard for hr bzr revid: ksa@tinyerp.co.in-20110407050512-ou6xehe7l1s4eej9 --- addons/hr/hr_installer.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml index 5ccbaefa3f5..388668b7456 100644 --- a/addons/hr/hr_installer.xml +++ b/addons/hr/hr_installer.xml @@ -55,5 +55,21 @@ always + + Employee + ir.actions.act_window + hr.employee + form + tree,form + + + + + + 3 + always + + + From cbfe43975a95dae4379715bfc0301b87eeb46af8 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:36:35 +0530 Subject: [PATCH 016/276] [ADD]: config wizard for hr_evaluation bzr revid: ksa@tinyerp.co.in-20110407050635-6wvhwajq88x712id --- addons/hr_evaluation/__openerp__.py | 3 ++- addons/hr_evaluation/installer_view.xml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 addons/hr_evaluation/installer_view.xml diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py index 1a611768d7e..11f6b236582 100644 --- a/addons/hr_evaluation/__openerp__.py +++ b/addons/hr_evaluation/__openerp__.py @@ -47,7 +47,8 @@ in the form of pdf file. Implements a dashboard for My Current Evaluations "wizard/hr_evaluation_mail_view.xml", "hr_evaluation_view.xml", "report/hr_evaluation_report_view.xml", - "board_hr_evaluation_view.xml" + "board_hr_evaluation_view.xml", + 'installer_view.xml' ], "test": ["test/test_hr_evaluation.yml"], "active": False, diff --git a/addons/hr_evaluation/installer_view.xml b/addons/hr_evaluation/installer_view.xml new file mode 100644 index 00000000000..2e5f8ef0e34 --- /dev/null +++ b/addons/hr_evaluation/installer_view.xml @@ -0,0 +1,19 @@ + + + + + Department + ir.actions.act_window + hr.department + form + tree,form + + + + + + 3 + always + + + From 6d9e38a658a64a7cd8045fae28d0fa2cbbe38682 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:38:10 +0530 Subject: [PATCH 017/276] [ADD]: config wizard for hr_expense and data file bzr revid: ksa@tinyerp.co.in-20110407050810-t2bzvqpvmb4ikrkj --- addons/hr_expense/__init__.py | 4 ++-- addons/hr_expense/__openerp__.py | 4 +++- addons/hr_expense/hr_expense.py | 6 ++++++ addons/hr_expense/hr_expense_data.xml | 13 +++++++++++++ addons/hr_expense/hr_expense_view.xml | 2 +- addons/hr_expense/installer_view.xml | 20 ++++++++++++++++++++ 6 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 addons/hr_expense/hr_expense_data.xml create mode 100644 addons/hr_expense/installer_view.xml diff --git a/addons/hr_expense/__init__.py b/addons/hr_expense/__init__.py index 06f78648101..55a87f95400 100644 --- a/addons/hr_expense/__init__.py +++ b/addons/hr_expense/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . +# along with this program. If not, see . # ############################################################################## diff --git a/addons/hr_expense/__openerp__.py b/addons/hr_expense/__openerp__.py index 95d2b60300b..a648bea92bc 100644 --- a/addons/hr_expense/__openerp__.py +++ b/addons/hr_expense/__openerp__.py @@ -54,7 +54,9 @@ re-invoice your customer's expenses if your work by project. 'security/ir_rule.xml', 'report/hr_expense_report_view.xml', 'board_hr_expense_view.xml', - 'board_hr_expense_manager_view.xml' + 'board_hr_expense_manager_view.xml', + 'installer_view.xml', + 'hr_expense_data.xml' ], 'demo_xml': [ 'hr_expense_demo.xml', diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 1fdbb56f40b..995b5950019 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -229,6 +229,12 @@ class product_product(osv.osv): 'hr_expense_ok': fields.boolean('Can Constitute an Expense', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."), } + def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok): + if not hr_expense_ok: + return {} + res = {'value' : {'type':'service','procure_method':'make_to_stock','supply_method':'buy','purchase_ok':True,'sale_ok' :False,'categ_id':19 }} + return res + product_product() class hr_expense_line(osv.osv): diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml new file mode 100644 index 00000000000..33a7ec7604c --- /dev/null +++ b/addons/hr_expense/hr_expense_data.xml @@ -0,0 +1,13 @@ + + + + + + + Expenses + + + + \ No newline at end of file diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index 5aa2fe5c38e..750404c40d9 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -189,7 +189,7 @@ form - + diff --git a/addons/hr_expense/installer_view.xml b/addons/hr_expense/installer_view.xml new file mode 100644 index 00000000000..7b194caa2c5 --- /dev/null +++ b/addons/hr_expense/installer_view.xml @@ -0,0 +1,20 @@ + + + + + Expences Product + ir.actions.act_window + product.product + form + tree,form + {'default_type':'service','default_procure_method':'make_to_stock','default_supply_method':'buy','default_purchase_ok':True,'default_sale_ok':False,'default_hr_expense_ok':True,'default_categ_id':19} + + + + + + 3 + always + + + From e544f257f0d74cd9f078790910e2c9f944794ddc Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:39:10 +0530 Subject: [PATCH 018/276] [ADD]: config wizard for hr_requirement bzr revid: ksa@tinyerp.co.in-20110407050910-upj2d0kfh2wnypw7 --- addons/hr_recruitment/__openerp__.py | 1 + addons/hr_recruitment/installer_view.xml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 addons/hr_recruitment/installer_view.xml diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py index c7f97cf3075..158d51fc491 100644 --- a/addons/hr_recruitment/__openerp__.py +++ b/addons/hr_recruitment/__openerp__.py @@ -47,6 +47,7 @@ system to store and search in your CV base. 'security/ir.model.access.csv', 'report/hr_recruitment_report_view.xml', 'board_hr_recruitment_statistical_view.xml', + 'installer_view.xml' ], 'init_xml': [ 'hr_recruitment_data.xml' diff --git a/addons/hr_recruitment/installer_view.xml b/addons/hr_recruitment/installer_view.xml new file mode 100644 index 00000000000..2f31fb51c12 --- /dev/null +++ b/addons/hr_recruitment/installer_view.xml @@ -0,0 +1,19 @@ + + + + + Recruitment Stages + ir.actions.act_window + hr.recruitment.stage + form + tree,form + + + + + + 3 + always + + + From 2004662aae8b9842361ee486434afa0710f6e632 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 10:39:58 +0530 Subject: [PATCH 019/276] [ADD]: config wizard for lunch bzr revid: ksa@tinyerp.co.in-20110407050958-k015asavo9bs2ik3 --- addons/lunch/__openerp__.py | 1 + addons/lunch/installer_view.xml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 addons/lunch/installer_view.xml diff --git a/addons/lunch/__openerp__.py b/addons/lunch/__openerp__.py index e5317cd8a94..ba980ad71e2 100644 --- a/addons/lunch/__openerp__.py +++ b/addons/lunch/__openerp__.py @@ -49,6 +49,7 @@ 'lunch_view.xml', 'lunch_report.xml', 'report/report_lunch_order_view.xml', + 'installer_view.xml' ], "demo_xml": ['lunch_demo.xml'], "test": ['test/test_lunch.yml', 'test/lunch_report.yml'], diff --git a/addons/lunch/installer_view.xml b/addons/lunch/installer_view.xml new file mode 100644 index 00000000000..7a1bd3fd6c4 --- /dev/null +++ b/addons/lunch/installer_view.xml @@ -0,0 +1,19 @@ + + + + + Lunch Products + ir.actions.act_window + lunch.product + form + tree,form + + + + + + 3 + always + + + From ad211158355cf3b861511f8f81bfcde69955f618 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Thu, 7 Apr 2011 11:21:47 +0530 Subject: [PATCH 020/276] [IMP]Product:Optimize Code of Wiz bzr revid: aag@tinyerp.co.in-20110407055147-knj8p33livb9dg23 --- addons/product/__openerp__.py | 2 +- addons/product/wizard/__init__.py | 1 - addons/product/wizard/product_installer.xml | 23 +++++++ .../product/wizard/res_product_installer.py | 54 ---------------- .../product/wizard/res_product_installer.xml | 63 ------------------- 5 files changed, 24 insertions(+), 119 deletions(-) create mode 100644 addons/product/wizard/product_installer.xml delete mode 100644 addons/product/wizard/res_product_installer.py delete mode 100644 addons/product/wizard/res_product_installer.xml diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 5ce1730c8c5..bcddcc93bdf 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -55,7 +55,7 @@ Print product labels with barcode. 'product_data.xml', 'product_report.xml', 'product_view.xml', - 'wizard/res_product_installer.xml', + 'wizard/product_installer.xml', 'product_shortcut_data.xml', 'pricelist_view.xml', 'partner_view.xml', diff --git a/addons/product/wizard/__init__.py b/addons/product/wizard/__init__.py index b18565e932b..47f5f2641fc 100644 --- a/addons/product/wizard/__init__.py +++ b/addons/product/wizard/__init__.py @@ -19,7 +19,6 @@ # ############################################################################## import product_price -import res_product_installer # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/wizard/product_installer.xml b/addons/product/wizard/product_installer.xml new file mode 100644 index 00000000000..93113818bb6 --- /dev/null +++ b/addons/product/wizard/product_installer.xml @@ -0,0 +1,23 @@ + + + + + + Create some products + ir.actions.act_window + product.product + form + form + + + + + + + current + never + skip + + + + diff --git a/addons/product/wizard/res_product_installer.py b/addons/product/wizard/res_product_installer.py deleted file mode 100644 index 9aa382ecda8..00000000000 --- a/addons/product/wizard/res_product_installer.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 -import pooler - -class res_product_installer(osv.osv_memory): - _name = 'res.product.installer' - _inherit = 'res.config' - _columns = { - } - _defaults = { - } - - def execute(self, cr, uid, ids, context=None): - if context is None: - context = {} - data_obj = self.pool.get('ir.model.data') - id2 = data_obj._get_id(cr, uid, 'product', 'product_normal_form_view') - if id2: - id2 = data_obj.browse(cr, uid, id2, context=context).res_id - return { - 'view_type': 'form', - 'view_mode': 'form', - 'res_model': 'product.product', - 'views': [(id2, 'form')], -# 'view_id': False, - 'type': 'ir.actions.act_window', - 'target': 'new', - 'nodestroy':True, - } - -res_product_installer() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/product/wizard/res_product_installer.xml b/addons/product/wizard/res_product_installer.xml deleted file mode 100644 index a92699bffb4..00000000000 --- a/addons/product/wizard/res_product_installer.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create some products - ir.actions.act_window - product.product - form - form - - - - - - - current - never - skip - - - - From 9a5ac3b0fe01315b8e3b2ab27f4d7be3c6feab88 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 11:30:32 +0530 Subject: [PATCH 021/276] [ADD]: config wizard for hr_timesheet_invoice bzr revid: ksa@tinyerp.co.in-20110407060032-9mi1ci7f2pqgzs6o --- addons/hr_timesheet_invoice/__init__.py | 6 +- addons/hr_timesheet_invoice/__openerp__.py | 1 + addons/hr_timesheet_invoice/installer.py | 57 +++++++++++++++++++ .../hr_timesheet_invoice/installer_view.xml | 38 +++++++++++++ 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 addons/hr_timesheet_invoice/installer.py create mode 100644 addons/hr_timesheet_invoice/installer_view.xml diff --git a/addons/hr_timesheet_invoice/__init__.py b/addons/hr_timesheet_invoice/__init__.py index 223ee7ea0c6..2251ea84d0b 100644 --- a/addons/hr_timesheet_invoice/__init__.py +++ b/addons/hr_timesheet_invoice/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,12 +15,12 @@ # 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 . +# along with this program. If not, see . # ############################################################################## import hr_timesheet_invoice import wizard import report - +import installer # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/__openerp__.py b/addons/hr_timesheet_invoice/__openerp__.py index 95682d00ef0..79fcd3ca9a6 100644 --- a/addons/hr_timesheet_invoice/__openerp__.py +++ b/addons/hr_timesheet_invoice/__openerp__.py @@ -47,6 +47,7 @@ reports, etc.""", 'wizard/hr_timesheet_invoice_create_view.xml', 'wizard/hr_timesheet_invoice_create_final_view.xml', 'board_hr_timesheet_invoice.xml', + 'installer_view.xml' ], 'demo': [ 'hr_timesheet_invoice_demo.xml', diff --git a/addons/hr_timesheet_invoice/installer.py b/addons/hr_timesheet_invoice/installer.py new file mode 100644 index 00000000000..0834ca6017c --- /dev/null +++ b/addons/hr_timesheet_invoice/installer.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 +from tools.translate import _ + +class hr_timesheet_invoice_installer(osv.osv): + _name = "hr.timesheet.invoice.installer" + _description = "Employee Invoice Data" + _columns = { + 'employee_id': fields.many2one('hr.employee', 'Employee', domain="['|',('product_id','=',False),('journal_id','=',False)]" ,required=True), + 'type': fields.many2one('product.product', 'Product',domain="[('type','=','service')]"), + 'timesheet_journal': fields.many2one('account.analytic.journal', 'Analytic Journal',domain="[('type','=','general')]"), + } + + def _get_user(self, cr, uid, context=None): + + emp_obj = self.pool.get('hr.employee') + emp_id = emp_obj.search(cr, uid, ['|',('user_id', '=', uid),('product_id','=',False),('journal_id','=',False)], context=context) + if not emp_id: + raise osv.except_osv(_("Warning"), _("No employee defined for this user")) + return emp_id and emp_id[0] or False + + _defaults = { + 'employee_id': _get_user + } + +hr_timesheet_invoice_installer() + +class hr_timesheet_invoice_wizard(osv.osv): + _name = "hr.timesheet.invoice.wizard" + _description = "Timesheet Invoice" + _columns = { + 'emp_ids':fields.one2many('hr.timesheet.invoice.installer', 'timesheet_journal', 'Employee details'), + } + +hr_timesheet_invoice_wizard() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/hr_timesheet_invoice/installer_view.xml b/addons/hr_timesheet_invoice/installer_view.xml new file mode 100644 index 00000000000..3d4fdc9c23e --- /dev/null +++ b/addons/hr_timesheet_invoice/installer_view.xml @@ -0,0 +1,38 @@ + + + + + Employee Invoice Data + hr.timesheet.invoice.wizard + form + +
+ + + + + + + +
+
+
+ + + Employee Invoice Data + ir.actions.act_window + hr.timesheet.invoice.wizard + form + form + + new + + + + + 3 + always + + +
+
\ No newline at end of file From 3a1bc3d153fc564c4c534c2aab90c4f9ccaa1091 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Thu, 7 Apr 2011 12:49:56 +0530 Subject: [PATCH 022/276] [IMP]sale,POS:Rename Shortcut Sales order line and add separator string Point of Sale in procurement & locations Tab bzr revid: aag@tinyerp.co.in-20110407071956-cjre75kkx8abown0 --- addons/point_of_sale/point_of_sale_view.xml | 3 ++- addons/sale/sale_view.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index acc0a72ff3b..18bbfb2a7f8 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -654,7 +654,8 @@ form - + + diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 61cb347655d..07bf44d8372 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -521,7 +521,7 @@ From 7eff17aef5c0f9b2f84ac54251a4e29b892c2ce1 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Thu, 7 Apr 2011 14:24:15 +0530 Subject: [PATCH 023/276] [IMP]thunderbird,outlook:Rename Conf wiz name With Prefix Load like Thunderbird Plug-In to --> Load Thunderbird Plug-In bzr revid: aag@tinyerp.co.in-20110407085415-jgob7tvcacn14dnj --- addons/outlook/outlook_installer.xml | 10 +++++----- addons/thunderbird/thunderbird_installer.xml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/outlook/outlook_installer.xml b/addons/outlook/outlook_installer.xml index e9fd756ff3d..a73ec7ac6c4 100644 --- a/addons/outlook/outlook_installer.xml +++ b/addons/outlook/outlook_installer.xml @@ -9,10 +9,10 @@
- Outlook Plug-In Configuration + Load Outlook Plug-In Configuration
- Outlook Plug-In + Load Outlook Plug-In This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one. @@ -49,7 +49,7 @@ - Outlook Plug-In Configuration + Load Outlook Plug-In Configuration ir.actions.act_window outlook.installer @@ -64,7 +64,7 @@ - Outlook Plug-In Configuration + Load Outlook Plug-In Configuration ir.actions.act_window outlook.installer @@ -81,7 +81,7 @@
diff --git a/addons/thunderbird/thunderbird_installer.xml b/addons/thunderbird/thunderbird_installer.xml index 0059cdfd8ab..260e9eec150 100644 --- a/addons/thunderbird/thunderbird_installer.xml +++ b/addons/thunderbird/thunderbird_installer.xml @@ -9,10 +9,10 @@
- Thunderbird Plug-In Configuration + Load Thunderbird Plug-In Configuration
- Thunderbird Plug-In + Load Thunderbird Plug-In This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one. @@ -50,7 +50,7 @@ - Thunderbird Plug-In Configuration + Load Thunderbird Plug-In Configuration ir.actions.act_window thunderbird.installer @@ -67,7 +67,7 @@ - Thunderbird Plug-In Configuration + Load Thunderbird Plug-In Configuration ir.actions.act_window thunderbird.installer @@ -78,7 +78,7 @@ - +
From 4941e9e4317e0d6a0b14234501cca208e4d53aa3 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Thu, 7 Apr 2011 16:15:27 +0530 Subject: [PATCH 024/276] [IMP]Base Setup:Create New Conf wiz- Migrate data from another application bzr revid: aag@tinyerp.co.in-20110407104527-hf08x01bfwhlph8c --- addons/base_setup/base_setup_installer.xml | 50 ++++++++++++++++++++++ addons/base_setup/installer.py | 25 +++++++++++ 2 files changed, 75 insertions(+) diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml index 13906abe6ba..a36d4213650 100644 --- a/addons/base_setup/base_setup_installer.xml +++ b/addons/base_setup/base_setup_installer.xml @@ -63,5 +63,55 @@ 2 always + + + + + migrade.application.installer.modules.form + migrade.application.installer.modules + form + + + +
+ Migrate data from another application +
+ + Migrate data from another application + + + Import data from other applications. Following the selected application, you can import more or less type of data matching to OpenERP objects. Choose the application and then the data you want to import in OpenERP + + + Configure + + + + + + + + + + +
+
+
+ + + Migrate data from another application + ir.actions.act_window + migrade.application.installer.modules + + form + form + new + + + + + always + + diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index 34c68fcf9f9..562301531df 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -148,4 +148,29 @@ class base_setup_installer(osv.osv_memory): cr.execute("update ir_actions_todo set restart='on_trigger' , state='open' from ir_model_data as data where data.res_id = ir_actions_todo.id and data.model = 'ir.actions.todo' and data.module like '%"+instl+"%'") return + base_setup_installer() + +#Migrate data from another application Conf wiz + +class migrade_application_installer_modules(osv.osv_memory): + _name = 'migrade.application.installer.modules' + _inherit = 'res.config.installer' + _columns = { + 'import_saleforce': fields.boolean('Import Saleforce', + help="For Import Saleforce"), + 'import_sugarcrm': fields.boolean('Import Sugarcrm', + help="For Import Sugarcrm"), + 'sync_google_contact': fields.boolean('Sync Google Contact', + help="For Sync Google Contact"), + 'quickbooks_ippids': fields.boolean('Quickbooks Ippids', + help="For Quickbooks Ippids"), + } + + _defaults = { + 'import_saleforce': True, + } + +migrade_application_installer_modules() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 228ac9aaf60190fef317a6ee8fb73c0e28738081 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Thu, 7 Apr 2011 18:59:30 +0530 Subject: [PATCH 025/276] [IMP]Base Setup:Create New Conf wiz- Import or create customers bzr revid: aag@tinyerp.co.in-20110407132930-4r2kywrleb41aclb --- addons/base_setup/base_setup_installer.xml | 51 ++++++++++++++++++++++ addons/base_setup/installer.py | 34 +++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml index a36d4213650..9255efdac07 100644 --- a/addons/base_setup/base_setup_installer.xml +++ b/addons/base_setup/base_setup_installer.xml @@ -1,5 +1,6 @@ + base.setup.installer.view base.setup.installer @@ -112,6 +113,56 @@ always + + + + + Import or create customers + product.installer + form + + + +
+ Import or create customers +
+ + Import or create customers + + + Create some customers, suppliers and their contacts manually or import a CSV spreadsheet by clicking on the import link + + + 15 + + + + + + + + +
+
+
+ + + Import or create customers + ir.actions.act_window + product.installer + + form + form + new + + + + + + never + skip +
diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index 562301531df..fe63bb9c1e3 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -173,4 +173,38 @@ class migrade_application_installer_modules(osv.osv_memory): migrade_application_installer_modules() +class product_installer(osv.osv_memory): + _name = 'product.installer' + _inherit = 'res.config' + _columns = { + 'customers': fields.selection([('create','Create'), ('import','Import')], 'Customers', size=32, required=True, help="Import or create customers"), + + } + _defaults = { + 'customers': 'create', + } + + def execute(self, cr, uid, ids, context=None): + if context is None: + context = {} + data_obj = self.pool.get('ir.model.data') + val = self.browse(cr, uid, ids, context=context)[0] + if val.customers == 'create': + id2 = data_obj._get_id(cr, uid, 'base', 'view_partner_form') + if id2: + id2 = data_obj.browse(cr, uid, id2, context=context).res_id + return { + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'res.partner', + 'views': [(id2, 'form')], + 'type': 'ir.actions.act_window', + 'target': 'current', + 'nodestroy':False, + } + if val.customers == 'import': + return {'type': 'ir.actions.act_window'} + +product_installer() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From f00fb439fc88c1a5455c93991561bcaa9c2a48b0 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 7 Apr 2011 18:59:56 +0530 Subject: [PATCH 026/276] [IMP]: Improvement bzr revid: ksa@tinyerp.co.in-20110407132956-1o67jgwlmahvvi3m --- addons/account_analytic_plans/installer_view.xml | 2 +- addons/crm/crm_installer_view.xml | 4 ++-- addons/fetchmail/installer_view.xml | 2 +- addons/hr/hr_installer.xml | 2 +- addons/hr_evaluation/installer_view.xml | 2 +- addons/hr_expense/installer_view.xml | 2 +- addons/hr_recruitment/installer_view.xml | 2 +- addons/hr_timesheet_invoice/installer.py | 2 +- addons/hr_timesheet_invoice/installer_view.xml | 6 +++--- addons/lunch/installer_view.xml | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/account_analytic_plans/installer_view.xml b/addons/account_analytic_plans/installer_view.xml index 6249c3ab7ca..f394732a8c1 100644 --- a/addons/account_analytic_plans/installer_view.xml +++ b/addons/account_analytic_plans/installer_view.xml @@ -3,7 +3,7 @@ - Analytic Plan + Account Analytic Plans ir.actions.act_window account.analytic.plan form diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index b75a105559f..da59ec7f96e 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -66,7 +66,7 @@ - Sales Team + Create sales team ir.actions.act_window crm.case.section form @@ -81,7 +81,7 @@ - Sales Stages + Review Sales Stages ir.actions.act_window crm.case.stage form diff --git a/addons/fetchmail/installer_view.xml b/addons/fetchmail/installer_view.xml index 74b9b898d71..a3250fd6911 100644 --- a/addons/fetchmail/installer_view.xml +++ b/addons/fetchmail/installer_view.xml @@ -2,7 +2,7 @@ - POP/IMAP Server + Setup Your Mail server ir.actions.act_window email.server form diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml index 388668b7456..e549f638f43 100644 --- a/addons/hr/hr_installer.xml +++ b/addons/hr/hr_installer.xml @@ -56,7 +56,7 @@ - Employee + Create Your Employees ir.actions.act_window hr.employee form diff --git a/addons/hr_evaluation/installer_view.xml b/addons/hr_evaluation/installer_view.xml index 2e5f8ef0e34..dfadc640937 100644 --- a/addons/hr_evaluation/installer_view.xml +++ b/addons/hr_evaluation/installer_view.xml @@ -2,7 +2,7 @@ - Department + Define Your Department Structure ir.actions.act_window hr.department form diff --git a/addons/hr_expense/installer_view.xml b/addons/hr_expense/installer_view.xml index 7b194caa2c5..8d9f0d6b5e9 100644 --- a/addons/hr_expense/installer_view.xml +++ b/addons/hr_expense/installer_view.xml @@ -2,7 +2,7 @@ - Expences Product + Review Your Expenses Products ir.actions.act_window product.product form diff --git a/addons/hr_recruitment/installer_view.xml b/addons/hr_recruitment/installer_view.xml index 2f31fb51c12..9826a8c5ad1 100644 --- a/addons/hr_recruitment/installer_view.xml +++ b/addons/hr_recruitment/installer_view.xml @@ -2,7 +2,7 @@ - Recruitment Stages + Review Recruitment Stages ir.actions.act_window hr.recruitment.stage form diff --git a/addons/hr_timesheet_invoice/installer.py b/addons/hr_timesheet_invoice/installer.py index 0834ca6017c..e4c8cb8e182 100644 --- a/addons/hr_timesheet_invoice/installer.py +++ b/addons/hr_timesheet_invoice/installer.py @@ -27,7 +27,7 @@ class hr_timesheet_invoice_installer(osv.osv): _description = "Employee Invoice Data" _columns = { 'employee_id': fields.many2one('hr.employee', 'Employee', domain="['|',('product_id','=',False),('journal_id','=',False)]" ,required=True), - 'type': fields.many2one('product.product', 'Product',domain="[('type','=','service')]"), + 'product_id': fields.many2one('product.product', 'Product', domain="[('type','=','service')]"), 'timesheet_journal': fields.many2one('account.analytic.journal', 'Analytic Journal',domain="[('type','=','general')]"), } diff --git a/addons/hr_timesheet_invoice/installer_view.xml b/addons/hr_timesheet_invoice/installer_view.xml index 3d4fdc9c23e..31917373c13 100644 --- a/addons/hr_timesheet_invoice/installer_view.xml +++ b/addons/hr_timesheet_invoice/installer_view.xml @@ -2,7 +2,7 @@ - Employee Invoice Data + Define Your Employee's Invoice Data hr.timesheet.invoice.wizard form @@ -10,7 +10,7 @@ - + @@ -19,7 +19,7 @@ - Employee Invoice Data + Define Your Employee's Invoice Data ir.actions.act_window hr.timesheet.invoice.wizard form diff --git a/addons/lunch/installer_view.xml b/addons/lunch/installer_view.xml index 7a1bd3fd6c4..8cd51a47ea6 100644 --- a/addons/lunch/installer_view.xml +++ b/addons/lunch/installer_view.xml @@ -2,7 +2,7 @@ - Lunch Products + Define Your Lunch Products ir.actions.act_window lunch.product form From 29e1b1076303e0005b222059df21ebd6d579c9e5 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Fri, 8 Apr 2011 15:37:06 +0530 Subject: [PATCH 027/276] [IMP]: Improve config wizard for hr_timesheet_invoice bzr revid: ksa@tinyerp.co.in-20110408100706-ia968sq1w9q63u4h --- addons/hr_timesheet_invoice/installer.py | 55 ++++++++++++++----- .../hr_timesheet_invoice/installer_view.xml | 11 +++- 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/addons/hr_timesheet_invoice/installer.py b/addons/hr_timesheet_invoice/installer.py index e4c8cb8e182..8f68bd9d3d4 100644 --- a/addons/hr_timesheet_invoice/installer.py +++ b/addons/hr_timesheet_invoice/installer.py @@ -22,36 +22,61 @@ from osv import fields, osv from tools.translate import _ -class hr_timesheet_invoice_installer(osv.osv): +class hr_timesheet_invoice_installer(osv.osv_memory): _name = "hr.timesheet.invoice.installer" _description = "Employee Invoice Data" _columns = { 'employee_id': fields.many2one('hr.employee', 'Employee', domain="['|',('product_id','=',False),('journal_id','=',False)]" ,required=True), 'product_id': fields.many2one('product.product', 'Product', domain="[('type','=','service')]"), - 'timesheet_journal': fields.many2one('account.analytic.journal', 'Analytic Journal',domain="[('type','=','general')]"), + 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal',domain="[('type','=','general')]"), + 'wizard_id': fields.many2one('hr.timesheet.invoice.wizard','Employee', required=True), } - def _get_user(self, cr, uid, context=None): - - emp_obj = self.pool.get('hr.employee') - emp_id = emp_obj.search(cr, uid, ['|',('user_id', '=', uid),('product_id','=',False),('journal_id','=',False)], context=context) - if not emp_id: - raise osv.except_osv(_("Warning"), _("No employee defined for this user")) - return emp_id and emp_id[0] or False - - _defaults = { - 'employee_id': _get_user - } hr_timesheet_invoice_installer() -class hr_timesheet_invoice_wizard(osv.osv): +class hr_timesheet_invoice_wizard(osv.osv_memory): _name = "hr.timesheet.invoice.wizard" _description = "Timesheet Invoice" _columns = { - 'emp_ids':fields.one2many('hr.timesheet.invoice.installer', 'timesheet_journal', 'Employee details'), + 'emp_ids':fields.one2many('hr.timesheet.invoice.installer', 'wizard_id', 'Wizard Reference'), } + def default_get(self, cr, uid, fields, context=None): + """ + To get default values for the object. + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param fields: List of fields for which we want default values + @param context: A standard dictionary + @return: A dictionary with default values for all field in ``fields`` + """ + if context is None: + context = {} + res = super(hr_timesheet_invoice_wizard, self).default_get(cr, uid, fields, context=context) + emp_obj = self.pool.get('hr.employee') + emp_id = emp_obj.search(cr, uid, ['|',('user_id', '=', uid),('product_id','=',False),('journal_id','=','')], context=context) + result = [] + data = {} + for emp in emp_obj.browse(cr, uid, emp_id, context=context): + data = {'employee_id':emp.id,'product_id':emp.product_id.id,'journal_id':emp.journal_id.id} + result.append(data) + if 'emp_ids' in fields: + res.update({'emp_ids': result}) + return res + + def employee_data(self, cr, uid, ids, context=None): + if context is None: + context = {} + hr_obj = self.pool.get('hr.employee') + data = {} + for emp in self.browse(cr, uid, ids, context=context): + for emp_data in emp.emp_ids: + emp_id = hr_obj.search(cr, uid, [('id', '=', emp_data.employee_id.id)], context=context) + hr_obj.write(cr, uid, emp_id, {'name': emp_data.employee_id.name,'product_id':emp_data.product_id.id or False, 'journal_id':emp_data.journal_id.id or ''}) + return {'type': 'ir.actions.act_window_close'} + hr_timesheet_invoice_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/hr_timesheet_invoice/installer_view.xml b/addons/hr_timesheet_invoice/installer_view.xml index 31917373c13..ef63c30779e 100644 --- a/addons/hr_timesheet_invoice/installer_view.xml +++ b/addons/hr_timesheet_invoice/installer_view.xml @@ -11,9 +11,18 @@ - + +
+ + + + + +