From 13b59bec4c2bff9910c759967784261ca1f3aa8e Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 23 Feb 2011 11:37:37 +0530 Subject: [PATCH 01/30] [FIX]: crm - send reminder uses wrong "from" email bzr revid: atp@tinyerp.com-20110223060737-88tydzckko1b4j8m --- addons/base_action_rule/base_action_rule.py | 1 + addons/crm/crm.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index 2a4e2c0e4e1..e22b6869c91 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -398,6 +398,7 @@ the rule to mark CC(mail to any other person defined in actions)."), if hasattr(model_obj, 'remind_user') and action.act_remind_user: model_obj.remind_user(cr, uid, [obj.id], context, attach=action.act_remind_attach) if hasattr(model_obj, 'remind_partner') and action.act_remind_partner: + context.update({'remind_partner': True}) model_obj.remind_partner(cr, uid, [obj.id], context, attach=action.act_remind_attach) if action.act_method: getattr(model_obj, 'act_method')(cr, uid, [obj.id], action, context) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index f4e31575544..da216b31274 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -441,6 +441,7 @@ class crm_case(object): @param context: A standard dictionary for contextual values """ + return self.remind_user(cr, uid, ids, context, attach, destination=False) @@ -451,15 +452,19 @@ class crm_case(object): @param uid: the current user’s ID for security checks, @param ids: List of Remind user's IDs @param context: A standard dictionary for contextual values - """ for case in self.browse(cr, uid, ids, context=context): if not case.section_id.reply_to: raise osv.except_osv(_('Error!'), ("Reply To is not specified in the sales team")) - if not case.email_from: + + if context.get('remind_partner') and not case.email_from: raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case")) - if case.section_id.reply_to and case.email_from: - src = case.email_from + elif not context.get('remind_partner') and not case.user_id.user_email: + raise osv.except_osv(_('Error!'), ("User Email is not specified in Case")) + + case_email = context.get('remind_partner') and case.email_from or case.user_id.user_email + if case.section_id.reply_to and case_email: + src = case_email dest = case.section_id.reply_to body = case.description or "" if case.message_ids: From d49ff054ce1e113eba6853d22e9288ad203df5cf Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 23 Feb 2011 13:01:08 +0100 Subject: [PATCH 02/30] [IMP] Checked authors in manifests. bzr revid: nicolas.vanhoren@openerp.com-20110223120108-3uckq8vsod1hmy2q --- addons/anonymization/__openerp__.py | 2 +- addons/base_report_creator/__openerp__.py | 2 +- addons/hr_holidays/__openerp__.py | 4 +--- addons/l10n_in/__openerp__.py | 2 +- addons/l10n_ve/__openerp__.py | 2 +- addons/stock_planning/__openerp__.py | 2 +- addons/thunderbird/__openerp__.py | 2 +- addons/web_livechat/__openerp__.py | 2 +- addons/web_uservoice/__openerp__.py | 2 +- addons/wiki/__openerp__.py | 2 +- 10 files changed, 10 insertions(+), 12 deletions(-) diff --git a/addons/anonymization/__openerp__.py b/addons/anonymization/__openerp__.py index 60f6f6a09ce..aeebe060d1d 100644 --- a/addons/anonymization/__openerp__.py +++ b/addons/anonymization/__openerp__.py @@ -28,7 +28,7 @@ 'description': """ This module allows you to anonymize a database. """, - 'author': 'OpenERP sa', + 'author': 'OpenERP SA', 'website': 'http://www.openerp.com', 'depends': ['base'], 'init_xml': [], diff --git a/addons/base_report_creator/__openerp__.py b/addons/base_report_creator/__openerp__.py index 43ced889725..d009f00950e 100644 --- a/addons/base_report_creator/__openerp__.py +++ b/addons/base_report_creator/__openerp__.py @@ -31,7 +31,7 @@ for and users. After installing the module, it adds a menu to define custom report in the "Dashboard" menu. """, - 'author': 'OpenERP SA & Axelor', + 'author': ['OpenERP SA', 'Axelor'], 'website': '', 'depends': ['base', 'board'], 'init_xml': [], diff --git a/addons/hr_holidays/__openerp__.py b/addons/hr_holidays/__openerp__.py index 09b312f0834..2baa20d201f 100644 --- a/addons/hr_holidays/__openerp__.py +++ b/addons/hr_holidays/__openerp__.py @@ -23,7 +23,7 @@ { "name": "Human Resources: Holidays management", "version": "1.5", - "author": "OpenERP SA & Axelor", + "author": ['OpenERP SA', 'Axelor'], "category": "Generic Modules/Human Resources", "website": "http://www.openerp.com", "description": """Human Resources: Holidays tracking and workflow @@ -48,8 +48,6 @@ for example, you maybe will do it for the user 'admin' . """, - 'author': 'OpenERP SA & Axelor', - 'website': 'http://www.openerp.com', 'depends': ['hr', 'crm', 'process', 'resource'], 'init_xml': [], 'update_xml': [ diff --git a/addons/l10n_in/__openerp__.py b/addons/l10n_in/__openerp__.py index 5e60ff2e885..da72cc3ef20 100644 --- a/addons/l10n_in/__openerp__.py +++ b/addons/l10n_in/__openerp__.py @@ -25,7 +25,7 @@ "description": """ Indian Accounting : chart of Account """, - "author": 'OpenERP SA & Axelor', + "author": ['OpenERP SA', 'Axelor'], "category": "Localisation/Account Charts", "depends": [ "account", diff --git a/addons/l10n_ve/__openerp__.py b/addons/l10n_ve/__openerp__.py index 84b1948b1e5..df642ebaf97 100644 --- a/addons/l10n_ve/__openerp__.py +++ b/addons/l10n_ve/__openerp__.py @@ -25,7 +25,7 @@ { "name" : "Venezuela -Chart of Account", "version" : "1.0", - "author" : "Tiny & Netquatro", + "author" : ['OpenERP SA', "Netquatro"], "category" : "Localisation/Account Charts", "description": ''' diff --git a/addons/stock_planning/__openerp__.py b/addons/stock_planning/__openerp__.py index d0566424cca..e422b36b593 100644 --- a/addons/stock_planning/__openerp__.py +++ b/addons/stock_planning/__openerp__.py @@ -22,7 +22,7 @@ { "name":"Master Procurement Schedule", "version":"1.1", - "author":"OpenERP SA and Grzegorz Grzelak (Cirrus)", + "author":["OpenERP SA", "Grzegorz Grzelak (Cirrus)"], "category":"Custom", "depends":["hr","stock","sale"], "description": """ diff --git a/addons/thunderbird/__openerp__.py b/addons/thunderbird/__openerp__.py index f4262ccd96d..2500ea8307a 100644 --- a/addons/thunderbird/__openerp__.py +++ b/addons/thunderbird/__openerp__.py @@ -22,7 +22,7 @@ { "name" : "Thunderbird Interface", "version" : "1.0", - "author" : "OpenERP SA & Axelor", + "author" : ['OpenERP SA', 'Axelor'], "website" : "http://www.openerp.com/", "depends" : ["base","mail_gateway"], "category" : "Generic Modules/Thunderbird interface", diff --git a/addons/web_livechat/__openerp__.py b/addons/web_livechat/__openerp__.py index 8ad23602610..9c75cf1f326 100644 --- a/addons/web_livechat/__openerp__.py +++ b/addons/web_livechat/__openerp__.py @@ -23,7 +23,7 @@ 'version': '1.1', 'category': 'Generic Modules/Others', 'description': "Enable live chat support for whom have a maintenance contract", - 'author': 'OpenERP s.a.', + 'author': 'OpenERP SA', 'website': 'http://openerp.com', 'depends': ['base'], 'update_xml': [], diff --git a/addons/web_uservoice/__openerp__.py b/addons/web_uservoice/__openerp__.py index 974da96ef0d..35ab24ed38d 100644 --- a/addons/web_uservoice/__openerp__.py +++ b/addons/web_uservoice/__openerp__.py @@ -23,7 +23,7 @@ 'version': '1.0', 'category': 'Generic Modules/Others', 'description': "", - 'author': 'OpenERP s.a.', + 'author': 'OpenERP SA', 'website': 'http://openerp.com', 'depends': ['base'], 'data': [], diff --git a/addons/wiki/__openerp__.py b/addons/wiki/__openerp__.py index 7402645b9d0..f29ebc04da1 100644 --- a/addons/wiki/__openerp__.py +++ b/addons/wiki/__openerp__.py @@ -28,7 +28,7 @@ The base module to manage documents(wiki) keep track for the wiki groups, pages, and history """, - 'author': 'OpenERP SA & Axelor', + 'author': ['OpenERP SA', 'Axelor'], 'website': 'http://openerp.com', 'depends': ['knowledge'], 'web_depends': ['widget_wiki'], From 72c51b890eed037d7156d67e35dc69e10f754f03 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 23 Feb 2011 13:09:12 +0100 Subject: [PATCH 03/30] [IMP] Checked manifests again. bzr revid: nicolas.vanhoren@openerp.com-20110223120912-3vlw30yfe7n0y68e --- addons/base_crypt/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_crypt/__openerp__.py b/addons/base_crypt/__openerp__.py index 71ea9f14c62..620aa19b09c 100644 --- a/addons/base_crypt/__openerp__.py +++ b/addons/base_crypt/__openerp__.py @@ -21,7 +21,7 @@ { "name" : "Base - Password Encryption", "version" : "1.1", - "author" : "FS3 & OpenERP SA", + "author" : ['OpenERP SA', "FS3"], "maintainer" : "OpenERP SA", "website" : "http://www.openerp.com", "category" : "Generic Modules/Base", From f6306b53ea3ccb4ed5a37cf5c15389604a76b97a Mon Sep 17 00:00:00 2001 From: "Atul Patel (OpenERP)" Date: Wed, 2 Mar 2011 15:58:38 +0530 Subject: [PATCH 04/30] [FIX]crm: set salesteam responsible user as remind user for send remind user action. bzr revid: atp@tinyerp.com-20110302102838-hwg2fqahjpxkoxnz --- addons/base_action_rule/base_action_rule.py | 1 - addons/crm/crm.py | 15 +++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index e22b6869c91..2a4e2c0e4e1 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -398,7 +398,6 @@ the rule to mark CC(mail to any other person defined in actions)."), if hasattr(model_obj, 'remind_user') and action.act_remind_user: model_obj.remind_user(cr, uid, [obj.id], context, attach=action.act_remind_attach) if hasattr(model_obj, 'remind_partner') and action.act_remind_partner: - context.update({'remind_partner': True}) model_obj.remind_partner(cr, uid, [obj.id], context, attach=action.act_remind_attach) if action.act_method: getattr(model_obj, 'act_method')(cr, uid, [obj.id], action, context) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index da216b31274..e566d119bf6 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -456,13 +456,15 @@ class crm_case(object): for case in self.browse(cr, uid, ids, context=context): if not case.section_id.reply_to: raise osv.except_osv(_('Error!'), ("Reply To is not specified in the sales team")) - - if context.get('remind_partner') and not case.email_from: + if not case.email_from: raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case")) - elif not context.get('remind_partner') and not case.user_id.user_email: - raise osv.except_osv(_('Error!'), ("User Email is not specified in Case")) - - case_email = context.get('remind_partner') and case.email_from or case.user_id.user_email + if not case.user_id.user_email: + raise osv.except_osv(_('Error!'), ("User Email is not specified in Case")) + if case.section_id.user_id: + case_email = case.section_id.user_id.user_email + else: + case_email = case.user_id.user_email + if case.section_id.reply_to and case_email: src = case_email dest = case.section_id.reply_to @@ -470,6 +472,7 @@ class crm_case(object): if case.message_ids: body = case.message_ids[0].description or "" if not destination: + src = case.email_from src, dest = dest, src if body and case.user_id.signature: if body: From edd32485de1cd0308f29528d2f6c806e5b3b5275 Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Wed, 2 Mar 2011 13:29:07 +0100 Subject: [PATCH 05/30] [FIX] raise an exception on case.email only if need to remind partner bzr revid: tfr@openerp.com-20110302122907-ex23dr1jzuuyjghs --- addons/crm/crm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index e566d119bf6..4be129762cb 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -441,7 +441,7 @@ class crm_case(object): @param context: A standard dictionary for contextual values """ - + return self.remind_user(cr, uid, ids, context, attach, destination=False) @@ -456,15 +456,15 @@ class crm_case(object): for case in self.browse(cr, uid, ids, context=context): if not case.section_id.reply_to: raise osv.except_osv(_('Error!'), ("Reply To is not specified in the sales team")) - if not case.email_from: + if not destination and not case.email_from: raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case")) if not case.user_id.user_email: raise osv.except_osv(_('Error!'), ("User Email is not specified in Case")) if case.section_id.user_id: - case_email = case.section_id.user_id.user_email + case_email = case.section_id.user_id.user_email else: - case_email = case.user_id.user_email - + case_email = case.user_id.user_email + if case.section_id.reply_to and case_email: src = case_email dest = case.section_id.reply_to From afb08ddc2ecbbe1412b7a501d81ca5cc6ab91e5b Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 3 Mar 2011 18:46:07 +0100 Subject: [PATCH 06/30] Working on css bzr revid: fme@openerp.com-20110303174607-wgxtm92kniqxvu7i --- addons/base/static/openerp/base.css | 107 +++++++++++++++++++++ addons/base/static/openerp/base.html | 45 +++++++++ addons/base/static/openerp/base.xml | 16 +-- addons/base/static/openerp/openerp.base.js | 6 +- 4 files changed, 163 insertions(+), 11 deletions(-) create mode 100644 addons/base/static/openerp/base.css create mode 100644 addons/base/static/openerp/base.html diff --git a/addons/base/static/openerp/base.css b/addons/base/static/openerp/base.css new file mode 100644 index 00000000000..b25d88c8e89 --- /dev/null +++ b/addons/base/static/openerp/base.css @@ -0,0 +1,107 @@ +/* TODO: seperate openerp webclient page css from openerp views css */ +body { + padding: 0; + margin: 0; + font-family: helvetica, sans, arial; + /* TODO: We must check best practice for font-size */ +} + +.oe_box { + border: 1px solid #aaf; + padding: 2px; + margin: 2px; +} + +.#oe_header h2 { + margin: 2px 0; +} + +#oe_errors pre { + margin: 0; +} + + +.openerp { +} + +.openerp .loading { + display: none; + z-index: 1000; + position: fixed; + top: 0; + right: 0; + padding: 4px 8px; + background: #A61300; + color: white; + text-align: center; +} + +.openerp .login { + display: none; + padding: 6px; + z-index: 100; + width: 34%; + position: fixed; + top: 0; + left: 33%; + +} +.openerp .login_valid { + background-color: #8f8; +} +.openerp .login_invalid { + background-color: #f88; +} + +.openerp h3.title { + margin: 2px 0; + color: #252424; + text-shadow: white 0 1px 0; +} + +.openerp .sf-menu { + margin-bottom: 0px; +} +/* +.sf-menu a { + padding: 5px 5px; +} +*/ + +/* SearchView */ + +.openerp .filter_label, .openerp .filter_icon { + border: 1px solid #666; + border-left-width: 0; + background: #F4F2F2; +} +.openerp .filter_icon { + padding: 1px 2px 0px 2px; +} +.openerp .filter_label { + font-weight: bold; + text-transform: uppercase; + text-shadow: #EEE 0 1px 0; + color: #4C4C4C; + white-space: nowrap; + min-height: 40px; + min-width: 75px; + padding: 2px 4px; +} +.openerp .filter_label_group button:first-child { + border-left: 1px solid #666; + -webkit-border-top-left-radius: 7px; + -webkit-border-bottom-left-radius: 7px; + -moz-border-radius-topleft: 7px; + -moz-border-radius-bottomleft: 7px; + border-top-left-radius: 7px; + border-bottom-left-radius: 7px; +} +.openerp .filter_label_group button:last-child { + -webkit-border-top-right-radius: 7px; + -webkit-border-bottom-right-radius: 7px; + -moz-border-radius-topright: 7px; + -moz-border-radius-bottomright: 7px; + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; +} diff --git a/addons/base/static/openerp/base.html b/addons/base/static/openerp/base.html new file mode 100644 index 00000000000..070e927ac19 --- /dev/null +++ b/addons/base/static/openerp/base.html @@ -0,0 +1,45 @@ + + + + + OpenERP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/base/static/openerp/base.xml b/addons/base/static/openerp/base.xml index beedaea82d2..aab8af79377 100644 --- a/addons/base/static/openerp/base.xml +++ b/addons/base/static/openerp/base.xml @@ -3,8 +3,8 @@ --> - - +
+

