diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2011-08-31 11:25:27 +0200 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2011-08-31 11:25:27 +0200 |
| commit | b71f6e37f31b3d0583c8da604f19fce9dfcdf74a (patch) | |
| tree | 21a6f224361bd19ccd7b86b9c10b3bccc47e149b /addons/base_setup/wizard | |
| parent | 9ea28d59700a2cc44cfb89744a3fea88f6007a81 (diff) | |
| parent | 0312e68bc3680652322fa1ef5a0849f8a30e7601 (diff) | |
[MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110831092527-b86v0k9l0cvpbu0b
Diffstat (limited to 'addons/base_setup/wizard')
| -rw-r--r-- | addons/base_setup/wizard/__init__.py | 25 | ||||
| -rw-r--r-- | addons/base_setup/wizard/res_company_logo.py | 49 | ||||
| -rw-r--r-- | addons/base_setup/wizard/res_company_logo_view.xml | 48 |
3 files changed, 0 insertions, 122 deletions
diff --git a/addons/base_setup/wizard/__init__.py b/addons/base_setup/wizard/__init__.py deleted file mode 100644 index 3c482efa976..00000000000 --- a/addons/base_setup/wizard/__init__.py +++ /dev/null @@ -1,25 +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/>. -# -############################################################################## - -import res_company_logo - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/base_setup/wizard/res_company_logo.py b/addons/base_setup/wizard/res_company_logo.py deleted file mode 100644 index 255b0e89408..00000000000 --- a/addons/base_setup/wizard/res_company_logo.py +++ /dev/null @@ -1,49 +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 -import os -import tools -from tools.translate import _ - - -class res_company_logo(osv.osv_memory): - _name = 'res.company.logo' - _inherit = 'res.config' - _columns = { - 'logo' : fields.binary('Logo'), - } - _defaults={ - 'logo':lambda self,cr,uid,c: self.pool.get('res.company').browse(cr, uid, uid,c).logo, - } - - def execute(self, cr, uid, ids, context=None): - if context is None: - context = {} - user_comp = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id - get_val = self.browse(cr, uid, ids)[0] - user_comp.write({'logo': get_val.logo}, context=context) - return {'type': 'ir.actions.act_window_close'} - -res_company_logo() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/base_setup/wizard/res_company_logo_view.xml b/addons/base_setup/wizard/res_company_logo_view.xml deleted file mode 100644 index a21fd261dd8..00000000000 --- a/addons/base_setup/wizard/res_company_logo_view.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<openerp> - <data> - - <record id="view_res_company_logo" model="ir.ui.view"> - <field name="name">res.company.logo.form</field> - <field name="model">res.company.logo</field> - <field name="type">form</field> - <field name="inherit_id" ref="base.res_config_view_base"/> - <field name="arch" type="xml"> - <data> - <form position="attributes"> - <attribute name="string">Upload Your Company Logo</attribute> - </form> - <xpath expr='//separator[@string="title"]' position='attributes'> - <attribute name='string'> </attribute> - </xpath> - <xpath expr="//label[@string='description']" - position="attributes"> - <attribute name="string">Upload your company logo in JPG or PNG with a format similar to 450*150 pixels </attribute> - </xpath> - <xpath expr='//separator[@string="vsep"]' position='attributes'> - <attribute name='string'> </attribute> - <attribute name='rowspan'>12</attribute> - </xpath> - <xpath expr="//button[@string='Next']" position="replace"> - <button icon="gtk-ok" string="Upload" name="execute" type="object"/> - </xpath> - <group string="res_config_contents" position="replace"> - <group colspan="4"> - <field colspan="4" height="150" name="logo" widget="image" nolabel="1"/> - </group> - </group> - </data> - </field> - </record> - - <record id="action_res_company_logo" model="ir.actions.act_window"> - <field name="name">Upload Your Company Logo</field> - <field name="res_model">res.company.logo</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="view_id" ref="view_res_company_logo"/> - <field name="target">new</field> - </record> - - </data> -</openerp> |
