From 7320093e0c21db32e89dc28616d82d99465ab586 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 22 Nov 2012 12:32:12 +0530 Subject: [PATCH 01/12] [IMP]tracked res partner fields bzr revid: sgo@tinyerp.com-20121122070212-9vejb0bltb4ffeff --- openerp/addons/base/res/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index df42bb81521..4a3cb4b9676 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -195,7 +195,7 @@ class res_partner(osv.osv, format_address): help="The partner's timezone, used to output proper date and time values inside printed reports. " "It is important to set a value for this field. You should use the same timezone " "that is otherwise used to pick and render date and time values: your computer's timezone."), - 'user_id': fields.many2one('res.users', 'Salesperson', help='The internal user that is in charge of communicating with this contact if any.'), + 'user_id': fields.many2one('res.users', 'Salesperson', tracked=True, help='The internal user that is in charge of communicating with this contact if any.'), 'vat': fields.char('TIN', size=32, help="Tax Identification Number. Check the box if this contact is subjected to taxes. Used by the some of the legal statements."), 'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'), 'website': fields.char('Website', size=64, help="Website of Partner or Company"), From 8de8537c1e616deb203de865a8f6f70770da4fdc Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 10 Dec 2012 18:41:00 +0530 Subject: [PATCH 02/12] [IMP]add tracked attribute on fields bzr revid: sgo@tinyerp.com-20121210131100-v88knep1or2s5o03 --- openerp/osv/fields.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index ea84cae978e..9e438f74c29 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -80,7 +80,7 @@ class _column(object): # used to hide a certain field type in the list of field types _deprecated = False - def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, **args): + def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False,tracked=False, **args): """ The 'manual' keyword argument specifies if the field is a custom one. @@ -109,6 +109,7 @@ class _column(object): self.select = select self.manual = manual self.selectable = True + self.tracked = tracked self.group_operator = args.get('group_operator', False) self.groups = False # CSV list of ext IDs of groups that can access this field self.deprecated = False # Optional deprecation warning From ef4bc9b9c67ee750107a28350aed8a3008d5e8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 17 Dec 2012 20:10:59 +0100 Subject: [PATCH 03/12] [IMP] tracked: models now have a _track attribute, telling the subtype to use for logging tracked fields. tracked attribute on columns become _track_visibility, telling if a field must always be logged or only when changed (to keep context value in logging message). bzr revid: tde@openerp.com-20121217191059-g5jdm0yjee1gttta --- openerp/osv/fields.py | 13 +++++++------ openerp/osv/orm.py | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 95b0ef67199..b7dff94b3f1 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -80,11 +80,12 @@ class _column(object): _symbol_f = _symbol_set _symbol_set = (_symbol_c, _symbol_f) _symbol_get = None - # used to hide a certain field type in the list of field types _deprecated = False + # used for automatic logging system if mail installed (should be 'on_change' or 'always') + _track_visibility = False - def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, tracked=False, **args): + def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, track_visibility=False, **args): """ The 'manual' keyword argument specifies if the field is a custom one. @@ -103,7 +104,7 @@ class _column(object): self.help = args.get('help', '') self.priority = priority self.change_default = change_default - self.ondelete = ondelete.lower() if ondelete else None # defaults to 'set null' in ORM + self.ondelete = ondelete.lower() if ondelete else None # defaults to 'set null' in ORM self.translate = translate self._domain = domain self._context = context @@ -113,14 +114,14 @@ class _column(object): self.select = select self.manual = manual self.selectable = True - self.tracked = tracked # Automatic logging system if mail installed + self._track_visibility = track_visibility self.group_operator = args.get('group_operator', False) self.groups = False # CSV list of ext IDs of groups that can access this field - self.deprecated = False # Optional deprecation warning + self.deprecated = False # Optional deprecation warning for a in args: if args[a]: setattr(self, a, args[a]) - + def restart(self): pass diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index eb5b9f29955..f5e46f71d1b 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -677,6 +677,23 @@ class BaseModel(object): _description = None _needaction = False + # Automatic logging system if mail installed + # _track = { + # 'field': { + # 'module.subtype_xml': lambda self, cr, uid, obj, context=None: obj.state == done, + # 'module.subtype_xml2': lambda self, cr, uid, obj, context=None: obj.state != done, + # }, + # 'field2': { + # ... + # }, + # } + # where + # :param string field: field name + # :param module.subtype_xml: xml_id of a mail.message.subtype (i.e. mail.mt_comment) + # :param obj: is a browse_record + # :param function lambda: returns whether the tracking should record using this subtype + _track = {} + # dict of {field:method}, with method returning the (name_get of records, {id: fold}) # to include in the _read_group, if grouped on this field _group_by_full = {} From 97e23c83f5f1e4cedbc15b16a8fff8b79e3affb4 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 18 Dec 2012 18:47:54 +0100 Subject: [PATCH 04/12] [IMP] company form view improved for logo bzr revid: fp@tinyerp.com-20121218174754-l5bxqao9xarr3ohk --- openerp/addons/base/res/res_company_view.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openerp/addons/base/res/res_company_view.xml b/openerp/addons/base/res/res_company_view.xml index 7cb461b2b68..06775d159ac 100644 --- a/openerp/addons/base/res/res_company_view.xml +++ b/openerp/addons/base/res/res_company_view.xml @@ -32,6 +32,11 @@ +
+