OpenERP Web Client
Codename: from __future__ import openerpweb

@@ -64,7 +64,7 @@
-

+

@@ -104,8 +104,8 @@ -

- +

+
@@ -129,7 +129,7 @@ --> - <td nowrap="true" valign="bottom"> + <td nowrap="true" valign="bottom" class="filter_label_group"> - + </tr> + </table> + <table border="0" cellspacing="0" cellpadding="0"> + <tr> + + + + + + + + + + diff --git a/addons/base/static/openerp/img/ui/group-expanded.png b/addons/base/static/openerp/img/ui/group-expanded.png new file mode 100644 index 0000000000000000000000000000000000000000..3f16536e123cb3327353ac83b755e12fafd933e7 GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^B0$W}!OXzG=pnRr4v=FU;1lAyXZP;oN00vd`}fbE zKfiwd{PE+*_wV1YUcS6}l`q+^phYuZk{P5w;>(^&YpZ@#TuZBssAafZ@ zg8YIR9G=}s196hP-CY3p^r=85p>QL70(Y z)*K0-AbW|YuPgg4PCiys7DG*!_dp>lPZ!4!4q4WN+)NG%A`Bb$a-Fol^M6&YQGghO zUBNOQ1LhA50`?6n7|Iy7&C6q8P<>>@z;MfIF9QR!2Q$N$CZ>COKvNhzUHx3vIVCg! E06#NjZvX%Q literal 0 HcmV?d00001 From c014ed014b1349d54f17e5eba42883cb5e190020 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 8 Mar 2011 11:06:14 +0100 Subject: [PATCH 19/30] [FIX] Cleaned setup.py bzr revid: nicolas.vanhoren@openerp.com-20110308100614-j3l1m0nmnsoeibw7 --- setup.py | 322 ++++++++++++++----------------------------------------- 1 file changed, 83 insertions(+), 239 deletions(-) mode change 100755 => 100644 setup.py diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 00667bcdf96..21c8327725d --- a/setup.py +++ b/setup.py @@ -1,250 +1,94 @@ -#!/usr/bin/env python -# -*- 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 . -# -############################################################################## -# setup from TinERP -# taken from straw http://www.nongnu.org/straw/index.html -# taken from gnomolicious http://www.nongnu.org/gnomolicious/ -# adapted by Nicolas Évrard -# - -import sys import os -from os.path import join, isfile, basename -import glob +import re +import sys +from setuptools import setup -from pprint import pprint as pp - -from setuptools import setup, find_packages -from setuptools.command.install import install -from distutils.sysconfig import get_python_lib - -has_py2exe = False -if os.name == 'nt': - import py2exe - has_py2exe = True - -sys.path.append(join(os.path.abspath(os.path.dirname(__file__)), "bin")) - -execfile(join('bin', 'release.py')) +name = 'openerp-web-proto' +version = '6.0.1' +description = "Web Client of OpenERP, the Enterprise Management Software" +long_description = "OpenERP Web is the web client of the OpenERP, a free enterprise management software" +author = "OpenERP S.A." +author_email = "info@openerp.com" +support_email = 'support@openerp.com' +url = "http://www.openerp.com/" +download_url = '' +license = "OEPL" +version_dash_incompatible = False if 'bdist_rpm' in sys.argv: + version_dash_incompatible = True +try: + import py2exe + from py2exe_utils import opts + version_dash_incompatible = True +except ImportError: + opts = {} +if version_dash_incompatible: version = version.split('-')[0] -# get python short version -py_short_version = '%s.%s' % sys.version_info[:2] +FILE_PATTERNS = \ + r'.+\.(py|cfg|po|pot|mo|txt|rst|gif|png|jpg|ico|mako|html|js|css|htc|swf)$' +def find_data_files(source, patterns=FILE_PATTERNS): + file_matcher = re.compile(patterns, re.I) + out = [] + for base, _, files in os.walk(source): + cur_files = [] + for f in files: + if file_matcher.match(f): + cur_files.append(os.path.join(base, f)) + if cur_files: + out.append( + (base, cur_files)) -# backports os.walk with followlinks from python 2.6 -def walk_followlinks(top, topdown=True, onerror=None, followlinks=False): - from os.path import join, isdir, islink - from os import listdir, error + return out - try: - names = listdir(top) - except error, err: - if onerror is not None: - onerror(err) - return - - dirs, nondirs = [], [] - for name in names: - if isdir(join(top, name)): - dirs.append(name) - else: - nondirs.append(name) - - if topdown: - yield top, dirs, nondirs - for name in dirs: - path = join(top, name) - if followlinks or not islink(path): - for x in walk_followlinks(path, topdown, onerror, followlinks): - yield x - if not topdown: - yield top, dirs, nondirs - -if sys.version_info < (2, 6): - os.walk = walk_followlinks - -def find_addons(): - for root, _, names in os.walk(join('bin', 'addons'), followlinks=True): - if '__openerp__.py' in names or '__terp__.py' in names: - yield basename(root), root - #look for extra modules - try: - empath = os.getenv('EXTRA_MODULES_PATH', '../addons/') - for mname in open(join(empath, 'server_modules.list')): - mname = mname.strip() - if not mname: - continue - - terp = join(empath, mname, '__openerp__.py') - if not os.path.exists(terp): - terp = join(empath, mname, '__terp__.py') - - if os.path.exists(terp): - yield mname, join(empath, mname) - else: - print "Module %s specified, but no valid path." % mname - except Exception: - pass - -def data_files(): - '''Build list of data files to be installed''' - files = [] - if os.name == 'nt': - os.chdir('bin') - for (dp, dn, names) in os.walk('addons'): - files.append((dp, map(lambda x: join('bin', dp, x), names))) - os.chdir('..') - #for root, _, names in os.walk(join('bin','addons')): - # files.append((root, [join(root, name) for name in names])) - for root, _, names in os.walk('doc'): - files.append((root, [join(root, name) for name in names])) - #for root, _, names in os.walk('pixmaps'): - # files.append((root, [join(root, name) for name in names])) - files.append(('.', [join('bin', 'import_xml.rng'),])) - else: - man_directory = join('share', 'man') - files.append((join(man_directory, 'man1'), ['man/openerp-server.1'])) - files.append((join(man_directory, 'man5'), ['man/openerp_serverrc.5'])) - - doc_directory = join('share', 'doc', 'openerp-server-%s' % version) - files.append((doc_directory, filter(isfile, glob.glob('doc/*')))) - files.append((join(doc_directory, 'migrate', '3.3.0-3.4.0'), - filter(isfile, glob.glob('doc/migrate/3.3.0-3.4.0/*')))) - files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'), - filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*')))) - - openerp_site_packages = join(get_python_lib(prefix=''), 'openerp-server') - - files.append((openerp_site_packages, [join('bin', 'import_xml.rng'),])) - - if sys.version_info[0:2] == (2,5): - files.append((openerp_site_packages, [ join('python25-compat','BaseHTTPServer.py'), - join('python25-compat','SimpleXMLRPCServer.py'), - join('python25-compat','SocketServer.py')])) - - for addonname, add_path in find_addons(): - addon_path = join(get_python_lib(prefix=''), 'openerp-server','addons', addonname) - for root, dirs, innerfiles in os.walk(add_path): - innerfiles = filter(lambda fil: os.path.splitext(fil)[1] not in ('.pyc', '.pyd', '.pyo'), innerfiles) - if innerfiles: - res = os.path.normpath(join(addon_path, root.replace(join(add_path), '.'))) - files.extend(((res, map(lambda fil: join(root, fil), - innerfiles)),)) - - return files - -f = file('openerp-server','w') -f.write("""#!/bin/sh -echo "Error: the content of this file should have been replaced during " -echo "installation\n" -exit 1 -""") -f.close() - -def find_package_dirs(): - package_dirs = {'openerp-server': 'bin'} - for mod, path in find_addons(): - package_dirs['openerp-server.addons.' + mod] = path - return package_dirs - -class openerp_server_install(install): - def run(self): - # create startup script - start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n"\ - % (join(self.install_libbase, "openerp-server"), sys.executable) - # write script - f = open('openerp-server', 'w') - f.write(start_script) - f.close() - install.run(self) - - - -options = { - "py2exe": { - "compressed": 1, - "optimize": 2, - "dist_dir": 'dist', - "packages": [ - "lxml", "lxml.builder", "lxml._elementpath", "lxml.etree", - "lxml.objectify", "decimal", "xml", "xml", "xml.dom", "xml.xpath", - "encodings", "dateutil", "wizard", "pychart", "PIL", "pyparsing", - "pydot", "asyncore","asynchat", "reportlab", "vobject", - "HTMLParser", "select", "mako", "poplib", - "imaplib", "smtplib", "email", "yaml", "DAV", - "uuid", +setup( + name=name, + version=version, + description=description, + long_description=long_description, + author=author, + author_email=author_email, + url=url, + download_url=download_url, + license=license, + install_requires=[ + "CherryPy >= 3.1.2", + "Mako >= 0.2.4", + "Babel >= 0.9.4", + "FormEncode >= 1.2.2", + "simplejson >= 2.0.9", + "python-dateutil >= 1.4.1", + "pytz >= 2009j" + ], + zip_safe=False, + packages=[ + 'openobject', + 'openobject.admin', + 'openobject.admin.i18n', + 'openobject.controllers', + 'openobject.i18n', + 'openobject.test', + 'openobject.tools', + 'openobject.widgets' + ], + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Environment :: Web Environment', + 'Topic :: Office/Business :: Financial', ], - "excludes" : ["Tkconstants","Tkinter","tcl"], - } -} - -setup(name = name, - version = version, - description = description, - long_description = long_desc, - url = url, - author = author, - author_email = author_email, - classifiers = filter(None, classifiers.split("\n")), - license = license, - data_files = data_files(), - cmdclass = { - 'install' : openerp_server_install, - }, - scripts = ['openerp-server'], - packages = [ - '.'.join(['openerp-server'] + package.split('.')[1:]) - for package in find_packages() - ], - include_package_data = True, - package_data = { - '': ['*.yml', '*.xml', '*.po', '*.pot', '*.csv'], - }, - package_dir = find_package_dirs(), - console = [ - { - "script": join("bin", "openerp-server.py"), - "icon_resources": [(1, join("pixmaps","openerp-icon.ico"))] - } - ], - options = options, - install_requires = [ - 'lxml', - 'mako', - 'python-dateutil', - 'psycopg2', - 'pychart', - 'pydot', - 'pytz', - 'reportlab', - 'caldav', - 'pyyaml', - 'pywebdav', - 'feedparser', - ], - extras_require={ - 'SSL' : ['pyopenssl'], - } + scripts=['scripts/openerp-web'], + data_files=(find_data_files('addons/openerp') + + find_data_files('addons/view_calendar') + + find_data_files('addons/view_diagram') + + find_data_files('addons/view_graph') + + find_data_files('addons/widget_ckeditor') + + find_data_files('doc', patterns='') + + find_data_files('openobject', patterns=r'.+\.(cfg|css|js|mako|gif|png|jpg|ico)') + + opts.pop('data_files', []) + ), + **opts ) - From f563b184fa35edc0850601ffc38de2ea64bfcbe2 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 8 Mar 2011 11:28:13 +0100 Subject: [PATCH 20/30] [FIX] Fixed setup.py, now it works. bzr revid: nicolas.vanhoren@openerp.com-20110308102813-i0oyuk297vgpsarq --- setup.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/setup.py b/setup.py index 21c8327725d..439fb77bcfd 100644 --- a/setup.py +++ b/setup.py @@ -55,39 +55,28 @@ setup( license=license, install_requires=[ "CherryPy >= 3.1.2", - "Mako >= 0.2.4", "Babel >= 0.9.4", - "FormEncode >= 1.2.2", "simplejson >= 2.0.9", "python-dateutil >= 1.4.1", - "pytz >= 2009j" ], zip_safe=False, packages=[ - 'openobject', - 'openobject.admin', - 'openobject.admin.i18n', - 'openobject.controllers', - 'openobject.i18n', - 'openobject.test', - 'openobject.tools', - 'openobject.widgets' + 'addons', + 'addons.base', + 'addons.base.controllers', + 'addons.base_calendar', + 'addons.base_hello', + 'openerpweb', ], classifiers=[ - 'Development Status :: 5 - Production/Stable', + 'Development Status :: 6 - Production/Stable', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Environment :: Web Environment', 'Topic :: Office/Business :: Financial', ], scripts=['scripts/openerp-web'], - data_files=(find_data_files('addons/openerp') - + find_data_files('addons/view_calendar') - + find_data_files('addons/view_diagram') - + find_data_files('addons/view_graph') - + find_data_files('addons/widget_ckeditor') - + find_data_files('doc', patterns='') - + find_data_files('openobject', patterns=r'.+\.(cfg|css|js|mako|gif|png|jpg|ico)') + data_files=(find_data_files('addons') + opts.pop('data_files', []) ), **opts From 081cd65e3615f13a4b8a1e5cea7e3931acafeb93 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Tue, 8 Mar 2011 11:51:52 +0100 Subject: [PATCH 21/30] [IMP] Debian init script now has variable for config file location bzr revid: niels@bubbles-it.be-20110308105152-w9uodtf166u1827x --- debian/openerp-server.init | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/openerp-server.init b/debian/openerp-server.init index 1f5c8822175..fbd74474b40 100644 --- a/debian/openerp-server.init +++ b/debian/openerp-server.init @@ -16,7 +16,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/openerp-server NAME=openerp-server DESC=openerp-server - +CONFIG=/etc/openerp-server.conf USER=openerp test -x ${DAEMON} || exit 0 @@ -29,7 +29,7 @@ case "${1}" in start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid \ --chuid ${USER} --background --make-pidfile \ - --exec ${DAEMON} -- --config=/etc/openerp-server.conf \ + --exec ${DAEMON} -- --config=$CONFIG \ --logfile=/var/log/openerp-server.log echo "${NAME}." @@ -54,7 +54,7 @@ case "${1}" in start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid \ --chuid ${USER} --background --make-pidfile \ - --exec ${DAEMON} -- --config=/etc/openerp-server.conf \ + --exec ${DAEMON} -- --config=$CONFIG \ --logfile=/var/log/openerp-server.log echo "${NAME}." From dee15c634268306c1fedc79f6d9d91d4888a6e35 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Tue, 8 Mar 2011 11:52:36 +0100 Subject: [PATCH 22/30] [IMP] Debian init script now has LOGFILE variable. bzr revid: niels@bubbles-it.be-20110308105236-0j0488uq0sx0lld6 --- debian/openerp-server.init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/openerp-server.init b/debian/openerp-server.init index fbd74474b40..032da542043 100644 --- a/debian/openerp-server.init +++ b/debian/openerp-server.init @@ -17,6 +17,7 @@ DAEMON=/usr/bin/openerp-server NAME=openerp-server DESC=openerp-server CONFIG=/etc/openerp-server.conf +LOGFILE=/var/log/openerp-server.log USER=openerp test -x ${DAEMON} || exit 0 @@ -30,7 +31,7 @@ case "${1}" in start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid \ --chuid ${USER} --background --make-pidfile \ --exec ${DAEMON} -- --config=$CONFIG \ - --logfile=/var/log/openerp-server.log + --logfile=$LOGFILE echo "${NAME}." ;; @@ -55,7 +56,7 @@ case "${1}" in start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid \ --chuid ${USER} --background --make-pidfile \ --exec ${DAEMON} -- --config=$CONFIG \ - --logfile=/var/log/openerp-server.log + --logfile=$LOGFILE echo "${NAME}." ;; From 04eaeaaeb4bda62369e2b056d0e0a0dbe61914f4 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 8 Mar 2011 12:19:54 +0100 Subject: [PATCH 23/30] addons loading part2 bzr revid: al@openerp.com-20110308111954-7z5sp3jtp0skllze --- addons/base/controllers/main.py | 53 +++++++++++++++------------------ 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 96c84634032..5e59b31875a 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -66,13 +66,18 @@ class Hello(openerpweb.Controller): class Connection(openerpweb.Controller): _cp_path = "/base/connection" - def filesofmodulemap(self, ): - # TODO root should be a global config - files=[] - for j in cssfiles.get(i,[]): - files.append(j) - def fileconcat(self, file_list): + def manifest_glob(self, modlist, key): + files = [] + for i in mods.split(','): + globlist = openerpweb.addons_manifest.get(i,{}).get('css',[]) + for j in globlist: + tmp = glob.glob(os.path.join(path_addons,i,j)) + files.append(tmp) + print modlist, key, files + return files + + def concat_files(self, file_list): """ Concatenate file content return (concat,timestamp) concat: concatenation of file content @@ -90,38 +95,28 @@ class Connection(openerpweb.Controller): files_concat = "".join(files_content) return files_concat + def list_modules(self, req): + return + + @openerpweb.jsonrequest + def manifest_files(self, req, key, mods): + files = self.manifest_glob(mods, key) + return {'files': files} + def css(self, req): # TODO http get argument mods is a comma seprated value of modules mods = 'base,base_hello' - files = [] - for i in mods.split(','): - globlist = openerpweb.addons_manifest.get(i,{}) - for j in globlist: - tmp = glob.glob(os.path.join(path_addons,i,j)) - print tmp - files.append(tmp) - - # TODO modules should list their css and js in __openerp__ - # TODO cssfiles should be a global registry of files - cssfiles = { - 'base': ['base/static/openerp/base.css'] - } - files = filesofmodulemap(mods) - (concat, timestamp) = self.fileconcat(files) + files = self.manifest_glob(mods.split(','), 'css') + (concat, timestamp) = self.concat_files(files) # TODO request set the Date of last modif and Etag return concat css.exposed=1 def js(self, req): # TODO http get argument mods is a comma seprated value of modules - mods = 'base,base_calendar' - # TODO modules should list their css and js in __openerp__ - # TODO cssfiles should be a global registry of files - jsfiles = { - 'base': ['base/static/openerp/openerp.base.js'] - } - files = filesofmodulemap(mods) - (concat, timestamp) = self.fileconcat(files) + mods = 'base,base_hello' + files = self.manifest_glob(mods.split(','), 'js') + (concat, timestamp) = self.concat_files(files) # TODO request set the Date of last modif and Etag return concat js.exposed=1 From 8fae3e7c6f6559b8678ff080c6815e7e7ac5d1c6 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Tue, 8 Mar 2011 15:04:49 +0100 Subject: [PATCH 24/30] [FIX] sql_db: use the config values later than at import time. lp bug: https://launchpad.net/bugs/716715 fixed bzr revid: vmt@openerp.com-20110308140449-5v883yms1z8dy23k --- openerp/sql_db.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/openerp/sql_db.py b/openerp/sql_db.py index b1822f6bb84..8afd684d3f1 100644 --- a/openerp/sql_db.py +++ b/openerp/sql_db.py @@ -358,14 +358,13 @@ class Connection(object): except Exception: return False - -_dsn = '' -for p in ('host', 'port', 'user', 'password'): - cfg = tools.config['db_' + p] - if cfg: - _dsn += '%s=%s ' % (p, cfg) - def dsn(db_name): + _dsn = '' + for p in ('host', 'port', 'user', 'password'): + cfg = tools.config['db_' + p] + if cfg: + _dsn += '%s=%s ' % (p, cfg) + return '%sdbname=%s' % (_dsn, db_name) def dsn_are_equals(first, second): From 747783efea88599ea8e8988af214665fab532ff2 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 8 Mar 2011 15:55:30 +0100 Subject: [PATCH 25/30] [FIX] Corrected indentation. bzr revid: nicolas.vanhoren@openerp.com-20110308145530-rdy43672n558kq5s --- addons/base/controllers/main.py | 2 +- openerpweb/xmlrpctimeout.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 5e59b31875a..e25d94d4f73 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -41,7 +41,7 @@ class Xml2Json: for kid in el: kids.append(Xml2Json.convert_element(kid)) if kid.tail and (not skip_whitespaces or kid.tail.strip() != ''): - kids.append(kid.tail) + kids.append(kid.tail) if len(kids): res["children"] = kids return res diff --git a/openerpweb/xmlrpctimeout.py b/openerpweb/xmlrpctimeout.py index 4a2e77f8481..15193115d0f 100644 --- a/openerpweb/xmlrpctimeout.py +++ b/openerpweb/xmlrpctimeout.py @@ -3,14 +3,14 @@ import httplib import socket class TimeoutHTTPConnection(httplib.HTTPConnection): - def connect(self): - httplib.HTTPConnection.connect(self) - self.sock.settimeout(self.timeout) + def connect(self): + httplib.HTTPConnection.connect(self) + self.sock.settimeout(self.timeout) class TimeoutHTTP(httplib.HTTP): - _connection_class = TimeoutHTTPConnection - def set_timeout(self, timeout): - self._conn.timeout = timeout + _connection_class = TimeoutHTTPConnection + def set_timeout(self, timeout): + self._conn.timeout = timeout class TimeoutTransport(xmlrpclib.Transport): def __init__(self, timeout=10, *l, **kw): From 13d8b38c4e60f5c46e4c151882b765d646980b7c Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 8 Mar 2011 15:57:54 +0100 Subject: [PATCH 26/30] [FIX] Cleaned for eclipse. bzr revid: nicolas.vanhoren@openerp.com-20110308145754-uzjzt5unoa2sslri --- addons/base/controllers/main.py | 6 +++--- openerpweb/openerpweb.py | 2 +- openerpweb/xmlrpctimeout.py | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index e25d94d4f73..21df7a02214 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -import glob,json,os,sys,traceback +import glob,json,os #import simplejson as json @@ -107,7 +107,7 @@ class Connection(openerpweb.Controller): # TODO http get argument mods is a comma seprated value of modules mods = 'base,base_hello' files = self.manifest_glob(mods.split(','), 'css') - (concat, timestamp) = self.concat_files(files) + concat = self.concat_files(files)[0] # TODO request set the Date of last modif and Etag return concat css.exposed=1 @@ -116,7 +116,7 @@ class Connection(openerpweb.Controller): # TODO http get argument mods is a comma seprated value of modules mods = 'base,base_hello' files = self.manifest_glob(mods.split(','), 'js') - (concat, timestamp) = self.concat_files(files) + concat = self.concat_files(files)[0] # TODO request set the Date of last modif and Etag return concat js.exposed=1 diff --git a/openerpweb/openerpweb.py b/openerpweb/openerpweb.py index 601599f35d0..edd1a907486 100644 --- a/openerpweb/openerpweb.py +++ b/openerpweb/openerpweb.py @@ -2,7 +2,7 @@ import os,re,sys,traceback,xmlrpclib -import cherrypy,cherrypy.lib.static +import cherrypy.lib.static import simplejson as json diff --git a/openerpweb/xmlrpctimeout.py b/openerpweb/xmlrpctimeout.py index 15193115d0f..28f9bcd41bd 100644 --- a/openerpweb/xmlrpctimeout.py +++ b/openerpweb/xmlrpctimeout.py @@ -1,6 +1,5 @@ import xmlrpclib import httplib -import socket class TimeoutHTTPConnection(httplib.HTTPConnection): def connect(self): From 2e2d85503a6e003ed60c86774e9a2f60a7faee58 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 8 Mar 2011 17:20:41 +0100 Subject: [PATCH 27/30] [FIX] compilation problems bzr revid: nicolas.vanhoren@openerp.com-20110308162041-0t6kk49hfmf13hay --- addons/base/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 21df7a02214..12e905d70d6 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -69,10 +69,10 @@ class Connection(openerpweb.Controller): def manifest_glob(self, modlist, key): files = [] - for i in mods.split(','): + for i in modlist.split(','): globlist = openerpweb.addons_manifest.get(i,{}).get('css',[]) for j in globlist: - tmp = glob.glob(os.path.join(path_addons,i,j)) + tmp = glob.glob(os.path.join(openerpweb.path_addons,i,j)) files.append(tmp) print modlist, key, files return files From a22866c19fe35b992724cc744cda4d9e85558c54 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Tue, 8 Mar 2011 23:47:32 +0100 Subject: [PATCH 28/30] Added images bzr revid: fme@openerp.com-20110308224732-wfcbrnto166ftl2y --- .../static/openerp/img/header-background.png | Bin 0 -> 149 bytes addons/base/static/openerp/img/logo.png | Bin 0 -> 3551 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 addons/base/static/openerp/img/header-background.png create mode 100644 addons/base/static/openerp/img/logo.png diff --git a/addons/base/static/openerp/img/header-background.png b/addons/base/static/openerp/img/header-background.png new file mode 100644 index 0000000000000000000000000000000000000000..774b395412478e595cd2cbe398a23b5d8965aa96 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$j!3HD+e9t`vQZb$`jv*44d;1S^9Z=wLcGmyb z_S^U7|8u+5GY^*qq{$lXX}R9kB9`v8ouT0ZPjAkItmS5t>Pn8yF4%4PyY#tMtO$=H yr{+?JJ_*I}bJ1u2i|2Gqe0@J_?OZ303Wj(6MqZD%XPN`;VeoYIb6Mw<&;$S!h&G4- literal 0 HcmV?d00001 diff --git a/addons/base/static/openerp/img/logo.png b/addons/base/static/openerp/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8f1c5c6085f81740bf23113d3182f73bedcab954 GIT binary patch literal 3551 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 Date: Tue, 8 Mar 2011 23:47:58 +0100 Subject: [PATCH 29/30] Start working on layout bzr revid: fme@openerp.com-20110308224758-si0b41r1nvpb0ban --- addons/base/static/openerp/base.css | 82 ++++++++++++++++++---- addons/base/static/openerp/base.xml | 25 ++++--- addons/base/static/openerp/openerp.base.js | 10 ++- 3 files changed, 94 insertions(+), 23 deletions(-) diff --git a/addons/base/static/openerp/base.css b/addons/base/static/openerp/base.css index e2c1ac5db1f..6e36ec906d6 100644 --- a/addons/base/static/openerp/base.css +++ b/addons/base/static/openerp/base.css @@ -3,7 +3,7 @@ body { padding: 0; margin: 0; font-family: helvetica, sans, arial; - /* TODO: We must check best practice for font-size */ + font-size: 80%; } .oe_box { @@ -53,6 +53,10 @@ body { background-color: #f88; } +.openerp .main { + padding: 6px; +} + .openerp h3.title { margin: 2px 0; color: #252424; @@ -68,34 +72,84 @@ body { } */ +/* Header */ +.openerp .header { + height: 65px; + background: url("img/header-background.png") repeat-x scroll left top transparent; + color: #FFFFFF; + letter-spacing: 0.5px; + text-shadow: 0 1px 0 #333333; +} +.openerp .company_logo_link { + display: block; + float: left; + height: 63px; + width: 200px; + margin-right: 10px; + line-height: 63px; + text-align: center; + border-bottom: 1px solid black; + border-right: 1px solid black; + border-top: 1px solid white; + border-left: 1px solid white; + background: #FFFFFF; + background: -moz-linear-gradient(top, #FFFFFF 0%, #CECECE 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#CECECE)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#CECECE',GradientType=0 ); +} +.openerp .company_logo { + vertical-align: middle +} +.openerp .header_title { + float: left; + font-size: 100%; + margin: 0; + padding: 4px 0; + text-shadow: 0 1px 0 #111111; +} +.openerp .header_title small { + color: #ccc; + font-size: 90%; + font-weight: normal; +} +.openerp .header_corner { + float: right; +} + +/* Header */ +.openerp .footer { + text-align: center; +} + /* SearchView */ .openerp .filter_label, .openerp .filter_icon { border: 1px solid #666; border-left-width: 0; - background: #F0F0F0; /* old browsers */ - background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%); /* firefox */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0)); /* webkit */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 ); /* ie */ + background: #F0F0F0; + background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 ); } .openerp .filter_label:hover, .openerp .filter_icon:hover { - background: #F0F0F0; /* old browsers */ - background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%); /* firefox */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE)); /* webkit */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 ); /* ie */ + background: #F0F0F0; + background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 ); } .openerp .filter_label:active, .openerp .filter_icon:active { - background: #AAAAAA; /* old browsers */ - background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%); /* firefox */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE)); /* webkit */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 ); /* ie */ + background: #AAAAAA; + background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE)); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 ); } .openerp .filter_label.enabled, .openerp .filter_icon.enabled { background: #AAAAAA; } .openerp .filter_icon { padding: 1px 2px 0px 2px; - margin: 0; + margin-left: 0; + margin-right: 0; } .openerp .filter_label { font-weight: bold; diff --git a/addons/base/static/openerp/base.xml b/addons/base/static/openerp/base.xml index ad845fc4c44..fc4c65befcf 100644 --- a/addons/base/static/openerp/base.xml +++ b/addons/base/static/openerp/base.xml @@ -5,18 +5,16 @@
-
-

OpenERP Web Client
Codename: from __future__ import openerpweb

-
+
-
-
+
+ +
+ + + + +
+
+
+