From 7bc0699330ba6f477c14b5f5c366ea564ac17c6d Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Tue, 17 Jul 2012 16:47:33 +0200 Subject: [PATCH 01/11] various improvements bzr revid: mit@openerp.com-20120717144733-jxlf113kuwga98ug --- addons/web/static/src/css/base.css | 26 +++++++++----------- addons/web/static/src/css/base.sass | 19 ++++++-------- addons/web/static/src/xml/base.xml | 4 +-- addons/web_kanban/static/src/css/kanban.css | 6 +++-- addons/web_kanban/static/src/css/kanban.sass | 17 +++++++------ 5 files changed, 33 insertions(+), 39 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index c48ab0e3012..0a3d24d41f4 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -1,4 +1,4 @@ -@charset "utf-8"; +@charset "UTF-8"; @font-face { font-family: "mnmliconsRegular"; src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot"); @@ -34,7 +34,7 @@ background: white; /* http://www.quirksmode.org/dom/inputfile.html * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image - */ */ + */ } .openerp a { text-decoration: none; @@ -234,14 +234,13 @@ .openerp.ui-dialog .ui-dialog-buttonpane { border-top: 1px solid #e0e0e0; background: #f5f7f9; - padding: 8px; margin: 0; -moz-border-radius: 0 0 2px 2px; -webkit-border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px; } .openerp.ui-dialog .ui-dialog-buttonpane button { - margin-left: 8px; + margin: 0; } .openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: left; @@ -1855,9 +1854,12 @@ font-weight: bold; font-size: 18px; } +.openerp .oe_form .oe_subtotal_footer label:after { + content: ":"; +} .openerp .oe_form .oe_subtotal_footer label.oe_subtotal_footer_separator { font-weight: bold !important; - padding: 2px 8px 2px 0px !important; + padding: 2px 11px 2px 0px !important; } .openerp .oe_form .oe_subtotal_footer label.oe_form_label_help { font-weight: normal; @@ -2061,15 +2063,6 @@ .openerp .oe_form .oe_form_field_with_button.oe_no_button > .oe_button { display: none; } -.openerp .oe_form .oe_form_field_with_button:not(.oe_no_button) input { - border-right: none; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 0px; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 0px; - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; -} .openerp .oe_form .oe_form_field_with_button:not(.oe_no_button) > .oe_button { float: right; -moz-border-radius: 0; @@ -2148,9 +2141,12 @@ } .openerp .oe_form_field_many2one span.oe_m2o_drop_down_button { position: absolute; - top: 1px; + top: 2px; right: 0px; } +.openerp .oe_form_field_many2one .oe_m2o_cm_button { + line-height: 14px; +} .openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page { display: none; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 8a2c510ec42..fb67945a02d 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -232,11 +232,10 @@ $sheet-max-width: 860px .ui-dialog-buttonpane border-top: 1px solid #e0e0e0 background: #f5f7f9 - padding: 8px margin: 0 @include radius(0 0 2px 2px) button - margin-left: 8px + margin: 0 .ui-dialog-buttonset float: left .ui-dialog-titlebar-close @@ -1444,9 +1443,11 @@ $sheet-max-width: 860px border-top: 1px solid #cacaca font-weight: bold font-size: 18px + label:after + content: ":" label.oe_subtotal_footer_separator font-weight: bold !important - padding: 2px 8px 2px 0px !important + padding: 2px 11px 2px 0px !important label.oe_form_label_help font-weight: normal // no sheet in popups @@ -1610,14 +1611,6 @@ $sheet-max-width: 860px .oe_form_field_with_button.oe_no_button > .oe_button display: none .oe_form_field_with_button:not(.oe_no_button) - input - border-right: none - -webkit-border-top-right-radius: 0px - -webkit-border-bottom-right-radius: 0px - -moz-border-radius-topright: 0px - -moz-border-radius-bottomright: 0px - border-top-right-radius: 0px - border-bottom-right-radius: 0px > .oe_button float: right @include radius(0) @@ -1691,8 +1684,10 @@ $sheet-max-width: 860px position: relative span.oe_m2o_drop_down_button position: absolute - top: 1px + top: 2px right: 0px + .oe_m2o_cm_button + line-height: 14px // }}} // FormView.one2many {{{ .oe_form .oe_form_field_one2many > .oe_view_manager diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 2d9caa43bbd..0ade5dd4d89 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -945,9 +945,7 @@ - + /
Date: Tue, 17 Jul 2012 19:30:02 +0200 Subject: [PATCH 02/11] improved task kanban view bzr revid: mit@openerp.com-20120717173002-0m3f3uicefpmcu2l --- addons/project/project_view.xml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 9e4f3c44a27..a70bc504299 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -517,22 +517,16 @@
- i + í
+
- -
- -
+
-
From 005f7a3180f03ee03075cb7e5bb46910a8994644 Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Tue, 17 Jul 2012 19:30:27 +0200 Subject: [PATCH 03/11] improved task kanban view bzr revid: mit@openerp.com-20120717173027-tnpri7yd1jclnufs --- addons/web_kanban/static/src/css/kanban.css | 11 +++++++---- addons/web_kanban/static/src/css/kanban.sass | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 868fa9783fd..36dbab57559 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -402,16 +402,19 @@ top: 2px; } .openerp .oe_kanban_view .oe_kanban_status { + position: relative; + top: 4px; display: inline-block; height: 12px; width: 12px; - margin: 4px auto; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); - -box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); + background-position: center center; + background-image: -webkit-radial-gradient(circle, #eeeeee 0%, #cccccc 40%, #bbbbbb 100%); + background-image: -moz-radial-gradient(#eeeeee 0%, #cccccc 40%, #bbbbbb 100%); + background-image: -ms-radial-gradient(#eeeeee 0%, #cccccc 40%, #bbbbbb 100%); + background-image: radial-gradient(#eeeeee 0%, #cccccc 40%, #bbbbbb 100%); } .openerp .oe_kanban_view .oe_kanban_status_green { background: green; diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index fb5bdc9dcbb..f4c13cc7bd2 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -338,12 +338,13 @@ top: 2px .oe_kanban_status + position: relative + top: 4px display: inline-block height: 12px width: 12px - margin: 4px auto @include radius(6px) - @include box-shadow(0 1px 3px rgba(0,0,0,0.6)) + @include radial-gradient((#eee 0%, #ccc 40%, #bbb 100%)) .oe_kanban_status_green background: green @include radial-gradient((#55dd55 0%, #44aa44 40%, #339933 100%)) From ebec068b6b52983040240bc55fbf07a82a0e97d5 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 18 Jul 2012 15:08:03 +0200 Subject: [PATCH 04/11] [IMP] in wizards, move buttons in the footer bzr revid: rco@openerp.com-20120718130803-hl42sgc8i0z7f0nu --- openerp/addons/base/res/res_config.xml | 86 +++++++++++++------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/openerp/addons/base/res/res_config.xml b/openerp/addons/base/res/res_config.xml index 0541bf46b48..37e50e91492 100644 --- a/openerp/addons/base/res/res_config.xml +++ b/openerp/addons/base/res/res_config.xml @@ -1,54 +1,54 @@ - + - res.config.view.base - res.config - form - -
-
-
- - -
+ res.config.view.base + res.config + form + +
+ +
+
+ +
- Compabitiliby configuration wizard - ir.actions.configuration.wizard - form - -
-
-
- - - -
-
+ Compabitiliby configuration wizard + ir.actions.configuration.wizard + form + +
+ + + +
+
+
+
- Inheritable view for installer objects - res.config.installer - form - -
-
-
- - -
+ Inheritable view for installer objects + res.config.installer + form + +
+ +
+
+ +
-
+
From 6001d4fcb4e8b7eebe83789f44219a76b489355f Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 18 Jul 2012 15:27:35 +0200 Subject: [PATCH 05/11] [FIX] temporarily desactivate commits 2748 & 2747 because there are problems with werkzeug versions bzr revid: nicolas.vanhoren@openerp.com-20120718132735-t2lg790pl9g4ccgj --- addons/web/common/http.py | 71 +-------------------------------------- 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index cd17f5711e0..cc76a554693 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -452,7 +452,7 @@ class Root(object): static_dirs = self._load_addons(openerp_addons_namespace) if options.serve_static: - self.dispatch = SuperSharedDataMiddleware( + self.dispatch = werkzeug.wsgi.SharedDataMiddleware( self.dispatch, static_dirs, cache=False) if options.session_storage: @@ -555,75 +555,6 @@ class Root(object): return m ps, _slash, meth = ps.rpartition('/') return None - -class SuperSharedDataMiddleware(werkzeug.wsgi.SharedDataMiddleware): - """Redefine SharedDataMiddleware to better handle the cache = False directive. - Also desactivate 304 Not Modified headers only when the referer has 'debug' in its - arguments. - """ - def __call__(self, environ, start_response): - import os - import mimetypes - import werkzeug.http - import urlparse - # sanitize the path for non unix systems - cleaned_path = environ.get('PATH_INFO', '').strip('/') - for sep in os.sep, os.altsep: - if sep and sep != '/': - cleaned_path = cleaned_path.replace(sep, '/') - path = '/'.join([''] + [x for x in cleaned_path.split('/') - if x and x != '..']) - file_loader = None - for search_path, loader in self.exports.iteritems(): - if search_path == path: - real_filename, file_loader = loader(None) - if file_loader is not None: - break - if not search_path.endswith('/'): - search_path += '/' - if path.startswith(search_path): - real_filename, file_loader = loader(path[len(search_path):]) - if file_loader is not None: - break - if file_loader is None or not self.is_allowed(real_filename): - return self.app(environ, start_response) - - guessed_type = mimetypes.guess_type(real_filename) - mime_type = guessed_type[0] or self.fallback_mimetype - f, mtime, file_size = file_loader() - - etag = self.generate_etag(mtime, file_size, real_filename) - modified = werkzeug.http.is_resource_modified(environ, etag, last_modified=mtime) - - headers = [('Date', werkzeug.http.http_date())] - if self.cache: - timeout = self.cache_timeout - headers += [ - ('Etag', '"%s"' % etag), - ('Cache-Control', 'max-age=%d, public' % timeout) - ] - if modified: - headers.append(('Expires', werkzeug.http.http_date(time() + timeout))) - else: - headers.append(('Cache-Control', 'no-cache')) - - referer = environ.get('HTTP_REFERER', '') - parsed = urlparse.urlparse(referer) - debug = not urlparse.parse_qs(parsed.query).has_key('debug') - # it's important to put it at the end - if not debug and not modified: - f.close() - start_response('304 Not Modified', headers) - return [] - - headers.extend(( - ('Content-Type', mime_type), - ('Content-Length', str(file_size)), - ('Last-Modified', werkzeug.http.http_date(mtime)) - )) - start_response('200 OK', headers) - return werkzeug.wsgi.wrap_file(environ, f) - class LibException(Exception): """ Base of all client lib exceptions """ From 26665b774376068a93b887a2818ae98a22f23ae7 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 18 Jul 2012 15:50:10 +0200 Subject: [PATCH 06/11] [IMP] after a module installation, reload the client and open the menu Feeds bzr revid: rco@openerp.com-20120718135010-4933mmgw3n18epvy --- openerp/addons/base/module/module.py | 28 +++------------------------ openerp/addons/base/res/res_config.py | 12 ++++++++---- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index fde8fcf5b9a..1a0932ac7cf 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -363,8 +363,9 @@ class module(osv.osv): if config.get('type') not in ('ir.actions.reload', 'ir.actions.act_window_close'): return config - # reload the client - menu_ids = self.root_menus(cr,uid,ids,context) + # reload the client; open the first available root menu + menu_obj = self.pool.get('ir.ui.menu') + menu_ids = menu_obj.search(cr, uid, [('parent_id', '=', False)], context=context) return { 'type': 'ir.actions.client', 'tag': 'reload', @@ -649,29 +650,6 @@ class module(osv.osv): _logger.critical('module %s: invalid quality certificate: %s', mod.name, mod.certificate) raise osv.except_osv(_('Error'), _('Module %s: Invalid Quality Certificate') % (mod.name,)) - def root_menus(self, cr, uid, ids, context=None): - """ Return root menu ids the menus created by the modules whose ids are - provided. - - :param list[int] ids: modules to get menus from - """ - values = self.read(cr, uid, ids, ['name'], context=context) - module_names = [i['name'] for i in values] - - ids = self.pool.get('ir.model.data').search(cr, uid, [ ('model', '=', 'ir.ui.menu'), ('module', 'in', module_names) ], context=context) - values = self.pool.get('ir.model.data').read(cr, uid, ids, ['res_id'], context=context) - all_menu_ids = [i['res_id'] for i in values] - - root_menu_ids = [] - for menu in self.pool.get('ir.ui.menu').browse(cr, uid, all_menu_ids, context=context): - while menu.parent_id: - menu = menu.parent_id - if not menu.id in root_menu_ids: - root_menu_ids.append((menu.sequence,menu.id)) - root_menu_ids.sort() - root_menu_ids = [i[1] for i in root_menu_ids] - return root_menu_ids - class module_dependency(osv.osv): _name = "ir.module.module.dependency" _description = "Module dependency" diff --git a/openerp/addons/base/res/res_config.py b/openerp/addons/base/res/res_config.py index 9277184a822..3f4a052a36b 100644 --- a/openerp/addons/base/res/res_config.py +++ b/openerp/addons/base/res/res_config.py @@ -70,10 +70,14 @@ class res_config_configurable(osv.osv_memory): res = next.action_launch(context=context) res['nodestroy'] = False return res - #if there is no next action and if html is in the context: reload instead of closing - if context and 'html' in context: - return {'type' : 'ir.actions.reload'} - return {'type' : 'ir.actions.act_window_close'} + # reload the client; open the first available root menu + menu_obj = self.pool.get('ir.ui.menu') + menu_ids = menu_obj.search(cr, uid, [('parent_id', '=', False)], context=context) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + 'params': {'menu_id': menu_ids and menu_ids[0] or False}, + } def start(self, cr, uid, ids, context=None): return self.next(cr, uid, ids, context) From bfe3afcbd8ac214487c57731c850c199f8a6a3c5 Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Wed, 18 Jul 2012 15:55:03 +0200 Subject: [PATCH 07/11] improved project kanban vignette bzr revid: mit@openerp.com-20120718135503-gi222ulbtmhyesq8 --- addons/web_kanban/static/src/css/kanban.css | 3 +++ addons/web_kanban/static/src/css/kanban.sass | 3 +++ 2 files changed, 6 insertions(+) diff --git a/addons/web_kanban/static/src/css/kanban.css b/addons/web_kanban/static/src/css/kanban.css index 36dbab57559..5a7c1b84067 100644 --- a/addons/web_kanban/static/src/css/kanban.css +++ b/addons/web_kanban/static/src/css/kanban.css @@ -401,6 +401,9 @@ position: relative; top: 2px; } +.openerp .oe_kanban_view .oe_kanban_project_times li { + float: left; +} .openerp .oe_kanban_view .oe_kanban_status { position: relative; top: 4px; diff --git a/addons/web_kanban/static/src/css/kanban.sass b/addons/web_kanban/static/src/css/kanban.sass index f4c13cc7bd2..cea95f2ce53 100644 --- a/addons/web_kanban/static/src/css/kanban.sass +++ b/addons/web_kanban/static/src/css/kanban.sass @@ -336,6 +336,9 @@ float: right position: relative top: 2px + + .oe_kanban_project_times li + float: left .oe_kanban_status position: relative From 607c1670314a00cb3cd5b28ba495f950104d776f Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Wed, 18 Jul 2012 15:55:14 +0200 Subject: [PATCH 08/11] improved project kanban vignette bzr revid: mit@openerp.com-20120718135514-ojyvli4qyresvsmf --- addons/project/project_view.xml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a70bc504299..dbc4007bf8c 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -521,6 +521,15 @@
@@ -531,19 +540,6 @@
- - - - - ! -
@@ -554,6 +550,12 @@ 7
+
From a824028878037b2e1bac655390ea77808feb7c11 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 18 Jul 2012 16:06:13 +0200 Subject: [PATCH 09/11] [IMP] initial mail message sale bzr revid: fp@tinyerp.com-20120718140613-3urmqhtng63lc23f --- addons/sale/sale_data.xml | 26 +++++++++++++++++++++++++ addons/sale/wizard/sale_make_invoice.py | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml index 4622577ac3d..b0fd5ed6d10 100644 --- a/addons/sale/sale_data.xml +++ b/addons/sale/sale_data.xml @@ -26,5 +26,31 @@ + + + Module sale installed! + comment + html + Welcome to OpenERP + Second Line + + +

OpenERP Sale module just installed!

+

+ You can click on the top menu Sales to manage your + customers, your quotations and sales orders. +

+

+ If you need to manage your sales pipeline (leads, + opportunities, phonecalls), you can install the CRM module + from the Settings top menu. +

+
+
+ + + + + diff --git a/addons/sale/wizard/sale_make_invoice.py b/addons/sale/wizard/sale_make_invoice.py index 5265afb9bff..b4b3772a91a 100644 --- a/addons/sale/wizard/sale_make_invoice.py +++ b/addons/sale/wizard/sale_make_invoice.py @@ -68,4 +68,4 @@ class sale_make_invoice(osv.osv_memory): sale_make_invoice() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From e0aafd1c5ebffe791fddf07c01b71b1cc52cd24a Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 18 Jul 2012 16:22:35 +0200 Subject: [PATCH 10/11] [FIX] Disable cache middleware for debug mode bzr revid: al@openerp.com-20120718142235-x4uwzsar7ak6sxgk --- addons/web/common/http.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index cc76a554693..7b73c2169ea 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -417,6 +417,20 @@ class ControllerType(type): class Controller(object): __metaclass__ = ControllerType +class DisableCacheMiddleware(object): + def __init__(self, app): + self.app = app + def __call__(self, environ, start_response): + def start_wrapped(status, headers): + debug = environ.get('HTTP_REFERER', '').find('debug') != -1 + filtered_headers = [(k,v) for k,v in headers if not (k=='Last-Modified' or (debug and k=='Cache-Control'))] + if debug: + filtered_headers.append(('Cache-Control', 'no-cache')) + print headers + print filtered_headers + start_response(status, filtered_headers) + return self.app(environ, start_wrapped) + class Root(object): """Root WSGI application for the OpenERP Web Client. @@ -452,8 +466,8 @@ class Root(object): static_dirs = self._load_addons(openerp_addons_namespace) if options.serve_static: - self.dispatch = werkzeug.wsgi.SharedDataMiddleware( - self.dispatch, static_dirs, cache=False) + app = werkzeug.wsgi.SharedDataMiddleware( self.dispatch, static_dirs) + self.dispatch = DisableCacheMiddleware(app) if options.session_storage: if not os.path.exists(options.session_storage): From e2e15fe6347b9a484cf1bc1568e18219c6f77e3a Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 18 Jul 2012 16:25:24 +0200 Subject: [PATCH 11/11] [FIX] crm, sale: fix xml missing end tag bzr revid: rco@openerp.com-20120718142524-7mw10njirqy70tkd --- addons/crm/res_partner_view.xml | 2 +- addons/sale/res_partner_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml index 482a0d37e97..26c74427009 100644 --- a/addons/crm/res_partner_view.xml +++ b/addons/crm/res_partner_view.xml @@ -123,7 +123,7 @@ res.partner form - +