+ Click to set your company logo. +

+
From af9d8053646d9a5f69021d679cff1c868e5da366 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 18 Dec 2012 23:39:59 +0100 Subject: [PATCH 05/12] [REVERT] revert changes in the server bzr revid: fp@tinyerp.com-20121218223959-jstszixwv464umqj --- openerp/osv/fields.py | 13 ++++++------- openerp/osv/orm.py | 17 ----------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 1565d4c9b85..bc7fefa1713 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -80,12 +80,11 @@ class _column(object): _symbol_f = _symbol_set _symbol_set = (_symbol_c, _symbol_f) _symbol_get = None + # used to hide a certain field type in the list of field types _deprecated = False - # used for automatic logging system if mail installed (should be 'on_change' or 'always') - _track_visibility = False - def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, track_visibility=False, **args): + def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, tracked=False, **args): """ The 'manual' keyword argument specifies if the field is a custom one. @@ -104,7 +103,7 @@ class _column(object): self.help = args.get('help', '') self.priority = priority self.change_default = change_default - self.ondelete = ondelete.lower() if ondelete else None # defaults to 'set null' in ORM + self.ondelete = ondelete.lower() if ondelete else None # defaults to 'set null' in ORM self.translate = translate self._domain = domain self._context = context @@ -114,14 +113,14 @@ class _column(object): self.select = select self.manual = manual self.selectable = True - self._track_visibility = track_visibility + self.tracked = tracked # Automatic logging system if mail installed self.group_operator = args.get('group_operator', False) self.groups = False # CSV list of ext IDs of groups that can access this field - self.deprecated = False # Optional deprecation warning + self.deprecated = False # Optional deprecation warning for a in args: if args[a]: setattr(self, a, args[a]) - + def restart(self): pass diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index e2dada4e381..92eb8dad776 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -677,23 +677,6 @@ class BaseModel(object): _description = None _needaction = False - # Automatic logging system if mail installed - # _track = { - # 'field': { - # 'module.subtype_xml': lambda self, cr, uid, obj, context=None: obj.state == done, - # 'module.subtype_xml2': lambda self, cr, uid, obj, context=None: obj.state != done, - # }, - # 'field2': { - # ... - # }, - # } - # where - # :param string field: field name - # :param module.subtype_xml: xml_id of a mail.message.subtype (i.e. mail.mt_comment) - # :param obj: is a browse_record - # :param function lambda: returns whether the tracking should record using this subtype - _track = {} - # dict of {field:method}, with method returning the (name_get of records, {id: fold}) # to include in the _read_group, if grouped on this field _group_by_full = {} From b5382291f7a84fcb4932281508a20ee1c5e3a3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 19 Dec 2012 10:36:55 +0100 Subject: [PATCH 06/12] [REV] Reverted some changes that should not be present in server. bzr revid: tde@openerp.com-20121219093655-ts20h4rhu5whrdwm --- openerp/addons/base/res/res_partner.py | 2 +- openerp/osv/fields.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index c8eab491fc8..faf9ad16be7 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -202,7 +202,7 @@ class res_partner(osv.osv, format_address): "It is important to set a value for this field. You should use the same timezone " "that is otherwise used to pick and render date and time values: your computer's timezone."), 'tz_offset': fields.function(_get_tz_offset, type='char', size=5, string='Timezone offset', invisible=True), - 'user_id': fields.many2one('res.users', 'Salesperson', tracked=True, help='The internal user that is in charge of communicating with this contact if any.'), + 'user_id': fields.many2one('res.users', 'Salesperson', track_visibility=1, help='The internal user that is in charge of communicating with this contact if any.'), 'vat': fields.char('TIN', size=32, help="Tax Identification Number. Check the box if this contact is subjected to taxes. Used by the some of the legal statements."), 'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'), 'website': fields.char('Website', size=64, help="Website of Partner or Company"), diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index bc7fefa1713..bcbdad081ad 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -84,7 +84,7 @@ class _column(object): # used to hide a certain field type in the list of field types _deprecated = False - def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, tracked=False, **args): + def __init__(self, string='unknown', required=False, readonly=False, domain=None, context=None, states=None, priority=0, change_default=False, size=None, ondelete=None, translate=False, select=False, manual=False, **args): """ The 'manual' keyword argument specifies if the field is a custom one. @@ -113,7 +113,6 @@ class _column(object): self.select = select self.manual = manual self.selectable = True - self.tracked = tracked # Automatic logging system if mail installed self.group_operator = args.get('group_operator', False) self.groups = False # CSV list of ext IDs of groups that can access this field self.deprecated = False # Optional deprecation warning From 4936f0b6833725d8de5cb82a79fd097faa4a9d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 19 Dec 2012 11:25:39 +0100 Subject: [PATCH 07/12] [REM] partner: do not track user_id. bzr revid: tde@openerp.com-20121219102539-lvlbl2vh828602ra --- openerp/addons/base/res/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index faf9ad16be7..d236d867795 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -202,7 +202,7 @@ class res_partner(osv.osv, format_address): "It is important to set a value for this field. You should use the same timezone " "that is otherwise used to pick and render date and time values: your computer's timezone."), 'tz_offset': fields.function(_get_tz_offset, type='char', size=5, string='Timezone offset', invisible=True), - 'user_id': fields.many2one('res.users', 'Salesperson', track_visibility=1, help='The internal user that is in charge of communicating with this contact if any.'), + 'user_id': fields.many2one('res.users', 'Salesperson', help='The internal user that is in charge of communicating with this contact if any.'), 'vat': fields.char('TIN', size=32, help="Tax Identification Number. Check the box if this contact is subjected to taxes. Used by the some of the legal statements."), 'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'), 'website': fields.char('Website', size=64, help="Website of Partner or Company"), From 355dac7356652bde1b5cf2ea7cb132df53b10b76 Mon Sep 17 00:00:00 2001 From: "dle@openerp.com" <> Date: Thu, 20 Dec 2012 11:15:11 +0100 Subject: [PATCH 08/12] [FIX]Kanban view js not loaded when db created through command line bzr revid: dle@openerp.com-20121220101511-679v8e6ijsbaxj0y --- openerp/tools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/tools/config.py b/openerp/tools/config.py index 9717792a82a..e80b58ed998 100644 --- a/openerp/tools/config.py +++ b/openerp/tools/config.py @@ -484,7 +484,7 @@ class configmanager(object): if opt.server_wide_modules: openerp.conf.server_wide_modules = map(lambda m: m.strip(), opt.server_wide_modules.split(',')) else: - openerp.conf.server_wide_modules = ['web'] + openerp.conf.server_wide_modules = ['web','web_kanban'] if complete: openerp.modules.module.initialize_sys_path() openerp.modules.loading.open_openerp_namespace() From d84a100dd6d7de014703ede4ca290611bdec5cdd Mon Sep 17 00:00:00 2001 From: "dle@openerp.com" <> Date: Thu, 20 Dec 2012 11:43:45 +0100 Subject: [PATCH 09/12] [ADD]form in action quick journal items and CSS Class to handle switcher bzr revid: dle@openerp.com-20121220104345-yrj9w6demtlba00l --- addons/account/__openerp__.py | 4 +++- addons/account/account_view.xml | 2 +- addons/account/static/src/css/account_move_line_quickadd.css | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 addons/account/static/src/css/account_move_line_quickadd.css diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 7fffc4f07d4..43aaa2f58c1 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -133,7 +133,9 @@ for a particular financial year and for preparation of vouchers there is a modul "static/src/xml/account_move_reconciliation.xml", "static/src/xml/account_move_line_quickadd.xml", ], - 'css':['static/src/css/account_move_reconciliation.css' + 'css':[ + 'static/src/css/account_move_reconciliation.css', + 'static/src/css/account_move_line_quickadd.css' ], 'demo': [ 'demo/account_demo.xml', diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index adf7ac05067..9af57cca247 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1155,7 +1155,7 @@ Journal Items account.move.line - tree_account_move_line_quickadd + tree_account_move_line_quickadd,form

