diff options
| author | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2011-06-28 09:20:06 +0200 |
|---|---|---|
| committer | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2011-06-28 09:20:06 +0200 |
| commit | 59792e5bf3e2cbd296679210cd4883b37a303f4e (patch) | |
| tree | f9346b072f68b20ddd3d806277c0fb69f7310d48 | |
| parent | 5baec6a299eaca09f7b08163f51c2aa0dfbbc5c7 (diff) | |
| parent | 997093f9c8f6e1ec664d45f2c182548b25374551 (diff) | |
[MERGE] deprecated config wizard removal
bzr revid: qdp-launchpad@openerp.com-20110628072006-teat2ove11jb2di8
3 files changed, 0 insertions, 122 deletions
diff --git a/addons/hr_timesheet_invoice/__init__.py b/addons/hr_timesheet_invoice/__init__.py index c6d84bbda04..a80615f5c9b 100644 --- a/addons/hr_timesheet_invoice/__init__.py +++ b/addons/hr_timesheet_invoice/__init__.py @@ -21,6 +21,5 @@ import hr_timesheet_invoice import wizard import report -import hr_timesheet_invoice_installer # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer.py deleted file mode 100644 index 045019c2fb8..00000000000 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). -# -# 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 <http://www.gnu.org/licenses/>. -# -############################################################################## - -from osv import fields, osv -from tools.translate import _ - -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')]"), - 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal',domain="[('type','=','general')]"), - 'wizard_id': fields.many2one('hr.timesheet.invoice.wizard','Employee', required=True), - } - - -hr_timesheet_invoice_installer() - -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', '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_ids = emp_obj.search(cr, uid, ['|', ('product_id', '=', False), ('journal_id', '=', False)], context=context) - result = [] - for emp in emp_obj.browse(cr, uid, emp_ids, context=context): - result.append({'employee_id': emp.id, 'product_id': emp.product_id.id, 'journal_id': emp.journal_id.id}) - if 'emp_ids' in fields: - res.update({'emp_ids': result}) - return res - - def set_employee_data(self, cr, uid, ids, context=None): - if context is None: - context = {} - hr_obj = self.pool.get('hr.employee') - for emp in self.browse(cr, uid, ids, context=context): - for emp_data in emp.emp_ids: - hr_obj.write(cr, uid, emp_data.employee_id.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/hr_timesheet_invoice_installer_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer_view.xml index 780444ea3be..22d12db6ec8 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer_view.xml @@ -1,49 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - <record id="view_hr_timesheet_invoice_wizard" model="ir.ui.view"> - <field name="name">Define Your Employee's Invoice Data</field> - <field name="model">hr.timesheet.invoice.wizard</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Employee Invoice Data"> - <field colspan="4" name="emp_ids" nolabel="1" mode="tree,form"> - <tree string="Employee Invoice Data" editable="bottom"> - <field name="employee_id"/> - <field name="product_id"/> - <field name="journal_id"/> - </tree> - <form string="Employee Invoice Data"> - <field name="employee_id"/> - <field name="product_id"/> - <field name="journal_id"/> - </form> - </field> - <separator string="" colspan="4" /> - <label string="" colspan="2" /> - <button special="cancel" string="Cancel" icon="gtk-cancel" /> - <button name="set_employee_data" string="OK" type="object" icon="gtk-ok"/> - </form> - </field> - </record> - - <record id="action_hr_timesheet_invoice_wizard" model="ir.actions.act_window"> - <field name="name">Define Your Employee's Invoice Data</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">hr.timesheet.invoice.wizard</field> - <field name="view_type">form</field> - <field name="view_mode">form</field> - <field name="view_id" ref="view_hr_timesheet_invoice_wizard"/> - <field name="target">new</field> - </record> - - <record id="hr_timesheet_invoice_todo" model="ir.actions.todo"> - <field name="action_id" ref="action_hr_timesheet_invoice_wizard"/> - <field name="category_id" ref="hr.category_hr_management_config"/> - <field name="sequence">3</field> - <field name="type">normal</field> - <field name="state">skip</field> - </record> <!-- Configure Your Services Config Wiz --> |
