diff options
Diffstat (limited to 'addons/base_setup/static/src')
| -rw-r--r-- | addons/base_setup/static/src/css/base_setup.css | 24 | ||||
| -rw-r--r-- | addons/base_setup/static/src/js/base_setup.js | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/addons/base_setup/static/src/css/base_setup.css b/addons/base_setup/static/src/css/base_setup.css new file mode 100644 index 00000000000..4e4b8a3c00a --- /dev/null +++ b/addons/base_setup/static/src/css/base_setup.css @@ -0,0 +1,24 @@ +/* Remove bold from labels in config wizards */ +.oe_form_configuration .oe_form_group td:last-child .oe_form_label_help, +.oe_form_configuration .oe_form_group td:last-child .oe_form_label { + font-weight: normal; +} + +/* Separate .eo_link elements from the rest of the label's text */ +.oe_form_configuration .oe_form_group td:last-child .oe_link, +.oe_form_configuration .oe_form_group td:last-child .oe_separate-from-text { + position: relative; + left: 2em; +} +.oe_form_configuration .oe_form_group td:last-child .oe_link:before, +.oe_form_configuration .oe_form_group td:last-child .oe_separate-from-text:before { + content:"—"; + padding-right: 1em; + color: grey; + + /* Prevent the pseudo element's content to behave like its parent element */ + position: absolute; + right: 100%; + bottom: 0; /* Parent element's height can vary */ + pointer-events: none; +} diff --git a/addons/base_setup/static/src/js/base_setup.js b/addons/base_setup/static/src/js/base_setup.js new file mode 100644 index 00000000000..4f900a3d69b --- /dev/null +++ b/addons/base_setup/static/src/js/base_setup.js @@ -0,0 +1,24 @@ +openerp.base_setup = function(openerp) { + /* extend kanban to include the names of partner categories in the kanban view of partners */ + openerp.web_kanban.KanbanView.include({ + on_groups_started: function() { + var self = this; + self._super.apply(this, arguments); + if (this.dataset.model === 'res.partner') { + /* Set names for partner categories */ + var category_ids = []; + this.$element.find('.oe_kanban_partner_categories span').each(function() { + category_ids.push($(this).data('category_id')); + }); + var dataset = new openerp.web.DataSetSearch(this, 'res.partner.category', self.session.context); + dataset.name_get(_.uniq(category_ids)).then(function(result) { + _.each(result, function(value) { + self.$element + .find('.oe_kanban_partner_categories span[data-category_id=' + value[0] + ']') + .html(value[1]); + }); + }); + } + } + }); +}; |