Select the period and the journal you want to fill. diff --git a/addons/account/static/src/css/account_move_line_quickadd.css b/addons/account/static/src/css/account_move_line_quickadd.css new file mode 100644 index 00000000000..6d7690c4490 --- /dev/null +++ b/addons/account/static/src/css/account_move_line_quickadd.css @@ -0,0 +1,4 @@ +.openerp .oe_vm_switch_tree_account_move_line_quickadd:after { + padding: 2px; + content: "i"; +} From ee937272d13bd6e77563c9d66d6cdd0da37b27ae Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 20 Dec 2012 12:01:27 +0100 Subject: [PATCH 10/12] [FIX] Updated spin.js to version v1.2.7 (w/fix for IE) bzr revid: fme@openerp.com-20121220110127-iw2e13n4mj79i8zv --- addons/web/static/lib/spinjs/spin.js | 288 ++++++++++++++------------- 1 file changed, 151 insertions(+), 137 deletions(-) diff --git a/addons/web/static/lib/spinjs/spin.js b/addons/web/static/lib/spinjs/spin.js index d8e21786a1f..434d76a6870 100644 --- a/addons/web/static/lib/spinjs/spin.js +++ b/addons/web/static/lib/spinjs/spin.js @@ -1,47 +1,45 @@ -//fgnass.github.com/spin.js#v1.2.5 -(function(window, document, undefined) { +//fgnass.github.com/spin.js#v1.2.7 +!function(window, document, undefined) { -/** - * Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de] - * Licensed under the MIT license - */ + /** + * Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de] + * Licensed under the MIT license + */ - var prefixes = ['webkit', 'Moz', 'ms', 'O']; /* Vendor prefixes */ - var animations = {}; /* Animation rules keyed by their name */ - var useCssAnimations; + var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */ + , animations = {} /* Animation rules keyed by their name */ + , useCssAnimations /** * Utility function to create elements. If no tag name is given, * a DIV is created. Optionally properties can be passed. */ function createEl(tag, prop) { - var el = document.createElement(tag || 'div'); - var n; + var el = document.createElement(tag || 'div') + , n - for(n in prop) { - el[n] = prop[n]; - } - return el; + for(n in prop) el[n] = prop[n] + return el } /** * Appends children and returns the parent. */ function ins(parent /* child1, child2, ...*/) { - for (var i=1, n=arguments.length; i> 1) : o.left+mid) + 'px', - top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : o.top+mid) + 'px' - }); + left: (o.left == 'auto' ? tp.x-ep.x + (target.offsetWidth >> 1) : parseInt(o.left, 10) + mid) + 'px', + top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : parseInt(o.top, 10) + mid) + 'px' + }) } - el.setAttribute('aria-role', 'progressbar'); - self.lines(el, self.opts); + el.setAttribute('aria-role', 'progressbar') + self.lines(el, self.opts) if (!useCssAnimations) { // No CSS animation support, use setTimeout() instead - var i = 0; - var fps = o.fps; - var f = fps/o.speed; - var ostep = (1-o.opacity)/(f*o.trail / 100); - var astep = f/o.lines; + var i = 0 + , fps = o.fps + , f = fps/o.speed + , ostep = (1-o.opacity) / (f*o.trail / 100) + , astep = f/o.lines - !function anim() { + ;(function anim() { i++; for (var s=o.lines; s; s--) { - var alpha = Math.max(1-(i+s*astep)%f * ostep, o.opacity); - self.opacity(el, o.lines-s, alpha, o); + var alpha = Math.max(1-(i+s*astep)%f * ostep, o.opacity) + self.opacity(el, o.lines-s, alpha, o) } - self.timeout = self.el && setTimeout(anim, ~~(1000/fps)); - }(); + self.timeout = self.el && setTimeout(anim, ~~(1000/fps)) + })() } - return self; + return self }, + stop: function() { - var el = this.el; + var el = this.el if (el) { - clearTimeout(this.timeout); - if (el.parentNode) el.parentNode.removeChild(el); - this.el = undefined; + clearTimeout(this.timeout) + if (el.parentNode) el.parentNode.removeChild(el) + this.el = undefined } - return this; + return this }, + lines: function(el, o) { - var i = 0; - var seg; + var i = 0 + , seg function fill(color, shadow) { return css(createEl(), { @@ -208,9 +210,10 @@ boxShadow: shadow, transformOrigin: 'left', transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)', - borderRadius: (o.width>>1) + 'px' - }); + borderRadius: (o.corners * o.width>>1) + 'px' + }) } + for (; i < o.lines; i++) { seg = css(createEl(), { position: 'absolute', @@ -218,16 +221,20 @@ transform: o.hwaccel ? 'translate3d(0,0,0)' : '', opacity: o.opacity, animation: useCssAnimations && addAnimation(o.opacity, o.trail, i, o.lines) + ' ' + 1/o.speed + 's linear infinite' - }); - if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'})); - ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)'))); + }) + + if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'})) + + ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)'))) } - return el; + return el }, + opacity: function(el, i, val) { - if (i < el.childNodes.length) el.childNodes[i].style.opacity = val; + if (i < el.childNodes.length) el.childNodes[i].style.opacity = val } - }); + + }) ///////////////////////////////////////////////////////////////////////// // VML rendering for IE @@ -236,36 +243,41 @@ /** * Check and init VML support */ - !function() { + ;(function() { function vml(tag, attr) { - return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr); + return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr) } - var s = css(createEl('group'), {behavior: 'url(#default#VML)'}); + var s = css(createEl('group'), {behavior: 'url(#default#VML)'}) if (!vendor(s, 'transform') && s.adj) { // VML support detected. Insert CSS rule ... - sheet.addRule('.spin-vml', 'behavior:url(#default#VML)'); + sheet.addRule('.spin-vml', 'behavior:url(#default#VML)') Spinner.prototype.lines = function(el, o) { - var r = o.length+o.width; - var s = 2*r; + var r = o.length+o.width + , s = 2*r function grp() { - return css(vml('group', {coordsize: s +' '+s, coordorigin: -r +' '+-r}), {width: s, height: s}); + return css( + vml('group', { + coordsize: s + ' ' + s, + coordorigin: -r + ' ' + -r + }), + { width: s, height: s } + ) } - var margin = -(o.width+o.length)*2+'px'; - var g = css(grp(), {position: 'absolute', top: margin, left: margin}); - - var i; + var margin = -(o.width+o.length)*2 + 'px' + , g = css(grp(), {position: 'absolute', top: margin, left: margin}) + , i function seg(i, dx, filter) { ins(g, ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}), - ins(css(vml('roundrect', {arcsize: 1}), { + ins(css(vml('roundrect', {arcsize: o.corners}), { width: r, height: o.width, left: o.radius, @@ -276,31 +288,33 @@ vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change ) ) - ); + ) } - if (o.shadow) { - for (i = 1; i <= o.lines; i++) { - seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)'); - } - } - for (i = 1; i <= o.lines; i++) seg(i); - return ins(el, g); - }; + if (o.shadow) + for (i = 1; i <= o.lines; i++) + seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)') + + for (i = 1; i <= o.lines; i++) seg(i) + return ins(el, g) + } + Spinner.prototype.opacity = function(el, i, val, o) { - var c = el.firstChild; - o = o.shadow && o.lines || 0; + var c = el.firstChild + o = o.shadow && o.lines || 0 if (c && i+o < c.childNodes.length) { - c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild; - if (c) c.opacity = val; + c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild + if (c) c.opacity = val } - }; + } } - else { - useCssAnimations = vendor(s, 'animation'); - } - }(); + else + useCssAnimations = vendor(s, 'animation') + })() - window.Spinner = Spinner; + if (typeof define == 'function' && define.amd) + define(function() { return Spinner }) + else + window.Spinner = Spinner -})(window, document); \ No newline at end of file +}(window, document); From 36cd0b866ec491867f0b40dd0107e887614c30c1 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Thu, 20 Dec 2012 12:25:28 +0100 Subject: [PATCH 11/12] [FIX] anonymization: fix for obsolete models bzr revid: olt@tinyerp.com-20121220112528-um4m3crn0enhcplj --- addons/anonymization/anonymization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/anonymization/anonymization.py b/addons/anonymization/anonymization.py index a455bc835ce..c7f9ab016c4 100644 --- a/addons/anonymization/anonymization.py +++ b/addons/anonymization/anonymization.py @@ -543,7 +543,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory): fixes = group(fixes, ('model_name', 'field_name')) for line in data: - table_name = self.pool.get(line['model_id'])._table + table_name = self.pool.get(line['model_id'])._table if self.pool.get(line['model_id']) else None # check if custom sql exists: key = (line['model_id'], line['field_id']) From d090cbdc9491aad49d29f83014c2159d0a2d435f Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Thu, 20 Dec 2012 12:28:37 +0100 Subject: [PATCH 12/12] [FIX] Contact form issue when anonymous bzr revid: vta@openerp.com-20121220112837-jx4koxl7l3dwx1po --- addons/portal_anonymous/security/ir.model.access.csv | 2 +- addons/portal_crm/contact.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/portal_anonymous/security/ir.model.access.csv b/addons/portal_anonymous/security/ir.model.access.csv index 24c29200230..a26b600288d 100644 --- a/addons/portal_anonymous/security/ir.model.access.csv +++ b/addons/portal_anonymous/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_mail_message_portal,mail.message.portal,mail.model_mail_message,portal.group_anonymous,1,0,1,0 +access_mail_message_portal,mail.message.portal,mail.model_mail_message,portal.group_anonymous,1,0,0,0 access_res_partner,res.partner,base.model_res_partner,portal.group_anonymous,1,0,0,0 diff --git a/addons/portal_crm/contact.py b/addons/portal_crm/contact.py index 1cc10344d67..3d2ef024de1 100644 --- a/addons/portal_crm/contact.py +++ b/addons/portal_crm/contact.py @@ -105,7 +105,7 @@ class crm_contact_us(osv.TransientModel): leads to a message_subscribe_user, that triggers access right issues. """ empty_values = dict((k, False) if k != 'name' else (k, '') for k, v in values.iteritems()) - return super(crm_contact_us, self).create(cr, uid, empty_values, {'mail_nosubscribe': True}) + return super(crm_contact_us, self).create(cr, SUPERUSER_ID, empty_values, {'mail_nosubscribe': True}) def submit(self, cr, uid, ids, context=None): """ When the form is submitted, redirect the user to a "Thanks" message """