return filters
@openerpweb.jsonrequest
- def save_filter(self, req, model, name, context_to_save, domain):
- Model = req.session.model("ir.filters")
- ctx = common.nonliterals.CompoundContext(context_to_save)
- ctx.session = req.session
- ctx = ctx.evaluate()
- domain = common.nonliterals.CompoundDomain(domain)
- domain.session = req.session
- domain = domain.evaluate()
- uid = req.session._uid
- context = req.session.eval_context(req.context)
- to_return = Model.create_or_replace({"context": ctx,
- "domain": domain,
- "model_id": model,
- "name": name,
- "user_id": uid
- }, context)
- return to_return
-
- @openerpweb.jsonrequest
def add_to_dashboard(self, req, menu_id, action_id, context_to_save, domain, view_mode, name=''):
- ctx = common.nonliterals.CompoundContext(context_to_save)
- ctx.session = req.session
- ctx = ctx.evaluate()
+ to_eval = common.nonliterals.CompoundContext(context_to_save)
+ to_eval.session = req.session
+ ctx = dict((k, v) for k, v in to_eval.evaluate().iteritems()
+ if not k.startswith('search_default_'))
ctx['dashboard_merge_domains_contexts'] = False # TODO: replace this 6.1 workaround by attribute on <action/>
domain = common.nonliterals.CompoundDomain(domain)
domain.session = req.session
class Action(openerpweb.Controller):
_cp_path = "/web/action"
+
+ action_mapping = {
+ "ir.actions.act_url": "ir.actions.url",
+ }
+ # For most actions, the type attribute and the model name are the same, but
+ # there are exceptions. This dict is used to remap action type attributes
+ # to the "real" model name when they differ.
+ action_mapping = {
+ "ir.actions.act_url": "ir.actions.url",
+ }
+
@openerpweb.jsonrequest
def load(self, req, action_id, do_not_eval=False):
Actions = req.session.model('ir.actions.actions')
-body.openerp {
- padding: 0;
- margin: 0;
- overflow-y: scroll;
-}
-.openerp {
- padding: 0;
- margin: 0;
- height: 100%;
- font-size: 80%;
- font-family: Ubuntu, Helvetica, sans-serif;
-}
-
-.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option,
-.openerp button, .openerp .ui-widget {
- font-family: Ubuntu, Helvetica, sans-serif;
- font-size:85%;
+@charset "utf-8";
+@font-face {
+ font-family: "mnmliconsRegular";
+ src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
+ src: url("/web/static/src/font/mnmliconsv21-webfont.woff") format("woff");
+ src: url("/web/static/src/font/mnmliconsv21-webfont.ttf") format("truetype");
+ src: url("/web/static/src/font/mnmliconsv21-webfont.svg") format("svg") active;
+ font-weight: normal;
+ font-style: normal;
}
-.openerp .view-manager-main-content {
- width: 100%;
- padding: 0 8px 8px 8px;
+@font-face {
+ font-family: "EntypoRegular";
+ src: url("/web/static/src/font/entypo-webfont.eot") format("eot");
+ src: url("/web/static/src/font/entypo-webfont.eot?#iefix") format("embedded-opentype");
+ src: url("/web/static/src/font/entypo-webfont.woff") format("woff");
+ src: url("/web/static/src/font/entypo-webfont.ttf") format("truetype");
+ src: url("/web/static/src/font/entypo-webfont.svg") format("svg") active;
+ font-weight: normal;
+ font-style: normal;
}
-.openerp .oe_form_frame_cell .view-manager-main-content {
- padding: 0;
+.openerp.openerp-web-client-container {
+ height: 100%;
+ position: relative;
}
-.oe_box {
- border: 1px solid #aaf;
- padding: 2px;
- margin: 2px;
-}
-
-#oe_header h2 {
- margin: 2px 0;
-}
-
-#oe_errors pre {
- margin: 0;
-}
-
-.openerp .oe-listview .oe-number {
- text-align: right !important;
-}
-.oe-listview-header-columns {
- background: #d1d1d1; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* W3C */
-}
-
-.openerp .oe_hide {
- display: none !important;
-}
-
-/* STATES */
-.openerp .on_logged,
-.openerp .db_options_row {
- display: none;
+.openerp {
+ padding: 0;
+ margin: 0;
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
+ color: #4c4c4c;
+ font-size: 13px;
+ 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;
+}
+.openerp table {
+ padding: 0;
+ border-collapse: collapse;
+}
+.openerp thead {
+ font-weight: bold;
+ background-color: #f0f0f0;
+}
+.openerp thead th {
+ border-right: 1px dotted #afafb6;
+}
+.openerp thead th:last-child {
+ border-right: none;
+}
+.openerp th, .openerp td {
+ padding: 0;
+ text-align: left;
+}
+.openerp th {
+ font-weight: bold;
+ vertical-align: middle;
+}
+.openerp td {
+ vertical-align: top;
+}
+.openerp .zebra tbody tr:nth-child(odd) td {
+ background-color: #f0f0fa;
+ background-color: #f0f0fa;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
+ background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
+}
+.openerp .zebra tbody tr:hover td {
+ background-color: #eeeeee;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede));
+ background-image: -webkit-linear-gradient(top, #eeeeee, #dedede);
+ background-image: -moz-linear-gradient(top, #eeeeee, #dedede);
+ background-image: -ms-linear-gradient(top, #eeeeee, #dedede);
+ background-image: -o-linear-gradient(top, #eeeeee, #dedede);
+ background-image: linear-gradient(to bottom, #eeeeee, #dedede);
+}
+.openerp ul, .openerp li, .openerp ol {
+ margin: 0;
+ padding: 0;
+}
+.openerp li {
+ list-style-type: none;
+}
+.openerp input, .openerp textarea, .openerp select {
+ padding: 4px;
+ border: 1px solid #cccccc;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+.openerp img {
+ vertical-align: middle;
+}
+.openerp h4 {
+ margin: 4px 0;
+}
+.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'] {
+ display: inline-block;
+ border: 1px solid #ababab;
+ color: #404040;
+ margin: 0;
+ padding: 3px 12px;
+ font-size: 13px;
+ text-align: center;
+ background-color: #efefef;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
+ background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: -moz-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: -ms-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: -o-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: linear-gradient(to bottom, #efefef, #d8d8d8);
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
+ -webkit-font-smoothing: antialiased;
+ outline: none;
+}
+.openerp a.button:hover, .openerp button:hover, .openerp input[type='submit']:hover {
+ background-color: #f6f6f6;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -moz-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3);
+ cursor: pointer;
+}
+.openerp a.button:focus, .openerp button:focus, .openerp input[type='submit']:focus {
+ border: 1px solid #80bfff;
+ background-color: #f6f6f6;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -moz-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3);
+ -moz-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+}
+.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active {
+ background-color: #e3e3e3;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
+ background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: -moz-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: -ms-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: -o-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: linear-gradient(to bottom, #e3e3e3, #f6f6f6);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp a.button.disabled, .openerp button:disabled, .openerp input[type='submit']:disabled {
+ background: #efefef !important;
+ border: 1px solid #d1d1d1 !important;
+ -moz-box-shadow: none !important;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important;
+ color: #aaaaaa !important;
+ cursor: default;
+ text-shadow: 0 1px 1px white !important;
}
-
-/* Loading */
-.loading {
- cursor: wait;
-}
-.openerp .loading {
- display: none;
- z-index: 100;
- position: fixed;
- top: 0;
- right: 50%;
- padding: 4px 12px;
- background: #A61300;
- color: white;
- text-align: center;
- border: 1px solid #900;
- border-top: none;
- -moz-border-radius-bottomright: 8px;
- -moz-border-radius-bottomleft: 8px;
- border-bottom-right-radius: 8px;
- border-bottom-left-radius: 8px;
+.openerp .ui-widget {
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
+ font-size: 13px;
+}
+.openerp .ui-menu .ui-menu-item {
+ margin: 0 8px 0 0;
+ padding: 0 0 0 12px;
+ width: auto;
+}
+.openerp .ui-menu .ui-menu-item a.ui-state-active {
+ background: #f0f0fa;
+}
+.openerp .oe_i {
+ font-family: "mnmliconsRegular" !important;
+ font-size: 21px;
+ font-weight: 300 !important;
+}
+.openerp .oe_e {
+ font-family: "entypoRegular" !important;
+ font-size: 34px;
+ font-weight: 300 !important;
+}
+.openerp .oe_left {
+ float: left;
+ margin-right: 8px;
+}
+.openerp .oe_right {
+ float: right;
+ margin-left: 8px;
+}
+.openerp .oe_text_right {
+ text-align: right;
+}
+.openerp .oe_clear {
+ clear: both;
+}
+.openerp .oe_wait {
+ cursor: wait;
+}
+.openerp .oe_fade {
+ color: #888888;
+}
+.openerp .oe_bold {
+ font-weight: bold;
+}
+.openerp .oe_inline {
+ width: auto !important;
+}
+.openerp .oe_highlight {
+ color: white;
+ background: #dc5f59;
+}
+.openerp button.oe_highlight {
+ background-color: #dc5f59;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
+ background-image: -webkit-linear-gradient(top, #dc5f59, #b33630);
+ background-image: -moz-linear-gradient(top, #dc5f59, #b33630);
+ background-image: -ms-linear-gradient(top, #dc5f59, #b33630);
+ background-image: -o-linear-gradient(top, #dc5f59, #b33630);
+ background-image: linear-gradient(to bottom, #dc5f59, #b33630);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp button.oe_highlight:active {
+ background-color: #b33630;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#b33630), to(#dc5f59));
+ background-image: -webkit-linear-gradient(top, #b33630, #dc5f59);
+ background-image: -moz-linear-gradient(top, #b33630, #dc5f59);
+ background-image: -ms-linear-gradient(top, #b33630, #dc5f59);
+ background-image: -o-linear-gradient(top, #b33630, #dc5f59);
+ background-image: linear-gradient(to bottom, #b33630, #dc5f59);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp button.oe_highlight:hover {
+ background-color: #df6b66;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#df6b66), to(#bf3a33));
+ background-image: -webkit-linear-gradient(top, #df6b66, #bf3a33);
+ background-image: -moz-linear-gradient(top, #df6b66, #bf3a33);
+ background-image: -ms-linear-gradient(top, #df6b66, #bf3a33);
+ background-image: -o-linear-gradient(top, #df6b66, #bf3a33);
+ background-image: linear-gradient(to bottom, #df6b66, #bf3a33);
+ -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
+}
+.openerp .oe_title {
+ width: 55%;
+}
+.openerp .oe_title:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+.openerp .oe_button_box {
+ width: 200px;
+ text-align: center;
+}
+.openerp .oe_avatar {
+ margin: 0 16px 0 0;
+}
+.openerp .oe_avatar img {
+ height: 50px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
+ border: none;
+}
+.openerp.oe_tooltip {
+ font-size: 12px;
+}
+.openerp.oe_tooltip .oe_tooltip_string {
+ color: #ffdd55;
+ font-weight: bold;
+ font-size: 13px;
+}
+.openerp.oe_tooltip .oe_tooltip_help {
+ white-space: pre-wrap;
+}
+.openerp.oe_tooltip .oe_tooltip_technical {
+ padding: 0 0 4px 0;
+ margin: 5px 0 0 15px;
+}
+.openerp.oe_tooltip .oe_tooltip_technical li {
+ list-style: circle;
+}
+.openerp.oe_tooltip .oe_tooltip_technical_title {
+ font-weight: bold;
+}
+.openerp .oe_notebook {
+ margin: 8px 0;
+ padding: 0 16px;
+ list-style: none;
+ zoom: 1;
+}
+.openerp .oe_notebook:before, .openerp .oe_notebook:after {
+ display: table;
+ content: "";
+ zoom: 1;
+}
+.openerp .oe_notebook:after {
+ clear: both;
+}
+.openerp .oe_notebook > li {
+ float: left;
+}
+.openerp .oe_notebook > li > a {
+ display: block;
+ color: #4c4c4c;
+}
+.openerp .oe_notebook {
+ border-color: #dddddd;
+ border-style: solid;
+ border-width: 0 0 1px;
+}
+.openerp .oe_notebook > li {
+ position: relative;
+}
+.openerp .oe_notebook > li > a {
+ padding: 0 12px;
+ margin-right: 2px;
+ line-height: 30px;
+ border: 1px solid transparent;
+ -moz-border-radius: 4px 4px 0 0;
+ -webkit-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.openerp .oe_notebook > li > a:hover {
+ text-decoration: none;
+ background-color: #eeeeee;
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.openerp .oe_notebook > li.ui-state-active > a, .openerp .oe_notebook > li.ui-state-active > a:hover {
+ background-color: white;
+ border: 1px solid #dddddd;
+ border-bottom-color: transparent;
+ cursor: default;
+}
+.openerp .oe_notebook_page {
+ padding: 0;
+}
+.openerp div.ui-tabs {
+ padding: 3px 0px 3px 0px;
+}
+.openerp .ui-tabs-hide {
+ display: none;
+}
+.openerp .oe_dropdown, .openerp .oe_dropdown_hover, .openerp .oe_dropdown_toggle {
+ position: relative;
+ cursor: pointer;
+}
+.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened {
+ display: block;
+}
+.openerp .oe_dropdown_menu {
+ display: none;
+ position: absolute;
+ top: 28px;
+ z-index: 1;
+ border: 1px solid #afafb6;
+ background: white;
+ padding: 8px;
+ min-width: 120px;
+ text-align: left;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+}
+.openerp .oe_dropdown_menu > li {
+ list-style-type: none;
+ float: none;
+ display: block;
+ position: relative;
+}
+.openerp .oe_dropdown_menu > li:hover {
+ background-color: #f0f0fa;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
+ background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe_dropdown_menu > li > a {
+ white-space: nowrap;
+ display: block;
+ padding: 3px 6px;
+ color: #4c4c4c;
+ text-decoration: none;
+}
+.openerp .oe_dropdown_menu > li > a:hover {
+ text-decoration: none;
+}
+.openerp .oe_dropdown_arrow:after {
+ width: 0;
+ height: 0;
+ display: inline-block;
+ content: "&darr";
+ text-indent: -99999px;
+ vertical-align: top;
+ margin-top: 8px;
+ margin-left: 4px;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #404040;
+ filter: alpha(opacity=50);
+ opacity: 0.5;
+}
+.openerp .oe_sidebar {
+ white-space: nowrap;
+}
+.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment {
+ height: 20px;
+ cursor: pointer;
+ padding-left: 6px;
+ margin-top: 6px;
+}
+.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment span {
+ font-weight: bold;
+}
+.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment .oe_hidden_input_file {
+ width: 200px;
+}
+.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment:hover {
+ background-color: #f0f0fa;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
+ background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item {
+ position: absolute;
+ top: 4px;
+ right: 4px;
+ display: none;
+ width: 12px;
+ height: 12px;
+ padding: 1px;
+ color: #8786b7;
+ line-height: 8px;
+ text-align: center;
+ font-weight: bold;
+ text-shadow: 0 1px 1px white;
+}
+.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item:hover {
+ text-decoration: none;
+ color: white;
+ background: #8786b7;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+.openerp .oe_sidebar .oe_dropdown_menu li:hover .oe_sidebar_delete_item {
+ display: inline-block;
+}
+.openerp .oe_loading {
+ display: none;
+ z-index: 100;
+ position: fixed;
+ top: 0;
+ right: 50%;
+ padding: 4px 12px;
+ background: #a61300;
+ color: white;
+ text-align: center;
+ border: 1px solid #990000;
+ border-top: none;
+ -moz-border-radius-bottomright: 8px;
+ -moz-border-radius-bottomleft: 8px;
+ border-bottom-right-radius: 8px;
+ border-bottom-left-radius: 8px;
}
.openerp .oe_notification {
- z-index: 1050;
- display: none;
-}
-.openerp .oe_notification * {
- color: white;
-}
-
-/* Login page */
-
-.login {
- padding: 0;
- margin: 0;
- font-family: "Lucida Grande", Helvetica, Verdana, Arial;
- background: url("/web/static/src/img/pattern.png") repeat;
- color: #eee;
- font-size: 14px;
- height: 100%;
-}
-
-.login ul, ol {
- padding: 0;
- margin: 0;
-}
-
-.login li {
- list-style-type: none;
- padding-bottom: 4px;
-}
-
-.login a {
- color: #eee;
- text-decoration: none;
-}
-
-.login button {
- float: right;
- display: inline-block;
- cursor: pointer;
- padding: 6px 16px;
- font-size: 13px;
- font-family: "Lucida Grande", Helvetica, Verdana, Arial;
- border: 1px solid #222222;
- color: white;
- margin: 0;
- background: #600606;
- background: -moz-linear-gradient(#b92020, #600606);
- background: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
- background: -ms-linear-gradient(top, #b92020, #600606);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b92020', endColorstr='#600606',GradientType=0 );
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(155, 155, 155, 0.4) inset;
- -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
-}
-
-.login input, .login select {
- width: 252px;
- font-size: 14px;
- font-family: "Lucida Grande", Helvetica, Verdana, Arial;
- border: 1px solid #999999;
- background: whitesmoke;
- -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
- -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
- -box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.login input {
- margin-bottom: 9px;
- padding: 5px 6px;
-}
-
-.login select {
- padding: 1px;
-}
-
-.login .dbpane {
- position: fixed;
- top: 0;
- right: 8px;
- padding: 5px 10px;
- color: #eee;
- border: solid 1px #333;
- background: #1e1e1e;
- background: rgba(30,30,30,0.94);
- -moz-border-radius: 0 0 8px 8px;
- -webkit-border-radius: 0 0 8px 8px;
- border-radius: 0 0 8px 8px;
-}
-
-.login .bottom {
- position: absolute;
- top: 50%;
- left: 0;
- right: 0;
- bottom: 0;
- text-shadow: 0 1px 1px #999999;
- background: #600606;
- background: -moz-linear-gradient(#b41616, #600606);
- background: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
- background: -ms-linear-gradient(top, #b41616, #600606);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b41616', endColorstr='#600606',GradientType=0 );
-}
-
-.login .pane {
- position: absolute;
- top: 50%;
- left: 50%;
- margin: -160px -166px;
- border: solid 1px #333333;
- background: #1e1e1e;
- background: rgba(30,30,30,0.94);
- padding: 22px 32px;
- text-align: left;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
- -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
- -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
-}
-
-.login .pane h2 {
- margin-top: 0;
- font-size: 18px;
-}
-
-.login #logo {
- position: absolute;
- top: -70px;
- left: 0;
- width: 100%;
- margin: 0 auto;
- text-align: center;
-}
-
-.login .footer {
- position: absolute;
- bottom: -40px;
- left: 0;
- width: 100%;
- text-align: center;
-}
-
-.login .footer a {
- font-size: 13px;
- margin: 0 8px;
-}
-
-.login .footer a:hover {
- text-decoration: underline;
-}
-
-.login .openerp {
- font-weight: bold;
- font-family: serif;
- font-size: 16px;
-}
-
-.openerp .login {
- text-align: center;
-}
-
-.openerp .login .login_error_message {
- display: none;
- background-color: #b41616;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
- -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
- color: #eee;
- font-size: 14px;
- padding: 14px 18px;
- margin-top: 15px;
- text-align: center;
-}
-
-.openerp .login.login_invalid .login_error_message {
- display: inline-block;
-}
-
-
-
-/* Database */
-.login .oe-database-manager {
- display: none;
- height: 100%;
- width: 100%;
- background-color: white;
-}
-.login.database_block .bottom,
-.login.database_block .login_error_message,
-.login.database_block .pane {
- display: none;
-}
-.login.database_block .oe-database-manager {
- display: block;
-}
-
-.login .database {
- float: left;
- width: 202px;
- height: 100%;
- background: #666666;
-}
-.login .oe_db_options {
- margin-left: 202px;
- color: black;
- padding-top: 20px;
-}
-
-.login .database ul {
- margin-top: 65px;
-}
-
-ul.db_options li {
- padding: 5px 0 10px 5px;
- background: #949292; /* Old browsers */
- background: -moz-linear-gradient(top, #949292 30%, #6d6b6b 95%, #282828 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#949292), color-stop(95%,#6d6b6b), color-stop(100%,#282828)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* W3C */
- /* for ie9 */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */
- border: none;
- /* overriding jquery ui */
- -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
- display: block;
- font-weight: bold;
- text-transform: uppercase;
- margin: 1px;
- color: #EEEEEE;
- cursor: pointer;
- width: 195px;
- font-size: 12px;
-}
-
-.db_option_table {
- border: 1px solid #5A5858;
- padding: 5px;
- -moz-border-radius: 10px;
-}
-
-table.db_option_table input.required {
- background-color: #D2D2FF !important;
-}
-
-.db_option_table label {
- display: block;
- text-align: right;
-}
-
-.db_option_table input[type="text"],
-.db_option_table input[type="password"],
-.db_option_table input[type="file"],
-.db_option_table select {
- width: 300px;
-}
-
-.option_string {
- font-weight: bold;
- color: #555;
- width: 100%;
- text-align: center;
- padding: 10px 0;
- font-size: large;
-}
-
-label.error {
- float: none;
- color: red;
- padding-left: .5em;
- vertical-align: top;
-}
-
-/* Main*/
-.openerp .main_table {
- width: 100%;
- height: 100%;
- background: #f0eeee;
-}
-.openerp .oe-application {
- height: 100%;
-}
-.openerp .oe-application-container {
- width: 100%;
- height: 100%;
-}
-
-/* IE Hack - for IE < 9
- * Avoids footer to be placed statically at 100% cutting the middle of the views
- * */
-.openerp .oe-application-container {
- height: auto\9;
- min-height: 100%\9;
-}
-
-/* Menu */
-.openerp .menu {
- height: 34px;
- background: #cc4e45; /* Old browsers */
- background: -moz-linear-gradient(top, #cc4e45 0%, #b52d20 8%, #7a211a 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc4e45), color-stop(8%,#b52d20), color-stop(100%,#7a211a)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CC4E45', endColorstr='#7A211A',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* W3C */
-}
-.openerp .menu td {
- text-align: center;
- padding:0;
-}
-.openerp .menu a {
- display:block;
- min-width: 60px;
- height: 20px;
- margin: 3px 2px;
- padding: 0 8px;
-
- background: #bd5e54; /* Old browsers */
- background: -moz-linear-gradient(top, #bd5e54 0%, #90322a 60%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bd5e54), color-stop(60%,#90322a)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#BD5E54', endColorstr='#90322A',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #bd5e54 0%,#90322a 60%); /* W3C */
-
- border: 1px solid #5E1A14;
- border-radius: 4px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
-
- color: #eee;
- text-shadow: #222 0 1px 0;
- text-decoration: none;
- text-transform: uppercase;
- line-height: 20px;
- font-weight: bold;
- font-size: 75%;
-
- white-space: nowrap;
-}
-.openerp .menu a:hover,
-.openerp .menu a:focus,
-.openerp .menu a.active {
- background: #c6c6c6; /* Old browsers */
- background: -moz-linear-gradient(top, #c6c6c6 0%, #5c5c5c 7%, #969595 86%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c6c6c6), color-stop(7%,#5c5c5c), color-stop(86%,#969595)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C6C6C6', endColorstr='#969595',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* W3C */
- /* for ie */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5c5c5c', endColorstr='#969595',GradientType=0 ); /* IE6-9 */
- color: #fff;
-}
-/* Secondary Menu */
-.openerp .secondary_menu .oe_toggle_secondary_menu {
- position: absolute;
- cursor: pointer;
- border-left: 1px solid #282828;
- border-bottom: 1px solid #282828;
- width: 21px;
- height: 21px;
- z-index: 10;
- background: transparent;
- color: white;
- text-shadow: 0 1px 0 #333;
- text-align: center;
- font-size: 18px;
- line-height: 18px;
- right: 0;
-}
-.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu {
- position: static;
- border-left: none;
- border-bottom: 1px solid #282828;
- width: 21px;
- height: 21px;
- background: #818181;
-}
-.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu span.oe_menu_fold {
- display: none;
-}
-.openerp .secondary_menu.oe_unfolded .oe_toggle_secondary_menu span.oe_menu_unfold {
- display: none;
-}
-.openerp .secondary_menu {
- width: 200px;
- min-width: 200px;
- border-right: 1px solid #3C3C3C;
- border-bottom: 1px solid #5A5858;
- background: #5A5858;
- vertical-align: top;
- height: 100%;
- display: block;
- position: relative;
- font-size:85%;
-}
-.openerp .secondary_menu.oe_folded {
- width: 20px;
- min-width: 20px;
- position: static;
-}
-.openerp .secondary_menu.oe_folded .oe_secondary_menu.active {
- position: absolute;
- z-index: 100;
- border: 4px solid #585858;
- border-color: rgba(88, 88, 88, .5);
- border-radius: 4px;
- min-width: 200px;
-}
-.openerp .secondary_menu a {
- display: block;
- padding: 0 5px 2px 5px;
- line-height: 20px;
- text-decoration: none;
- white-space: nowrap;
- color: white;
- text-shadow: 0 1px 0 #333;
+ z-index: 1050;
+}
+.openerp .oe_login {
+ background: url("/web/static/src/img/pattern.png") repeat;
+ text-align: center;
+ font-size: 14px;
+ height: 100%;
+}
+.openerp .oe_login li {
+ list-style-type: none;
+ padding-bottom: 4px;
+}
+.openerp .oe_login button {
+ float: right;
+ display: inline-block;
+ cursor: pointer;
+ padding: 6px 16px;
+ border: 1px solid #222222;
+ color: white;
+ margin: 0;
+ background-color: #b92020;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
+ background-image: -webkit-linear-gradient(top, #b92020, #600606);
+ background-image: -moz-linear-gradient(top, #b92020, #600606);
+ background-image: -ms-linear-gradient(top, #b92020, #600606);
+ background-image: -o-linear-gradient(top, #b92020, #600606);
+ background-image: linear-gradient(to bottom, #b92020, #600606);
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
+}
+.openerp .oe_login input, .openerp .oe_login select {
+ width: 252px;
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial;
+ border: 1px solid #999999;
+ background: whitesmoke;
+ -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
+ box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+.openerp .oe_login input {
+ margin-bottom: 9px;
+ padding: 5px 6px;
+}
+.openerp .oe_login select {
+ padding: 1px;
+}
+.openerp .oe_login .oe_login_dbpane {
+ position: fixed;
+ top: 0;
+ right: 8px;
+ padding: 5px 10px;
+ color: #eeeeee;
+ border: solid 1px #333333;
+ background: #1e1e1e;
+ background: rgba(30, 30, 30, 0.94);
+ -moz-border-radius: 0 0 8px 8px;
+ -webkit-border-radius: 0 0 8px 8px;
+ border-radius: 0 0 8px 8px;
+}
+.openerp .oe_login .oe_login_dbpane input {
+ padding: 2px 4px;
+ margin: 4px 0;
+}
+.openerp .oe_login .oe_login_bottom {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ text-shadow: 0 1px 1px #999999;
+ background-color: #b41616;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
+ background-image: -webkit-linear-gradient(top, #b41616, #600606);
+ background-image: -moz-linear-gradient(top, #b41616, #600606);
+ background-image: -ms-linear-gradient(top, #b41616, #600606);
+ background-image: -o-linear-gradient(top, #b41616, #600606);
+ background-image: linear-gradient(to bottom, #b41616, #600606);
+}
+.openerp .oe_login .oe_login_pane {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin: -160px -166px;
+ border: solid 1px #333333;
+ background: #1e1e1e;
+ background: rgba(30, 30, 30, 0.94);
+ padding: 22px 32px;
+ color: #eeeeee;
+ text-align: left;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
+ -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
+ box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
+}
+.openerp .oe_login .oe_login_pane h2 {
+ margin-top: 0;
+ font-size: 18px;
+}
+.openerp .oe_login .oe_login_logo {
+ position: absolute;
+ top: -70px;
+ left: 0;
+ width: 100%;
+ margin: 0 auto;
+ text-align: center;
+}
+.openerp .oe_login .oe_login_footer {
+ position: absolute;
+ bottom: -40px;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.openerp .oe_login .oe_login_footer a {
+ color: #eeeeee;
+ margin: 0 8px;
+}
+.openerp .oe_login .oe_login_footer a:hover {
+ text-decoration: underline;
+}
+.openerp .oe_login .oe_login_footer span {
+ font-weight: bold;
+ font-size: 16px;
+}
+.openerp .oe_login .oe_login_error_message {
+ display: none;
+ background-color: #b41616;
+ color: #eeeeee;
+ padding: 14px 18px;
+ margin-top: 15px;
+ text-align: center;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
+}
+.openerp .oe_login_invalid .oe_login_error_message {
+ display: inline-block;
+}
+.openerp .oe_database_manager {
+ background: white;
+ color: black;
+ text-align: left;
+}
+.openerp .oe_database_manager .oe_database_manager_menu {
+ color: black;
+}
+.openerp .oe_webclient {
+ width: 100%;
+ height: 100%;
+ border-spacing: 0px;
+}
+.openerp .oe_content_full_screen .oe_application {
+ top: 0;
+ left: 0;
+}
+.openerp .oe_content_full_screen .oe_topbar, .openerp .oe_content_full_screen .oe_leftbar {
+ display: none;
+}
+.openerp .oe_topbar {
+ width: 100%;
+ height: 31px;
+ border-top: solid 1px #d3d3d3;
+ background-color: #646060;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626));
+ background-image: -webkit-linear-gradient(top, #646060, #262626);
+ background-image: -moz-linear-gradient(top, #646060, #262626);
+ background-image: -ms-linear-gradient(top, #646060, #262626);
+ background-image: -o-linear-gradient(top, #646060, #262626);
+ background-image: linear-gradient(to bottom, #646060, #262626);
+}
+.openerp .oe_topbar .oe_topbar_item {
+ display: block;
+ padding: 5px 10px 7px;
+ line-height: 20px;
+ height: 20px;
+ color: #eeeeee;
+ vertical-align: top;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+}
+.openerp .oe_topbar .oe_topbar_item:hover {
+ background: #303030;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+}
+.openerp .oe_topbar .oe_topbar_item .oe_active {
+ background: #303030;
+ font-weight: bold;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+}
+.openerp .oe_topbar .oe_topbar_avatar {
+ width: 24px;
+ height: 24px;
+ margin: -2px 2px 0 0;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+.openerp .oe_topbar .oe_topbar_avatar {
+ vertical-align: top;
+}
+.openerp .oe_topbar .oe_dropdown_arrow:after {
+ border-top: 4px solid white;
+}
+.openerp .oe_topbar .oe_dropdown_menu {
+ background: #333333;
+ background: rgba(37, 37, 37, 0.9);
+ border-color: #999999;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 0 1px 1px;
+ -moz-border-radius: 0 0 6px 6px;
+ -webkit-border-radius: 0 0 6px 6px;
+ border-radius: 0 0 6px 6px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.openerp .oe_topbar .oe_dropdown_menu li {
+ float: none;
+}
+.openerp .oe_topbar .oe_dropdown_menu li a {
+ color: #eeeeee;
+}
+.openerp .oe_topbar .oe_dropdown_menu li a:hover {
+ background-color: #292929;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919));
+ background-image: -webkit-linear-gradient(top, #292929, #191919);
+ background-image: -moz-linear-gradient(top, #292929, #191919);
+ background-image: -ms-linear-gradient(top, #292929, #191919);
+ background-image: -o-linear-gradient(top, #292929, #191919);
+ background-image: linear-gradient(to bottom, #292929, #191919);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe_leftbar {
+ display: none;
+ width: 220px;
+ background: #f0eeee;
+ border-right: 1px solid #afafb6;
+ text-shadow: 0 1px 1px white;
+ padding-bottom: 16px;
+}
+.openerp a.oe_logo {
+ width: 220px;
+ display: block;
+ text-align: center;
+ height: 70px;
+ line-height: 70px;
+}
+.openerp a.oe_logo img {
+ height: 40px;
+ width: 157px;
+ margin: 14px 0;
+}
+.openerp .oe_footer {
+ position: fixed;
+ bottom: 0;
+ padding: 4px 0;
+ background: #f0eeee;
+ width: 220px;
+ text-align: center;
+}
+.openerp .oe_footer a {
+ font-weight: 800;
+ font-family: serif;
+ font-size: 16px;
+ color: black;
+}
+.openerp .oe_footer a span {
+ color: #c81010;
+ font-style: italic;
+}
+.openerp .oe_user_menu {
+ float: right;
+ padding: 0;
+ margin: 0;
+}
+.openerp .oe_user_menu li {
+ list-style-type: none;
+ float: left;
+}
+.openerp .oe_user_menu .oe_dropdown_menu {
+ right: -1px;
+}
+.openerp .oe_systray > div {
+ float: left;
+ padding: 0 4px 0 4px;
+}
+.openerp .oe_systray {
+ float: right;
+}
+.openerp .oe_menu {
+ float: left;
+ padding: 0;
+ margin: 0;
+}
+.openerp .oe_menu li {
+ float: left;
+}
+.openerp .oe_menu a {
+ display: block;
+ padding: 5px 10px 7px;
+ line-height: 20px;
+ height: 20px;
+ color: #eeeeee;
+ vertical-align: top;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+}
+.openerp .oe_menu a:hover {
+ background: #303030;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+}
+.openerp .oe_menu .oe_active {
+ background: #303030;
+ font-weight: bold;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+}
+.openerp .oe_secondary_menu_section {
+ font-weight: bold;
+ margin-left: 8px;
+ color: #8a89ba;
}
.openerp .oe_secondary_submenu {
- background: #5A5858;
-}
-.openerp .secondary_menu a.oe_secondary_menu_item {
- background: #949292; /* Old browsers */
- background: -moz-linear-gradient(top, #949292 0%, #6d6b6b 87%, #282828 99%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#949292), color-stop(87%,#6d6b6b), color-stop(99%,#282828)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* W3C */
- /* for ie9 */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */
- white-space: nowrap;
- color: white;
- text-shadow: 0 1px 0 #333;
-
-}
-.openerp a.oe_secondary_submenu_item {
- padding: 0 5px 2px 10px;
-}
-.openerp a.oe_secondary_submenu_item,
-.openerp a.oe_secondary_menu_item {
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.openerp a.oe_secondary_submenu_item:hover,
-.openerp a.oe_secondary_submenu_item.leaf.active {
- display: block;
- background: #ffffff; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #d8d8d8 11%, #afafaf 86%, #333333 91%, #5a5858 96%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(11%,#d8d8d8), color-stop(86%,#afafaf), color-stop(91%,#333333), color-stop(96%,#5a5858)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#5A5858',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* W3C */
- padding: 0 5px 2px 10px;
- line-height: 20px;
- color: #3f3d3d;
- text-decoration: none;
- text-shadow: #fff 0 1px 0;
-}
-.openerp a.oe_secondary_submenu_item.submenu.opened span:before {
- content: "\25be";
-}
-.openerp a.oe_secondary_submenu_item.submenu span:before {
- content: "\25b8";
+ padding: 2px 0 8px 0;
+ margin: 0;
+ width: 100%;
+ display: inline-block;
+}
+.openerp .oe_secondary_submenu > li {
+ position: relative;
+ padding: 1px 0 1px 20px;
+}
+.openerp .oe_secondary_submenu > li a {
+ display: block;
+ color: #4c4c4c;
+ padding: 2px 4px 2px 0;
+}
+.openerp .oe_secondary_submenu > li .oe_menu_label {
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ font-size: 10px;
+ background: #8a89ba;
+ color: white;
+ padding: 2px 4px;
+ margin: 1px 6px 0 0;
+ border: 1px solid lightGray;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+}
+.openerp .oe_secondary_submenu .oe_menu_counter {
+ float: right;
+ background: #8a89ba;
+ color: #eeeeee;
+ font-size: 10px;
+ border: 1px solid lightgray;
+ padding: 2px 4px;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ margin: 0px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+}
+.openerp .oe_secondary_submenu .oe_active {
+ background: #8a89ba;
+ border-top: 1px solid lightGray;
+ border-bottom: 1px solid lightGray;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+}
+.openerp .oe_secondary_submenu .oe_active a {
+ color: white;
+}
+.openerp .oe_secondary_submenu .oe_active .oe_menu_label {
+ background: #eeeeee;
+ color: #8a89ba;
+ text-shadow: 0 1px 1px white;
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+}
+.openerp .oe_secondary_submenu .oe_active .oe_menu_counter {
+ background: #eeeeee;
+ color: #8a89ba;
+}
+.openerp .oe_secondary_submenu .oe_menu_toggler:before {
+ width: 0;
+ height: 0;
+ display: inline-block;
+ content: "&darr";
+ text-indent: -99999px;
+ vertical-align: top;
+ margin-left: -12px;
+ margin-top: 4px;
+ margin-right: 4px;
+ border-top: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ border-left: 4px solid #4c4c4c;
+ filter: alpha(opacity=50);
+ opacity: 0.5;
+}
+.openerp .oe_secondary_submenu .oe_menu_opened:before {
+ margin-top: 6px;
+ margin-left: -16px;
+ margin-right: 4px;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #4c4c4c;
+}
+.openerp .oe_application {
+ width: 100%;
+}
+.openerp .oe_application a {
+ color: #8a89ba;
+}
+.openerp .oe_application a:hover {
+ text-decoration: underline;
+}
+.openerp .oe_application > div {
+ height: 100%;
+}
+.openerp .oe_view_manager .oe_view_manager_body {
+ height: inherit;
+}
+.openerp .oe_view_manager .oe_view_manager_view_kanban {
+ height: inherit;
+}
+.openerp .oe_view_manager .oe_view_manager_header {
+ width: 100%;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_header_row {
+ clear: both;
+ text-shadow: 0 1px 1px white;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_header_row:last-child td {
+ padding-top: 0;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_view_manager_sidebar {
+ margin: 0px auto;
+ width: 400px;
+ text-align: center;
+}
+.openerp .oe_view_manager .oe_view_manager_header td {
+ line-height: 26px;
+}
+.openerp .oe_view_manager .oe_view_manager_header h2 {
+ font-size: 18px;
+ margin: 0;
+ float: left;
+}
+.openerp .oe_view_manager .oe_view_manager_header h2 a {
+ color: #8a89ba;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group {
+ display: inline-block;
+ border: 1px solid #ababab;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group li {
+ float: left;
+ border-right: 1px solid #ababab;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group li:last-child {
+ border: none;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group a {
+ color: #4c4c4c;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group a:hover {
+ text-decoration: none;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group .active {
+ background: #999999;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_button_group .active a {
+ color: white;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
+}
+.openerp .oe_view_manager .oe_view_manager_header .oe_view_manager_buttons {
+ white-space: nowrap;
+}
+.openerp .oe_view_manager .oe_view_manager_pager {
+ line-height: 26px;
+}
+.openerp .oe_view_manager .oe_pager_value {
+ float: left;
+ margin-right: 8px;
+}
+.openerp .oe_view_manager .oe_pager_group {
+ float: left;
+ height: 24px;
+ line-height: 24px;
+ display: inline-block;
+ border: 1px solid #ababab;
+ cursor: pointer;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+.openerp .oe_view_manager .oe_pager_group li {
+ height: 24px;
+ line-height: 24px;
+ padding: 0;
+ float: left;
+ border-right: 1px solid #ababab;
+}
+.openerp .oe_view_manager .oe_pager_group li:last-child {
+ border: none;
+}
+.openerp .oe_view_manager .oe_pager_group a {
+ color: #4c4c4c;
+ padding: 0 8px;
+}
+.openerp .oe_view_manager .oe_pager_group a:hover {
+ text-decoration: none;
+}
+.openerp .oe_view_manager .oe_pager_group .active {
+ background: #999999;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
+}
+.openerp .oe_view_manager .oe_pager_group .active a {
+ color: white;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
+}
+.openerp .oe_view_manager .oe_view_manager_switch li {
+ text-align: center;
+ width: 24px;
+ height: 24px;
+ line-height: 16px;
+}
+.openerp .oe_view_manager .oe_view_manager_switch li a {
+ position: relative;
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_list:after, .openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_tree:after {
+ padding: 2px;
+ content: "i";
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_form:after {
+ content: "m";
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_graph:after {
+ font-family: "mnmliconsRegular" !important;
+ font-size: 21px;
+ font-weight: 300 !important;
+ content: "}";
+ top: -2px;
+ position: relative;
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_gantt:after {
+ font-family: "mnmliconsRegular" !important;
+ font-size: 21px;
+ font-weight: 300 !important;
+ content: "y";
+ top: -2px;
+ position: relative;
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_calendar:after {
+ content: "P";
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_kanban:after {
+ content: "k";
+}
+.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after {
+ content: "f";
+}
+.openerp .oe_view_manager_global {
+ height: 100%;
+}
+.openerp .oe_view_manager_global > .oe_view_manager_header {
+ border-top: 1px solid #cacaca;
+ border-bottom: 1px solid #cacaca;
+ background-color: #fcfcfc;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
+ background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -moz-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -ms-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
+ -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
+}
+.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row td {
+ padding: 8px;
+}
+.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td {
+ padding-top: 8px;
+}
+.openerp .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager {
+ display: none !important;
+}
+.openerp .oe_searchview {
+ cursor: text;
+ position: relative;
+ float: right;
+ padding: 1px 0;
+ line-height: 18px;
+ width: 480px;
+ border: 1px solid #ababab;
+ background: white;
+ -moz-border-radius: 13px;
+ -webkit-border-radius: 13px;
+ border-radius: 13px;
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
+}
+.openerp .oe_searchview input, .openerp .oe_searchview textarea {
+ padding: 3px;
+ height: 14px;
+ font-size: 11px;
+ line-height: 18px;
+}
+.openerp .oe_searchview.oe_focused {
+ border-color: #a6a6fe;
+ -moz-box-shadow: 0 1px 2px #a6a6fe inset;
+ -webkit-box-shadow: 0 1px 2px #a6a6fe inset;
+ box-shadow: 0 1px 2px #a6a6fe inset;
+}
+.openerp .oe_searchview .oe_searchview_clear {
+ cursor: pointer;
+ position: absolute;
+ top: 0;
+ right: 18px;
+ width: 15px;
+ height: 100%;
+ background: url(../img/search_reset.gif) center center no-repeat;
+}
+.openerp .oe_searchview .oe_searchview_unfold_drawer {
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 100%;
+ padding: 0 7px 0 4px;
+ color: #cccccc;
+ cursor: pointer;
+}
+.openerp .oe_searchview .oe_searchview_unfold_drawer:hover {
+ color: #999999;
+}
+.openerp .oe_searchview .oe_searchview_unfold_drawer:before {
+ position: absolute;
+ top: 10px;
+ right: 7px;
+ width: 0;
+ height: 0;
+ display: inline-block;
+ content: "";
+ vertical-align: top;
+ border-top: 5px solid #4c4c4c;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ filter: alpha(opacity=50);
+ opacity: 0.5;
+}
+.openerp .oe_searchview .oe_searchview_facets {
+ min-height: 22px;
+}
+.openerp .oe_searchview .oe_searchview_facets:before {
+ color: #cccccc;
+ font-family: "mnmliconsRegular";
+ content: "r";
+ font-size: 130%;
+ display: inline;
+ position: relative;
+ left: 6px;
+ top: 2px;
+ color: #a3a3a3;
+ padding-right: 4px;
+}
+.openerp .oe_searchview .oe_searchview_facets * {
+ vertical-align: top;
+ display: inline-block;
+ line-height: 17px;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input, .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet {
+ height: 18px;
+ margin: 1px 0;
+ font-size: 11px;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input:focus, .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
+ outline: none;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input {
+ padding: 0 3px;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet {
+ position: relative;
+ cursor: pointer;
+ border: 1px solid #afafb6;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background: #8786b7;
+ -webkit-font-smoothing: auto;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
+ border-color: #a6a6fe;
+ -moz-box-shadow: 0 0 3px 1px #a6a6fe;
+ -webkit-box-shadow: 0 0 3px 1px #a6a6fe;
+ box-shadow: 0 0 3px 1px #a6a6fe;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_values {
+ background: #f0f0fa;
+ -moz-border-radius: 0 3px 3px 0;
+ -webkit-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_category, .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value {
+ height: 18px;
+ padding: 0 4px;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_category {
+ color: white;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_category.oe_i {
+ font-size: 16px;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value {
+ border-left: 1px solid #afafb6;
+ text-shadow: 0 1px 1px white;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value:last-child {
+ padding-right: 16px;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_remove {
+ position: absolute;
+ top: 3px;
+ right: 3px;
+ color: #8786b7;
+ line-height: 8px;
+ width: 12px;
+ height: 12px;
+ text-align: center;
+ font-weight: bold;
+ cursor: pointer;
+ text-shadow: 0 1px 1px white;
+}
+.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_remove:hover {
+ color: white;
+ background: #8786b7;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+.openerp .oe_searchview.oe_searchview_open_drawer .oe_searchview_drawer {
+ display: block;
+}
+.openerp .oe_searchview .oe_searchview_drawer {
+ position: absolute;
+ z-index: 100;
+ margin-top: 4px;
+ top: 100%;
+ right: -1px;
+ background-color: white;
+ min-width: 100%;
+ display: none;
+ border: 1px solid #afafb6;
+ text-align: left;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+}
+.openerp .oe_searchview .oe_searchview_drawer > div {
+ border-top: 1px solid #cccccc;
+ margin: 0;
+ padding: 8px;
+}
+.openerp .oe_searchview .oe_searchview_drawer > div:first-child {
+ border-top: none;
+ margin: 0;
+}
+.openerp .oe_searchview .oe_searchview_drawer h3 {
+ margin: 8px 4px 4px 12px;
+ color: #8786b7;
+ font-size: 13px;
+}
+.openerp .oe_searchview .oe_searchview_drawer h4, .openerp .oe_searchview .oe_searchview_drawer h4 * {
+ margin: 0;
+ cursor: pointer;
+ font-weight: normal;
+ display: inline-block;
+}
+.openerp .oe_searchview .oe_searchview_drawer h4:hover, .openerp .oe_searchview .oe_searchview_drawer h4 *:hover {
+ background-color: #f0f0fa;
+}
+.openerp .oe_searchview .oe_searchview_drawer h4:before {
+ content: "â–¸ ";
+ color: #a3a3a3;
+}
+.openerp .oe_searchview .oe_searchview_drawer button {
+ margin: 4px 0;
+}
+.openerp .oe_searchview .oe_searchview_drawer .button {
+ border: none;
+ background: transparent;
+ padding: 0 2px;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section {
+ display: table;
+ width: 100%;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section > div {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ display: table-cell;
+ width: 50%;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section ul {
+ margin: 0 8px 8px;
+ padding: 0;
+ list-style: none;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section li {
+ list-style: none;
+ padding: 2px 4px 2px 20px;
+ line-height: 14px;
+ color: inherit;
+ cursor: pointer;
+ position: relative;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section li.oe_selected:before {
+ content: "W";
+ font-family: "entypoRegular" !important;
+ font-size: 24px;
+ font-weight: 300 !important;
+ color: #a3a3a3;
+ position: absolute;
+ left: 4px;
+ top: -2px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section li:hover {
+ background-color: #f0f0fa;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section form {
+ margin-left: 12px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section form p {
+ margin: 4px 0;
+ line-height: 18px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_section form button {
+ margin: 0 0 8px 0;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom {
+ padding: 0 8px 8px 8px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom form {
+ display: none;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom li {
+ cursor: pointer;
+ position: relative;
+ line-height: 14px;
+ padding: 2px 4px 2px 20px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom li:hover {
+ background-color: #f0f0fa;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom li button {
+ position: absolute;
+ top: 0;
+ right: 5px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced form {
+ display: none;
+ margin-top: 8px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced button.oe_add_condition:before {
+ content: "Z";
+ font-family: "entypoRegular" !important;
+ font-size: 24px;
+ font-weight: 300 !important;
+ margin-right: 4px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced ul {
+ list-style: none;
+ padding: 0;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced li {
+ position: relative;
+ list-style: none;
+ margin: 0;
+ white-space: nowrap;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_opened h4:before {
+ content: "â–¾ ";
+ position: relative;
+ top: -1px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_opened form {
+ display: block;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete, .openerp .oe_searchview .oe_searchview_drawer .searchview_extended_delete_prop {
+ display: inline-block;
+ width: 12px;
+ height: 12px;
+ line-height: 12px;
+ padding: 1px;
+ color: #8786b7;
+ line-height: 8px;
+ text-align: center;
+ font-weight: bold;
+ text-shadow: 0 1px 1px white;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete:hover, .openerp .oe_searchview .oe_searchview_drawer .searchview_extended_delete_prop:hover {
+ text-decoration: none;
+ color: white;
+ background: #8786b7;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete {
+ display: none;
+ position: absolute;
+ bottom: 1px;
+ right: 4px;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_private:hover .oe_searchview_custom_delete, .openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_public:hover .oe_searchview_custom_delete {
+ display: inline-block;
+}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_public:after {
+ content: ",";
+ font-family: "entypoRegular" !important;
+ font-size: 22px;
+ font-weight: 300 !important;
+ margin: 0 0 0 4px;
+ padding: 0;
+}
+.openerp .oe_view_nocontent > img {
+ float: left;
+ margin: 1.5em;
+}
+.openerp .oe_view_nocontent > div {
+ overflow: hidden;
+ padding: 35px 0px 0px 0px;
+ max-width: 700px;
+ font-size: 125%;
+}
+.openerp .oe_formview {
+ background: white;
+}
+.openerp .oe_form_dropdown_section {
+ position: relative;
+ display: inline-block;
+}
+.openerp .oe_form_invalid input, .openerp .oe_form_invalid select, .openerp .oe_form_invalid textarea {
+ background-color: #ff6666 !important;
+ border: 1px solid #dd0000 !important;
}
-
-/* Header */
-.openerp .header {
- height: 65px;
- background: url("/web/static/src/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;
- border: 1px solid white;
- border-right-color: black;
- border-bottom-color: black;
- 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 {
- margin-top: 7px;
- margin-left: 10px;
- display: block;
- background: url(/web/static/src/img/logo.png);
- width:180px;
- height:46px;
-}
-.openerp .header_title {
- float: left;
- font-size: 100%;
- margin: 0;
- padding: 4px 10px;
- text-shadow: 0 1px 0 #111111;
- font-weight:normal;
- line-height:14px;
-}
-.openerp .header_title small {
- color: #ccc;
- font-size: 90%;
- font-weight: normal;
-}
-.openerp .header_corner {
- float: right;
-}
-.openerp .header_corner .block {
- float: left;
- height: 34px;
- line-height: 34px;
- /*background: url(../images/top-sep-a.png) no-repeat;*/
- border-left: 1px solid #6a6a6a;
- background: #828282;
- background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 );
-}
-.openerp .header_corner .block a {
- display: block;
- color: white;
- text-decoration: none;
- padding: 0 10px;
-}
-.openerp .header_corner .block a:hover {
- background: #929292;
- background: -moz-linear-gradient(top, #929292 0%, #4D4D4D 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#929292), color-stop(100%,#4D4D4D));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#929292', endColorstr='#4D4D4D',GradientType=0 );
-}
-.openerp .header_corner ul.block {
- list-style: none;
- height: 34px;
- margin: 0;
- padding: 0 0 0 2px;
- line-height: 33px;
-}
-.openerp .header_corner ul.block li {
- float: left;
-}
-.openerp .header_corner ul.block li a {
- padding: 0 5px;
- position: relative;
- line-height: 32px;
-}
-.openerp .header_corner ul.block li a img {
- vertical-align: middle;
-}
-.openerp .header_corner ul.block li a small {
- position: absolute;
- right: 0;
- top: 5px;
- padding: 1px 4px 2px;
- background: rgba(0, 0, 0, 0.75);
- border-radius: 7px;
- -moz-border-radius: 7px;
- -webkit-border-radius: 7px;
- line-height: 1em;
- font-weight: bold;
-}
-
-.openerp .logout {
- font-size:80%;
-}
-
-/* Footer */
-.openerp div.oe_footer {
- background: none repeat scroll 0 0 #CCCCCC;
- overflow: hidden;
- padding: 5px 0;
- position: relative;
- -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4);
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4);
-}
-.openerp div.oe_footer p.oe_footer_powered {
- left: 50%;
- margin: 0;
- padding: 0 15px;
- color: #666666;
- font-weight: bold;
- font-size: 0.8em;
- text-align: center;
-}
-.openerp div.oe_footer p.oe_footer_powered a {
- text-decoration: none;
- color: #666666;
-}
-
-
-/* Main Application */
-.openerp .oe-main-content {
- padding: 0;
- height: 100%;
-}
-
-.openerp h2.oe_view_title {
- font-size: 110%;
- font-weight: normal;
- margin: 2px 0;
- color: #252424;
- text-shadow: white 0 1px 0;
-}
-.openerp div[id^="notebook"] .oe_view_title {
- font-size:85%;
- padding-bottom:4px;
-}
-
-/* View Manager */
-.openerp .oe_vm_switch {
- float: right;
-}
-.openerp .oe-view-manager-header .oe_view_title {
- font-size:150%;
- padding:2px 0 0 0;
-}
-
-/* SearchView */
-.openerp .oe_searchview_field > div {
- position: relative;
- white-space: nowrap;
-}
-.openerp .oe_searchview_field .oe_input_icon {
- top: auto;
- bottom: 3px;
-}
-
-.openerp .filter_label, .openerp .filter_icon {
- background: #F0F0F0;
- border: 1px solid #999;
- 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;
- 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: #aaa;
- 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: #aaa;
- filter: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- -o-box-shadow: none;
- box-shadow: none;
-}
-.openerp .filter_icon {
- height: 22px;
- padding: 1px 2px 0 2px;
- margin: 0;
- vertical-align: bottom;
-}
-.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;
- margin: 0;
-}
-.openerp .filter_label_group {
- padding-right: 0.4em;
- white-space: nowrap;
-}
-
-.openerp .filter_label_group button {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- border-right: none;
-}
-.openerp .filter_label_group button:first-child {
- -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;
- border-right: none;
-}
-.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;
- border-right: 1px solid #999;
-}
-.openerp .filter_label_group button.filter_icon img {
- padding: 1px 8px 0 8px;
-}
-.openerp .filter_label_group button.filter_icon:first-child {
- border-left: solid 1px #999;
- margin-left: -7px;
- -webkit-border-top-left-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -moz-border-radius-topleft: 0;
- -moz-border-radius-bottomleft: 0;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-
-.openerp .searchview_group_string {
- display: block;
- color: #7D7979;
- font-weight: bold;
- padding: 2px 0 2px 10px;
- text-decoration: none;
-}
-.openerp .searchview_group_string:hover {
- background-color: #ccc;
-}
-.openerp .searchview_group.folded .searchview_group_string {
- background: url("/web/static/src/img/ui/group-folded.png") no-repeat scroll 0 50%;
-}
-.openerp .searchview_group.folded .searchview_group_content {
- display: none;
-}
-.openerp .searchview_group.expanded .searchview_group_string {
- background: url("/web/static/src/img/ui/group-expanded.png") no-repeat scroll 0 50%;
-}
-.openerp .searchview_group.expanded .searchview_group_content {
- display: block;
- padding-bottom:3px;
-}
-
-.openerp .searchview_group_content .oe_label, .openerp .searchview_group_content .oe_label_help {
- font-weight: bold;
- color: #4c4c4c;
-}
-
-.openerp .oe-searchview-render-line .oe_label, .openerp .oe-searchview-render-line .oe_label_help {
- font-weight: bold;
- font-size: 80%;
- white-space: nowrap;
-}
-
-.openerp .searchview_extended_group {
- padding: 3px;
- margin: 2px;
-}
-
-.openerp .searchview_extended_group .oe_adv_filters_and {
- border-bottom: 1px solid #8E8E8E;
- text-align: center;
- margin-top: -10px;
-}
-.openerp .searchview_extended_group .oe_adv_filters_and span {
- background: #F0EEEE;
- position: relative;
- top: 0.5em;
- padding: 0 1em 0 1em;
- color: #8E8E8E;
-}
-
-.openerp .searchview_extended_group.last_group .oe_adv_filters_and {
- display: none;
-}
-
-.openerp .oe_search-view-buttons {
- padding: 2px 0 10px 0;
- vertical-align:middle;
-}
-.openerp .oe_search-view-filters-management {
- float: right;
-}
-.openerp .oe_search-view-filters-management, .openerp .oe_search-view-custom-filter-btn {
- float:right;
-}
-
-.openerp .searchview_extended_add_proposition span {
- font-size: 0.9em;
- background: url(/web/static/src/img/icons/gtk-add.png) repeat-y;
- padding-left: 18px;
-}
-
-.openerp .searchview_extended_delete_group {
- float:right;
- display: none;
-}
-
-.openerp .searchview_extended_delete_prop {
- text-decoration: none;
-}
-
-.openerp .searchview_extended_delete_group span,
-.openerp .searchview_extended_delete_prop span {
- font-size: 0.9em;
- background: url(/web/static/src/img/icons/gtk-close.png) repeat-y;
- padding-left: 18px;
-}
-/* List */
-.openerp table.oe-listview-content {
- clear: right;
- width: 100%;
- border-spacing: 0;
- border: 1px solid silver;
-}
-
-.openerp .oe-listview thead table {
- width: 100%;
- border: none;
-}
-.openerp .oe-listview tr.odd {
- background-color: #f3f3f3;
-}
-.openerp .oe-listview tbody tr:hover {
- background-color: #ecebf2;
-}
-.openerp .oe-listview tbody tr:hover {
- background-color: #eae9f0;
-}
-.openerp .oe-listview thead table tr,
-.openerp .oe-listview thead table tr:hover {
- background: none;
-}
-
-.openerp .oe-listview > table > tbody > tr > td,
-.openerp .oe-listview th {
- vertical-align: middle;
- text-align: left;
- padding: 1px 2px;
-}
-
-.openerp .oe-record-delete button,
-.openerp button.oe-edit-row-save {
- border: none;
- height: 12px;
- width: 12px;
- background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent;
- cursor: pointer;
-}
-.openerp button.oe-edit-row-save {
- background-image: url('/web/static/src/img/icons/save-document.png');
-}
-
-/* Could use :not selectors if they were supported by MSIE8... */
-.openerp .oe-listview > table > tbody > tr > td {
- border-left: 1px solid #dadada; /*currently commenting to test with no vertical lines in list view*/
-}
-.openerp .oe-listview tbody td:first-child,
-.openerp .oe-listview tbody td.oe-button,
-.openerp .oe-listview tbody td.oe-button,
-.openerp .oe-listview tbody th.oe-record-selector,
-.openerp .oe-listview tbody td.oe-record-delete {
- border-left: none;
-}
-
-.openerp .oe-listview td.oe-record-delete {
- text-align: right;
-}
-.openerp .oe-listview th.oe-sortable {
- cursor: pointer;
- font-size: 75%;
- text-transform: uppercase;
- padding: 0;
- margin: 0;
- padding-left: 3px;
- color: #333;
-}
-.openerp .oe-listview th.oe-sortable .ui-icon {
- height: 60%;
- margin: -6px 0 0;
- display: inline;
- display: inline-block;
- vertical-align: middle;
-}
-
-.openerp .oe-listview > table > tbody > tr > td {
- border-bottom: 1px solid #E3E3E3;
-}
-
-
-.openerp .oe-listview td.oe-actions {
- border-bottom:none;
-}
-
-.openerp .oe-listview .oe-record-selector, .openerp .oe-listview .oe-record-edit-link {
- border-bottom: 1px solid #E3E3E3;
-}
-.openerp .oe-listview .oe-record-edit-link {
- cursor: pointer;
-}
-
-.openerp .oe-listview .oe-field-cell {
- cursor: pointer;
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 3px;
- padding-bottom: 3px;
- font-size: 80%;
-}
-.openerp .oe-listview .oe-field-cell progress {
- width: 100%;
-}
-.openerp .oe-listview .oe-field-cell.oe-button button,
-.openerp .oe-listview .oe_form_button button {
- margin: 0;
- padding: 0;
- border: none;
- background: none;
- width: 16px;
- box-shadow: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
-}
-.openerp .oe-listview .oe-field-cell button:active {
- opacity: 0.5;
-}
-.openerp .oe-listview .oe-field-cell button img {
- cursor: pointer;
-}
-.openerp .oe-listview .oe-field-cell button img:hover {
- opacity: 0.75;
-}
-
-.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img {
- opacity: 0.5;
-}
-
-.openerp .oe-listview th.oe-actions {
- text-align: left;
- white-space: nowrap;
-}
-.openerp .oe-listview th.oe-list-pager {
- text-align: right;
- white-space: nowrap;
-}
-.openerp .oe-list-pager .oe-pager-state {
- cursor: pointer;
- font-size: 90%;
- color: #555;
-}
-
-.openerp .oe_button.oe_button_pager,
-.openerp .oe-list-pager > span,
-.openerp .oe_form_pager > span {
- line-height: 17px;
- height: 17px;
- cursor: pointer;
- color: gray;
- font-weight: bold;
- vertical-align: middle;
-}
-.openerp .oe_button.oe_button_pager,
-.openerp .oe_button.oe_button_pager:disabled {
- padding: 0 3px 0 3px;
- margin: 0;
- height: 17px;
-}
-.openerp .oe-listview .oe-group-name {
- padding-right: 1em;
-}
-.openerp .oe-listview .oe-group-name,
-.openerp .oe-listview .oe-group-pagination {
- white-space: nowrap;
-}
-
-.openerp .oe-listview tfoot td {
- padding: 3px 3px 0;
-}
-.openerp .oe-listview .oe-list-footer {
- text-align: center;
- white-space: nowrap;
- color: #444;
- font-size: 85%;
-}
-.openerp .oe-listview .oe-list-footer span {
- margin: 0 1em;
-}
-.openerp .oe-listview .oe-list-footer progress {
- vertical-align:-10% !important;
- width: 100%;
-}
-
-/** list rounded corners
-
- rounded corners are a pain on tables: need to round not only table, but
- also on the first and last children of the first and last row
- */
-.openerp .oe-listview table.oe-listview-content {
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content thead tr:first-child th:first-child {
- -webkit-border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
- border-top-left-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content thead tr:first-child th:last-child {
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- border-top-right-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:first-child,
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:first-child,
-.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child th:first-child {
- -webkit-border-bottom-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- border-bottom-left-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:last-child,
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:last-child,
-.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child td:last-child {
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- border-bottom-right-radius: 4px;
-}
-
-/* Notebook */
-.openerp .oe_form_notebook {
- padding: 0;
- background: none;
- border-width: 0;
-}
-.openerp .oe_form_notebook .ui-tabs-panel {
- padding: 4px;
- -moz-border-radius-topright: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
-}
-.openerp .oe_form_notebook ul.ui-tabs-nav {
- padding-left: 0;
- background: transparent;
- border-width: 0;
- border-radius: 0;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- line-height: 0.8em;
- font-size: 95%;
- color: #555;
-}
-.openerp .oe_form_notebook ul.ui-tabs-nav li {
- font-weight: bold;
-}
-.openerp .oe_form_notebook .ui-tabs-panel {
- background: #f9f9f9;
- border-width: 1px;
-}
-.openerp .oe_form_notebook .ui-tabs-selected {
- background: #f9f9f9;
-}
-/* Unedit Form */
-.openerp .field_char,
-.openerp .field_date,
-.openerp .field_float,
-.openerp .field_selection,
-.openerp a.oe_form_uri {
- vertical-align: middle;
- padding-top: 3px;
- font-size: 90%;
- color: #222;
-}
-.openerp a.oe_form_uri {
- color: #9A0404;
- line-height: 12px;
-}
-
-
-
-/* Form */
.openerp .oe_form_button_save_dirty {
- display: none;
-}
-.openerp .oe_form_dirty > .oe_form_header > .oe_form_buttons > .oe_form_button_save {
- color: white;
- background: #dc5f59;
- background: -moz-linear-gradient(#dc5f59, #b33630);
- background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
- background: -webkit-linear-gradient(#dc5f59, #b33630);
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- -box-shadow: none;
- font-weight: bold;
-}
-.openerp .oe_form_frame_cell input[type="checkbox"] {
- margin-top: 3px;
- vertical-align: middle;
-}
-.openerp .oe_form_frame_cell .input[type="text"] {
- padding-bottom: 1px;
-}
-
-.openerp table.oe_frame td {
- color: #4c4c4c;
-}
-.openerp td.oe_form_frame_cell {
- padding: 2px;
- position: relative;
-}
-.openerp .oe_frame.oe_forms {
- clear: both;
-}
-.openerp table.oe_frame {
- color: #4c4c4c;
-}
-.openerp fieldset.oe_group_box {
- border: 1px solid #AAAAAA;
- moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- background: #F9F9F9;
- padding: 4px;
-}
-.openerp fieldset.oe_group_box legend {
- font-weight: bold;
-}
-.openerp td.oe_form_frame_cell {
- padding: 2px;
- position: relative;
-}
-.openerp td.oe_form_field_translatable,
-.openerp td.oe_form_field_many2one,
-.openerp td.oe_form_field_date,
-.openerp td.oe_form_field_datetime {
- white-space: nowrap;
-}
-.openerp td.oe_form_field_boolean {
- padding-top: 4px;
-}
-.openerp td.oe_form_frame_cell.oe_form_group {
- padding: 0;
-}
-.openerp .required.error {
- border: 1px solid #900;
-}
-.openerp .oe_form_buttons, .openerp .oe_list_buttons {
- float: left;
-}
-.openerp .oe_form_pager, .openerp .oe_list_pager {
- float: right;
- font-size: 80%;
- color: gray;
- font-weight: bold;
-}
-
-.openerp .oe_form_pager {
- margin-right: 3px;
-}
-
-
-.openerp label.oe_label_help, .openerp label.oe_label,
-.openerp .oe_form_paragraph,
-.openerp .oe_form_field_statusbar,
-.openerp .oe_forms input[type="text"],
-.openerp .oe_forms input[type="password"],
-.openerp .oe_forms input[type="file"],
-.openerp .oe_forms select,
-.openerp .oe_forms .oe_button,
-.openerp .oe_forms textarea {
- font-size: 85%;
-}
-
-.openerp label.oe_label_help, .openerp label.oe_label {
- display: block;
- color: #4c4c4c;
- font-weight: normal;
-}
-.openerp label.oe_label_help {
- cursor: help;
-}
-.openerp .oe_form_frame_cell .oe_label, .openerp .oe_form_frame_cell .oe_label_help {
- font-weight: normal;
-}
-.openerp #tiptip_content {
- font-size: 12px;
-}
-.openerp .oe_tooltip_string {
- color: #FD5;
- font-weight: bold;
- font-size: 13px;
-}
-.openerp .oe_tooltip_help {
- white-space: pre-wrap;
-}
-.openerp .oe_tooltip_technical {
- padding: 0 0 4px 0;
- margin: 5px 0 0 15px;
- list-style: circle;
-}
-.openerp .oe_tooltip_technical_title {
- font-weight: bold;
-}
-
-.openerp .oe_forms label.oe_label, .openerp .oe_forms label.oe_label_help {
- margin: 3px 0 0 3px;
- white-space: nowrap;
-}
-.openerp .oe_forms .searchview_group_content label.oe_label, .openerp .searchview_group_content .oe_forms label.oe_label_help { /* making a distinction between labels in search view and other labels */
- margin: 3px 0 0 3px;
-}
-
-.openerp label.oe_label_help span {
- font-size: 80%;
- color: darkgreen;
- vertical-align:top;
- position: relative;
- top: -4px;
- padding: 0 2px;
-}
-.openerp .oe_align_left {
- text-align: left;
-}
-.openerp .oe_align_right {
- text-align: right;
-}
-.openerp .oe_align_center {
- text-align: center;
-}
-.openerp .oe_forms .oe_form_paragraph {
- margin: 3px 0 0 0;
- white-space: normal;
-}
-
-.openerp .oe_forms .oe_form_paragraph.oe_multilines {
- white-space: pre;
-}
-
-.openerp .oe_form_field_one2many .oe-actions h3.oe_view_title,
-.openerp .oe_form_field_one2many_list .oe-actions h3.oe_view_title{
- display: inline;
- margin: 0 0.5em 0 0;
-}
-.openerp .oe_form_field_one2many .oe-listview .oe-edit-row-save,
-.openerp .oe_form_field_one2many_list .oe-listview .oe-edit-row-save {
- background-image: url("/web/static/src/img/iconset-b-remove.png");
-}
-
-.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon,
-.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon {
- height: 100%;
- margin-top: -9px;
-}
-
-.openerp table.oe_frame .oe-listview-content td {
- color: inherit;
-}
-
-/* Uneditable Form View */
-.openerp .oe_form_readonly {
-
-}
-.openerp .oe_form_readonly .oe_form_frame_cell .field_text,
-.openerp .oe_form_readonly .field_char,
-.openerp .oe_form_readonly .field_int,
-.openerp .oe_form_readonly .field_float,
-.openerp .oe_form_readonly .field_email,
-.openerp .oe_form_readonly .field_date,
-.openerp .oe_form_readonly .field_selection,
-.openerp .oe_forms_readonly .oe_form_field_many2one {
- padding: 3px 2px 2px 2px;
- background-color: white;
- min-height: 17px;
-}
-.openerp .oe_form_readonly .oe_form_frame_cell .field_text {
- height: auto;
-}
-.openerp .oe_form_readonly .field_datetime {
- padding: 1px 2px 2px 2px;
- background-color: white;
- height:19px;
-}
-.openerp .oe_form_readonly .oe_form_field_many2one div {
- background-color:white;
- height:18px;
- margin-bottom:1px;
- padding: 0px 2px 5px 2px;
-}
-
-.openerp .oe_form_readonly .oe_form_field_email div {
- background-color: white;
- padding: 1px 2px 3px 2px;
-}
-
-
-.openerp .oe_form_readonly .oe_form_field_text div.field_text,
-.openerp .oe_form_readonly .oe_form_field_text_html div.field_text_html {
- white-space: pre-wrap;
-}
-.openerp .oe_form_readonly .oe_form_frame_cell .field_text {
- min-height:100px;
-}
-/* Inputs */
-.openerp .oe_forms input[type="text"],
-.openerp .oe_forms input[type="password"],
-.openerp .oe_forms input[type="file"],
-.openerp .oe_forms select,
-.openerp .oe_forms textarea {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0 2px;
- margin: 0 2px;
- border: 1px solid #999;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background: white;
- min-width: 90px;
- color: #1f1f1f;
-}
-
-.openerp .oe_forms input.field_many2one,
-.openerp .oe_forms input.field_binary,
-.openerp .oe_forms input.field_binary,
-.openerp .oe_forms input.field_email,
-.openerp .oe_forms input.field_url {
- 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_button.oe_field_button {
- -webkit-border-top-left-radius: 0px;
- -webkit-border-bottom-left-radius: 0px;
- -moz-border-radius-topleft: 0px;
- -moz-border-radius-bottomleft: 0px;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- margin-right:-1px;
- height: 22px;
-}
-
-.openerp .oe_form_field_email button img,
-.openerp .oe_form_field_url button img {
- vertical-align: top;
-}
-/* vertically recentering filter management select tag */
-.openerp select.oe_search-view-filters-management {
- margin-top:2px;
-}
-
-.openerp .oe_forms select{
- padding-top: 2px;
-}
-.openerp .oe_forms input[readonly],
-.openerp .oe_forms select[readonly],
-.openerp .oe_forms textarea[readonly],
-.openerp .oe_forms input[disabled],
-.openerp .oe_forms select[disabled],
-.openerp .oe_forms textarea[disabled]{
- background: #E5E5E5 !important;
- color: #666;
-}
-.openerp .oe_forms textarea {
- resize:vertical;
-}
-.openerp .oe_forms input[type="text"],
-.openerp .oe_forms input[type="password"],
-.openerp .oe_forms input[type="file"],
-.openerp .oe_forms select,
-.openerp .oe_forms .oe_button {
- height: 22px;
-}
-
-.openerp .oe_forms input.field_datetime {
- min-width: 11em;
-}
-.openerp .oe_forms .oe_form_button .oe_button {
- color: #4c4c4c;
- white-space: nowrap;
- min-width: 100%;
- width: 100%;
-}
-@-moz-document url-prefix() {
- /* Strange firefox behaviour on width: 100% + white-space: nowrap */
- .openerp .oe_forms .oe_form_button .oe_button {
- width: auto;
- }
-}
-/* IE Hack - for IE < 9
- * Avoids buttons overflow
- * */
-.openerp .oe_forms .oe_form_button .oe_button {
- min-width: auto\9;
-}
-.openerp .oe_forms .button {
- height: 22px;
-}
-.openerp .oe_forms .oe_button span {
- position: relative;
- vertical-align: top;
-}
-.openerp .oe_input_icon {
- cursor: pointer;
- margin: 3px 0 0 -21px;
- vertical-align: top;
-}
-.openerp .oe_datepicker_container {
- display: none;
-}
-.openerp .oe_datepicker_root {
- display: inline-block;
-}
-.openerp .oe_form_frame_cell .oe_datepicker_root {
- width: 100%;
-}
-.openerp .oe_input_icon_disabled {
- position: absolute;
- cursor: default;
- opacity: 0.5;
- filter:alpha(opacity=50);
- right: 5px;
- top: 3px;
+ color: white;
+ background: #dc5f59;
+ background-color: #dc5f59;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
+ background-image: -webkit-linear-gradient(top, #dc5f59, #b33630);
+ background-image: -moz-linear-gradient(top, #dc5f59, #b33630);
+ background-image: -ms-linear-gradient(top, #dc5f59, #b33630);
+ background-image: -o-linear-gradient(top, #dc5f59, #b33630);
+ background-image: linear-gradient(to bottom, #dc5f59, #b33630);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ font-weight: bold;
+}
+.openerp .oe_form_button_save_dirty:hover {
+ background: #ed6f6a;
+}
+.openerp .oe_form_editable .oe_highlight {
+ color: #404040;
+ background: none;
+}
+.openerp .oe_form_editable button.oe_highlight {
+ background-color: #efefef;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
+ background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: -moz-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: -ms-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: -o-linear-gradient(top, #efefef, #d8d8d8);
+ background-image: linear-gradient(to bottom, #efefef, #d8d8d8);
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+}
+.openerp .oe_form_editable button.oe_highlight:active {
+ background-color: #e3e3e3;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
+ background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: -moz-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: -ms-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: -o-linear-gradient(top, #e3e3e3, #f6f6f6);
+ background-image: linear-gradient(to bottom, #e3e3e3, #f6f6f6);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe_form_editable button.oe_highlight:hover {
+ background-color: #f6f6f6;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -moz-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3);
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+}
+.openerp .oe_form_invisible {
+ display: none !important;
+}
+.openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty {
+ display: none !important;
+}
+.openerp .oe_form_nosheet > *:not(header) {
+ margin-left: 10px !important;
+ margin-right: 10px !important;
+}
+.openerp .oe_form header {
+ position: relative;
+ border-bottom: 1px solid #cacaca;
+ background-color: #fcfcfc;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
+ background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -moz-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -ms-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
+ padding: 0 8px;
+ line-height: 30px;
+}
+.openerp .oe_form header ul {
+ display: inline-block;
+ float: right;
+}
+.openerp .oe_form footer {
+ min-width: 650px;
+ max-width: 960px;
+ margin: 0 auto;
+}
+.openerp ul.oe_form_steps {
+ height: 30px;
+ padding: 0;
+ margin: 0;
+ text-shadow: 0 1px 1px white;
+}
+.openerp ul.oe_form_steps img {
+ vertical-align: top;
+ margin-left: 8px;
+}
+.openerp ul.oe_form_steps li {
+ border-right: none;
+ padding: 0;
+ margin: 0;
+ float: left;
+ vertical-align: top;
+ height: 30px;
+ padding: 0 0 0 12px;
+}
+.openerp ul.oe_form_steps li:first-child {
+ border-left: 1px solid #cacaca;
+}
+.openerp ul.oe_form_steps li:last-child {
+ margin-right: 12px;
+ padding-right: 12px;
+ border-right: 1px solid #cacaca;
+}
+.openerp ul.oe_form_steps li a {
+ color: #4c4c4c;
+}
+.openerp ul.oe_form_steps li a:hover {
+ color: black;
+}
+.openerp ul.oe_form_steps .oe_form_steps_active {
+ font-weight: bold;
+ color: #b33630;
+}
+.openerp .oe_form .oe_subtotal_footer {
+ width: 1% !important;
+}
+.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell {
+ text-align: right;
+ padding: 0 !important;
+}
+.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell_label {
+ border-right: none;
+}
+.openerp .oe_form .oe_subtotal_footer .oe_form_field {
+ width: auto !important;
+}
+.openerp .oe_form .oe_subtotal_footer .oe_subtotal_footer_separator {
+ border-top: 1px solid #cacaca;
+ font-sie: 120%;
+ font-weight: bold;
+}
+.openerp .oe_form .oe_subtotal_footer label.oe_subtotal_footer_separator {
+ font-weight: bold !important;
+ padding: 2px 8px 2px 0px !important;
+}
+.openerp .oe_application .oe_form_sheetbg {
+ background: url(/web/static/src/img/form_sheetbg.png);
+ padding: 8px 0;
+ border-bottom: 1px solid #dddddd;
+}
+.openerp .oe_application .oe_form_sheet_width {
+ min-width: 650px;
+ max-width: 960px;
+ margin: 0 auto;
+}
+.openerp .oe_application .oe_form_sheet {
+ background: white;
+ min-height: 330px;
+ padding: 16px;
+ border: 1px solid #afafb6;
+ -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
+}
+.openerp .oe_application .oe_form_sheet .ui-tabs {
+ margin: 0 -16px;
+}
+.openerp .oe_application .oe_form_sheet .oe_notebook_page {
+ padding: 0 16px;
+}
+.openerp .oe_form td.oe_form_group_cell_label {
+ border-right: 1px solid #dddddd;
+ padding: 2px 0px 2px 0px;
+}
+.openerp .oe_form td.oe_form_group_cell_label label {
+ line-height: 18px;
+ display: block;
+ min-width: 120px;
+}
+.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell {
+ padding-left: 8px;
+}
+.openerp .oe_form .oe_form_group {
+ width: 100%;
+ margin: 4px 0 4px 0;
+}
+.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] {
+ font-weight: bold;
+ white-space: nowrap;
+ padding-right: 8px;
+}
+.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
+ font-size: 80%;
+ color: darkGreen;
+ vertical-align: top;
+ position: relative;
+ top: -4px;
+ padding: 0 2px;
+}
+.openerp .oe_horizontal_border {
+ border-bottom: 1px solid black;
+}
+.openerp .oe_horizontal_separator {
+ font-weight: bold;
+ font-size: 20px;
+ margin: 8px 0px 8px 0px;
+ color: #aaaabb;
+}
+.openerp .oe_horizontal_separator:empty {
+ height: 5px;
+}
+.openerp .oe_vertical_separator {
+ border-left: 1px solid #666666;
+ padding: 0 4px 0 4px;
+}
+.openerp .oe_form_field_progressbar {
+ display: inline-block;
+ min-width: 70px;
+}
+.openerp .oe_form_field_progressbar.ui-progressbar {
+ height: 22px;
+ font-size: 10px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 1px solid #999999;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background: white;
+ min-width: 50px;
+}
+.openerp .oe_form_field_progressbar.ui-progressbar span {
+ position: absolute;
+ margin-left: 10px;
+ font-weight: bold;
+}
+.openerp .oe_form_field_progressbar.ui-progressbar .ui-widget-header {
+ background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
+}
+.openerp .oe_form .oe_form_field_text {
+ width: 100%;
+}
+.openerp .oe_form .oe_form_field_char input,
+.openerp .oe_form .oe_form_field_url input,
+.openerp .oe_form .oe_form_field_text textarea,
+.openerp .oe_form .oe_form_field_selection select {
+ width: inherit;
+}
+.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea {
+ width: 500px;
+}
+.openerp .oe_form .oe_form_field_float input {
+ width: 100px;
+}
+.openerp .oe_form h1 .oe_form_field_float input {
+ width: 140px;
+}
+.openerp .oe_form h2 .oe_form_field_float input {
+ width: 120px;
+}
+.openerp .oe_form h1, .openerp .oe_form h2, .openerp .oe_form h3, .openerp .oe_form h4, .openerp .oe_form h5, .openerp .oe_form h6 {
+ margin: 0 0 4px 0;
+}
+.openerp .oe_form h1 input, .openerp .oe_form h2 input, .openerp .oe_form h3 input, .openerp .oe_form h4 input, .openerp .oe_form h5 input, .openerp .oe_form h6 input {
+ height: inherit !important;
+ font-size: inherit;
+}
+.openerp .oe_form .oe_form_field {
+ width: 100%;
+ display: inline-block;
+ padding: 2px 2px 2px 0px;
+ line-height: 18px;
+}
+.openerp .oe_form .oe_form_field input {
+ margin: 0px;
+}
+.openerp .oe_form .oe_form_field_integer {
+ width: 180px;
+}
+.openerp .oe_form .oe_form_field_float {
+ width: 180px;
+}
+.openerp .oe_form .oe_form_field_date {
+ width: 7em;
+}
+.openerp .oe_form .oe_form_field_datetime {
+ width: 11em;
+}
+.openerp .oe_form input[type="text"], .openerp .oe_form input[type="password"], .openerp .oe_form input[type="file"], .openerp .oe_form select {
+ height: 22px;
+ padding-top: 2px;
+}
+.openerp .oe_form input[type="text"], .openerp .oe_form input[type="password"], .openerp .oe_form input[type="file"], .openerp .oe_form select, .openerp .oe_form textarea {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ background: white;
+ min-width: 70px;
+ color: #1f1f1f;
+}
+.openerp .oe_form input[readonly], .openerp .oe_form select[readonly], .openerp .oe_form textarea[readonly], .openerp .oe_form input[disabled], .openerp .oe_form select[disabled] {
+ background: #e5e5e5 !important;
+ color: #666666;
+}
+.openerp .oe_form textarea[disabled] {
+ border: none;
+ border-left: 8px solid #eeeeee;
+ padding-left: 8px;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ -moz-border-radius: 0px;
+ -webkit-border-radius: 0px;
+ border-radius: 0px;
+}
+.openerp .oe_form .oe_form_field_many2one input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_url 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_url button img {
+ vertical-align: top;
+}
+.openerp .oe_form .oe_form_field_date,
+.openerp .oe_form .oe_form_field_datetime {
+ white-space: nowrap;
+}
+.openerp .oe_form .oe_form_field_boolean {
+ padding-top: 4px;
+ width: auto;
+}
+.openerp .oe_form .oe_form_field_many2manytags .text-wrap {
+ width: 100% !important;
+}
+.openerp .oe_form .oe_form_field_many2manytags .text-wrap textarea {
+ width: 100% !important;
+}
+.openerp .oe_form .oe_form_field_many2manytags .oe_form_field_many2manytags_box {
+ border-radius: 2px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ position: relative;
+ float: left;
+ border: 1px solid #9daccc;
+ background: #e2e6f0;
+ color: black;
+ padding: 0px 3px 0px 3px;
+ margin: 0 2px 2px 0;
+ height: 16px;
+ font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
+}
+.openerp .oe_form .oe_form_field_many2manytags .text-core .text-wrap .text-dropdown .text-list .text-suggestion em {
+ font-style: italic;
+ text-decoration: none;
+}
+.openerp .oe_form .oe_datepicker_container {
+ display: none;
+}
+.openerp .oe_form .oe_datepicker_root {
+ display: inline-block;
+}
+.openerp .oe_form .oe_form_required input, .openerp .oe_form .oe_form_required select, .openerp .oe_form .oe_form_required textarea {
+ background-color: #d2d2ff !important;
+}
+.openerp .oe_form .oe_form_invalid input, .openerp .oe_form .oe_form_invalid select, .openerp .oe_form .oe_form_invalid textarea {
+ background-color: #ff6666 !important;
+ border: 1px solid #dd0000 !important;
+}
+.openerp .oe_form .oe_input_icon {
+ cursor: pointer;
+ margin: 3px 0 0 -21px;
+ vertical-align: top;
+}
+.openerp .oe_form .oe_input_icon_disabled {
+ position: absolute;
+ cursor: default;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+ right: 5px;
+ top: 3px;
+}
+.openerp .oe_form .oe_form_field_with_button input {
+ width: 100%;
+}
+.openerp .oe_form .oe_form_field_with_button > .oe_button {
+ float: right;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ border-bottom-left-radius: 0px;
+ height: 22px;
+}
+.openerp .oe_form .oe_form_field_with_button > div {
+ position: relative;
+ overflow: hidden;
+}
+.openerp .oe_hidden_input_file {
+ overflow: hidden;
+ position: relative;
+ display: inline-block;
+ width: 45px;
+ height: 30px;
+}
+.openerp .oe_hidden_input_file input.oe-binary-file {
+ z-index: 0;
+ line-height: 0;
+ font-size: 12px;
+ position: absolute;
+ top: 1px;
+ right: 10px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+ -ms-filter: "alpha(opacity=0)";
+ margin: 0;
+ padding: 0;
+}
+.openerp .oe_form .oe_form_field_image {
+ padding: 0;
+ position: relative;
+ display: inline-block;
+ width: auto;
+ vertical-align: top;
+}
+.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls {
+ position: absolute;
+ top: 1px;
+ padding: 3px 0 0 0;
+ margin: 0 1px;
+ display: none;
+ width: 99%;
+ text-align: center;
+ background: url(/web/static/src/img/form_sheetbg.png);
+ border-bottom: 1px dotted black;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.openerp .oe_form .oe_form_field_image:hover .oe_form_field_image_controls {
+ display: block;
+}
+.openerp .oe_form_field_many2one td:first-child {
+ position: relative;
+}
+.openerp .oe_form_field_many2one span.oe-m2o-drop-down-button {
+ position: absolute;
+ top: 3px;
+ right: 2px;
+}
+.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
+ display: none;
+}
++.openerp .oe_form_field_one2many .oe-listview .oe-edit-row-save {
++ background-image: url(/web/static/src/img/iconset-b-remove.png);
++}
+.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top {
+ display: none;
+}
+.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td {
+ padding: 0px 8px;
+ line-height: 16px;
+}
+.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_i {
+ font-size: 13px;
+}
+.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group {
+ height: auto;
+ line-height: 16px;
+}
+.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group li {
+ height: auto;
+ line-height: 16px;
+}
+.openerp .oe_form .oe_form_field_many2many > .oe-listview .oe_list_pager_single_page {
+ display: none;
+}
+.openerp .oe-listview-content {
+ width: 100%;
+}
+.openerp .oe-listview-content td:first-child:after, .openerp .oe-listview-content th:first-child:after {
+ border-width: 0;
+}
+.openerp .oe-listview-content > thead {
+ border-bottom: 2px solid #cacaca;
+ background: #eeeeee;
+ vertical-align: top;
+}
+.openerp .oe-listview-content > thead th {
+ position: relative;
+}
+.openerp .oe-listview-content td, .openerp .oe-listview-content th {
+ padding: 3px 6px;
+ line-height: 18px;
+}
+.openerp .oe-listview-content th:after {
+ position: absolute;
+ right: 6px;
+ content: "";
+ margin-top: 7px;
+ border-width: 0 4px 4px;
+ border-style: solid;
+ border-color: black transparent;
+ visibility: hidden;
+}
+.openerp .oe-listview-content th.sortup:after {
+ visibility: visible;
+ filter: alpha(opacity=60);
+ opacity: 0.6;
+}
+.openerp .oe-listview-content th.sortdown:after {
+ border-bottom: none;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid black;
+ visibility: visible;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ filter: alpha(opacity=60);
+ opacity: 0.6;
+}
+.openerp .oe-listview-content > tbody {
+ cursor: pointer;
+ background: white;
+}
+.openerp .oe-listview-content > tbody > tr {
+ border-top: 1px solid #dddddd;
+}
+.openerp .oe-listview-content > tbody > tr > td.oe-field-cell {
+ padding: 3px 6px;
+}
+.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th {
+ line-height: 18px;
+}
+.openerp .oe-listview-content > tbody > tr > td > button, .openerp .oe-listview-content > tbody > tr > th > button {
+ border: none;
+ background: transparent;
+ padding: 0;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child {
+ width: 17px;
+}
+.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child:after {
+ border-width: 0;
+}
+.openerp .oe-listview-content > tbody > tr > td.oe_number {
+ text-align: right !important;
+}
+.openerp .oe-listview-content > tbody > tr:nth-child(odd) {
+ background-color: #f0f0fa;
+ background-color: #f0f0fa;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
+ background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
+ background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
+}
+.openerp .oe-listview-content > tfoot {
+ border-top: 2px solid #cacaca;
+ border-bottom: 1px solid #cacaca;
+ background: #eeeeee;
+ font-weight: bold;
+}
+.openerp .oe-listview-content > tbody tr:hover td, .openerp .oe-listview-content tbody tr:hover th {
+ background-color: #eeeeee;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede));
+ background-image: -webkit-linear-gradient(top, #eeeeee, #dedede);
+ background-image: -moz-linear-gradient(top, #eeeeee, #dedede);
+ background-image: -ms-linear-gradient(top, #eeeeee, #dedede);
+ background-image: -o-linear-gradient(top, #eeeeee, #dedede);
+ background-image: linear-gradient(to bottom, #eeeeee, #dedede);
+}
+.openerp .oe-listview-content .numeric {
+ text-align: right;
+ width: 82px;
+}
+.openerp .oe-listview-content .numeric input {
+ text-align: right;
}
.openerp .oe_trad_field.touched {
- border: 1px solid green !important;
-}
-
-/* http://www.quirksmode.org/dom/inputfile.html
- * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
- */
-.openerp .oe-binary-file-set {
- overflow: hidden;
- position: relative;
-}
-.openerp input.oe-binary-file {
- z-index: 0;
- line-height: 0;
- font-size: 12px;
- position: absolute;
- /* Should be adjusted for all browsers */
- top: 1px;
- right: 10px;
- opacity: 0;
- filter: alpha(opacity = 0);
- -ms-filter: "alpha(opacity=0)";
- margin: 0;
- padding:0;
-}
-
-/* Widgets */
-.openerp .separator {
- border: 0 solid #666;
-}
-.openerp .separator.horizontal {
- font-weight: bold;
- border-bottom-width: 1px;
- margin: 3px 4px 3px 1px;
- height: 17px;
- font-size: 95%;
-}
-.openerp .separator.horizontal:empty {
- height: 5px;
-}
-.openerp .oe_form_frame_cell.oe_form_separator_vertical {
- border-left: 1px solid #666;
-}
-.openerp td.required input,
-.openerp td.required select,
-.openerp td.required textarea
-.openerp td.required table.oe-listview-content {
- background-color: #D2D2FF !important;
-}
-.openerp td.invalid input, .openerp td.invalid select, .openerp td.invalid textarea {
- background-color: #F66 !important;
- border: 1px solid #D00 !important;
-}
-.openerp td.invalid table.oe-listview-content {
- border: 1px solid #FF6666 !important;
-}
-.openerp div.oe-progressbar span {
- position: absolute;
- margin-left: 10px;
- margin-top: 5px;
- font-weight: bold;
-}
-
-/* jQuery UI override */
-.openerp .ui-widget {
- font-size: 1em;
-}
-.openerp .oe_form_field_progressbar .ui-progressbar {
- height: 22px;
- font-size: 10px;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing: border-box;
- border: 1px solid #999;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background: white;
- min-width: 90px;
-}
-.openerp tbody.ui-widget-content {
- margin-bottom: 10px;
- border-spacing: 4px;
-}
-.openerp .ui-widget-header {
- background: white none;
-}
-/* progress bars */
-.openerp .ui-progressbar .ui-widget-header {
- background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
-}
-
-/* Sidebar */
-.openerp .view-manager-main-table {
- margin: 0;
- width:100%;
- border-collapse:collapse;
- height:100%;
-}
-
-.openerp .view-manager-main-table tbody {
- vertical-align: top;
-}
-
-.openerp .oe-view-manager-header {
- overflow: auto;
- background: url("/web/static/src/img/sep-a.gif") 0 100% repeat-x;
- margin:6px 0 6px 2px;
-}
-.openerp .oe_form_frame_cell .oe-view-manager-header { /* Trick: remove the background when element is in a formular */
- background: none;
-}
-
-.openerp .oe-view-manager-header h2 {
- float: left;
-}
-
-.openerp .oe_view_manager_menu_tips blockquote {
- display: none;
- font-size: 85%;
- margin: 0;
- background: #fff;
- border-bottom: 1px solid #CECBCB;
- padding: 1px 10px;
- color: #4C4C4C;
-}
-.openerp .oe_view_manager_menu_tips blockquote p {
- margin: 0;
- padding: 6px 1px 4px;
-}
-
-.openerp .oe_view_manager_menu_tips blockquote div {
- text-align: right;
- margin-right:10px;
-}
-
-.openerp .oe_view_manager_menu_tips blockquote div button {
- border: none;
- background: none;
- padding: 0 4px;
- margin: 0;
- display: inline;
- text-decoration: underline;
- color: inherit;
-}
-.openerp .oe-view-manager-logs {
- clear: both;
- background: #fff;
- margin: 0.25em 0;
- font-size: 85%;
- color: #4C4C4C;
- position: relative;
- overflow: hidden;
-}
-.openerp .oe-view-manager-logs ul {
- margin: 0;
- padding: 0 10px;
- list-style: none;
-}
-.openerp .oe-view-manager-logs li:before {
- content: '\2192 ';
-}
-.openerp .oe-view-manager-logs a {
- text-decoration: none;
- color: inherit;
-}
-/* only display first three log items of a folded logs list */
-.openerp .oe-view-manager-logs.oe-folded li:nth-child(n+4) {
- display: none;
-}
-/* display link to more logs if there are more logs to view and the logview is
- currently folded */
-.openerp .oe-view-manager-logs a.oe-more-logs {
- display: none;
-}
-.openerp .oe-view-manager-logs.oe-folded.oe-has-more a.oe-more-logs {
- display: block;
-}
-.openerp .oe-view-manager-logs a.oe-remove-everything {
- position: absolute;
- top: 0;
- right: 0;
- cursor: pointer;
-}
-
-.openerp .view-manager-main-sidebar {
- width: 180px;
- padding: 0;
- margin: 0;
-}
-
-.openerp .sidebar-main-div {
- height: 100%;
- border-left: 1px solid #D2CFCF;
-}
-
-.openerp .sidebar-content {
- padding: 0;
- margin: 0;
- width: 180px;
- height: 100%;
- font-size: 0.9em;
-}
-
-.openerp .closed-sidebar .sidebar-content {
- width: 22px;
-}
-
-.openerp .closed-sidebar .sidebar-content {
- display: none;
-}
-
-.openerp .sidebar-main-div a {
- color: #555;
- text-decoration: none;
-}
-
-.openerp .sidebar-main-div a:hover {
- color: black;
-}
-
-.openerp .oe-sidebar-attachments-toolbar {
- margin: 4px 0 0 4px;
-}
-.openerp .oe-sidebar-attachments-items {
- clear: both;
- padding-top: 5px !important;
-}
-.openerp .oe-sidebar-attachments-items li {
- position: relative;
- padding: 0 0 3px 10px !important;
-}
-.openerp .oe-sidebar-attachments-items li:hover {
- background: #ddd;
-}
-.openerp .oe-sidebar-attachments-link {
- display: block;
- margin-right: 15px;
- overflow: hidden;
-}
-.openerp .oe-sidebar-attachment-delete {
- position: absolute;
- right: 2px;
- top: 1px;
- overflow: hidden;
- width: 15px;
- height: 15px;
- padding: 1px;
- border-radius: 7px;
- -moz-border-radius: 7px;
- -webkit-border-radius: 7px;
-}
-.openerp .oe-sidebar-attachment-delete:hover {
- background-color: white;
-}
-
-.openerp .view-manager-main-sidebar h2 {
- margin:0;
- font-size: 1.15em;
- color: #8E8E8E;
- text-shadow: white 0 1px 0;
- padding-left: 10px;
- padding-right: 21px;
- height: 21px;
-
- background: #ffffff; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */
-
- border: 1px solid #D2CFCF;
- border-right-width: 0;
- border-left-width: 0;
-}
-.openerp .view-manager-main-sidebar h2 {
- border-top-width: 0;
-}
-
-.openerp .view-manager-main-sidebar ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
- display: block;
-}
-
-.openerp .view-manager-main-sidebar li {
- display: block;
- padding: 3px 3px 3px 10px;
-}
-
-.openerp .toggle-sidebar {
- cursor: pointer;
- border: 1px solid #D2CFCF;
- border-top-width: 0;
- display: block;
- background: url(/web/static/src/img/toggle-a-bg.png);
- width: 21px;
- height: 21px;
- z-index: 10;
-}
-.openerp .open-sidebar .toggle-sidebar {
- margin-left: 158px;
- background-position: 21px 0;
- position: absolute;
-}
-.openerp .closed-sidebar .toggle-sidebar {
- border-left: none;
-}
-.openerp li.oe_sidebar_print {
- padding-left: 20px;
- background: 1px 3px url(/web/static/src/img/icons/gtk-print.png) no-repeat;
-}
-
-.openerp .oe_sidebar_print ul {
- padding-left:8px;
-}
-
-.openerp.kitten-mode-activated .main_table {
- background: url(http://placekitten.com/g/1500/800) repeat;
-}
-.openerp.kitten-mode-activated.clark-gable .main_table {
- background: url(http://amigrave.com/ClarkGable.jpg);
- background-size: 100%;
-}
-
-.openerp.kitten-mode-activated .header {
- background: url(http://placekitten.com/g/211/65) repeat;
-}
-
-.openerp.kitten-mode-activated .secondary_menu {
- background: url(http://placekitten.com/g/212/100) repeat;
-}
-
-.openerp.kitten-mode-activated .menu {
- background: #828282;
- background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 );
-}
-.openerp.kitten-mode-activated .menu a {
- background: none;
-}
-.openerp.kitten-mode-activated .menu span {
- background: none;
-}
-.openerp.kitten-mode-activated .sidebar-content li a,
-.openerp.kitten-mode-activated .oe-application .view-manager-main-content h2.oe_view_title,
-.openerp.kitten-mode-activated .oe-application .view-manager-main-content a.searchview_group_string,
-.openerp.kitten-mode-activated .oe-application .view-manager-main-content label {
- color: white;
-}
-.openerp.kitten-mode-activated .menu,
-.openerp.kitten-mode-activated .header_corner,
-.openerp.kitten-mode-activated .header_title,
-.openerp.kitten-mode-activated .secondary_menu div,
-.openerp.kitten-mode-activated .oe-application,
-.openerp.kitten-mode-activated .oe_footer,
-.openerp.kitten-mode-activated .loading,
-.openerp.kitten-mode-activated .ui-dialog {
- opacity:0.8;
- filter:alpha(opacity=80);
-}
-.openerp.kitten-mode-activated .header .company_logo {
- background: url(http://placekitten.com/g/180/46);
-}
-.openerp.kitten-mode-activated .loading {
- background: #828282;
- border-color: #828282;
-}
-
-.openerp .oe-m2o-drop-down-button {
- margin-left: -24px;
-}
-.openerp .oe-m2o-drop-down-button img {
- margin-bottom: -4px;
- cursor: pointer;
-}
-.openerp .oe-m2o input {
- border-right: none;
- margin-right: 0px !important;
- padding-bottom: 2px !important;
-}
-.openerp .oe-m2o-disabled-cm {
- color: grey;
-}
-.openerp ul[role="listbox"] li a {
- font-size:80%;
-}
-.parent_top {
- vertical-align: text-top;
-}
-
-.openerp .oe-dialog-warning p {
- padding-left: 1em;
- font-size: 1.2em;
- font-weight: bold;
-}
-
-.openerp .dhx_mini_calendar {
- -moz-box-shadow: none;
- -khtml-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.openerp .oe-treeview-table {
- width: 100%;
- background-color : #FFFFFF;
- border-spacing: 0;
-
-}
-.openerp .oe-treeview-table tr:hover{
- color: blue;
- background-color : #D8D8D8;
-}
-.treeview-tr, .treeview-td {
- cursor: pointer;
- vertical-align: top;
- text-align: left;
- border-bottom: 1px solid #CFCCCC;
-}
-.openerp .oe-treeview-table .oe-number {
- text-align: right !important;
-}
-.treeview-tr span, .treeview-td span {
- font-size: 90%;
- font-weight: normal;
- white-space: nowrap;
- display: block;
- }
-.treeview-tr.oe-treeview-first {
- background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat;
-}
-.oe-open .treeview-tr.oe-treeview-first {
- background-image: url(/web/static/src/img/collapse.gif);
-}
-.treeview-tr.oe-treeview-first span,
-.treeview-td.oe-treeview-first span {
- margin-left: 16px;
-}
-
-.treeview-header {
- vertical-align: top;
- background-color : #D8D8D8;
- white-space: nowrap;
- text-align: left;
- padding: 4px 5px;
-}
-/* Shortcuts*/
-.oe-shortcut-toggle {
- height: 20px;
- margin-top: 3px;
- padding: 0;
- width: 24px;
- cursor: pointer;
- display: block;
- background: url(/web/static/src/img/add-shortcut.png) no-repeat center center;
- float: left;
-}
-.oe-shortcut-remove{
- background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center;
-}
-.oe-shortcuts {
- position: absolute;
- margin: 0;
- padding: 6px 15px;
- top: 37px;
- left: 197px;
- right: 0;
- height: 17px;
- line-height: 1.2;
-}
-.oe-shortcuts ul {
- display: block;
- overflow: hidden;
- list-style: none;
- white-space: nowrap;
- padding: 0;
- margin: 0;
-}
-.oe-shortcuts li {
- cursor: pointer;
- display: -moz-inline-stack;
- display: inline-block;
- display: inline; /*IE7 */
- color: #fff;
- text-align: center;
- border-left: 1px solid #909090;
- padding: 0 4px;
- font-size: 80%;
- font-weight: normal;
- vertical-align: top;
-}
-
-.oe-shortcuts li:hover {
- background-color: #666;
-}
-.oe-shortcuts li:first-child {
- border-left: none;
- padding-left: 0;
-}
-
-ul.oe-arrow-list {
- padding-left: 1.1em;
- margin: 0;
- white-space: nowrap;
-}
-ul.oe-arrow-list li {
- display: inline-block;
- margin-left: -1em;
- vertical-align: top;
-}
-ul.oe-arrow-list li span {
- vertical-align: top;
- display: inline-block;
- border: 1em solid #DEDEDE;
- line-height:0em;
-}
-ul.oe-arrow-list .oe-arrow-list-before {
- border-left-color: transparent;
- border-right-width:0;
-}
-ul.oe-arrow-list .oe-arrow-list-after {
- border-color: transparent;
- border-left-color: #DEDEDE;
- border-right-width:0;
-}
-ul.oe-arrow-list li.oe-arrow-list-selected span {
- border-color: #B5B9FF;
-}
-ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-before {
- border-left-color: transparent;
-}
-ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
- border-color: transparent;
- border-left-color: #B5B9FF;
-}
-.openerp ul.oe-arrow-list li:first-child span:first-child{
- -webkit-border-top-left-radius: 3px;
- -moz-border-radius-topleft: 3px;
- border-top-left-radius: 3px;
- -webkit-border-bottom-left-radius: 3px;
- -moz-border-radius-bottomleft: 3px;
- border-bottom-left-radius: 3px;
-}
-.openerp ul.oe-arrow-list li:last-child span:last-child{
- -webkit-border-top-right-radius: 3px;
- -moz-border-radius-topright: 3px;
- border-top-right-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- -moz-border-radius-bottomright: 3px;
- border-bottom-right-radius: 3px;
+ border: 1px solid green !important;
}
.openerp .oe_view_editor {
- width:100%;
- border-collapse : collapse;
- margin-left: -12px;
-
- width: 100%;
- background-color : white;
- border-spacing: 0;
-}
-.openerp .oe_view_editor td{
- text-align: center;
- white-space: nowrap;
- border: 1px solid #D8D8D8;
-
- cursor: pointer;
- font-size: 90%;
-}
-.openerp .oe_view_editor_field td{
- border: 0px !important;
+ width: 100%;
+ border-collapse: collapse;
+ margin-left: -12px;
+ width: 100%;
+ background-color: white;
+ border-spacing: 0;
+}
+.openerp .oe_view_editor td {
+ text-align: center;
+ white-space: nowrap;
+ border: 1px solid #d8d8d8;
+ cursor: pointer;
+ font-size: 90%;
+}
+.openerp .oe_view_editor_field td {
+ border: 0px !important;
}
-
.openerp .oe_view_editor tr:hover {
- background-color: #ecebf2;
+ background-color: #ecebf2;
}
-
-
-/* Dialog traceback cases */
-.openerp .oe_error_detail{
- display: block;
+.openerp .oe_layout_debugging .oe_form_group {
+ outline: 2px dashed green;
}
-.openerp .oe_error_send{
- display:block;
+.openerp .oe_layout_debugging .oe_form_group_cell {
+ outline: 1px solid blue;
}
-.openerp .oe_fielddiv{
- display:inline-block;
- width:100%;
+.openerp .oe_layout_debugging .oe_form_group:hover, .openerp .oe_layout_debugging .oe_form_group_cell:hover {
+ outline-color: red;
}
-.openerp .oe_fielddiv input[type=text],textarea{
- width:100%;
+.openerp .oe_layout_debugging .oe_form_group_row_incomplete > td:last-child:after {
+ content: "[Incomplete Row]";
+ background: red;
+ padding: 2px;
+ font-weight: bold;
+ color: white;
+ float: right;
}
-/* for Alignment center */
-.openerp .oe_centeralign{
- text-align:center;
+.openerp .oe_layout_debugging .oe_form_group_row_incomplete.oe_form_group_row_newline > td:last-child:after {
+ content: "[newline]";
}
-
-.openerp .oe_applications_tiles {
- color: #4C4C4C;
- text-shadow: #EEE 0 1px 0;
- margin: 0 20px;
-}
-
-.openerp .oe_vm_switch {
- margin:2px 0 0 0;
-}
-
-.openerp .oe_vm_switch_form,
-.openerp .oe_vm_switch_page,
-.openerp .oe_vm_switch_tree,
-.openerp .oe_vm_switch_list,
-.openerp .oe_vm_switch_graph,
-.openerp .oe_vm_switch_gantt,
-.openerp .oe_vm_switch_calendar,
-.openerp .oe_vm_switch_kanban,
-.openerp .oe_vm_switch_diagram {
- background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent;
- overflow: hidden;
- width: 22px;
- height: 21px;
- border: none;
- background-position: 0px 0px;
-}
-
-.openerp .oe_vm_switch_form span,
-.openerp .oe_vm_switch_page span,
-.openerp .oe_vm_switch_tree span,
-.openerp .oe_vm_switch_list span,
-.openerp .oe_vm_switch_graph span,
-.openerp .oe_vm_switch_gantt span,
-.openerp .oe_vm_switch_calendar span,
-.openerp .oe_vm_switch_kanban span,
-.openerp .oe_vm_switch_diagram span {
- display: none;
-}
-
-.openerp .oe_vm_switch_list {
- background-position: 0px 0px;
-}
-.openerp .oe_vm_switch_list:active,
-.openerp .oe_vm_switch_list:hover,
-.openerp .oe_vm_switch_list:focus,
-.openerp .oe_vm_switch_list[disabled="disabled"] {
- background-position: 0px -21px;
-}
-
-.openerp .oe_vm_switch_tree {
- background-position: 0px 0px;
-}
-.openerp .oe_vm_switch_tree:active,
-.openerp .oe_vm_switch_tree:hover,
-.openerp .oe_vm_switch_tree:focus,
-.openerp .oe_vm_switch_tree[disabled="disabled"] {
- background-position: 0px -21px;
-}
-
-.openerp .oe_vm_switch_form {
- background-position: -22px 0px;
-}
-.openerp .oe_vm_switch_form:active,
-.openerp .oe_vm_switch_form:hover,
-.openerp .oe_vm_switch_form:focus,
-.openerp .oe_vm_switch_form[disabled="disabled"] {
- background-position: -22px -21px;
-}
-
-.openerp .oe_vm_switch_page {
- background-position: -22px 0px;
-}
-.openerp .oe_vm_switch_page:active,
-.openerp .oe_vm_switch_page:hover,
-.openerp .oe_vm_switch_page:focus,
-.openerp .oe_vm_switch_page[disabled="disabled"] {
- background-position: -22px -21px;
-}
-.openerp .oe_vm_switch_graph {
- background-position: -44px 0px;
-}
-.openerp .oe_vm_switch_graph:active,
-.openerp .oe_vm_switch_graph:hover,
-.openerp .oe_vm_switch_graph:focus,
-.openerp .oe_vm_switch_graph[disabled="disabled"] {
- background-position: -44px -21px;
-}
-
-.openerp .oe_vm_switch_gantt {
- background-position: -66px 0px;
-}
-.openerp .oe_vm_switch_gantt:active,
-.openerp .oe_vm_switch_gantt:hover,
-.openerp .oe_vm_switch_gantt:focus,
-.openerp .oe_vm_switch_gantt[disabled="disabled"] {
- background-position: -66px -21px;
+.openerp .oe_debug_view {
+ float: left;
}
-
-.openerp .oe_vm_switch_calendar {
- background-position: -88px 0px;
-}
-.openerp .oe_vm_switch_calendar:active,
-.openerp .oe_vm_switch_calendar:hover,
-.openerp .oe_vm_switch_calendar:focus,
-.openerp .oe_vm_switch_calendar[disabled="disabled"] {
- background-position: -88px -21px;
-}
-.openerp .oe_vm_switch_kanban {
- background-position: -110px 0px;
-}
-.openerp .oe_vm_switch_kanban:active,
-.openerp .oe_vm_switch_kanban:hover,
-.openerp .oe_vm_switch_kanban:focus,
-.openerp .oe_vm_switch_kanban[disabled="disabled"] {
- background-position: -110px -21px;
-}
-
-.openerp .oe_vm_switch_diagram {
- background-position: 0px 0px;
-}
-.openerp .oe_vm_switch_diagram:active,
-.openerp .oe_vm_switch_diagram:hover,
-.openerp .oe_vm_switch_diagram:focus,
-.openerp .oe_vm_switch_diagram[disabled="disabled"] {
- background-position: 0px -21px;
-}
-
-/* Buttons */
-.openerp .oe_button:link,
-.openerp .oe_button:visited,
-.openerp .oe_button {
- display: inline-block;
- border: 1px solid #ababab;
- color: #404040;
- font-size: 12px;
- padding: 3px 10px;
- text-align: center;
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- -webkit-background-size: auto auto !important;
- background-size: 100% 100%;
- background: #d8d8d8 none;
- background: none, -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
- background: none, -webkit-linear-gradient(#efefef, #d8d8d8);
- background: none, -moz-linear-gradient(#efefef, #d8d8d8);
- background: none, -o-linear-gradient(top, #efefef, #d8d8d8);
- background: none, -khtml-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
- background: -ms-linear-gradient(top, #efefef, #d8d8d8);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#d8d8d8',GradientType=0 );
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- -o-border-radius: 3px;
- -ms-border-radius: 3px;
- border-radius: 3px;
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
- -webkit-font-smoothing: antialiased;
- outline: none;
-}
-
-.openerp .oe_button:hover {
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- -webkit-background-size: auto auto !important;
- background-size: 100% 100%;
- background: #e3e3e3 none;
- background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3);
- background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 );
- cursor: pointer;
-}
-
-.openerp .oe_button:focus {
- border: 1px solid #80bfff;
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- -webkit-background-size: auto auto !important;
- background-size: 100% 100%;
- background: #e3e3e3, none;
- background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3);
- background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 );
- -moz-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -o-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
-}
-
-.openerp .oe_button:active,
-.openerp .oe_button.active {
- background: #e3e3e3;
- background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
- background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f;
- background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
- background: -ms-linear-gradient(top, #e3e3e3, #f6f6f6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#f6f6f6',GradientType=0 );
- -moz-box-shadow: none, 0 0 0 transparent;
- -webkit-box-shadow: none, 0 0 0 transparent;
- -o-box-shadow: none, 0 0 0 transparent;
- box-shadow: none, 0 0 0 transparent;
-}
-
-.openerp .oe_button.disabled,
-.openerp .oe_button:disabled {
- background: #efefef !important;
- border: 1px solid #d1d1d1 !important;
- font-size: 12px;
- padding: 3px 10px;
- -moz-box-shadow: none !important, 0 0 0 transparent;
- -webkit-box-shadow: none !important, 0 0 0 transparent;
- -o-box-shadow: none !important, 0 0 0 transparent;
- box-shadow: none !important, 0 0 0 transparent;
- color: #aaaaaa !important;
- cursor: default;
- text-shadow: 0 1px 1px white !important;
-}
-
-.openerp select.oe_search-view-filters-management {
- font-style: oblique;
- color: #999999;
-}
-
-.openerp .oe_search-view-filters-management option,
-.openerp .oe_search-view-filters-management optgroup {
- font-style: normal;
- color: black;
-}
-
-/* Debug stuff */
.openerp .oe_debug_view_log {
- font-size: 95%;
+ font-size: 95%;
}
.openerp .oe_debug_view_log label {
- display: block;
- width: 49%;
- text-align: right;
- float: left;
- font-weight: bold;
- color: #009;
+ display: block;
+ width: 49%;
+ text-align: right;
+ float: left;
+ font-weight: bold;
+ color: #000099;
}
.openerp .oe_debug_view_log span {
- display: block;
- width: 49%;
- float: right;
- color: #333;
+ display: block;
+ width: 49%;
+ float: right;
+ color: #333333;
}
-/* Internet Explorer Fix */
-a img {
- border: none;
+.kitten-mode-activated {
+ background-image: url(http://placekitten.com/g/1365/769);
+ background-size: cover;
+ background-attachment: fixed;
+}
+.kitten-mode-activated > * {
+ opacity: 0.7;
}
--- /dev/null
+@charset "utf-8"
+
+// Variables {{{
+$section-title-color: #8786b7
+$facets-border: #afafb6
+$facets-border-selected: #a6a6fe
+$hover-background: #f0f0fa
+$colour4: #8a89ba
+// }}}
+// Mixins {{{
+@font-face
+ font-family: 'mnmliconsRegular'
+ src: url('/web/static/src/font/mnmliconsv21-webfont.eot') format('eot')
+ src: url('/web/static/src/font/mnmliconsv21-webfont.woff') format('woff')
+ src: url('/web/static/src/font/mnmliconsv21-webfont.ttf') format('truetype')
+ src: url('/web/static/src/font/mnmliconsv21-webfont.svg') format('svg') active
+ font-weight: normal
+ font-style: normal
+
+@font-face
+ font-family: 'EntypoRegular'
+ src: url('/web/static/src/font/entypo-webfont.eot') format('eot')
+ src: url('/web/static/src/font/entypo-webfont.eot?#iefix') format('embedded-opentype')
+ src: url('/web/static/src/font/entypo-webfont.woff') format('woff')
+ src: url('/web/static/src/font/entypo-webfont.ttf') format('truetype')
+ src: url('/web/static/src/font/entypo-webfont.svg') format('svg') active
+ font-weight: normal
+ font-style: normal
+
+@mixin vertical-gradient($startColor: #555, $endColor: #333)
+ background-color: $startColor
+ background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */
+ background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */
+ background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
+ background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */
+ background-image: linear-gradient(to bottom, $startColor, $endColor)
+
+@mixin radial-gradient($gradient)
+ background-position: center center
+ background-image: -webkit-radial-gradient(circle, $gradient)
+ background-image: -moz-radial-gradient($gradient)
+ background-image: -ms-radial-gradient($gradient)
+ background-image: radial-gradient($gradient)
+
+@mixin radius($radius: 5px)
+ -moz-border-radius: $radius
+ -webkit-border-radius: $radius
+ border-radius: $radius
+
+@mixin box-shadow($bsval: 0px 1px 4px #777)
+ -moz-box-shadow: $bsval
+ -webkit-box-shadow: $bsval
+ box-shadow: $bsval
+
+@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s))
+ -webkit-transition: $transval
+ -moz-transition: $transval
+ -ms-transition: $transval
+ -o-transition: $transval
+ transition: $transval
+
+@mixin opacity($opacity: .5)
+ filter: alpha(opacity=$opacity * 100)
+ opacity: $opacity
+
+@mixin background-clip($clip: padding-box)
+ -webkit-background-clip: $clip
+ -moz-background-clip: $clip
+ background-clip: $clip
+
+@mixin box-sizing($type: content)
+ // type = border || content || padding
+ -webkit-box-sizing: #{$type}-box
+ -moz-box-sizing: #{$type}-box
+ -ms-box-sizing: #{$type}-box
+ box-sizing: #{$type}-box
+
+// Transforms the (readable) text of an inline element into an mmlicons icon,
+// allows for actual readable text in-code (and in readers?) with iconic looks
+@mixin text-to-icon($icon-name, $color: #404040)
+ font-size: 1px
+ letter-spacing: -1px
+ color: transparent
+ &:before
+ font-family: "mnmliconsRegular"
+ content: $icon-name
+ font-size: 20px
+ color: $color
+
+// }}}
+
+.openerp.openerp-web-client-container
+ height: 100%
+ position: relative
+
+.openerp
+ // Global style {{{
+ padding: 0
+ margin: 0
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif
+ color: #4c4c4c
+ font-size: 13px
+ background: white
+ // }}}
+ // Tag reset {{{
+ a
+ text-decoration: none
+ table
+ padding: 0
+ border-collapse: collapse
+ thead
+ font-weight: bold
+ background-color: #f0f0f0
+ th
+ border-right: 1px dotted #afafb6
+ &:last-child
+ border-right: none
+ th, td
+ padding: 0
+ text-align: left
+ th
+ font-weight: bold
+ vertical-align: middle
+ td
+ vertical-align: top
+ .zebra tbody tr:nth-child(odd) td
+ background-color: #f0f0fa
+ @include vertical-gradient(#f0f0fa, #eeeef6)
+ .zebra tbody tr:hover td
+ @include vertical-gradient(#eee, #dedede)
+ ul, li, ol
+ margin: 0
+ padding: 0
+ li
+ list-style-type: none
+ input, textarea, select
+ padding: 4px
+ border: 1px solid #ccc
+ @include radius(3px)
+ img
+ vertical-align: middle
+ h4
+ margin: 4px 0
+ // }}}
+ // Button style {{{
+ a.button:link, a.button:visited, button, input[type='submit']
+ display: inline-block
+ border: 1px solid #ababab
+ color: #404040
+ margin: 0
+ padding: 3px 12px
+ font-size: 13px
+ text-align: center
+ @include vertical-gradient(#efefef, #d8d8d8)
+ @include radius(3px)
+ @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))
+ text-shadow: 0 1px 1px rgba(255, 255, 255, .5)
+ -webkit-font-smoothing: antialiased
+ outline: none
+
+ a.button:hover, button:hover, input[type='submit']:hover
+ @include vertical-gradient(#f6f6f6, #e3e3e3)
+ cursor: pointer
+
+ a.button:focus, button:focus, input[type='submit']:focus
+ border: 1px solid #80bfff
+ @include vertical-gradient(#f6f6f6, #e3e3e3)
+ @include box-shadow((0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, .8) inset))
+
+ a.button:active, a.button.active, button:active, button.active, input[type='submit']:active, input[type='submit'].active
+ @include vertical-gradient(#e3e3e3, #f6f6f6)
+ @include box-shadow(none)
+
+ a.button.disabled, button:disabled, input[type='submit']:disabled
+ background: #efefef !important
+ border: 1px solid #d1d1d1 !important
+ @include box-shadow(none !important)
+ color: #aaa !important
+ cursor: default
+ text-shadow: 0 1px 1px #fff !important
+ // }}}
+ // Jquery ui Overrides {{{
+ .ui-widget
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif
+ font-size: 13px
+ .ui-menu
+ .ui-menu-item
+ margin: 0 8px 0 0
+ padding: 0 0 0 12px
+ width: auto
+ a.ui-state-active
+ background: #f0f0fa
+ // }}}
+ // Generic classes {{{
+ .oe_i
+ font-family: "mnmliconsRegular" !important
+ font-size: 21px
+ font-weight: 300 !important
+ .oe_e
+ font-family: "entypoRegular" !important
+ font-size: 34px
+ font-weight: 300 !important
+ .oe_left
+ float: left
+ margin-right: 8px
+ .oe_right
+ float: right
+ margin-left: 8px
+ .oe_text_right
+ text-align: right
+ .oe_clear
+ clear: both
+ .oe_wait
+ cursor: wait
+ .oe_fade
+ color: #888
+ .oe_bold
+ font-weight: bold
+ .oe_inline
+ width: auto !important
+ .oe_highlight
+ color: white
+ background: #DC5F59
+ button.oe_highlight
+ @include vertical-gradient(#dc5f59, #b33630)
+ @include box-shadow(none)
+ button.oe_highlight:active
+ @include vertical-gradient(#b33630, #dc5f59)
+ @include box-shadow(none)
+ button.oe_highlight:hover
+ @include vertical-gradient(#DF6B66, #BF3A33)
+ //@include vertical-gradient(lighten(#dc5f59, 3%), lighten(#b33630, 3%))
+ @include box-shadow(0 0 1px rgba(0, 0, 0, 0.2))
+ .oe_title
+ width: 55%
+ .oe_title:after
+ content: "."
+ display: block
+ height: 0
+ clear: both
+ visibility: hidden
+ .oe_button_box
+ width: 200px
+ text-align: center
+ .oe_avatar
+ margin: 0 16px 0 0
+ img
+ height: 50px
+ @include radius(3px)
+ @include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
+ border: none
+ //.oe_edit_onlyÂ
+ // }}}
+ // Tooltips {{{
+ &.oe_tooltip
+ font-size: 12px
+ .oe_tooltip_string
+ color: #FD5
+ font-weight: bold
+ font-size: 13px
+ .oe_tooltip_help
+ white-space: pre-wrap
+ .oe_tooltip_technical
+ padding: 0 0 4px 0
+ margin: 5px 0 0 15px
+ li
+ list-style: circle
+ .oe_tooltip_technical_title
+ font-weight: bold
+ // }}}
+ // Notebook {{{
+ .oe_notebook
+ margin: 8px 0
+ padding: 0 16px
+ list-style: none
+ zoom: 1
+ .oe_notebook:before, .oe_notebook:after
+ display: table
+ content: ""
+ zoom: 1
+ .oe_notebook:after
+ clear: both
+ .oe_notebook > li
+ float: left
+ .oe_notebook > li > a
+ display: block
+ color: #4c4c4c
+ .oe_notebook
+ border-color: #ddd
+ border-style: solid
+ border-width: 0 0 1px
+ .oe_notebook > li
+ position: relative
+ .oe_notebook > li > a
+ padding: 0 12px
+ margin-right: 2px
+ line-height: 30px
+ border: 1px solid transparent
+ @include radius(4px 4px 0 0)
+ .oe_notebook > li > a:hover
+ text-decoration: none
+ background-color: #eee
+ border-color: #eee #eee #ddd
+ .oe_notebook > li.ui-state-active > a, .oe_notebook > li.ui-state-active > a:hover
+ background-color: #ffffff
+ border: 1px solid #ddd
+ border-bottom-color: transparent
+ cursor: default
+ .oe_notebook_page
+ padding: 0
+ div.ui-tabs
+ padding: 3px 0px 3px 0px
+ .ui-tabs-hide
+ display: none
+ // }}}
+ // Dropdown {{{
+ .oe_dropdown, .oe_dropdown_hover, .oe_dropdown_toggle
+ position: relative
+ cursor: pointer
+ .oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened
+ display: block
+ .oe_dropdown_menu
+ display: none
+ position: absolute
+ top: 28px
+ z-index: 1
+ border: 1px solid #afafb6
+ background: white
+ padding: 8px
+ min-width: 120px
+ text-align: left
+ @include radius(3px)
+ @include box-shadow(0 1px 4px rgba(0,0,0,0.3))
+ > li
+ &:hover
+ @include vertical-gradient(#f0f0fa, #eeeef6)
+ @include box-shadow(none)
+ list-style-type: none
+ float: none
+ display: block
+ position: relative
+ > a
+ white-space: nowrap
+ display: block
+ padding: 3px 6px
+ color: #4c4c4c
+ text-decoration: none
+ &:hover
+ text-decoration: none
+ .oe_dropdown_arrow:after
+ width: 0
+ height: 0
+ display: inline-block
+ content: "&darr"
+ text-indent: -99999px
+ vertical-align: top
+ margin-top: 8px
+ margin-left: 4px
+ border-left: 4px solid transparent
+ border-right: 4px solid transparent
+ border-top: 4px solid#404040
+ @include opacity(0.5)
+
+ .oe_sidebar
+ white-space: nowrap
+ .oe_dropdown_menu
+ .oe_sidebar_add_attachment
+ height: 20px
+ cursor: pointer
+ padding-left: 6px
+ margin-top: 6px
+ span
+ font-weight: bold
+ .oe_hidden_input_file
+ width: 200px
+ &:hover
+ @include vertical-gradient(#f0f0fa, #eeeef6)
+ @include box-shadow(none)
+ li
+ .oe_sidebar_delete_item
+ position: absolute
+ top: 4px
+ right: 4px
+ display: none
+ width: 12px
+ height: 12px
+ padding: 1px
+ color: #8786b7
+ line-height: 8px
+ text-align: center
+ font-weight: bold
+ text-shadow: 0 1px 1px white
+ &:hover
+ text-decoration: none
+ color: white
+ background: #8786b7
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
+ @include radius(2px)
+ &:hover
+ .oe_sidebar_delete_item
+ display: inline-block
+ // }}}
+ // Loading {{{
+ .oe_loading
+ display: none
+ z-index: 100
+ position: fixed
+ top: 0
+ right: 50%
+ padding: 4px 12px
+ background: #A61300
+ color: white
+ text-align: center
+ border: 1px solid #900
+ border-top: none
+ -moz-border-radius-bottomright: 8px
+ -moz-border-radius-bottomleft: 8px
+ border-bottom-right-radius: 8px
+ border-bottom-left-radius: 8px
+ // }}}
+ // Notification {{{
+ .oe_notification
+ z-index: 1050
+ // }}}
+ // Login {{{
+ .oe_login
+ background: url("/web/static/src/img/pattern.png") repeat
+ text-align: center
+ font-size: 14px
+ height: 100%
+ li
+ list-style-type: none
+ padding-bottom: 4px
+ button
+ float: right
+ display: inline-block
+ cursor: pointer
+ padding: 6px 16px
+ border: 1px solid #222
+ color: white
+ margin: 0
+ @include vertical-gradient(#b92020, #600606)
+ @include radius(4px)
+ @include box-shadow((0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset))
+ input, select
+ width: 252px
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial
+ border: 1px solid #999999
+ background: whitesmoke
+ @include box-shadow(inset 0 1px 4px rgba(0, 0, 0, 0.3))
+ @include radius(3px)
+ input
+ margin-bottom: 9px
+ padding: 5px 6px
+ select
+ padding: 1px
+ .oe_login_dbpane
+ position: fixed
+ top: 0
+ right: 8px
+ padding: 5px 10px
+ color: #eee
+ border: solid 1px #333
+ background: #1e1e1e
+ background: rgba(30,30,30,0.94)
+ @include radius(0 0 8px 8px)
+ input
+ padding: 2px 4px
+ margin: 4px 0
+ .oe_login_bottom
+ position: absolute
+ top: 50%
+ left: 0
+ right: 0
+ bottom: 0
+ text-shadow: 0 1px 1px #999999
+ @include vertical-gradient(#b41616, #600606)
+ .oe_login_pane
+ position: absolute
+ top: 50%
+ left: 50%
+ margin: -160px -166px
+ border: solid 1px #333333
+ background: #1e1e1e
+ background: rgba(30,30,30,0.94)
+ padding: 22px 32px
+ color: #eee
+ text-align: left
+ @include radius(8px)
+ @include box-shadow(0 0 18px rgba(0, 0, 0, 0.9))
+ h2
+ margin-top: 0
+ font-size: 18px
+ .oe_login_logo
+ position: absolute
+ top: -70px
+ left: 0
+ width: 100%
+ margin: 0 auto
+ text-align: center
+ .oe_login_footer
+ position: absolute
+ bottom: -40px
+ left: 0
+ width: 100%
+ text-align: center
+ a
+ color: #eee
+ margin: 0 8px
+ &:hover
+ text-decoration: underline
+ span
+ font-weight: bold
+ font-size: 16px
+ .oe_login_error_message
+ display: none
+ background-color: #b41616
+ color: #eee
+ padding: 14px 18px
+ margin-top: 15px
+ text-align: center
+ @include radius(4px)
+ @include box-shadow(0 1px 4px rgba(0, 0, 0, 0.8))
+ .oe_login_invalid
+ .oe_login_error_message
+ display: inline-block
+ // }}}
+ // DatabaseManager {{{
+ .oe_database_manager
+ background: #fff
+ color: #000
+ text-align: left
+ .oe_database_manager_menu
+ color: #000
+ // }}}
+ // WebClient {{{
+ .oe_webclient
+ width: 100%
+ height: 100%
+ border-spacing: 0px
+ // }}}
+ // WebClient.fullscreen {{{
+ .oe_content_full_screen
+ .oe_application
+ top: 0
+ left: 0
+ .oe_topbar, .oe_leftbar
+ display: none
+ // }}}
+ // WebClient.topbar {{{
+ .oe_topbar
+ width: 100%
+ height: 31px
+ border-top: solid 1px #d3d3d3
+ @include vertical-gradient(#646060, #262626)
+ .oe_topbar_item
+ display: block
+ padding: 5px 10px 7px
+ line-height: 20px
+ height: 20px
+ color: #eee
+ vertical-align: top
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ &:hover
+ background: #303030
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+ .oe_active
+ background: #303030
+ font-weight: bold
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+
+ .oe_topbar_avatar
+ width: 24px
+ height: 24px
+ margin: -2px 2px 0 0
+ @include radius(3px)
+ .oe_topbar_avatar
+ vertical-align: top
+ .oe_dropdown_arrow:after
+ border-top: 4px solid white
+ .oe_dropdown_menu
+ background: #333
+ background: rgba(37,37,37,0.9)
+ border-color: #999
+ border-color: rgba(0, 0, 0, 0.2)
+ border-style: solid
+ border-width: 0 1px 1px
+ @include radius(0 0 6px 6px)
+ @include background-clip()
+ li
+ float: none
+ a
+ color: #eee
+ &:hover
+ @include vertical-gradient(#292929, #191919)
+ @include box-shadow(none)
+ // }}}
+ // Webclient.leftbar {{{
+ .oe_leftbar
+ display: none
+ width: 220px
+ background: #f0eeee
+ border-right: 1px solid #afafb6
+ text-shadow: 0 1px 1px white
+ padding-bottom: 16px
+ a.oe_logo
+ width: 220px
+ display: block
+ text-align: center
+ height: 70px
+ line-height: 70px
+ img
+ height: 40px
+ width: 157px
+ margin: 14px 0
+ .oe_footer
+ position: fixed
+ bottom: 0
+ padding: 4px 0
+ background: #f0eeee
+ width: 220px
+ text-align: center
+ a
+ font-weight: 800
+ font-family: serif
+ font-size: 16px
+ color: black
+ span
+ color: #c81010
+ font-style: italic
+ // }}}
+ // UserMenu {{{
+ .oe_user_menu
+ float: right
+ padding: 0
+ margin: 0
+ li
+ list-style-type: none
+ float: left
+ .oe_dropdown_menu
+ right: -1px
+ // }}}
+ // Systray {{{
+ .oe_systray > div
+ float: left
+ padding: 0 4px 0 4px
+ .oe_systray
+ float: right
+ // }}}
+ // Menu {{{
+ .oe_menu
+ float: left
+ padding: 0
+ margin: 0
+ li
+ float: left
+ a
+ display: block
+ padding: 5px 10px 7px
+ line-height: 20px
+ height: 20px
+ color: #eee
+ vertical-align: top
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ &:hover
+ background: #303030
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+ .oe_active
+ background: #303030
+ font-weight: bold
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+ .oe_secondary_menu_section
+ font-weight: bold
+ margin-left: 8px
+ color: $colour4
+ .oe_secondary_submenu
+ padding: 2px 0 8px 0
+ margin: 0
+ width: 100%
+ display: inline-block
+ > li
+ position: relative
+ padding: 1px 0 1px 20px
+ a
+ display: block
+ color: #4c4c4c
+ padding: 2px 4px 2px 0
+ .oe_menu_label
+ position: absolute
+ top: 1px
+ right: 1px
+ font-size: 10px
+ background: $colour4
+ color: white
+ padding: 2px 4px
+ margin: 1px 6px 0 0
+ border: 1px solid lightGray
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ @include radius(4px)
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
+ .oe_menu_counter
+ float: right
+ background: #8a89ba
+ color: #eee
+ font-size: 10px
+ border: 1px solid lightgray
+ padding: 2px 4px
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ margin: 0px
+ @include radius(4px)
+ .oe_active
+ background: $colour4
+ border-top: 1px solid lightGray
+ border-bottom: 1px solid lightGray
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
+ a
+ color: white
+ .oe_menu_label
+ background: #eee
+ color: $colour4
+ text-shadow: 0 1px 1px white
+ @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2))
+ .oe_menu_counter
+ background: #eee
+ color: #8a89ba
+ .oe_menu_toggler:before
+ width: 0
+ height: 0
+ display: inline-block
+ content: "&darr"
+ text-indent: -99999px
+ vertical-align: top
+ margin-left: -12px
+ margin-top: 4px
+ margin-right: 4px
+ border-top: 4px solid transparent
+ border-bottom: 4px solid transparent
+ border-left: 4px solid #4c4c4c
+ @include opacity(0.5)
+ .oe_menu_opened:before
+ margin-top: 6px
+ margin-left: -16px
+ margin-right: 4px
+ border-left: 4px solid transparent
+ border-right: 4px solid transparent
+ border-top: 4px solid #4c4c4c
+ // }}}
+ // ActionManager {{{
+ .oe_application
+ width: 100%
+ a
+ color: $colour4
+ &:hover
+ text-decoration: underline
+ > div
+ height: 100%
+ // }}}
+ // ViewManager common {{{
+ .oe_view_manager
+ .oe_view_manager_body
+ height: inherit
+ .oe_view_manager_view_kanban
+ height: inherit
+
+ .oe_view_manager_header
+ width: 100%
+ .oe_header_row
+ //min-height: 26px
+ //line-height: 26px
+ clear: both
+ text-shadow: 0 1px 1px white
+ .oe_header_row:last-child
+ td
+ padding-top: 0
+ .oe_view_manager_sidebar
+ margin: 0px auto
+ width: 400px
+ text-align: center
+ td
+ line-height: 26px
+ h2
+ font-size: 18px
+ margin: 0
+ float: left
+ a
+ color: $colour4
+ .oe_button_group
+ display: inline-block
+ border: 1px solid #ababab
+ @include radius(5px)
+ li
+ float: left
+ border-right: 1px solid #ababab
+ &:last-child
+ border: none
+ a
+ color: #4c4c4c
+ &:hover
+ text-decoration: none
+ .active
+ background: #999
+ @include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset)
+ a
+ color: #fff
+ text-shadow: 0 1px 2px rgba(0,0,0,0.4)
+ .oe_view_manager_buttons
+ white-space: nowrap
+ // }}}
+ // ViewManager.pager {{{
+ .oe_view_manager_pager
+ line-height: 26px
+ .oe_pager_value
+ float: left
+ margin-right: 8px
+ .oe_pager_group
+ float: left
+ height: 24px
+ line-height: 24px
+ display: inline-block
+ border: 1px solid #ababab
+ cursor: pointer
+ @include radius(5px)
+ li
+ height: 24px
+ line-height: 24px
+ padding: 0
+ float: left
+ border-right: 1px solid #ababab
+ &:last-child
+ border: none
+ a
+ color: #4c4c4c
+ padding: 0 8px
+ &:hover
+ text-decoration: none
+ .active
+ background: #999
+ @include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset)
+ a
+ color: #fff
+ text-shadow: 0 1px 2px rgba(0,0,0,0.4)
+ // }}}
+ // ViewManager.switches {{{
+ .oe_view_manager_switch
+ li
+ text-align: center
+ width: 24px
+ height: 24px
+ line-height: 16px
+ a
+ position: relative
+ .oe_vm_switch_list:after, .oe_vm_switch_tree:after
+ padding: 2px
+ content: "i"
+ .oe_vm_switch_form:after
+ content: "m"
+ .oe_vm_switch_graph:after
+ font-family: "mnmliconsRegular" !important
+ font-size: 21px
+ font-weight: 300 !important
+ content: "}"
+ top: -2px
+ position: relative
+ .oe_vm_switch_gantt:after
+ font-family: "mnmliconsRegular" !important
+ font-size: 21px
+ font-weight: 300 !important
+ content: "y"
+ top: -2px
+ position: relative
+ .oe_vm_switch_calendar:after
+ content: "P"
+ .oe_vm_switch_kanban:after
+ content: "k"
+ .oe_vm_switch_diagram:after
+ content: "f"
+ // }}}
+ // ViewManager application {{{
+ .oe_view_manager_global
+ height: 100%
+ > .oe_view_manager_header
+ border-top: 1px solid #cacaca
+ border-bottom: 1px solid #cacaca
+ @include vertical-gradient(#fcfcfc, #dedede)
+ @include box-shadow((0 1px 0 rgba(255,255,255,0.4), 0 0 9px rgba(0,0,0,0.1)))
+ .oe_header_row
+ td
+ padding: 8px
+ .oe_header_row:first-child
+ td
+ padding-top: 8px
+ // }}}
+ // Viewmanager popup {{{
+ .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager
+ display: none !important
+ // }}}
+ // SearchView {{{
+ .oe_searchview
+ cursor: text
+ position: relative
+ float: right
+ padding: 1px 0
+ line-height: 18px
+ width: 480px
+ border: 1px solid #ababab
+ background: white
+ @include radius(13px)
+ @include box-shadow(0 1px 2px rgba(0,0,0,0.2) inset)
+ input, textarea
+ padding: 3px
+ height: 14px
+ font-size: 11px
+ line-height: 18px
+ &.oe_focused
+ border-color: $facets-border-selected
+ @include box-shadow(0 1px 2px $facets-border-selected inset)
+ .oe_searchview_clear
+ cursor: pointer
+ position: absolute
+ top: 0
+ right: 18px
+ width: 15px
+ height: 100%
+ background: url(../img/search_reset.gif) center center no-repeat
+ .oe_searchview_unfold_drawer
+ position: absolute
+ top: 0
+ right: 0
+ height: 100%
+ padding: 0 7px 0 4px
+ color: #ccc
+ cursor: pointer
+ &:hover
+ color: #999
+ &:before
+ position: absolute
+ top: 10px
+ right: 7px
+ width: 0
+ height: 0
+ display: inline-block
+ content: ""
+ vertical-align: top
+ border-top: 5px solid #4C4C4C
+ border-left: 5px solid transparent
+ border-right: 5px solid transparent
+ @include opacity()
+
+ .oe_searchview_facets
+ min-height: 22px
+ &:before
+ color: #ccc
+ font-family: "mnmliconsRegular"
+ content: "r"
+ font-size: 130%
+ display: inline
+ position: relative
+ left: 6px
+ top: 2px
+ color: #a3a3a3
+ padding-right: 4px
+ *
+ vertical-align: top
+ display: inline-block
+ line-height: 17px
+ .oe_searchview_input, .oe_searchview_facet
+ height: 18px
+ margin: 1px 0
+ font-size: 11px
+ &:focus
+ outline: none
+ .oe_searchview_input
+ padding: 0 3px
+ .oe_searchview_facet
+ position: relative
+ cursor: pointer
+ border: 1px solid $facets-border
+ @include radius(3px)
+ background: #8786b7
+ -webkit-font-smoothing: auto
+ // spacing for opera, FF
+ &:focus
+ border-color: $facets-border-selected
+ @include box-shadow(0 0 3px 1px $facets-border-selected)
+ .oe_facet_values
+ background: #f0f0fa
+ @include radius(0 3px 3px 0)
+ .oe_facet_category, .oe_facet_value
+ height: 18px
+ padding: 0 4px
+ .oe_facet_category
+ color: white
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
+ .oe_facet_category.oe_i
+ font-size: 16px
+ .oe_facet_value
+ border-left: 1px solid $facets-border
+ text-shadow: 0 1px 1px white
+ &:last-child
+ padding-right: 16px
+ .oe_facet_remove
+ position: absolute
+ top: 3px
+ right: 3px
+ color: #8786b7
+ line-height: 8px
+ width: 12px
+ height: 12px
+ text-align: center
+ font-weight: bold
+ cursor: pointer
+ text-shadow: 0 1px 1px white
+ &:hover
+ color: white
+ background: #8786b7
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
+ @include radius(2px)
+ &.oe_searchview_open_drawer
+ .oe_searchview_drawer
+ display: block
+
+ .oe_searchview_drawer
+ position: absolute
+ z-index: 100
+ // detach drawer from field slightly
+ margin-top: 4px
+ top: 100%
+ right: -1px
+ background-color: white
+ min-width: 100%
+ display: none
+ border: 1px solid #afafb6
+ text-align: left
+ @include radius(4px)
+ @include box-shadow(0 1px 4px rgba(0,0,0,0.3))
+ > div
+ border-top: 1px solid #ccc
+ margin: 0
+ padding: 8px
+ > div:first-child
+ border-top: none
+ margin: 0
+ h3
+ margin: 8px 4px 4px 12px
+ color: $section-title-color
+ font-size: 13px
+ h4, h4 *
+ margin: 0
+ cursor: pointer
+ font-weight: normal
+ display: inline-block
+ &:hover
+ background-color: $hover-background
+ h4:before
+ content: "â–¸ "
+ color: #a3a3a3
+ button
+ margin: 4px 0
+ .button
+ border: none
+ background: transparent
+ padding: 0 2px
+ @include box-shadow(none)
+ @include radius(0)
+ .oe_searchview_section
+ display: table
+ width: 100%
+ > div
+ @include box-sizing(border)
+ display: table-cell
+ width: 50%
+ ul
+ margin: 0 8px 8px
+ padding: 0
+ list-style: none
+ li
+ list-style: none
+ padding: 2px 4px 2px 20px
+ line-height: 14px
+ color: inherit
+ cursor: pointer
+ position: relative
+ &.oe_selected:before
+ content: "W"
+ font-family: "entypoRegular" !important
+ font-size: 24px
+ font-weight: 300 !important
+ color: #a3a3a3
+ position: absolute
+ left: 4px
+ top: -2px
+ // after oe_selected so background color is not overridden
+ &:hover
+ background-color: $hover-background
+ form
+ margin-left: 12px
+ p
+ margin: 4px 0
+ line-height: 18px
+ button
+ margin: 0 0 8px 0
+ .oe_searchview_custom
+ padding: 0 8px 8px 8px
+ form
+ display: none
+ li
+ cursor: pointer
+ position: relative
+ line-height: 14px
+ padding: 2px 4px 2px 20px
+ &:hover
+ background-color: $hover-background
+ button
+ position: absolute
+ top: 0
+ right: 5px
+ .oe_searchview_advanced
+ form
+ display: none
+ margin-top: 8px
+ button.oe_add_condition:before
+ content: "Z"
+ font-family: "entypoRegular" !important
+ font-size: 24px
+ font-weight: 300 !important
+ margin-right: 4px
+ ul
+ list-style: none
+ padding: 0
+ li
+ position: relative
+ list-style: none
+ margin: 0
+ white-space: nowrap
+ .oe_opened
+ h4:before
+ content: "â–¾ "
+ position: relative
+ top: -1px
+ form
+ display: block
+
+ // delete buttons
+ .oe_searchview_custom_delete, .searchview_extended_delete_prop
+ display: inline-block
+ width: 12px
+ height: 12px
+ line-height: 12px
+ padding: 1px
+ color: #8786b7
+ line-height: 8px
+ text-align: center
+ font-weight: bold
+ text-shadow: 0 1px 1px white
+ &:hover
+ text-decoration: none
+ color: white
+ background: #8786b7
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
+ @include radius(2px)
+ .oe_searchview_custom_delete
+ display: none
+ position: absolute
+ bottom: 1px
+ right: 4px
+ .oe_searchview_custom_private, .oe_searchview_custom_public
+ &:hover
+ .oe_searchview_custom_delete
+ display: inline-block
+ .oe_searchview_custom_public:after
+ content: ","
+ font-family: "entypoRegular" !important
+ font-size: 22px
+ font-weight: 300 !important
+ margin: 0 0 0 4px
+ padding: 0
+
+
+ // }}}
+ // Views Common {{{
+ .oe_view_nocontent
+ > img
+ float: left
+ margin: 1.5em
+ > div
+ // don't encroach on my arrow
+ overflow: hidden
+ padding: 35px 0px 0px 0px
+ max-width: 700px
+ font-size: 125%
+ // }}}
+ // FormView.base and dynamic tags {{{
+ .oe_formview
+ background: white
+ .oe_form_dropdown_section
+ position: relative
+ display: inline-block
+ .oe_form_invalid
+ input, select, textarea
+ background-color: #F66 !important
+ border: 1px solid #D00 !important
+ .oe_form_button_save_dirty
+ color: white
+ background: #dc5f59
+ @include vertical-gradient(#dc5f59, #b33630)
+ @include box-shadow(none)
+ font-weight: bold
+ &:hover
+ background: #ED6F6A
+ .oe_form_editable
+ .oe_highlight
+ color: #404040
+ background: none
+ button.oe_highlight
+ @include vertical-gradient(#efefef, #d8d8d8)
+ @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))
+ button.oe_highlight:active
+ @include vertical-gradient(#e3e3e3, #f6f6f6)
+ @include box-shadow(none)
+ button.oe_highlight:hover
+ @include vertical-gradient(#f6f6f6, #e3e3e3)
+ @include box-shadow((0 1px 2px rgba(0, 0, 0, .1), 0 1px 1px rgba(255, 255, 255, .8) inset))
+ .oe_form_invisible
+ display: none !important
+ .oe_form_readonly
+ .oe_edit_only, .oe_form_field:empty
+ display: none !important
+ .oe_form_nosheet > *:not(header)
+ margin-left: 10px !important
+ margin-right: 10px !important
+ // }}}
+ // FormView.custom tags and classes {{{
+ .oe_form
+ header
+ position: relative
+ border-bottom: 1px solid #cacaca
+ @include vertical-gradient(#fcfcfc, #dedede)
+ padding: 0 8px
+ line-height: 30px
+ ul
+ display: inline-block
+ float: right
+ footer
+ min-width: 650px
+ max-width: 960px
+ margin: 0 auto
+ ul.oe_form_steps
+ height: 30px
+ padding: 0
+ margin: 0
+ text-shadow: 0 1px 1px white
+ img
+ vertical-align: top
+ margin-left: 8px
+ li
+ border-right: none
+ padding: 0
+ margin: 0
+ float: left
+ vertical-align: top
+ height: 30px
+ padding: 0 0 0 12px
+ &:first-child
+ border-left: 1px solid #cacaca
+ &:last-child
+ margin-right: 12px
+ padding-right: 12px
+ border-right: 1px solid #cacaca
+ a
+ color: #4c4c4c
+ &:hover
+ color: black
+ .oe_form_steps_active
+ font-weight: bold
+ color: #b33630
+ .oe_form .oe_subtotal_footer
+ width: 1% !important
+ td.oe_form_group_cell
+ text-align: right
+ padding: 0 !important
+ td.oe_form_group_cell_label
+ border-right: none
+ .oe_form_field
+ width: auto !important
+ .oe_subtotal_footer_separator
+ border-top: 1px solid #cacaca
+ font-sie: 120%
+ font-weight: bold
+ label.oe_subtotal_footer_separator
+ font-weight: bold !important
+ padding: 2px 8px 2px 0px !important
+ // no sheet in popups
+ .oe_application
+ .oe_form_sheetbg
+ background: url(/web/static/src/img/form_sheetbg.png)
+ padding: 8px 0
+ border-bottom: 1px solid #ddd
+ .oe_form_sheet_width
+ min-width: 650px
+ max-width: 960px
+ margin: 0 auto
+ .oe_form_sheet
+ background: white
+ min-height: 330px
+ padding: 16px
+ border: 1px solid #afafb6
+ @include box-shadow(0 0 10px rgba(0,0,0,0.3))
+ .ui-tabs
+ margin: 0 -16px
+ .oe_notebook_page
+ padding: 0 16px
+ // }}}
+ // FormView.group {{{
+ .oe_form
+ td.oe_form_group_cell_label
+ border-right: 1px solid #ddd
+ padding: 2px 0px 2px 0px
+ label
+ line-height: 18px
+ display: block
+ min-width: 120px
+ td.oe_form_group_cell + .oe_form_group_cell
+ padding-left: 8px
+ .oe_form_group
+ width: 100%
+ margin: 4px 0 4px 0
+ // }}}
+ // FormView.label {{{
+ .oe_form
+ .oe_form_label_help[for], .oe_form_label[for]
+ font-weight: bold
+ white-space: nowrap
+ padding-right: 8px
+ span
+ font-size: 80%
+ color: darkGreen
+ vertical-align: top
+ position: relative
+ top: -4px
+ padding: 0 2px
+ // }}}
+ // FormView.separator {{{
+ .oe_horizontal_border
+ border-bottom: 1px solid black
+ .oe_horizontal_separator
+ font-weight: bold
+ font-size: 20px
+ margin: 8px 0px 8px 0px
+ color: #aab
+ .oe_horizontal_separator:empty
+ height: 5px
+ .oe_vertical_separator
+ border-left: 1px solid #666
+ padding: 0 4px 0 4px
+ // }}}
+ // FormView.progressbar {{{
+ .oe_form_field_progressbar
+ display: inline-block
+ min-width: 70px
+ .oe_form_field_progressbar.ui-progressbar
+ height: 22px
+ font-size: 10px
+ @include box-sizing(border)
+ border: 1px solid #999
+ @include radius(3px)
+ background: white
+ min-width: 50px
+ span
+ position: absolute
+ margin-left: 10px
+ font-weight: bold
+ .ui-widget-header
+ background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x
+ // }}}
+ // FormView.fields {{{
+ .oe_form
+ .oe_form_field_text
+ width: 100%
+ .oe_form_field_char input,
+ .oe_form_field_url input,
+ .oe_form_field_text textarea,
+ .oe_form_field_selection select
+ width: inherit
+ .oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea
+ width: 500px
+ .oe_form_field_float input
+ width: 100px
+ h1 .oe_form_field_float input
+ width: 140px
+ h2 .oe_form_field_float input
+ width: 120px
+ h1, h2, h3, h4, h5, h6
+ margin: 0 0 4px 0
+ input
+ height: inherit !important
+ font-size: inherit
+ .oe_form_field
+ width: 100%
+ display: inline-block
+ padding: 2px 2px 2px 0px
+ line-height: 18px
+ input
+ margin: 0px
+ .oe_form_field_integer
+ width: 180px
+ .oe_form_field_float
+ width: 180px
+ .oe_form_field_date
+ width: 7em
+ .oe_form_field_datetime
+ width: 11em
+ input[type="text"], input[type="password"], input[type="file"], select
+ height: 22px
+ padding-top: 2px
+ input[type="text"], input[type="password"], input[type="file"], select, textarea
+ @include box-sizing(border)
+ background: white
+ min-width: 70px
+ color: #1f1f1f
+ input[readonly], select[readonly], textarea[readonly], input[disabled], select[disabled]
+ background: #E5E5E5 !important
+ color: #666
+ textarea[disabled]
+ border: none
+ border-left: 8px solid #eee
+ padding-left: 8px
+ @include box-shadow(none)
+ @include radius(0px)
+ .oe_form_field_many2one input, .oe_form_field_binary input, .oe_form_field_binary input, .oe_form_field_url 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_form_field_url button img
+ vertical-align: top
+ .oe_form_field_date,
+ .oe_form_field_datetime
+ white-space: nowrap
+ .oe_form_field_boolean
+ padding-top: 4px
+ width: auto
+ .oe_form_field_many2manytags
+ .text-wrap
+ width: 100% !important
+ textarea
+ width: 100% !important
+ .oe_form_field_many2manytags_box
+ border-radius: 2px
+ @include box-sizing(border)
+ position: relative
+ float: left
+ border: 1px solid #9DACCC
+ background: #E2E6F0
+ color: black
+ padding: 0px 3px 0px 3px
+ margin: 0 2px 2px 0
+ height: 16px
+ font: 11px "lucida grande", tahoma, verdana, arial, sans-serif
+ .text-core .text-wrap .text-dropdown .text-list .text-suggestion em
+ font-style: italic
+ text-decoration: none
+ .oe_datepicker_container
+ display: none
+ .oe_datepicker_root
+ display: inline-block
+ .oe_form_required
+ input, select, textarea
+ background-color: #D2D2FF !important
+ .oe_form_invalid
+ input, select, textarea
+ background-color: #F66 !important
+ border: 1px solid #D00 !important
+ .oe_input_icon
+ cursor: pointer
+ margin: 3px 0 0 -21px
+ vertical-align: top
+ .oe_input_icon_disabled
+ position: absolute
+ cursor: default
+ opacity: 0.5
+ filter: alpha(opacity=50)
+ right: 5px
+ top: 3px
+ .oe_form_field_with_button
+ input
+ width: 100%
+ > .oe_button
+ float: right
+ @include radius(0)
+ border-bottom-left-radius: 0px
+ height: 22px
+ > div
+ position: relative
+ overflow: hidden
+ // }}}
+ // FormView.fields_binary {{{
+ /* http://www.quirksmode.org/dom/inputfile.html
+ * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
+ */
+ .oe_hidden_input_file
+ overflow: hidden
+ position: relative
+ display: inline-block
+ width: 45px
+ height: 30px
+ input.oe-binary-file
+ z-index: 0
+ line-height: 0
+ font-size: 12px
+ position: absolute
+ // Should be adjusted for all browsers
+ top: 1px
+ right: 10px
+ opacity: 0
+ filter: alpha(opacity = 0)
+ -ms-filter: "alpha(opacity=0)"
+ margin: 0
+ padding: 0
+ .oe_form
+ .oe_form_field_image
+ padding: 0
+ position: relative
+ display: inline-block
+ width: auto
+ vertical-align: top
+ .oe_form_field_image_controls
+ position: absolute
+ top: 1px
+ padding: 3px 0 0 0
+ margin: 0 1px
+ display: none
+ width: 99%
+ text-align: center
+ background: url(/web/static/src/img/form_sheetbg.png)
+ border-bottom: 1px dotted black
+ @include box-sizing(border)
+ &:hover .oe_form_field_image_controls
+ display: block
+ // }}}
+ // FormView.many2one {{{
+ .oe_form_field_many2one
+ td:first-child
+ position: relative
+ span.oe-m2o-drop-down-button
+ position: absolute
+ top: 3px
+ right: 2px
+ // }}}
+ // FormView.one2many {{{
+ .oe_form .oe_form_field_one2many > .oe_view_manager
+ .oe_list_pager_single_page
+ display: none
- .oe_form_field_one2many > .oe_view_manager
- .oe_header_row_top
- display: none
- .oe_view_manager_header2
- td
- padding: 0px 8px
- line-height: 16px
- .oe_i
- font-size: 13px
- .oe_pager_group
- height: auto
++ .oe_form_field_one2many
++ // TODO: oe_form_field_one2many_list?
++ .oe-listview .oe-edit-row-save
++ background-image: url(/web/static/src/img/iconset-b-remove.png)
++
++ &> .oe_view_manager
++ .oe_header_row_top
++ display: none
++ .oe_view_manager_header2
++ td
++ padding: 0px 8px
+ line-height: 16px
- li
++ .oe_i
++ font-size: 13px
++ .oe_pager_group
+ height: auto
+ line-height: 16px
++ li
++ height: auto
++ line-height: 16px
+ // }}}
+ // FormView.many2many {{{
+ .oe_form .oe_form_field_many2many > .oe-listview
+ .oe_list_pager_single_page
+ display: none
+ // }}}
+ // ListView {{{
+ .oe-listview-content
+ width: 100%
+ td:first-child, th:first-child
+ &:after
+ border-width: 0
+ > thead
+ border-bottom: 2px solid #cacaca
+ background: #eee
+ vertical-align: top
+ th
+ position: relative
+ td, th
+ padding: 3px 6px
+ line-height: 18px
+ th:after
+ position: absolute
+ right: 6px
+ content: ""
+ margin-top: 7px
+ border-width: 0 4px 4px
+ border-style: solid
+ border-color: #000 transparent
+ visibility: hidden
+ th.sortup:after
+ visibility: visible
+ @include opacity(0.6)
+ th.sortdown:after
+ border-bottom: none
+ border-left: 4px solid transparent
+ border-right: 4px solid transparent
+ border-top: 4px solid #000
+ visibility: visible
+ @include box-shadow(none)
+ @include opacity(0.6)
+ > tbody
+ cursor: pointer
+ background: white
+ > tr
+ border-top: 1px solid #ddd
+ > td.oe-field-cell
+ padding: 3px 6px
+ > td, > th
+ line-height: 18px
+ > button
+ border: none
+ background: transparent
+ padding: 0
+ @include box-shadow(none)
+ > td.oe_list_checkbox:first-child, th.oe_list_checkbox:first-child
+ width: 17px
+ &:after
+ border-width: 0
+ > td.oe_number
+ text-align: right !important
+ > tr:nth-child(odd)
+ background-color: #f0f0fa
+ @include vertical-gradient(#f0f0fa, #eeeef6)
+ > tfoot
+ border-top: 2px solid #cacaca
+ border-bottom: 1px solid #cacaca
+ background: #eee
+ font-weight: bold
+
+ > tbody tr:hover td, tbody tr:hover th
+ @include vertical-gradient(#eee, #dedede)
+
+ .numeric
+ text-align: right
+ width: 82px
+ input
+ text-align: right
+ // }}}
+ // Translation {{{
+ .oe_trad_field.touched
+ border: 1px solid green !important
+ // }}}
+ // View Editor {{{
+ .oe_view_editor
+ width: 100%
+ border-collapse: collapse
+ margin-left: -12px
+ width: 100%
+ background-color: white
+ border-spacing: 0
+ td
+ text-align: center
+ white-space: nowrap
+ border: 1px solid #D8D8D8
+ cursor: pointer
+ font-size: 90%
+ .oe_view_editor_field td
+ border: 0px !important
+ .oe_view_editor tr:hover
+ background-color: #ecebf2
+ // }}}
+ // Debugging stuff {{{
+ .oe_layout_debugging
+ .oe_form_group
+ outline: 2px dashed green
+ .oe_form_group_cell
+ outline: 1px solid blue
+ .oe_form_group:hover, .oe_form_group_cell:hover
+ outline-color: red
+ .oe_form_group_row_incomplete > td:last-child:after
+ content: "[Incomplete Row]"
+ background: red
+ padding: 2px
+ font-weight: bold
+ color: white
+ float: right
+ .oe_form_group_row_incomplete.oe_form_group_row_newline > td:last-child:after
+ content: "[newline]"
+ .oe_debug_view
+ float: left
+ .oe_debug_view_log
+ font-size: 95%
+ .oe_debug_view_log label
+ display: block
+ width: 49%
+ text-align: right
+ float: left
+ font-weight: bold
+ color: #009
+ .oe_debug_view_log span
+ display: block
+ width: 49%
+ float: right
+ color: #333
+ // }}}
+// Kitten Mode {{{
+.kitten-mode-activated
+ background-image: url(http://placekitten.com/g/1365/769)
+ background-size: cover
+ background-attachment: fixed
+ >*
+ opacity: 0.70
+// }}}
+
+// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
+// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:
--- /dev/null
+.openerp {
+ padding: 0;
+ margin: 0;
+ font-size: 80%;
+ font-family: Ubuntu, Helvetica, sans-serif;
+}
+
+.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option,
+.openerp button, .openerp .ui-widget {
+ font-family: Ubuntu, Helvetica, sans-serif;
+ font-size:85%;
+}
+
+.openerp .view-manager-main-content {
+ width: 100%;
+}
+
+.openerp .oe_form_group_cell .view-manager-main-content {
+ padding: 0;
+}
+
+.oe_box {
+ border: 1px solid #aaf;
+ padding: 2px;
+ margin: 2px;
+}
+
+
+#oe_errors pre {
+ margin: 0;
+}
+
+.openerp .oe-listview .oe-number {
+ text-align: right !important;
+}
+.oe-listview-header-columns {
+ background: #d1d1d1; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* W3C */
+}
+
+.openerp .oe_hide {
+ display: none !important;
+}
+
+/* STATES */
+.openerp .on_logged,
+.openerp .db_options_row {
+ display: none;
+}
+
+
+
+/* Database */
+.login .oe-database-manager {
+ display: none;
+ height: 100%;
+ width: 100%;
+ background-color: white;
+}
+.login.database_block .bottom,
+.login.database_block .login_error_message,
+.login.database_block .pane {
+ display: none;
+}
+.login.database_block .oe-database-manager {
+ display: block;
+}
+
+.login .database {
+ float: left;
+ width: 202px;
+ height: 100%;
+ background: #666666;
+}
+.login .oe_db_options {
+ margin-left: 202px;
+ color: black;
+ padding-top: 20px;
+}
+
+.login .database ul {
+ margin-top: 65px;
+}
+
+ul.db_options li {
+ padding: 5px 0 10px 5px;
+ background: #949292; /* Old browsers */
+ background: -moz-linear-gradient(top, #949292 30%, #6d6b6b 95%, #282828 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#949292), color-stop(95%,#6d6b6b), color-stop(100%,#282828)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* W3C */
+ /* for ie9 */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */
+ border: none;
+ /* overriding jquery ui */
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
+ display: block;
+ font-weight: bold;
+ text-transform: uppercase;
+ margin: 1px;
+ color: #EEEEEE;
+ cursor: pointer;
+ width: 195px;
+ font-size: 12px;
+}
+
+.db_option_table {
+ border: 1px solid #5A5858;
+ padding: 5px;
+ -moz-border-radius: 10px;
+}
+
+table.db_option_table input.required {
+ background-color: #D2D2FF !important;
+}
+
+.db_option_table label {
+ display: block;
+ text-align: right;
+}
+
+.db_option_table input[type="text"],
+.db_option_table input[type="password"],
+.db_option_table input[type="file"],
+.db_option_table select {
+ width: 300px;
+}
+
+.option_string {
+ font-weight: bold;
+ color: #555;
+ width: 100%;
+ text-align: center;
+ padding: 10px 0;
+ font-size: large;
+}
+
+label.error {
+ float: none;
+ color: red;
+ padding-left: .5em;
+ vertical-align: top;
+}
+
+/* Main*/
+.openerp .main_table {
+ width: 100%;
+ height: 100%;
+ background: #f0eeee;
+}
+.openerp .oe-application {
+ height: 100%;
+}
+.openerp .oe-application-container {
+ width: 100%;
+ height: 100%;
+}
+
+/* IE Hack - for IE < 9
+ * Avoids footer to be placed statically at 100% cutting the middle of the views
+ * */
+.openerp .oe-application-container {
+ height: auto\9;
+ min-height: 100%\9;
+}
+
+
+/* Main Application */
+.openerp .oe-main-content {
+ padding: 0;
+ height: 100%;
+}
+
+.openerp h2.oe_view_title {
+ font-size: 110%;
+ font-weight: normal;
+ margin: 2px 0;
+ color: #252424;
+ text-shadow: white 0 1px 0;
+}
+.openerp div[id^="notebook"] .oe_view_title {
+ font-size:85%;
+ padding-bottom:4px;
+}
+
+/* List */
+.openerp table.oe-listview-content {
+ clear: right;
+ width: 100%;
+ border-spacing: 0;
+ border: 1px solid silver;
+}
+
+.openerp .oe-listview thead table {
+ width: 100%;
+ border: none;
+}
+.openerp .oe-listview tr.odd {
+ background-color: #f3f3f3;
+}
+.openerp .oe-listview tbody tr:hover {
+ background-color: #ecebf2;
+}
+.openerp .oe-listview tbody tr:hover {
+ background-color: #eae9f0;
+}
+.openerp .oe-listview thead table tr,
+.openerp .oe-listview thead table tr:hover {
+ background: none;
+}
+
+.openerp .oe-listview > table > tbody > tr > td,
+.openerp .oe-listview th {
+ vertical-align: middle;
+ text-align: left;
+ padding: 1px 2px;
+}
+
+.openerp .oe-record-delete button,
+.openerp button.oe-edit-row-save {
+ border: none;
+ height: 12px;
+ width: 12px;
+ background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent;
+ cursor: pointer;
+}
+.openerp button.oe-edit-row-save {
+ background-image: url('/web/static/src/img/icons/save-document.png');
+}
+
+/* Could use :not selectors if they were supported by MSIE8... */
+.openerp .oe-listview > table > tbody > tr > td {
+ border-left: 1px solid #dadada; /*currently commenting to test with no vertical lines in list view*/
+}
+.openerp .oe-listview tbody td:first-child,
+.openerp .oe-listview tbody td.oe-button,
+.openerp .oe-listview tbody td.oe-button,
+.openerp .oe-listview tbody th.oe-record-selector,
+.openerp .oe-listview tbody td.oe-record-delete {
+ border-left: none;
+}
+
+.openerp .oe-listview td.oe-record-delete {
+ text-align: right;
+}
+.openerp .oe-listview th.oe-sortable {
+ cursor: pointer;
+ font-size: 75%;
+ text-transform: uppercase;
+ padding: 0;
+ margin: 0;
+ padding-left: 3px;
+ color: #333;
+}
+.openerp .oe-listview th.oe-sortable .ui-icon {
+ height: 60%;
+ margin: -6px 0 0;
+ display: inline;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.openerp .oe-listview > table > tbody > tr > td {
+ border-bottom: 1px solid #E3E3E3;
+}
+
+
+.openerp .oe-listview td.oe-actions {
+ border-bottom:none;
+}
+
+.openerp .oe-listview .oe-record-selector, .openerp .oe-listview .oe-record-edit-link {
+ border-bottom: 1px solid #E3E3E3;
+}
+.openerp .oe-listview .oe-record-edit-link {
+ cursor: pointer;
+}
+
+.openerp .oe-listview .oe-field-cell {
+ cursor: pointer;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 3px;
+ padding-bottom: 3px;
+ font-size: 80%;
+}
+.openerp .oe-listview .oe-field-cell progress {
+ width: 100%;
+}
+.openerp .oe-listview .oe-field-cell.oe-button button,
+.openerp .oe-listview .oe_form_button button {
+ margin: 0;
+ padding: 0;
+ border: none;
+ background: none;
+ width: 16px;
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+}
+.openerp .oe-listview .oe-field-cell button:active {
+ opacity: 0.5;
+}
+.openerp .oe-listview .oe-field-cell button img {
+ cursor: pointer;
+}
+.openerp .oe-listview .oe-field-cell button img:hover {
+ opacity: 0.75;
+}
+
+.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img {
+ opacity: 0.5;
+}
+
+.openerp .oe-listview th.oe-actions {
+ text-align: left;
+ white-space: nowrap;
+}
+.openerp .oe-listview th.oe-list-pager {
+ text-align: right;
+ white-space: nowrap;
+}
+.openerp .oe-list-pager .oe-pager-state {
+ cursor: pointer;
+ font-size: 90%;
+ color: #555;
+}
+
+.openerp .oe_button.oe_button_pager,
+.openerp .oe-list-pager > span,
+.openerp .oe_form_pager > span {
+ line-height: 17px;
+ height: 17px;
+ cursor: pointer;
+ color: gray;
+ font-weight: bold;
+ vertical-align: middle;
+}
+.openerp .oe_button.oe_button_pager,
+.openerp .oe_button.oe_button_pager:disabled {
+ padding: 0 3px 0 3px;
+ margin: 0;
+ height: 17px;
+}
+.openerp .oe-listview .oe-group-name {
+ padding-right: 1em;
+}
+.openerp .oe-listview .oe-group-name,
+.openerp .oe-listview .oe-group-pagination {
+ white-space: nowrap;
+}
+
+.openerp .oe-listview tfoot td {
+ padding: 3px 3px 0;
+}
+.openerp .oe-listview .oe-list-footer {
+ text-align: center;
+ white-space: nowrap;
+ color: #444;
+ font-size: 85%;
+}
+.openerp .oe-listview .oe-list-footer span {
+ margin: 0 1em;
+}
+.openerp .oe-listview .oe-list-footer progress {
+ vertical-align:-10% !important;
+ width: 100%;
+}
+
+/** list rounded corners
+
+ rounded corners are a pain on tables: need to round not only table, but
+ also on the first and last children of the first and last row
+ */
+.openerp .oe-listview table.oe-listview-content {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content thead tr:first-child th:first-child {
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ border-top-left-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content thead tr:first-child th:last-child {
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-right-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:first-child,
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:first-child,
+.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child th:first-child {
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ border-bottom-left-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:last-child,
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:last-child,
+.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child td:last-child {
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ border-bottom-right-radius: 4px;
+}
+
+/* Form */
+.openerp .oe_form_group_cell input[type="checkbox"] {
+ margin-top: 3px;
+ vertical-align: middle;
+}
+.openerp .oe_form_group_cell .input[type="text"] {
+ padding-bottom: 1px;
+}
+
+.openerp table.oe_form_group td {
+ color: #4c4c4c;
+}
+.openerp table.oe_form_group {
+ color: #4c4c4c;
+}
+.openerp fieldset.oe_group_box {
+ border: 1px solid #AAAAAA;
+ moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ background: #F9F9F9;
+ padding: 4px;
+}
+.openerp fieldset.oe_group_box legend {
+ font-weight: bold;
+}
+.openerp .required.error {
+ border: 1px solid #900;
+}
+.openerp .oe_form_buttons, .openerp .oe_list_buttons {
+ float: left;
+}
+.openerp .oe_form_pager, .openerp .oe_list_pager {
+ float: right;
+ font-size: 80%;
+ color: gray;
+ font-weight: bold;
+}
+
+.openerp .oe_form_pager {
+ margin-right: 3px;
+}
+
+.openerp .oe_align_left {
+ text-align: left;
+}
+.openerp .oe_align_right {
+ text-align: right;
+}
+.openerp .oe_align_center {
+ text-align: center;
+}
+.openerp .oe_form .oe_form_paragraph {
+ margin: 3px 0 0 0;
+ white-space: normal;
+}
+
+.openerp .oe_form .oe_form_paragraph.oe_multilines {
+ white-space: pre;
+}
+
+.openerp .oe_form_field_one2many .oe-actions h3.oe_view_title,
+.openerp .oe_form_field_one2many_list .oe-actions h3.oe_view_title{
+ display: inline;
+ margin: 0 0.5em 0 0;
+}
++.openerp .oe_form_field_one2many .oe-listview .oe-edit-row-save,
++.openerp .oe_form_field_one2many_list .oe-listview .oe-edit-row-save {
++ background-image: url("/web/static/src/img/iconset-b-remove.png");
++}
+
+.openerp .oe_form .oe-listview th.oe-sortable .ui-icon,
+.openerp .oe_form .oe-listview th.oe-sortable .ui-icon {
+ height: 100%;
+ margin-top: -9px;
+}
+
+.openerp table.oe_form_group .oe-listview-content td {
+ color: inherit;
+}
+
+/* Uneditable Form View */
+.openerp .oe_form_readonly {
+
+}
+.openerp .oe_form_readonly .oe_form_group_cell .field_text,
+.openerp .oe_form_readonly .field_char,
+.openerp .oe_form_readonly .field_int,
+.openerp .oe_form_readonly .field_float,
+.openerp .oe_form_readonly .field_email,
+.openerp .oe_form_readonly .field_date,
+.openerp .oe_form_readonly .field_selection,
+.openerp .oe_form_readonly .oe_form_field_many2one {
+ padding: 3px 2px 2px 2px;
+ background-color: white;
- height: 17px;
++ min-height: 17px;
+}
+.openerp .oe_form_readonly .oe_form_group_cell .field_text {
+ height: auto;
+}
+.openerp .oe_form_readonly .field_datetime {
+ padding: 1px 2px 2px 2px;
+ background-color: white;
+ height:19px;
+}
+.openerp .oe_form_readonly .oe_form_field_many2one div {
+ background-color:white;
+ height:18px;
+ margin-bottom:1px;
+ padding: 0px 2px 5px 2px;
+}
+
+.openerp .oe_form_readonly .oe_form_field_email div {
+ background-color: white;
+ padding: 1px 2px 3px 2px;
+}
+
+
+.openerp .oe_form_readonly .oe_form_field_text div.field_text,
+.openerp .oe_form_readonly .oe_form_field_text_html div.field_text_html {
+ white-space: pre-wrap;
+}
+.openerp .oe_form_readonly .oe_form_group_cell .field_text {
+ min-height:100px;
+}
+/* Inputs */
+/* vertically recentering filter management select tag */
+.openerp select.oe_search-view-filters-management {
+ margin-top:2px;
+}
+
+
+@-moz-document url-prefix() {
+ /* Strange firefox behaviour on width: 100% + white-space: nowrap */
+ .openerp .oe_form .oe_form_button .oe_button {
+ width: auto;
+ }
+}
+/* IE Hack - for IE < 9
+ * Avoids buttons overflow
+ * */
+.openerp .oe_form .oe_form_button .oe_button {
+ min-width: auto\9;
+}
+
+
+/* jQuery UI override */
+.openerp .ui-widget {
+ font-size: 1em;
+}
+.openerp tbody.ui-widget-content {
+ margin-bottom: 10px;
+ border-spacing: 4px;
+}
+.openerp .ui-widget-header {
+ background: white none;
+}
+
+/* Sidebar */
+.openerp .view-manager-main-table {
+ margin: 0;
+ width:100%;
+ border-collapse:collapse;
+ height:100%;
+}
+
+.openerp .view-manager-main-table tbody {
+ vertical-align: top;
+}
+
+.openerp .oe-view-manager-header {
+ overflow: auto;
+ background: url("/web/static/src/img/sep-a.gif") 0 100% repeat-x;
+ margin:6px 0 6px 2px;
+}
+.openerp .oe_form_group_cell .oe-view-manager-header { /* Trick: remove the background when element is in a formular */
+ background: none;
+}
+
+.openerp .oe-view-manager-header h2 {
+ float: left;
+}
+
+.openerp .oe_view_manager_menu_tips blockquote {
+ display: none;
+ font-size: 85%;
+ margin: 0;
+ background: #fff;
+ border-bottom: 1px solid #CECBCB;
+ padding: 1px 10px;
+ color: #4C4C4C;
+}
+.openerp .oe_view_manager_menu_tips blockquote p {
+ margin: 0;
+ padding: 6px 1px 4px;
+}
+
+.openerp .oe_view_manager_menu_tips blockquote div {
+ text-align: right;
+ margin-right:10px;
+}
+
+.openerp .oe_view_manager_menu_tips blockquote div button {
+ border: none;
+ background: none;
+ padding: 0 4px;
+ margin: 0;
+ display: inline;
+ text-decoration: underline;
+ color: inherit;
+}
+
+.openerp .view-manager-main-sidebar {
+ width: 180px;
+ padding: 0;
+ margin: 0;
+}
+
+.openerp .sidebar-main-div {
+ height: 100%;
+ border-left: 1px solid #D2CFCF;
+}
+
+.openerp .sidebar-content {
+ padding: 0;
+ margin: 0;
+ width: 180px;
+ height: 100%;
+ font-size: 0.9em;
+}
+
+.openerp .closed-sidebar .sidebar-content {
+ width: 22px;
+}
+
+.openerp .closed-sidebar .sidebar-content {
+ display: none;
+}
+
+.openerp .sidebar-main-div a {
+ color: #555;
+ text-decoration: none;
+}
+
+.openerp .sidebar-main-div a:hover {
+ color: black;
+}
+
+.openerp .oe-sidebar-attachments-toolbar {
+ margin: 4px 0 0 4px;
+}
+.openerp .oe-sidebar-attachments-items {
+ clear: both;
+ padding-top: 5px !important;
+}
+.openerp .oe-sidebar-attachments-items li {
+ position: relative;
+ padding: 0 0 3px 10px !important;
+}
+.openerp .oe-sidebar-attachments-items li:hover {
+ background: #ddd;
+}
+.openerp .oe-sidebar-attachments-link {
+ display: block;
+ margin-right: 15px;
+ overflow: hidden;
+}
+.openerp .oe-sidebar-attachment-delete {
+ position: absolute;
+ right: 2px;
+ top: 1px;
+ overflow: hidden;
+ width: 15px;
+ height: 15px;
+ padding: 1px;
+ border-radius: 7px;
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+}
+.openerp .oe-sidebar-attachment-delete:hover {
+ background-color: white;
+}
+
+.openerp .view-manager-main-sidebar h2 {
+ margin:0;
+ font-size: 1.15em;
+ color: #8E8E8E;
+ text-shadow: white 0 1px 0;
+ padding-left: 10px;
+ padding-right: 21px;
+ height: 21px;
+
+ background: #ffffff; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */
+
+ border: 1px solid #D2CFCF;
+ border-right-width: 0;
+ border-left-width: 0;
+}
+.openerp .view-manager-main-sidebar h2 {
+ border-top-width: 0;
+}
+
+.openerp .view-manager-main-sidebar ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ display: block;
+}
+
+.openerp .view-manager-main-sidebar li {
+ display: block;
+ padding: 3px 3px 3px 10px;
+}
+
+.openerp .toggle-sidebar {
+ cursor: pointer;
+ border: 1px solid #D2CFCF;
+ border-top-width: 0;
+ display: block;
+ background: url(/web/static/src/img/toggle-a-bg.png);
+ width: 21px;
+ height: 21px;
+ z-index: 10;
+}
+.openerp .open-sidebar .toggle-sidebar {
+ margin-left: 158px;
+ background-position: 21px 0;
+ position: absolute;
+}
+.openerp .closed-sidebar .toggle-sidebar {
+ border-left: none;
+}
+.openerp li.oe_sidebar_print {
+ padding-left: 20px;
+ background: 1px 3px url(/web/static/src/img/icons/gtk-print.png) no-repeat;
+}
+
+.openerp .oe_sidebar_print ul {
+ padding-left:8px;
+}
+
+.openerp.kitten-mode-activated .main_table {
+ background: url(http://placekitten.com/g/1500/800) repeat;
+}
+.openerp.kitten-mode-activated.clark-gable .main_table {
+ background: url(http://amigrave.com/ClarkGable.jpg);
+ background-size: 100%;
+}
+
+.openerp.kitten-mode-activated .header {
+ background: url(http://placekitten.com/g/211/65) repeat;
+}
+
+.openerp.kitten-mode-activated .menu {
+ background: #828282;
+ background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D));
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 );
+}
+.openerp.kitten-mode-activated .menu a {
+ background: none;
+}
+.openerp.kitten-mode-activated .menu span {
+ background: none;
+}
+.openerp.kitten-mode-activated .sidebar-content li a,
+.openerp.kitten-mode-activated .oe-application .view-manager-main-content h2.oe_view_title,
+.openerp.kitten-mode-activated .oe-application .view-manager-main-content a.searchview_group_string,
+.openerp.kitten-mode-activated .oe-application .view-manager-main-content label {
+ color: white;
+}
+.openerp.kitten-mode-activated .menu,
+.openerp.kitten-mode-activated .header_corner,
+.openerp.kitten-mode-activated .header_title,
+.openerp.kitten-mode-activated .oe-application,
+.openerp.kitten-mode-activated .oe_footer,
+.openerp.kitten-mode-activated .loading,
+.openerp.kitten-mode-activated .ui-dialog {
+ opacity:0.8;
+ filter:alpha(opacity=80);
+}
+.openerp.kitten-mode-activated .header .company_logo {
+ background: url(http://placekitten.com/g/180/46);
+}
+.openerp.kitten-mode-activated .loading {
+ background: #828282;
+ border-color: #828282;
+}
+
+.openerp .oe-m2o-drop-down-button {
+ margin-left: -24px;
+}
+.openerp .oe-m2o-drop-down-button img {
+ margin-bottom: -4px;
+ cursor: pointer;
+}
+.openerp .oe-m2o input {
+ border-right: none;
+ margin-right: 0px !important;
+ padding-bottom: 2px !important;
+}
+.openerp .oe-m2o-disabled-cm {
+ color: grey;
+}
+.openerp ul[role="listbox"] li a {
+ font-size:80%;
+}
+.parent_top {
+ vertical-align: text-top;
+}
+
+.openerp .oe-dialog-warning p {
+ padding-left: 1em;
+ font-size: 1.2em;
+ font-weight: bold;
+}
+
+.openerp .dhx_mini_calendar {
+ -moz-box-shadow: none;
+ -khtml-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe-treeview-table {
+ width: 100%;
+ background-color : #FFFFFF;
+ border-spacing: 0;
+
+}
+.openerp .oe-treeview-table tr:hover{
+ color: blue;
+ background-color : #D8D8D8;
+}
+.treeview-tr, .treeview-td {
+ cursor: pointer;
+ vertical-align: top;
+ text-align: left;
+ border-bottom: 1px solid #CFCCCC;
+}
+.openerp .oe-treeview-table .oe-number {
+ text-align: right !important;
+}
+.treeview-tr span, .treeview-td span {
+ font-size: 90%;
+ font-weight: normal;
+ white-space: nowrap;
+ display: block;
+ }
+.treeview-tr.oe-treeview-first {
+ background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat;
+}
+.oe-open .treeview-tr.oe-treeview-first {
+ background-image: url(/web/static/src/img/collapse.gif);
+}
+.treeview-tr.oe-treeview-first span,
+.treeview-td.oe-treeview-first span {
+ margin-left: 16px;
+}
+
+.treeview-header {
+ vertical-align: top;
+ background-color : #D8D8D8;
+ white-space: nowrap;
+ text-align: left;
+ padding: 4px 5px;
+}
+ul.oe-arrow-list {
+ padding-left: 1.1em;
+ margin: 0;
+ white-space: nowrap;
+}
+ul.oe-arrow-list li {
+ display: inline-block;
+ margin-left: -1em;
++ vertical-align: top;
+}
+ul.oe-arrow-list li span {
+ vertical-align: top;
+ display: inline-block;
+ border: 1em solid #DEDEDE;
+ line-height:0em;
+}
+ul.oe-arrow-list .oe-arrow-list-before {
- border-left-color: rgba(0,0,0,0);
++ border-left-color: transparent;
+ border-right-width:0;
+}
+ul.oe-arrow-list .oe-arrow-list-after {
- border-color: rgba(0,0,0,0);
++ border-color: transparent;
+ border-left-color: #DEDEDE;
+ border-right-width:0;
+}
+ul.oe-arrow-list li.oe-arrow-list-selected span {
+ border-color: #B5B9FF;
+}
+ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-before {
- border-left-color: rgba(0,0,0,0);
++ border-left-color: transparent;
+}
+ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
- border-color: rgba(0,0,0,0);
++ border-color: transparent;
+ border-left-color: #B5B9FF;
+}
+.openerp ul.oe-arrow-list li:first-child span:first-child{
+ -webkit-border-top-left-radius: 3px;
+ -moz-border-radius-topleft: 3px;
+ border-top-left-radius: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ border-bottom-left-radius: 3px;
+}
+.openerp ul.oe-arrow-list li:last-child span:last-child{
+ -webkit-border-top-right-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ border-top-right-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+ -moz-border-radius-bottomright: 3px;
+ border-bottom-right-radius: 3px;
+}
+.openerp .oe_view_editor {
+ width:100%;
+ border-collapse : collapse;
+ margin-left: -12px;
+
+ width: 100%;
+ background-color : white;
+ border-spacing: 0;
+}
+.openerp .oe_view_editor td{
+ text-align: center;
+ white-space: nowrap;
+ border: 1px solid #D8D8D8;
+
+ cursor: pointer;
+ font-size: 90%;
+}
+.openerp .oe_view_editor_field td{
+ border: 0px !important;
+}
+
+.openerp .oe_view_editor tr:hover {
+ background-color: #ecebf2;
+}
+
+
+/* Dialog traceback cases */
+.openerp .oe_error_detail{
+ display: block;
+}
+.openerp .oe_error_send{
+ display:block;
+}
+.openerp .oe_fielddiv{
+ display:inline-block;
+ width:100%;
+}
+.openerp .oe_fielddiv input[type=text],textarea{
+ width:100%;
+}
+/* for Alignment center */
+.openerp .oe_centeralign{
+ text-align:center;
+}
+
+.openerp .oe_applications_tiles {
+ color: #4C4C4C;
+ text-shadow: #EEE 0 1px 0;
+ margin: 0 20px;
+}
+
+.openerp select.oe_search-view-filters-management {
+ font-style: oblique;
+ color: #999999;
+}
+
+.openerp .oe_search-view-filters-management option,
+.openerp .oe_search-view-filters-management optgroup {
+ font-style: normal;
+ color: black;
+}
+
+
+/* Internet Explorer Fix */
+a img {
+ border: none;
+}
init: function(parent) {
var self = this;
this._super(parent);
- openerp.webclient = this;
-
+ instance.webclient = this;
+ this.querystring = '?' + jQuery.param.querystring();
this._current_state = null;
},
+ _get_version_label: function() {
+ if (this.session.openerp_entreprise) {
+ return 'OpenERP';
+ } else {
+ return _t("OpenERP - Unsupported/Community Version");
+ }
+ },
+ set_title: function(title) {
+ title = _.str.clean(title);
+ var sep = _.isEmpty(title) ? '' : ' - ';
+ document.title = title + sep + 'OpenERP';
+ },
start: function() {
var self = this;
- this.$element = $(document.body);
- if (jQuery.param != undefined && jQuery.deparam(jQuery.param.querystring()).kitten != undefined) {
- this.$element.addClass("kitten-mode-activated");
- this.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
+ this.$element.addClass("openerp openerp-web-client-container");
+ if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {
+ $("body").addClass("kitten-mode-activated");
+ self.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
self.$element.toggleClass('clark-gable');
});
}
},
show_application: function() {
var self = this;
- this.destroy_content();
- this.show_common();
- self.$table = $(QWeb.render("Interface", {}));
self.$element.append(self.$table);
- self.header = new openerp.web.Header(self);
- self.header.on_logout.add(this.proxy('on_logout'));
- self.header.on_action.add(this.proxy('on_menu_action'));
- self.header.appendTo($("#oe_header"));
- self.menu = new openerp.web.Menu(self, "oe_menu", "oe_secondary_menu");
- self.menu.on_action.add(this.proxy('on_menu_action'));
- self.menu.start();
- },
- show_common: function() {
- var self = this;
- if (!this.crashmanager) {
- this.crashmanager = new openerp.web.CrashManager();
- openerp.connection.on_rpc_error.add(this.crashmanager.on_rpc_error);
- window.onerror = function (message, file, line) {
- self.crashmanager.on_traceback({
- type: _t("Client Error"),
- message: message,
- data: {debug: file + ':' + line}
- });
- }
+ self.login.$element.hide();
+ self.menu = new instance.web.Menu(self);
+ self.menu.replace(this.$element.find('.oe_menu_placeholder'));
+ self.menu.on('menu_click', this, this.on_menu_action);
+ self.user_menu = new instance.web.UserMenu(self);
+ self.user_menu.replace(this.$element.find('.oe_user_menu_placeholder'));
+ self.user_menu.on_menu_logout.add(this.proxy('on_logout'));
+ self.user_menu.on_action.add(this.proxy('on_menu_action'));
+ self.user_menu.do_update();
+ self.bind_hashchange();
- var version_label = _t("OpenERP - Unsupported/Community Version");
+ if (!self.session.openerp_entreprise) {
++ var version_label = self._get_version_label();
+ self.$element.find('.oe_footer_powered').append(_.str.sprintf('<span> - <a href="http://www.openerp.com/support-or-publisher-warranty-contract" target="_blank">%s</a></span>', version_label));
- document.title = version_label;
}
- this.notification = new openerp.web.Notification(this);
- this.notification.appendTo(this.$element);
- this.loading = new openerp.web.Loading(this);
- this.loading.appendTo(this.$element);
++ self.set_title();
},
destroy_content: function() {
- _.each(_.clone(this.widget_children), function(el) {
- el.stop();
+ _.each(_.clone(this.getChildren()), function(el) {
+ el.destroy();
});
this.$element.children().remove();
},
--- /dev/null
+/*
+ * Copyright (c) 2012, OpenERP S.A.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+openerp.web.corelib = function(instance) {
+
+/**
+ * Improved John Resig's inheritance, based on:
+ *
+ * Simple JavaScript Inheritance
+ * By John Resig http://ejohn.org/
+ * MIT Licensed.
+ *
+ * Adds "include()"
+ *
+ * Defines The Class object. That object can be used to define and inherit classes using
+ * the extend() method.
+ *
+ * Example:
+ *
+ * var Person = instance.web.Class.extend({
+ * init: function(isDancing){
+ * this.dancing = isDancing;
+ * },
+ * dance: function(){
+ * return this.dancing;
+ * }
+ * });
+ *
+ * The init() method act as a constructor. This class can be instancied this way:
+ *
+ * var person = new Person(true);
+ * person.dance();
+ *
+ * The Person class can also be extended again:
+ *
+ * var Ninja = Person.extend({
+ * init: function(){
+ * this._super( false );
+ * },
+ * dance: function(){
+ * // Call the inherited version of dance()
+ * return this._super();
+ * },
+ * swingSword: function(){
+ * return true;
+ * }
+ * });
+ *
+ * When extending a class, each re-defined method can use this._super() to call the previous
+ * implementation of that method.
+ */
+(function() {
+ var initializing = false,
+ fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
+ // The web Class implementation (does nothing)
+ instance.web.Class = function(){};
+
+ /**
+ * Subclass an existing class
+ *
+ * @param {Object} prop class-level properties (class attributes and instance methods) to set on the new class
+ */
+ instance.web.Class.extend = function() {
+ var _super = this.prototype;
+ // Support mixins arguments
+ var args = _.toArray(arguments);
+ args.unshift({});
+ var prop = _.extend.apply(_,args);
+
+ // Instantiate a web class (but only create the instance,
+ // don't run the init constructor)
+ initializing = true;
+ var prototype = new this();
+ initializing = false;
+
+ // Copy the properties over onto the new prototype
+ for (var name in prop) {
+ // Check if we're overwriting an existing function
+ prototype[name] = typeof prop[name] == "function" &&
- typeof _super[name] == "function" &&
+ fnTest.test(prop[name]) ?
+ (function(name, fn) {
+ return function() {
+ var tmp = this._super;
+
+ // Add a new ._super() method that is the same
+ // method but on the super-class
+ this._super = _super[name];
+
+ // The method only need to be bound temporarily, so
+ // we remove it when we're done executing
+ var ret = fn.apply(this, arguments);
+ this._super = tmp;
+
+ return ret;
+ };
+ })(name, prop[name]) :
+ prop[name];
+ }
+
+ // The dummy class constructor
+ function Class() {
+ // All construction is actually done in the init method
+ if (!initializing && this.init) {
+ var ret = this.init.apply(this, arguments);
+ if (ret) { return ret; }
+ }
+ return this;
+ }
+ Class.include = function (properties) {
+ for (var name in properties) {
+ if (typeof properties[name] !== 'function'
+ || !fnTest.test(properties[name])) {
+ prototype[name] = properties[name];
+ } else if (typeof prototype[name] === 'function'
+ && prototype.hasOwnProperty(name)) {
+ prototype[name] = (function (name, fn, previous) {
+ return function () {
+ var tmp = this._super;
+ this._super = previous;
+ var ret = fn.apply(this, arguments);
+ this._super = tmp;
+ return ret;
+ }
+ })(name, properties[name], prototype[name]);
+ } else if (typeof _super[name] === 'function') {
+ prototype[name] = (function (name, fn) {
+ return function () {
+ var tmp = this._super;
+ this._super = _super[name];
+ var ret = fn.apply(this, arguments);
+ this._super = tmp;
+ return ret;
+ }
+ })(name, properties[name]);
+ }
+ }
+ };
+
+ // Populate our constructed prototype object
+ Class.prototype = prototype;
+
+ // Enforce the constructor to be what we expect
+ Class.constructor = Class;
+
+ // And make this class extendable
+ Class.extend = arguments.callee;
+
+ return Class;
+ };
+})();
+
+// Mixins
+
+/**
+ * Mixin to structure objects' life-cycles folowing a parent-children
+ * relationship. Each object can a have a parent and multiple children.
+ * When an object is destroyed, all its children are destroyed too releasing
+ * any resource they could have reserved before.
+ */
+instance.web.ParentedMixin = {
+ __parentedMixin : true,
+ init: function() {
+ this.__parentedDestroyed = false;
+ this.__parentedChildren = [];
+ this.__parentedParent = null;
+ },
+ /**
+ * Set the parent of the current object. When calling this method, the
+ * parent will also be informed and will return the current object
+ * when its getChildren() method is called. If the current object did
+ * already have a parent, it is unregistered before, which means the
+ * previous parent will not return the current object anymore when its
+ * getChildren() method is called.
+ */
+ setParent : function(parent) {
+ if (this.getParent()) {
+ if (this.getParent().__parentedMixin) {
+ this.getParent().__parentedChildren = _.without(this
+ .getParent().getChildren(), this);
+ }
+ }
+ this.__parentedParent = parent;
+ if (parent && parent.__parentedMixin) {
+ parent.__parentedChildren.push(this);
+ }
+ },
+ /**
+ * Return the current parent of the object (or null).
+ */
+ getParent : function() {
+ return this.__parentedParent;
+ },
+ /**
+ * Return a list of the children of the current object.
+ */
+ getChildren : function() {
+ return _.clone(this.__parentedChildren);
+ },
+ /**
+ * Returns true if destroy() was called on the current object.
+ */
+ isDestroyed : function() {
+ return this.__parentedDestroyed;
+ },
+ /**
+ * Inform the object it should destroy itself, releasing any
+ * resource it could have reserved.
+ */
+ destroy : function() {
+ _.each(this.getChildren(), function(el) {
+ el.destroy();
+ });
+ this.setParent(undefined);
+ this.__parentedDestroyed = true;
+ }
+};
+
+/**
+ * Backbone's events. Do not ever use it directly, use EventDispatcherMixin instead.
+ *
+ * (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
+ * Backbone may be freely distributed under the MIT license.
+ * For all details and documentation:
+ * http://backbonejs.org
+ *
+ * This class just handle the dispatching of events, it is not meant to be extended,
+ * nor used directly. All integration with parenting and automatic unregistration of
+ * events is done in EventDispatcherMixin.
+ *
+ */
+var Events = instance.web.Class.extend({
+ on : function(events, callback, context) {
+ var ev;
+ events = events.split(/\s+/);
+ var calls = this._callbacks || (this._callbacks = {});
+ while (ev = events.shift()) {
+ var list = calls[ev] || (calls[ev] = {});
+ var tail = list.tail || (list.tail = list.next = {});
+ tail.callback = callback;
+ tail.context = context;
+ list.tail = tail.next = {};
+ }
+ return this;
+ },
+
+ off : function(events, callback, context) {
+ var ev, calls, node;
+ if (!events) {
+ delete this._callbacks;
+ } else if (calls = this._callbacks) {
+ events = events.split(/\s+/);
+ while (ev = events.shift()) {
+ node = calls[ev];
+ delete calls[ev];
+ if (!callback || !node)
+ continue;
+ while ((node = node.next) && node.next) {
+ if (node.callback === callback
+ && (!context || node.context === context))
+ continue;
+ this.on(ev, node.callback, node.context);
+ }
+ }
+ }
+ return this;
+ },
+
+ trigger : function(events) {
+ var event, node, calls, tail, args, all, rest;
+ if (!(calls = this._callbacks))
+ return this;
+ all = calls['all'];
+ (events = events.split(/\s+/)).push(null);
+ // Save references to the current heads & tails.
+ while (event = events.shift()) {
+ if (all)
+ events.push({
+ next : all.next,
+ tail : all.tail,
+ event : event
+ });
+ if (!(node = calls[event]))
+ continue;
+ events.push({
+ next : node.next,
+ tail : node.tail
+ });
+ }
+ rest = Array.prototype.slice.call(arguments, 1);
+ while (node = events.pop()) {
+ tail = node.tail;
+ args = node.event ? [ node.event ].concat(rest) : rest;
+ while ((node = node.next) !== tail) {
+ node.callback.apply(node.context || this, args);
+ }
+ }
+ return this;
+ }
+});
+// end of Jeremy Ashkenas' code
+
+instance.web.EventDispatcherMixin = _.extend({}, instance.web.ParentedMixin, {
+ __eventDispatcherMixin: true,
+ init: function() {
+ instance.web.ParentedMixin.init.call(this);
+ this.__edispatcherEvents = new Events();
+ this.__edispatcherRegisteredEvents = [];
+ },
+ on: function(events, dest, func) {
+ var self = this;
+ if (!(func instanceof Function)) {
+ throw new Error("Event handler must be a function.");
+ }
+ events = events.split(/\s+/);
+ _.each(events, function(eventName) {
+ self.__edispatcherEvents.on(eventName, func, dest);
+ if (dest && dest.__eventDispatcherMixin) {
+ dest.__edispatcherRegisteredEvents.push({name: eventName, func: func, source: self});
+ }
+ });
+ return this;
+ },
+ off: function(events, dest, func) {
+ var self = this;
+ events = events.split(/\s+/);
+ _.each(events, function(eventName) {
+ self.__edispatcherEvents.off(eventName, func, dest);
+ if (dest && dest.__eventDispatcherMixin) {
+ dest.__edispatcherRegisteredEvents = _.filter(dest.__edispatcherRegisteredEvents, function(el) {
+ return !(el.name === eventName && el.func === func && el.source === self);
+ });
+ }
+ });
+ return this;
+ },
+ trigger: function(events) {
+ this.__edispatcherEvents.trigger.apply(this.__edispatcherEvents, arguments);
+ return this;
+ },
+ destroy: function() {
+ var self = this;
+ _.each(this.__edispatcherRegisteredEvents, function(event) {
+ event.source.__edispatcherEvents.off(event.name, event.func, self);
+ });
+ this.__edispatcherRegisteredEvents = [];
+ if(!this.__edispatcherEvents) {
+ debugger;
+ }
+ this.__edispatcherEvents.off();
+ instance.web.ParentedMixin.destroy.call(this);
+ }
+});
+
+instance.web.PropertiesMixin = _.extend({}, instance.web.EventDispatcherMixin, {
+ init: function() {
+ instance.web.EventDispatcherMixin.init.call(this);
+ this.__getterSetterInternalMap = {};
+ },
+ set: function(map) {
+ var self = this;
+ var changed = false;
+ _.each(map, function(val, key) {
+ var tmp = self.__getterSetterInternalMap[key];
+ if (tmp === val)
+ return;
+ changed = true;
+ self.__getterSetterInternalMap[key] = val;
+ self.trigger("change:" + key, self, {
+ oldValue: tmp,
+ newValue: val
+ });
+ });
+ if (changed)
+ self.trigger("change", self);
+ },
+ get: function(key) {
+ return this.__getterSetterInternalMap[key];
+ }
+});
+
+instance.web.CallbackEnabledMixin = _.extend({}, instance.web.PropertiesMixin, {
+ init: function() {
+ instance.web.PropertiesMixin.init.call(this);
+ var self = this;
+ var callback_maker = function(obj, name, method) {
+ var callback = function() {
+ var args = Array.prototype.slice.call(arguments);
+ self.trigger.apply(self, [name].concat(args));
+ var r;
+ for(var i = 0; i < callback.callback_chain.length; i++) {
+ var c = callback.callback_chain[i];
+ if(c.unique) {
+ callback.callback_chain.splice(i, 1);
+ i -= 1;
+ }
+ var result = c.callback.apply(c.self, c.args.concat(args));
+ if (c.callback === method) {
+ // return the result of the original method
+ r = result;
+ }
+ // TODO special value to stop the chain
+ // instance.web.callback_stop
+ }
+ return r;
+ };
+ callback.callback_chain = [];
+ callback.add = function(f) {
+ if(typeof(f) == 'function') {
+ f = { callback: f, args: Array.prototype.slice.call(arguments, 1) };
+ }
+ f.self = f.self || null;
+ f.args = f.args || [];
+ f.unique = !!f.unique;
+ if(f.position == 'last') {
+ callback.callback_chain.push(f);
+ } else {
+ callback.callback_chain.unshift(f);
+ }
+ return callback;
+ };
+ callback.add_first = function(f) {
+ return callback.add.apply(null,arguments);
+ };
+ callback.add_last = function(f) {
+ return callback.add({
+ callback: f,
+ args: Array.prototype.slice.call(arguments, 1),
+ position: "last"
+ });
+ };
+ callback.remove = function(f) {
+ callback.callback_chain = _.difference(callback.callback_chain, _.filter(callback.callback_chain, function(el) {
+ return el.callback === f;
+ }));
+ return callback;
+ };
+
+ return callback.add({
+ callback: method,
+ self:obj,
+ args:Array.prototype.slice.call(arguments, 3)
+ });
+ };
+ // Transform on_/do_* methods into callbacks
+ for (var name in this) {
+ if(typeof(this[name]) == "function") {
+ this[name].debug_name = name;
+ if((/^on_|^do_/).test(name)) {
+ this[name] = callback_maker(this, name, this[name]);
+ }
+ }
+ }
+ },
+ /**
+ * Proxies a method of the object, in order to keep the right ``this`` on
+ * method invocations.
+ *
+ * This method is similar to ``Function.prototype.bind`` or ``_.bind``, and
+ * even more so to ``jQuery.proxy`` with a fundamental difference: its
+ * resolution of the method being called is lazy, meaning it will use the
+ * method as it is when the proxy is called, not when the proxy is created.
+ *
+ * Other methods will fix the bound method to what it is when creating the
+ * binding/proxy, which is fine in most javascript code but problematic in
+ * OpenERP Web where developers may want to replace existing callbacks with
+ * theirs.
+ *
+ * The semantics of this precisely replace closing over the method call.
+ *
+ * @param {String} method_name name of the method to invoke
+ * @returns {Function} proxied method
+ */
+ proxy: function (method_name) {
+ var self = this;
+ return function () {
+ return self[method_name].apply(self, arguments);
+ }
+ }
+});
+
+instance.web.WidgetMixin = _.extend({},instance.web.CallbackEnabledMixin, {
+ /**
+ * Tag name when creating a default $element.
+ * @type string
+ */
+ tagName: 'div',
+ /**
+ * Constructs the widget and sets its parent if a parent is given.
+ *
+ * @constructs instance.web.Widget
+ * @extends instance.web.CallbackEnabled
+ *
+ * @param {instance.web.Widget} parent Binds the current instance to the given Widget instance.
+ * When that widget is destroyed by calling destroy(), the current instance will be
+ * destroyed too. Can be null.
+ * @param {String} element_id Deprecated. Sets the element_id. Only useful when you want
+ * to bind the current Widget to an already existing part of the DOM, which is not compatible
+ * with the DOM insertion methods provided by the current implementation of Widget. So
+ * for new components this argument should not be provided any more.
+ */
+ init: function(parent) {
+ instance.web.CallbackEnabledMixin.init.call(this);
+ this.$element = $(document.createElement(this.tagName));
+ this.setParent(parent);
+ },
+ /**
+ * Destroys the current widget, also destroys all its children before destroying itself.
+ */
+ destroy: function() {
+ _.each(this.getChildren(), function(el) {
+ el.destroy();
+ });
+ if(this.$element != null) {
+ this.$element.remove();
+ }
+ instance.web.PropertiesMixin.destroy.call(this);
+ },
+ /**
+ * Renders the current widget and appends it to the given jQuery object or Widget.
+ *
+ * @param target A jQuery object or a Widget instance.
+ */
+ appendTo: function(target) {
+ var self = this;
+ return this.__widgetRenderAndInsert(function(t) {
+ self.$element.appendTo(t);
+ }, target);
+ },
+ /**
+ * Renders the current widget and prepends it to the given jQuery object or Widget.
+ *
+ * @param target A jQuery object or a Widget instance.
+ */
+ prependTo: function(target) {
+ var self = this;
+ return this.__widgetRenderAndInsert(function(t) {
+ self.$element.prependTo(t);
+ }, target);
+ },
+ /**
+ * Renders the current widget and inserts it after to the given jQuery object or Widget.
+ *
+ * @param target A jQuery object or a Widget instance.
+ */
+ insertAfter: function(target) {
+ var self = this;
+ return this.__widgetRenderAndInsert(function(t) {
+ self.$element.insertAfter(t);
+ }, target);
+ },
+ /**
+ * Renders the current widget and inserts it before to the given jQuery object or Widget.
+ *
+ * @param target A jQuery object or a Widget instance.
+ */
+ insertBefore: function(target) {
+ var self = this;
+ return this.__widgetRenderAndInsert(function(t) {
+ self.$element.insertBefore(t);
+ }, target);
+ },
+ /**
+ * Renders the current widget and replaces the given jQuery object.
+ *
+ * @param target A jQuery object or a Widget instance.
+ */
+ replace: function(target) {
+ return this.__widgetRenderAndInsert(_.bind(function(t) {
+ this.$element.replaceAll(t);
+ }, this), target);
+ },
+ __widgetRenderAndInsert: function(insertion, target) {
+ this.renderElement();
+ insertion(target);
+ return this.start();
+ },
+ /**
+ * This is the method to implement to render the Widget.
+ */
+ renderElement: function() {
+ },
+ /**
+ * Method called after rendering. Mostly used to bind actions, perform asynchronous
+ * calls, etc...
+ *
+ * By convention, the method should return a promise to inform the caller when
+ * this widget has been initialized.
+ *
+ * @returns {jQuery.Deferred}
+ */
+ start: function() {
+ }
+});
+
+// Classes
+
+instance.web.CallbackEnabled = instance.web.Class.extend(instance.web.CallbackEnabledMixin, {
+ init: function() {
+ instance.web.CallbackEnabledMixin.init.call(this);
+ }
+});
+
+/**
+ * Base class for all visual components. Provides a lot of functionalities helpful
+ * for the management of a part of the DOM.
+ *
+ * Widget handles:
+ * - Rendering with QWeb.
+ * - Life-cycle management and parenting (when a parent is destroyed, all its children are
+ * destroyed too).
+ * - Insertion in DOM.
+ *
+ * Guide to create implementations of the Widget class:
+ * ==============================================
+ *
+ * Here is a sample child class:
+ *
+ * MyWidget = instance.base.Widget.extend({
+ * // the name of the QWeb template to use for rendering
+ * template: "MyQWebTemplate",
+ *
+ * init: function(parent) {
+ * this._super(parent);
+ * // stuff that you want to init before the rendering
+ * },
+ * start: function() {
+ * // stuff you want to make after the rendering, `this.$element` holds a correct value
+ * this.$element.find(".my_button").click(/* an example of event binding * /);
+ *
+ * // if you have some asynchronous operations, it's a good idea to return
+ * // a promise in start()
+ * var promise = this.rpc(...);
+ * return promise;
+ * }
+ * });
+ *
+ * Now this class can simply be used with the following syntax:
+ *
+ * var my_widget = new MyWidget(this);
+ * my_widget.appendTo($(".some-div"));
+ *
+ * With these two lines, the MyWidget instance was inited, rendered, it was inserted into the
+ * DOM inside the ".some-div" div and its events were binded.
+ *
+ * And of course, when you don't need that widget anymore, just do:
+ *
+ * my_widget.destroy();
+ *
+ * That will kill the widget in a clean way and erase its content from the dom.
+ */
+instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, {
+ /**
+ * The name of the QWeb template that will be used for rendering. Must be
+ * redefined in subclasses or the default render() method can not be used.
+ *
+ * @type string
+ */
+ template: null,
+ /**
+ * Constructs the widget and sets its parent if a parent is given.
+ *
+ * @constructs instance.web.Widget
+ * @extends instance.web.CallbackEnabled
+ *
+ * @param {instance.web.Widget} parent Binds the current instance to the given Widget instance.
+ * When that widget is destroyed by calling destroy(), the current instance will be
+ * destroyed too. Can be null.
+ * @param {String} element_id Deprecated. Sets the element_id. Only useful when you want
+ * to bind the current Widget to an already existing part of the DOM, which is not compatible
+ * with the DOM insertion methods provided by the current implementation of Widget. So
+ * for new components this argument should not be provided any more.
+ */
+ init: function(parent) {
+ instance.web.WidgetMixin.init.call(this,parent);
+ this.session = instance.connection;
+ },
+ /**
+ * Renders the element. The default implementation renders the widget using QWeb,
+ * `this.template` must be defined. The context given to QWeb contains the "widget"
+ * key that references `this`.
+ */
+ renderElement: function() {
+ var rendered = null;
+ if (this.template)
+ rendered = instance.web.qweb.render(this.template, {widget: this});
+ if (_.str.trim(rendered)) {
+ var elem = $(rendered);
+ this.$element.replaceWith(elem);
+ this.$element = elem;
+ }
+ },
+ /**
+ * Shortcut for $element.find() like backbone
+ */
+ "$": function() {
+ return this.$element.find.apply(this.$element,arguments);
+ },
+ /**
+ * Informs the action manager to do an action. This supposes that
+ * the action manager can be found amongst the ancestors of the current widget.
+ * If that's not the case this method will simply return `false`.
+ */
+ do_action: function(action, on_finished) {
+ if (this.getParent()) {
+ return this.getParent().do_action(action, on_finished);
+ }
+ return false;
+ },
+ do_notify: function() {
+ if (this.getParent()) {
+ return this.getParent().do_notify.apply(this,arguments);
+ }
+ return false;
+ },
+ do_warn: function() {
+ if (this.getParent()) {
+ return this.getParent().do_warn.apply(this,arguments);
+ }
+ return false;
+ },
+ rpc: function(url, data, success, error) {
+ var def = $.Deferred().then(success, error);
+ var self = this;
+ instance.connection.rpc(url, data). then(function() {
+ if (!self.isDestroyed())
+ def.resolve.apply(def, arguments);
+ }, function() {
+ if (!self.isDestroyed())
+ def.reject.apply(def, arguments);
+ });
+ return def.promise();
+ }
+});
+
+instance.web.Registry = instance.web.Class.extend({
+ /**
+ * Stores a mapping of arbitrary key (strings) to object paths (as strings
+ * as well).
+ *
+ * Resolves those paths at query time in order to always fetch the correct
+ * object, even if those objects have been overloaded/replaced after the
+ * registry was created.
+ *
+ * An object path is simply a dotted name from the instance root to the
+ * object pointed to (e.g. ``"instance.web.Session"`` for an OpenERP
+ * connection object).
+ *
+ * @constructs instance.web.Registry
+ * @param {Object} mapping a mapping of keys to object-paths
+ */
+ init: function (mapping) {
+ this.parent = null;
+ this.map = mapping || {};
+ },
+ /**
+ * Retrieves the object matching the provided key string.
+ *
+ * @param {String} key the key to fetch the object for
+ * @param {Boolean} [silent_error=false] returns undefined if the key or object is not found, rather than throwing an exception
+ * @returns {Class} the stored class, to initialize or null if not found
+ */
+ get_object: function (key, silent_error) {
+ var path_string = this.map[key];
+ if (path_string === undefined) {
+ if (this.parent) {
+ return this.parent.get_object(key, silent_error);
+ }
+ if (silent_error) { return void 'nooo'; }
+ return null;
+ }
+
+ var object_match = instance;
+ var path = path_string.split('.');
+ // ignore first section
+ for(var i=1; i<path.length; ++i) {
+ object_match = object_match[path[i]];
+
+ if (object_match === undefined) {
+ if (silent_error) { return void 'noooooo'; }
+ return null;
+ }
+ }
+ return object_match;
+ },
+ /**
+ * Checks if the registry contains an object mapping for this key.
+ *
+ * @param {String} key key to look for
+ */
+ contains: function (key) {
+ if (key === undefined) { return false; }
+ if (key in this.map) {
+ return true
+ }
+ if (this.parent) {
+ return this.parent.contains(key);
+ }
+ return false;
+ },
+ /**
+ * Tries a number of keys, and returns the first object matching one of
+ * the keys.
+ *
+ * @param {Array} keys a sequence of keys to fetch the object for
+ * @returns {Class} the first class found matching an object
+ */
+ get_any: function (keys) {
+ for (var i=0; i<keys.length; ++i) {
+ var key = keys[i];
+ if (!this.contains(key)) {
+ continue;
+ }
+
+ return this.get_object(key);
+ }
+ return null;
+ },
+ /**
+ * Adds a new key and value to the registry.
+ *
+ * This method can be chained.
+ *
+ * @param {String} key
+ * @param {String} object_path fully qualified dotted object path
+ * @returns {instance.web.Registry} itself
+ */
+ add: function (key, object_path) {
+ this.map[key] = object_path;
+ return this;
+ },
+ /**
+ * Creates and returns a copy of the current mapping, with the provided
+ * mapping argument added in (replacing existing keys if needed)
+ *
+ * Parent and child remain linked, a new key in the parent (which is not
+ * overwritten by the child) will appear in the child.
+ *
+ * @param {Object} [mapping={}] a mapping of keys to object-paths
+ */
+ extend: function (mapping) {
+ var child = new instance.web.Registry(mapping);
+ child.parent = this;
+ return child;
+ },
+ /**
+ * @deprecated use Registry#extend
+ */
+ clone: function (mapping) {
+ console.warn('Registry#clone is deprecated, use Registry#extend');
+ return this.extend(mapping);
+ }
+});
+
+instance.web.JsonRPC = instance.web.CallbackEnabled.extend({
+ /**
+ * @constructs instance.web.JsonRPC
+ * @extends instance.web.CallbackEnabled
+ *
+ * @param {String} [server] JSON-RPC endpoint hostname
+ * @param {String} [port] JSON-RPC endpoint port
+ */
+ init: function() {
+ this._super();
+ this.server = null;
+ this.debug = ($.deparam($.param.querystring()).debug != undefined);
+ },
+ setup: function(origin) {
+ var window_origin = location.protocol+"//"+location.host, self=this;
+ this.origin = origin ? _.str.rtrim(origin,'/') : window_origin;
+ this.prefix = this.origin;
+ this.server = this.origin; // keep chs happy
+ this.rpc_function = (this.origin == window_origin) ? this.rpc_json : this.rpc_jsonp;
+ },
+ test_eval_get_context: function () {
+ var asJS = function (arg) {
+ if (arg instanceof py.object) {
+ return arg.toJSON();
+ }
+ return arg;
+ };
+
+ var datetime = new py.object();
+ datetime.datetime = new py.type(function datetime() {
+ throw new Error('datetime.datetime not implemented');
+ });
+ var date = datetime.date = new py.type(function date(y, m, d) {
+ if (y instanceof Array) {
+ d = y[2];
+ m = y[1];
+ y = y[0];
+ }
+ this.year = asJS(y);
+ this.month = asJS(m);
+ this.day = asJS(d);
+ }, py.object, {
+ strftime: function (args) {
+ var f = asJS(args[0]), self = this;
+ return new py.str(f.replace(/%([A-Za-z])/g, function (m, c) {
+ switch (c) {
+ case 'Y': return self.year;
+ case 'm': return _.str.sprintf('%02d', self.month);
+ case 'd': return _.str.sprintf('%02d', self.day);
+ }
+ throw new Error('ValueError: No known conversion for ' + m);
+ }));
+ }
+ });
+ date.__getattribute__ = function (name) {
+ if (name === 'today') {
+ return date.today;
+ }
+ throw new Error("AttributeError: object 'date' has no attribute '" + name +"'");
+ };
+ date.today = new py.def(function () {
+ var d = new Date();
+ return new date(d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate());
+ });
+ datetime.time = new py.type(function time() {
+ throw new Error('datetime.time not implemented');
+ });
+
+ var time = new py.object();
+ time.strftime = new py.def(function (args) {
+ return date.today.__call__().strftime(args);
+ });
+
+ var relativedelta = new py.type(function relativedelta(args, kwargs) {
+ if (!_.isEmpty(args)) {
+ throw new Error('Extraction of relative deltas from existing datetimes not supported');
+ }
+ this.ops = kwargs;
+ }, py.object, {
+ __add__: function (other) {
+ if (!(other instanceof datetime.date)) {
+ return py.NotImplemented;
+ }
+ // TODO: test this whole mess
+ var year = asJS(this.ops.year) || asJS(other.year);
+ if (asJS(this.ops.years)) {
+ year += asJS(this.ops.years);
+ }
+
+ var month = asJS(this.ops.month) || asJS(other.month);
+ if (asJS(this.ops.months)) {
+ month += asJS(this.ops.months);
+ // FIXME: no divmod in JS?
+ while (month < 1) {
+ year -= 1;
+ month += 12;
+ }
+ while (month > 12) {
+ year += 1;
+ month -= 12;
+ }
+ }
+
+ var lastMonthDay = new Date(year, month, 0).getDate();
+ var day = asJS(this.ops.day) || asJS(other.day);
+ if (day > lastMonthDay) { day = lastMonthDay; }
+ var days_offset = ((asJS(this.ops.weeks) || 0) * 7) + (asJS(this.ops.days) || 0);
+ if (days_offset) {
+ day = new Date(year, month-1, day + days_offset).getDate();
+ }
+ // TODO: leapdays?
+ // TODO: hours, minutes, seconds? Not used in XML domains
+ // TODO: weekday?
+ return new datetime.date(year, month, day);
+ },
+ __radd__: function (other) {
+ return this.__add__(other);
+ },
+
+ __sub__: function (other) {
+ if (!(other instanceof datetime.date)) {
+ return py.NotImplemented;
+ }
+ // TODO: test this whole mess
+ var year = asJS(this.ops.year) || asJS(other.year);
+ if (asJS(this.ops.years)) {
+ year -= asJS(this.ops.years);
+ }
+
+ var month = asJS(this.ops.month) || asJS(other.month);
+ if (asJS(this.ops.months)) {
+ month -= asJS(this.ops.months);
+ // FIXME: no divmod in JS?
+ while (month < 1) {
+ year -= 1;
+ month += 12;
+ }
+ while (month > 12) {
+ year += 1;
+ month -= 12;
+ }
+ }
+
+ var lastMonthDay = new Date(year, month, 0).getDate();
+ var day = asJS(this.ops.day) || asJS(other.day);
+ if (day > lastMonthDay) { day = lastMonthDay; }
+ var days_offset = ((asJS(this.ops.weeks) || 0) * 7) + (asJS(this.ops.days) || 0);
+ if (days_offset) {
+ day = new Date(year, month-1, day - days_offset).getDate();
+ }
+ // TODO: leapdays?
+ // TODO: hours, minutes, seconds? Not used in XML domains
+ // TODO: weekday?
+ return new datetime.date(year, month, day);
+ },
+ __rsub__: function (other) {
+ return this.__sub__(other);
+ }
+ });
+
+ return {
+ uid: new py.float(this.uid),
+ datetime: datetime,
+ time: time,
+ relativedelta: relativedelta
+ };
+ },
+ /**
+ * FIXME: Huge testing hack, especially the evaluation context, rewrite + test for real before switching
+ */
+ test_eval: function (source, expected) {
+ var match_template = '<ul>' +
+ '<li>Source: %(source)s</li>' +
+ '<li>Local: %(local)s</li>' +
+ '<li>Remote: %(remote)s</li>' +
+ '</ul>',
+ fail_template = '<ul>' +
+ '<li>Error: %(error)s</li>' +
+ '<li>Source: %(source)s</li>' +
+ '</ul>';
+ try {
+ // see Session.eval_context in Python
+ var ctx = this.test_eval_contexts(
+ ([this.context] || []).concat(source.contexts));
+ if (!_.isEqual(ctx, expected.context)) {
+ instance.webclient.notification.warn('Context mismatch, report to xmo',
+ _.str.sprintf(match_template, {
+ source: JSON.stringify(source.contexts),
+ local: JSON.stringify(ctx),
+ remote: JSON.stringify(expected.context)
+ }), true);
+ }
+ } catch (e) {
+ instance.webclient.notification.warn('Context fail, report to xmo',
+ _.str.sprintf(fail_template, {
+ error: e.message,
+ source: JSON.stringify(source.contexts)
+ }), true);
+ }
+
+ try {
+ var dom = this.test_eval_domains(source.domains, this.test_eval_get_context());
+ if (!_.isEqual(dom, expected.domain)) {
+ instance.webclient.notification.warn('Domains mismatch, report to xmo',
+ _.str.sprintf(match_template, {
+ source: JSON.stringify(source.domains),
+ local: JSON.stringify(dom),
+ remote: JSON.stringify(expected.domain)
+ }), true);
+ }
+ } catch (e) {
+ instance.webclient.notification.warn('Domain fail, report to xmo',
+ _.str.sprintf(fail_template, {
+ error: e.message,
+ source: JSON.stringify(source.domains)
+ }), true);
+ }
+
+ try {
+ var groups = this.test_eval_groupby(source.group_by_seq);
+ if (!_.isEqual(groups, expected.group_by)) {
+ instance.webclient.notification.warn('GroupBy mismatch, report to xmo',
+ _.str.sprintf(match_template, {
+ source: JSON.stringify(source.group_by_seq),
+ local: JSON.stringify(groups),
+ remote: JSON.stringify(expected.group_by)
+ }), true);
+ }
+ } catch (e) {
+ instance.webclient.notification.warn('GroupBy fail, report to xmo',
+ _.str.sprintf(fail_template, {
+ error: e.message,
+ source: JSON.stringify(source.group_by_seq)
+ }), true);
+ }
+ },
+ test_eval_contexts: function (contexts, evaluation_context) {
+ evaluation_context = evaluation_context || {};
+ var self = this;
+ return _(contexts).reduce(function (result_context, ctx) {
+ // __eval_context evaluations can lead to some of `contexts`'s
+ // values being null, skip them as well as empty contexts
+ if (_.isEmpty(ctx)) { return result_context; }
+ var evaluated = ctx;
+ switch(ctx.__ref) {
+ case 'context':
+ evaluated = py.eval(ctx.__debug, evaluation_context);
+ break;
+ case 'compound_context':
+ var eval_context = self.test_eval_contexts([ctx.__eval_context]);
+ evaluated = self.test_eval_contexts(
+ ctx.__contexts, _.extend({}, evaluation_context, eval_context));
+ break;
+ }
+ // add newly evaluated context to evaluation context for following
+ // siblings
+ _.extend(evaluation_context, evaluated);
+ return _.extend(result_context, evaluated);
+ }, _.extend({}, this.user_context));
+ },
+ test_eval_domains: function (domains, evaluation_context) {
+ var result_domain = [], self = this;
+ _(domains).each(function (dom) {
+ switch(dom.__ref) {
+ case 'domain':
+ result_domain.push.apply(
+ result_domain, py.eval(dom.__debug, evaluation_context));
+ break;
+ case 'compound_domain':
+ var eval_context = self.test_eval_contexts([dom.__eval_context]);
+ result_domain.push.apply(
+ result_domain, self.test_eval_domains(
+ dom.__domains, _.extend(
+ {}, evaluation_context, eval_context)));
+ break;
+ default:
+ result_domain.push.apply(
+ result_domain, dom);
+ }
+ });
+ return result_domain;
+ },
+ test_eval_groupby: function (contexts) {
+ var result_group = [], self = this;
+ _(contexts).each(function (ctx) {
+ var group;
+ switch(ctx.__ref) {
+ case 'context':
+ group = py.eval(ctx.__debug).group_by;
+ break;
+ case 'compound_context':
+ group = self.test_eval_contexts(
+ ctx.__contexts, ctx.__eval_context).group_by;
+ break;
+ default:
+ group = ctx.group_by
+ }
+ if (!group) { return; }
+ if (typeof group === 'string') {
+ result_group.push(group);
+ } else if (group instanceof Array) {
+ result_group.push.apply(result_group, group);
+ } else {
+ throw new Error('Got invalid groupby {{'
+ + JSON.stringify(group) + '}}');
+ }
+ });
+ return result_group;
+ },
+ /**
+ * Executes an RPC call, registering the provided callbacks.
+ *
+ * Registers a default error callback if none is provided, and handles
+ * setting the correct session id and session context in the parameter
+ * objects
+ *
+ * @param {String} url RPC endpoint
+ * @param {Object} params call parameters
+ * @param {Function} success_callback function to execute on RPC call success
+ * @param {Function} error_callback function to execute on RPC call failure
+ * @returns {jQuery.Deferred} jquery-provided ajax deferred
+ */
+ rpc: function(url, params, success_callback, error_callback) {
+ var self = this;
+ // url can be an $.ajax option object
+ if (_.isString(url)) {
+ url = { url: url };
+ }
+ // Construct a JSON-RPC2 request, method is currently unused
+ if (this.debug)
+ params.debug = 1;
+ var payload = {
+ jsonrpc: '2.0',
+ method: 'call',
+ params: params,
+ id: _.uniqueId('r')
+ };
+ var deferred = $.Deferred();
+ this.on_rpc_request();
+ var aborter = params.aborter;
+ delete params.aborter;
+ var request = this.rpc_function(url, payload).then(
+ function (response, textStatus, jqXHR) {
+ self.on_rpc_response();
+ if (!response.error) {
+ if (url.url === '/web/session/eval_domain_and_context') {
+ self.test_eval(params, response.result);
+ }
+ deferred.resolve(response["result"], textStatus, jqXHR);
+ } else if (response.error.data.type === "session_invalid") {
+ self.uid = false;
+ // TODO deprecate or use a deferred on login.do_ask_login()
+ self.on_session_invalid(function() {
+ self.rpc(url, payload.params,
+ function() { deferred.resolve.apply(deferred, arguments); },
+ function() { deferred.reject.apply(deferred, arguments); });
+ });
+ } else {
+ deferred.reject(response.error, $.Event());
+ }
+ },
+ function(jqXHR, textStatus, errorThrown) {
+ self.on_rpc_response();
+ var error = {
+ code: -32098,
+ message: "XmlHttpRequestError " + errorThrown,
+ data: {type: "xhr"+textStatus, debug: jqXHR.responseText, objects: [jqXHR, errorThrown] }
+ };
+ deferred.reject(error, $.Event());
+ });
+ if (aborter) {
+ aborter.abort_last = function () {
+ if (!(request.isResolved() || request.isRejected())) {
+ deferred.fail(function (error, event) {
+ event.preventDefault();
+ });
+ request.abort();
+ }
+ };
+ }
+ // Allow deferred user to disable on_rpc_error in fail
+ deferred.fail(function() {
+ deferred.fail(function(error, event) {
+ if (!event.isDefaultPrevented()) {
+ self.on_rpc_error(error, event);
+ }
+ });
+ }).then(success_callback, error_callback).promise();
+ return deferred;
+ },
+ /**
+ * Raw JSON-RPC call
+ *
+ * @returns {jQuery.Deferred} ajax-webd deferred object
+ */
+ rpc_json: function(url, payload) {
+ var self = this;
+ var ajax = _.extend({
+ type: "POST",
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(payload),
+ processData: false
+ }, url);
+ if (this.synch)
+ ajax.async = false;
+ return $.ajax(ajax);
+ },
+ rpc_jsonp: function(url, payload) {
+ var self = this;
+ // extracted from payload to set on the url
+ var data = {
+ session_id: this.session_id,
+ id: payload.id
+ };
+ url.url = this.get_url(url.url);
+ var ajax = _.extend({
+ type: "GET",
+ dataType: 'jsonp',
+ jsonp: 'jsonp',
+ cache: false,
+ data: data
+ }, url);
+ if (this.synch)
+ ajax.async = false;
+ var payload_str = JSON.stringify(payload);
+ var payload_url = $.param({r:payload_str});
+ if(payload_url.length < 2000) {
+ // Direct jsonp request
+ ajax.data.r = payload_str;
+ return $.ajax(ajax);
+ } else {
+ // Indirect jsonp request
+ var ifid = _.uniqueId('oe_rpc_iframe');
+ var display = options.openerp.debug ? 'block' : 'none';
+ var $iframe = $(_.str.sprintf("<iframe src='javascript:false;' name='%s' id='%s' style='display:%s'></iframe>", ifid, ifid, display));
+ var $form = $('<form>')
+ .attr('method', 'POST')
+ .attr('target', ifid)
+ .attr('enctype', "multipart/form-data")
+ .attr('action', ajax.url + '?' + $.param(data))
+ .append($('<input type="hidden" name="r" />').attr('value', payload_str))
+ .hide()
+ .appendTo($('body'));
+ var cleanUp = function() {
+ if ($iframe) {
+ $iframe.unbind("load").attr("src", "javascript:false;").remove();
+ }
+ $form.remove();
+ };
+ var deferred = $.Deferred();
+ // the first bind is fired up when the iframe is added to the DOM
+ $iframe.bind('load', function() {
+ // the second bind is fired up when the result of the form submission is received
+ $iframe.unbind('load').bind('load', function() {
+ $.ajax(ajax).always(function() {
+ cleanUp();
+ }).then(
+ function() { deferred.resolve.apply(deferred, arguments); },
+ function() { deferred.reject.apply(deferred, arguments); }
+ );
+ });
+ // now that the iframe can receive data, we fill and submit the form
+ $form.submit();
+ });
+ // append the iframe to the DOM (will trigger the first load)
+ $form.after($iframe);
+ return deferred;
+ }
+ },
+ on_rpc_request: function() {
+ },
+ on_rpc_response: function() {
+ },
+ on_rpc_error: function(error) {
+ },
+ get_url: function (file) {
+ return this.prefix + file;
+ },
+});
+
+}
+
+// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
this.mutating_mutex = new $.Mutex();
this.on_change_mutex = new $.Mutex();
this.reload_mutex = new $.Mutex();
-
+ this.__clicked_inside = false;
+ this.__blur_timeout = null;
+ this.rendering_engine = new instance.web.form.FormRenderingEngineReadonly(this);
+ this.qweb = null; // A QWeb instance will be created if the view is a QWeb template
},
- start: function() {
- this._super();
- return this.init_view();
- },
- init_view: function() {
- if (this.embedded_view) {
- var def = $.Deferred().then(this.on_loaded);
- var self = this;
- $.async_when().then(function() {def.resolve(self.embedded_view);});
- return def.promise();
- } else {
- var context = new openerp.web.CompoundContext(this.dataset.get_context());
- return this.rpc("/web/view/load", {
- "model": this.model,
- "view_id": this.view_id,
- "view_type": "form",
- toolbar: this.options.sidebar,
- context: context
- }, this.on_loaded);
- }
- },
- stop: function() {
- if (this.sidebar) {
- this.sidebar.attachments.stop();
- this.sidebar.stop();
- }
- _.each(this.widgets, function(w) {
+ destroy: function() {
+ _.each(this.get_widgets(), function(w) {
++ // FIXME: use widget events
+ $(w).unbind('.formBlur');
- w.stop();
+ w.destroy();
});
+ this.$element.unbind('.formBlur');
this._super();
},
- reposition: function ($e) {
- this.$element = $e;
- this.on_loaded();
- },
on_loaded: function(data) {
var self = this;
- if (data) {
- this.fields_order = [];
- this.fields_view = data;
- var frame = new (this.registry.get_object('frame'))(this, this.fields_view.arch);
+ if (!data) {
+ throw new Error("No data provided.");
+ }
+ if (this.arch) {
+ throw "Form view does not support multiple calls to on_loaded";
+ }
+ this.fields_order = [];
+ this.fields_view = data;
- this.rendered = QWeb.render(this.form_template, { 'frame': frame, 'widget': this });
+ this.rendering_engine.set_fields_registry(this.fields_registry);
+ this.rendering_engine.set_tags_registry(this.tags_registry);
+ if (!this.extract_qweb_template(data)) {
+ this.rendering_engine.set_fields_view(data);
+ var $dest = this.$element.hasClass("oe_form_container") ? this.$element : this.$element.find('.oe_form_container');
+ this.rendering_engine.render_to($dest);
}
- this.$element.html(this.rendered);
+
+ this.$element.bind('mousedown.formBlur', function () {
+ self.__clicked_inside = true;
+ });
- _.each(this.widgets, function(w) {
- w.start();
- $(w).bind('widget-focus.formBlur', self.proxy('widgetFocused'))
- .bind('widget-blur.formBlur', self.proxy('widgetBlurred'));
- });
- this.$form_header = this.$element.find('.oe_form_header:first');
- this.$form_header.find('div.oe_form_pager button[data-pager-action]').click(function() {
+
+ this.$buttons = $(QWeb.render("FormView.buttons", {'widget':self}));
+ if (this.options.$buttons) {
+ this.$buttons.appendTo(this.options.$buttons);
+ } else {
+ this.$element.find('.oe_form_buttons').replaceWith(this.$buttons);
+ }
+ this.$buttons.on('click','.oe_form_button_create',this.on_button_create);
+ this.$buttons.on('click','.oe_form_button_edit',this.on_button_edit);
+ this.$buttons.on('click','.oe_form_button_save',this.on_button_save);
+ this.$buttons.on('click','.oe_form_button_cancel',this.on_button_cancel);
+
+ this.$pager = $(QWeb.render("FormView.pager", {'widget':self}));
+ if (this.options.$pager) {
+ this.$pager.appendTo(this.options.$pager);
+ } else {
+ this.$element.find('.oe_form_pager').replaceWith(this.$pager);
+ }
+ this.$pager.on('click','a[data-pager-action]',function() {
var action = $(this).data('pager-action');
self.on_pager_action(action);
});
- this.$form_header.find('button.oe_form_button_save').click(this.on_button_save);
- this.$form_header.find('button.oe_form_button_cancel').click(this.on_button_cancel);
-
- if (!this.sidebar && this.options.sidebar && this.options.sidebar_id) {
- this.sidebar = new openerp.web.Sidebar(this, this.options.sidebar_id);
- this.sidebar.start();
- this.sidebar.do_unfold();
- this.sidebar.attachments = new openerp.web.form.SidebarAttachments(this.sidebar, this);
- this.sidebar.add_toolbar(this.fields_view.toolbar);
- this.set_common_sidebar_sections(this.sidebar);
-
- this.sidebar.add_section(_t('Customize'), 'customize');
- this.sidebar.add_items('customize', [{
- label: _t('Set Default'),
- form: this,
- callback: function (item) {
- item.form.open_defaults_dialog();
- }
- }]);
+ this.$sidebar = this.options.$sidebar || this.$element.find('.oe_form_sidebar');
+ if (!this.sidebar && this.options.$sidebar) {
+ this.sidebar = new instance.web.Sidebar(this);
+ this.sidebar.appendTo(this.$sidebar);
+ if(this.fields_view.toolbar) {
+ this.sidebar.add_toolbar(this.fields_view.toolbar);
+ }
+ this.sidebar.add_items('other', [
+ { label: _t('Delete'), callback: self.on_button_delete },
+ { label: _t('Duplicate'), callback: self.on_button_duplicate },
+ { label: _t('Set Default'), callback: function (item) { self.open_defaults_dialog(); } },
+ ]);
}
+ this.on("change:mode", this, this.switch_mode);
+ this.set({mode: this.options.initial_mode});
this.has_been_loaded.resolve();
+ return $.when();
+ },
+ extract_qweb_template: function(fvg) {
+ for (var i=0, ii=fvg.arch.children.length; i < ii; i++) {
+ var child = fvg.arch.children[i];
+ if (child.tag === "templates") {
+ this.qweb = new QWeb2.Engine();
+ this.qweb.add_template(instance.web.json_node_to_xml(child));
+ if (!this.qweb.has_template('form')) {
+ throw new Error("No QWeb template found for form view");
+ }
+ return true;
+ }
+ }
+ this.qweb = null;
+ return false;
+ },
+ get_fvg_from_qweb: function(record) {
+ var view = this.qweb.render('form', this.get_qweb_context(record));
+ var fvg = _.clone(this.fields_view);
+ fvg.arch = instance.web.xml_to_json(instance.web.str_to_xml(view).firstChild);
+ return fvg;
+ },
+ get_qweb_context: function(record) {
+ var self = this,
+ new_record = {};
+ _.each(record, function(value_, name) {
+ var r = _.clone(self.fields_view.fields[name] || {});
+ if ((r.type === 'date' || r.type === 'datetime') && value_) {
+ r.raw_value = instance.web.auto_str_to_date(value_);
+ } else {
+ r.raw_value = value_;
+ }
+ r.value = instance.web.format_value(value_, r);
+ new_record[name] = r;
+ });
+ return {
+ record : new_record,
+ new_record : !record.id
+ };
+ },
+ kill_current_form: function() {
+ _.each(this.getChildren(), function(el) {
+ el.destroy();
+ });
+ this.fields = {};
+ this.fields_order = [];
+ this.default_focus_field = null;
+ this.default_focus_button = null;
+ this.translatable_fields = [];
+ this.$element.find('.oe_form_container').empty();
},
+
+ widgetFocused: function() {
+ // Clear click flag if used to focus a widget
+ this.__clicked_inside = false;
+ if (this.__blur_timeout) {
+ clearTimeout(this.__blur_timeout);
+ this.__blur_timeout = null;
+ }
+ },
+ widgetBlurred: function() {
+ if (this.__clicked_inside) {
+ // clicked in an other section of the form (than the currently
+ // focused widget) => just ignore the blurring entirely?
+ this.__clicked_inside = false;
+ return;
+ }
+ var self = this;
+ // clear timeout, if any
+ this.widgetFocused();
+ this.__blur_timeout = setTimeout(function () {
+ $(self).trigger('form-blur');
+ }, 0);
+ },
+
do_load_state: function(state, warm) {
if (state.id && this.datarecord.id != state.id) {
if (!this.dataset.get_id_index(state.id)) {
}
});
},
-- on_processed_onchange: function(response, processed) {
++ on_processed_onchange: function(result, processed) {
try {
-- var result = response;
if (result.value) {
for (var f in result.value) {
if (!result.value.hasOwnProperty(f)) { continue; }
}
this.do_update_pager();
if (this.sidebar) {
- this.sidebar.attachments.do_update();
+ this.sidebar.do_attachement_update(this.dataset, this.datarecord.id);
}
- this.reload();
- return $.when(_.extend(r, {created: true})).then(success);
+ //openerp.log("The record has been created with id #" + this.datarecord.id);
+ return $.when(this.reload()).pipe(function () {
+ return _.extend(r, {created: true}); })
+ .then(success);
}
},
on_action: function (action) {
});
d.template = 'FormView.set_default';
d.open();
- }
+ },
+ register_field: function(field, name) {
+ this.fields[name] = field;
+ this.fields_order.push(name);
++
++ $(field).bind('widget-focus.formBlur', this.proxy('widgetFocused'))
++ .bind('widget-blur.formBlur', this.proxy('widgetBlurred'));
+ if (this.get_field(name).translate) {
+ this.translatable_fields.push(field);
+ }
+ field.on('changed_value', this, function() {
+ field._dirty_flag = true;
+ if (field.is_syntax_valid()) {
+ this.do_onchange(field);
+ this.on_form_changed(true);
+ this.do_notify_change();
+ }
+ });
+ },
+ get_field: function(field_name) {
+ return this.fields_view.fields[field_name];
+ },
+ is_create_mode: function() {
+ return !this.datarecord.id;
+ },
+});
+
+/**
+ * Interface to be implemented by rendering engines for the form view.
+ */
+instance.web.form.FormRenderingEngineInterface = instance.web.Class.extend({
+ set_fields_view: function(fields_view) {},
+ set_fields_registry: function(fields_registry) {},
+ render_to: function($element) {},
+});
+
+/**
+ * Default rendering engine for the form view.
+ *
+ * It is necessary to set the view using set_view() before usage.
+ */
+instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInterface.extend({
+ init: function(view) {
+ this.view = view;
+ },
+ set_fields_view: function(fvg) {
+ this.fvg = fvg;
+ this.version = parseFloat(this.fvg.arch.attrs.version);
+ if (isNaN(this.version)) {
+ this.version = 6.1;
+ }
+ },
+ set_tags_registry: function(tags_registry) {
+ this.tags_registry = tags_registry;
+ },
+ set_fields_registry: function(fields_registry) {
+ this.fields_registry = fields_registry;
+ },
+ // Backward compatibility tools, current default version: v6.1
+ process_version: function() {
+ if (this.version < 7.0) {
+ this.$form.find('form:first').wrapInner('<group col="4"/>');
+ this.$form.find('page').each(function() {
+ if (!$(this).parents('field').length) {
+ $(this).wrapInner('<group col="4"/>');
+ }
+ });
+ }
+ selector = 'form[version!="7.0"] page,form[version!="7.0"]';
+ },
+ render_to: function($target) {
+ var self = this;
+ this.$target = $target;
+
+ // TODO: I know this will save the world and all the kitten for a moment,
+ // but one day, we will have to get rid of xml2json
+ var xml = instance.web.json_node_to_xml(this.fvg.arch);
+ this.$form = $('<div class="oe_form">' + xml + '</div>');
+
+ this.process_version();
+
+ this.fields_to_init = [];
+ this.tags_to_init = [];
+ this.labels = {};
+ this.process(this.$form);
+
+ this.$form.appendTo(this.$target);
+
+ _.each(this.fields_to_init, function($elem) {
+ var name = $elem.attr("name");
+ if (!self.fvg.fields[name]) {
+ throw new Error("Field '" + name + "' specified in view could not be found.");
+ }
+ var obj = self.fields_registry.get_any([$elem.attr('widget'), self.fvg.fields[name].type]);
+ if (!obj) {
+ throw new Error("Widget type '"+ $elem.attr('widget') + "' is not implemented");
+ }
+ var w = new (obj)(self.view, instance.web.xml_to_json($elem[0]));
+ var $label = self.labels[$elem.attr("name")];
+ if ($label) {
+ w.set_input_id($label.attr("for"));
+ }
+ self.alter_field(w);
+ self.view.register_field(w, $elem.attr("name"));
+ w.replace($elem);
+ });
+ _.each(this.tags_to_init, function($elem) {
+ var tag_name = $elem[0].tagName.toLowerCase();
+ var obj = self.tags_registry.get_object(tag_name);
+ var w = new (obj)(self.view, instance.web.xml_to_json($elem[0]));
+ w.replace($elem);
+ });
+ // TODO: return a deferred
+ },
+ render_element: function(template /* dictionaries */) {
+ var dicts = [].slice.call(arguments).slice(1);
+ var dict = _.extend.apply(_, dicts);
+ dict['classnames'] = dict['class'] || ''; // class is a reserved word and might caused problem to Safari when used from QWeb
+ return $(QWeb.render(template, dict));
+ },
+ alter_field: function(field) {
+ },
+ toggle_layout_debugging: function() {
+ if (!this.$target.has('.oe_layout_debug_cell:first').length) {
+ this.$target.find('[title]').removeAttr('title');
+ this.$target.find('.oe_form_group_cell').each(function() {
+ var text = 'W:' + ($(this).attr('width') || '') + ' - C:' + $(this).attr('colspan');
+ $(this).attr('title', text);
+ });
+ }
+ this.$target.toggleClass('oe_layout_debugging');
+ },
+ process: function($tag) {
+ var self = this;
+ var tagname = $tag[0].nodeName.toLowerCase();
+ if (this.tags_registry.contains(tagname)) {
+ this.tags_to_init.push($tag);
+ return $tag;
+ }
+ var fn = self['process_' + tagname];
+ if (fn) {
+ var args = [].slice.call(arguments);
+ args[0] = $tag;
+ return fn.apply(self, args);
+ } else {
+ // generic tag handling, just process children
+ $tag.children().each(function() {
+ self.process($(this));
+ });
+ self.handle_common_properties($tag, $tag);
+ $tag.removeAttr("modifiers");
+ return $tag;
+ }
+ },
+ process_sheet: function($sheet) {
+ var $new_sheet = this.render_element('FormRenderingSheet', $sheet.getAttributes());
+ this.handle_common_properties($new_sheet, $sheet);
+ var $dst = $new_sheet.find('.oe_form_sheet');
+ $sheet.contents().appendTo($dst);
+ $sheet.before($new_sheet).remove();
+ this.process($new_sheet);
+ },
+ process_form: function($form) {
+ if ($form.find('> sheet').length === 0) {
+ $form.addClass('oe_form_nosheet');
+ }
+ var $new_form = this.render_element('FormRenderingForm', $form.getAttributes());
+ this.handle_common_properties($new_form, $form);
+ $form.contents().appendTo($new_form);
+ if ($form[0] === this.$form[0]) {
+ // If root element, replace it
+ this.$form = $new_form;
+ } else {
+ $form.before($new_form).remove();
+ }
+ this.process($new_form);
+ },
+ /*
+ * Used by direct <field> children of a <group> tag only
+ * This method will add the implicit <label...> for every field
+ * in the <group>
+ */
+ preprocess_field: function($field) {
+ var self = this;
+ var name = $field.attr('name'),
+ field_colspan = parseInt($field.attr('colspan'), 10),
+ field_modifiers = JSON.parse($field.attr('modifiers') || '{}');
+
+ if ($field.attr('nolabel') === '1')
+ return;
+ $field.attr('nolabel', '1');
+ var found = false;
+ this.$form.find('label[for="' + name + '"]').each(function(i ,el) {
+ $(el).parents().each(function(unused, tag) {
+ var name = tag.tagName.toLowerCase();
+ if (name === "field" || name in self.tags_registry.map)
+ found = true;
+ });
+ });
+ if (found)
+ return;
+
+ $label = $('<label/>').attr({
+ 'for' : name,
+ "modifiers": JSON.stringify({invisible: field_modifiers.invisible}),
+ "string": $field.attr('string'),
+ "help": $field.attr('help'),
+ "class": $field.attr('class'),
+ });
+ $label.insertBefore($field);
+ if (field_colspan > 1) {
+ $field.attr('colspan', field_colspan - 1);
+ }
+ return $label;
+ },
+ process_field: function($field) {
+ if ($field.parent().is('group')) {
+ // No implicit labels for normal fields, only for <group> direct children
+ var $label = this.preprocess_field($field);
+ if ($label) {
+ this.process($label);
+ }
+ }
+ this.fields_to_init.push($field);
+ return $field;
+ },
+ process_group: function($group) {
+ var self = this;
+ $group.children('field').each(function() {
+ self.preprocess_field($(this));
+ });
+ var $new_group = this.render_element('FormRenderingGroup', $group.getAttributes());
+ var $table;
+ if ($new_group.first().is('table.oe_form_group')) {
+ $table = $new_group;
+ } else if ($new_group.filter('table.oe_form_group').length) {
+ $table = $new_group.filter('table.oe_form_group').first();
+ } else {
+ $table = $new_group.find('table.oe_form_group').first();
+ }
+
+ var $tr, $td,
+ cols = parseInt($group.attr('col') || 2, 10),
+ row_cols = cols;
+
+ var children = [];
+ $group.children().each(function(a,b,c) {
+ var $child = $(this);
+ var colspan = parseInt($child.attr('colspan') || 1, 10);
+ var tagName = $child[0].tagName.toLowerCase();
+ var $td = $('<td/>').addClass('oe_form_group_cell').attr('colspan', colspan);
+ var newline = tagName === 'newline';
+
+ // Note FME: those classes are used in layout debug mode
+ if ($tr && row_cols > 0 && (newline || row_cols < colspan)) {
+ $tr.addClass('oe_form_group_row_incomplete');
+ if (newline) {
+ $tr.addClass('oe_form_group_row_newline');
+ }
+ }
+ if (newline) {
+ $tr = null;
+ return;
+ }
+ if (!$tr || row_cols < colspan) {
+ $tr = $('<tr/>').addClass('oe_form_group_row').appendTo($table);
+ row_cols = cols;
+ }
+ row_cols -= colspan;
+
+ // invisibility transfer
+ var field_modifiers = JSON.parse($child.attr('modifiers') || '{}');
+ var invisible = field_modifiers.invisible;
+ self.handle_common_properties($td, $("<dummy>").attr("modifiers", JSON.stringify({invisible: invisible})));
+
+ $tr.append($td.append($child));
+ children.push($child[0]);
+ });
+ if (row_cols && $td) {
+ $td.attr('colspan', parseInt($td.attr('colspan'), 10) + row_cols);
+ }
+ $group.before($new_group).remove();
+
+ $table.find('> tbody > tr').each(function() {
+ var to_compute = [],
+ row_cols = cols,
+ total = 100;
+ $(this).children().each(function() {
+ var $td = $(this),
+ $child = $td.children(':first');
+ switch ($child[0].tagName.toLowerCase()) {
+ case 'separator':
+ if ($child.attr('orientation') === 'vertical') {
+ $td.addClass('oe_vertical_separator').attr('width', '1');
+ $td.empty();
+ row_cols-= $td.attr('colspan') || 1;
+ total--;
+ }
+ break;
+ case 'label':
+ if ($child.attr('for')) {
+ $td.attr('width', '1%').addClass('oe_form_group_cell_label');
+ row_cols-= $td.attr('colspan') || 1;
+ total--;
+ }
+ break;
+ default:
+ var width = _.str.trim($child.attr('width') || ''),
+ iwidth = parseInt(width, 10);
+ if (iwidth) {
+ if (width.substr(-1) === '%') {
+ total -= iwidth;
+ width = iwidth + '%';
+ } else {
+ // Absolute width
+ $td.css('min-width', width + 'px');
+ }
+ $td.attr('width', width);
+ $child.removeAttr('width');
+ row_cols-= $td.attr('colspan') || 1;
+ } else {
+ to_compute.push($td);
+ }
+
+ }
+ });
+ if (row_cols) {
+ var unit = Math.floor(total / row_cols);
+ if (!$(this).is('.oe_form_group_row_incomplete')) {
+ _.each(to_compute, function($td, i) {
+ var width = parseInt($td.attr('colspan'), 10) * unit;
+ $td.attr('width', width + '%');
+ total -= width;
+ });
+ }
+ }
+ });
+ _.each(children, function(el) {
+ self.process($(el));
+ });
+ this.handle_common_properties($new_group, $group);
+ return $new_group;
+ },
+ process_notebook: function($notebook) {
+ var self = this;
+ var pages = [];
+ $notebook.find('> page').each(function() {
+ var $page = $(this);
+ var page_attrs = $page.getAttributes();
+ page_attrs.id = _.uniqueId('notebook_page_');
+ var $new_page = self.render_element('FormRenderingNotebookPage', page_attrs);
+ $page.contents().appendTo($new_page);
+ $page.before($new_page).remove();
+ var ic = self.handle_common_properties($new_page, $page).invisibility_changer;
+ page_attrs.__page = $new_page;
+ page_attrs.__ic = ic;
+ pages.push(page_attrs);
+
+ $new_page.children().each(function() {
+ self.process($(this));
+ });
+ });
+ var $new_notebook = this.render_element('FormRenderingNotebook', { pages : pages });
+ $notebook.contents().appendTo($new_notebook);
+ $notebook.before($new_notebook).remove();
+ self.process($($new_notebook.children()[0]));
+ //tabs and invisibility handling
+ $new_notebook.tabs();
+ _.each(pages, function(page, i) {
+ if (! page.__ic)
+ return;
+ page.__ic.on("change:effective_invisible", null, function() {
+ var current = $new_notebook.tabs("option", "selected");
+ if (! pages[current].__ic || ! pages[current].__ic.get("effective_invisible"))
+ return;
+ var first_visible = _.find(_.range(pages.length), function(i2) {
+ return (! pages[i2].__ic) || (! pages[i2].__ic.get("effective_invisible"));
+ });
+ if (first_visible !== undefined) {
+ $new_notebook.tabs('select', first_visible);
+ }
+ });
+ });
+
+ this.handle_common_properties($new_notebook, $notebook);
+ return $new_notebook;
+ },
+ process_separator: function($separator) {
+ var $new_separator = this.render_element('FormRenderingSeparator', $separator.getAttributes());
+ $separator.before($new_separator).remove();
+ this.handle_common_properties($new_separator, $separator);
+ return $new_separator;
+ },
+ process_label: function($label) {
+ var name = $label.attr("for"),
+ field_orm = this.fvg.fields[name];
+ var dict = {
+ string: $label.attr('string') || (field_orm || {}).string || '',
+ help: $label.attr('help') || (field_orm || {}).help || '',
+ _for: name ? _.uniqueId('oe-field-input-') : undefined,
+ };
+ var align = parseFloat(dict.align);
+ if (isNaN(align) || align === 1) {
+ align = 'right';
+ } else if (align === 0) {
+ align = 'left';
+ } else {
+ align = 'center';
+ }
+ dict.align = align;
+ var $new_label = this.render_element('FormRenderingLabel', dict);
+ $label.before($new_label).remove();
+ this.handle_common_properties($new_label, $label);
+ if (name) {
+ this.labels[name] = $new_label;
+ }
+ return $new_label;
+ },
+ handle_common_properties: function($new_element, $node) {
+ var str_modifiers = $node.attr("modifiers") || "{}"
+ var modifiers = JSON.parse(str_modifiers);
+ var ic = null;
+ if (modifiers.invisible !== undefined)
+ ic = new instance.web.form.InvisibilityChanger(this.view, this.view, modifiers.invisible, $new_element);
+ $new_element.addClass($node.attr("class") || "");
+ $new_element.attr('style', $node.attr('style'));
+ return {invisibility_changer: ic,};
+ },
});
-openerp.web.FormDialog = openerp.web.Dialog.extend({
+
+instance.web.form.FormRenderingEngineReadonly = instance.web.form.FormRenderingEngine.extend({
+ alter_field: function(field) {
+ field.set({"force_readonly": true});
+ },
+});
+
+instance.web.form.FormDialog = instance.web.Dialog.extend({
init: function(parent, options, view_id, dataset) {
this._super(parent, options);
this.dataset = dataset;
this.view = view;
this.node = node;
this.modifiers = JSON.parse(this.node.attrs.modifiers || '{}');
- this.always_invisible = (this.modifiers.invisible && this.modifiers.invisible === true);
- this.type = this.type || node.tag;
- this.element_name = this.element_name || this.type;
- this.element_class = [
- 'formview', this.view.view_id, this.element_name,
- this.view.widgets_counter++].join("_");
+ instance.web.form.InvisibilityChangerMixin.init.call(this, view, this.modifiers.invisible);
- this._super(view);
-
- this.view.widgets[this.element_class] = this;
- this.children = node.children;
- this.colspan = parseInt(node.attrs.colspan || 1, 10);
- this.decrease_max_width = 0;
-
- this.string = this.string || node.attrs.string;
- this.help = this.help || node.attrs.help;
- this.invisible = this.modifiers['invisible'] === true;
- this.classname = 'oe_form_' + this.type;
-
- this.align = parseFloat(this.node.attrs.align);
- if (isNaN(this.align) || this.align === 1) {
- this.align = 'right';
- } else if (this.align === 0) {
- this.align = 'left';
- } else {
- this.align = 'center';
- }
-
-
- this.width = this.node.attrs.width;
+ this.view.on("view_content_has_changed", this, this.process_modifiers);
},
- /**
- * Sets up blur/focus forwarding from DOM elements to a widget (`this`)
+ renderElement: function() {
+ this._super();
+ this.$element.addClass(this.node.attrs["class"] || "");
+ },
+ destroy: function() {
+ $.fn.tipsy.clear();
+ this._super.apply(this, arguments);
+ },
++ /**
++ * Sets up blur/focus forwarding from DOM elements to a widget (`this`)
+ *
+ * @param {jQuery} $e jQuery object of elements to bind focus/blur on
+ */
+ setupFocus: function ($e) {
+ var self = this;
+ $e.bind({
+ focus: function () { $(self).trigger('widget-focus'); },
+ blur: function () { $(self).trigger('widget-blur'); }
+ });
+ },
- start: function() {
- this.$element = this.view.$element.find(
- '.' + this.element_class.replace(/[^\r\n\f0-9A-Za-z_-]/g, "\\$&"));
- },
- stop: function() {
- this._super.apply(this, arguments);
- $.fn.tipsy.clear();
- },
process_modifiers: function() {
- var compute_domain = openerp.web.form.compute_domain;
+ var compute_domain = instance.web.form.compute_domain;
+ var to_set = {};
for (var a in this.modifiers) {
- this[a] = compute_domain(this.modifiers[a], this.view.fields);
+ if (!_.include(["invisible"], a)) {
+ var val = compute_domain(this.modifiers[a], this.view.fields);
+ to_set[a] = val;
+ }
}
- },
- update_dom: function() {
- this.$element.toggle(!this.invisible);
- },
- render: function() {
- var template = this.template;
- return QWeb.render(template, { "widget": this });
+ this.set(to_set);
},
do_attach_tooltip: function(widget, trigger, options) {
widget = widget || this;
},
start: function() {
this._super.apply(this, arguments);
- this.$element.click(this.on_click);
+ var $button = this.$element.find('button');
+ $button.click(this.on_click);
- if (this.help || openerp.connection.debug) {
+ if (this.node.attrs.help || instance.connection.debug) {
this.do_attach_tooltip();
}
+ this.setupFocus($button);
},
on_click: function() {
var self = this;
}
});
-openerp.web.form.WidgetLabel = openerp.web.form.Widget.extend({
- template: 'WidgetLabel',
- init: function(view, node) {
- this.element_name = 'label_' + node.attrs.name;
-
- this._super(view, node);
-
- if (this.node.tag == 'label' && !this.string && this.node.children.length) {
- this.string = this.node.children[0];
- this.align = 'left';
- }
-
- if (this.node.tag == 'label' && (this.align === 'left' || this.node.attrs.colspan || (this.string && this.string.length > 32))) {
- this.template = "WidgetParagraph";
- this.colspan = parseInt(this.node.attrs.colspan || 1, 10);
- // Widgets default to right-aligned, but paragraph defaults to
- // left-aligned
- if (isNaN(parseFloat(this.node.attrs.align))) {
- this.align = 'left';
- }
-
- this.multilines = this.string && _.str.lines(this.string).length > 1;
- } else {
- this.colspan = 1;
- this.width = '1%';
- this.decrease_max_width = 1;
- this.nowrap = true;
- }
- },
- render: function () {
- if (this['for'] && this.type !== 'label') {
- return QWeb.render(this.template, {widget: this['for']});
- }
- // Actual label widgets should not have a false and have type label
- return QWeb.render(this.template, {widget: this});
- },
- start: function() {
- this._super();
- var self = this;
- if (this['for'] && (this['for'].help || openerp.connection.debug)) {
- this.do_attach_tooltip(self['for']);
- }
- var $label = this.$element.find('label');
- $label.dblclick(function() {
- var widget = self['for'] || self;
- openerp.log(widget.element_class , widget);
- window.w = widget;
- });
- this.setupFocus($label);
- }
-});
+/**
+ * Interface to be implemented by fields.
+ *
+ * Properties:
+ * - readonly: boolean. If set to true the field should appear in readonly mode.
+ * - force_readonly: boolean, When it is true, the field should always appear
+ * in read only mode, no matter what the value of the "readonly" property can be.
+ * Events:
+ * - changed_value: triggered to inform the view to check on_changes
+ *
+ */
+instance.web.form.FieldInterface = {
+ /**
+ * Constructor takes 2 arguments:
+ * - field_manager: Implements FieldManagerMixin
+ * - node: the "<field>" node in json form
+ */
+ init: function(field_manager, node) {},
+ /**
+ * Called by the form view to indicate the value of the field.
+ *
+ * set_value() may return an object that can be passed to $.when() that represents the moment when
+ * the field has finished all operations necessary before the user can effectively use the widget.
+ *
+ * Multiple calls to set_value() can occur at any time and must be handled correctly by the implementation,
+ * regardless of any asynchronous operation currently running and the status of any promise that a
+ * previous call to set_value() could have returned.
+ *
+ * set_value() must be able, at any moment, to handle the syntax returned by the "read" method of the
+ * osv class in the OpenERP server as well as the syntax used by the set_value() (see below). It must
+ * also be able to handle any other format commonly used in the _defaults key on the models in the addons
+ * as well as any format commonly returned in a on_change. It must be able to autodetect those formats as
+ * no information is ever given to know which format is used.
+ */
+ set_value: function(value_) {},
+ /**
+ * Get the current value of the widget.
+ *
+ * Must always return a syntaxically correct value to be passed to the "write" method of the osv class in
+ * the OpenERP server, although it is not assumed to respect the constraints applied to the field.
+ * For example if the field is marqued as "required", a call to get_value() can return false.
+ *
+ * get_value() can also be called *before* a call to set_value() and, in that case, is supposed to
+ * return a defaut value according to the type of field.
+ *
+ * This method is always assumed to perform synchronously, it can not return a promise.
+ *
+ * If there was no user interaction to modify the value of the field, it is always assumed that
+ * get_value() return the same semantic value than the one passed in the last call to set_value(),
+ * altough the syntax can be different. This can be the case for type of fields that have a different
+ * syntax for "read" and "write" (example: m2o: set_value([0, "Administrator"]), get_value() => 0).
+ */
+ get_value: function() {},
+ /**
+ * Inform the current object of the id it should use to match a html <label> that exists somewhere in the
+ * view.
+ */
+ set_input_id: function(id) {},
+ /**
+ * Returns true if is_syntax_valid() returns true and the value is semantically
+ * valid too according to the semantic restrictions applied to the field.
+ */
+ is_valid: function() {},
+ /**
+ * Returns true if the field holds a value which is syntaxically correct, ignoring
+ * the potential semantic restrictions applied to the field.
+ */
+ is_syntax_valid: function() {},
+ /**
+ * Must set the focus on the field.
+ */
+ focus: function() {},
+};
-openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.form.Field# */{
+/**
+ * Abstract class for classes implementing FieldInterface.
+ *
+ * Properties:
+ * - effective_readonly: when it is true, the widget is displayed as readonly. Vary depending
+ * the values of the "readonly" property and the "force_readonly" property on the field manager.
+ * - value: useful property to hold the value of the field. By default, set_value() and get_value()
+ * set and retrieve the value property. Changing the value property also triggers automatically
+ * a 'changed_value' event that inform the view to trigger on_changes.
+ *
+ */
+instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.web.form.FieldInterface, {
/**
- * @constructs openerp.web.form.Field
- * @extends openerp.web.form.Widget
+ * @constructs instance.web.form.AbstractField
+ * @extends instance.web.form.FormWidget
*
- * @param view
+ * @param field_manager
* @param node
*/
- init: function(view, node) {
- this.name = node.attrs.name;
- this.value = undefined;
- view.fields[this.name] = this;
- view.fields_order.push(this.name);
- this.type = node.attrs.widget || view.fields_view.fields[node.attrs.name].type;
- this.element_name = "field_" + this.name + "_" + this.type;
-
- this._super(view, node);
-
- if (node.attrs.nolabel != '1' && this.colspan > 1) {
- this.colspan--;
- }
- this.field = view.fields_view.fields[node.attrs.name] || {};
- this.string = node.attrs.string || this.field.string;
- this.help = node.attrs.help || this.field.help;
- this.nolabel = (this.field.nolabel || node.attrs.nolabel) === '1';
- this.readonly = this.modifiers['readonly'] === true;
- this.required = this.modifiers['required'] === true;
- this.invalid = this.dirty = false;
-
- this.classname = 'oe_form_field_' + this.type;
+ init: function(field_manager, node) {
+ this._super(field_manager, node);
+ this.field_manager = field_manager;
+ this.name = this.node.attrs.name;
+ this.set({'value': false});
+ this.field = this.field_manager.get_field(this.name);
+ this.set({required: this.modifiers['required'] === true});
+
+ // some events to make the property "effective_readonly" sync automatically with "readonly" and
+ // "force_readonly"
+ this.set({"readonly": this.modifiers['readonly'] === true});
+ var test_effective_readonly = function() {
+ this.set({"effective_readonly": this.get("readonly") || !!this.get("force_readonly")});
+ };
+ this.on("change:readonly", this, test_effective_readonly);
+ this.on("change:force_readonly", this, test_effective_readonly);
+ _.bind(test_effective_readonly, this)();
+
+ this.on("change:value", this, function() {
+ if (! this._inhibit_on_change)
+ this.trigger('changed_value');
+ this._check_css_flags();
+ });
},
- start: function() {
- this._super.apply(this, arguments);
+ renderElement: function() {
+ var self = this;
+ this._super();
if (this.field.translate) {
- this.view.translatable_fields.push(this);
this.$element.addClass('oe_form_field_translatable');
- this.$element.find('.oe_field_translate').click(this.on_translate);
+ this.$element.find('.oe_field_translate').click(_.bind(function() {
+ this.field_manager.open_translate_dialog(this);
+ }, this));
}
- if (this.nolabel && openerp.connection.debug) {
- this.do_attach_tooltip(this, this.$element);
+ this.$label = this.view.$element.find('label[for=' + this.id_for_label + ']');
+ if (instance.connection.debug) {
+ this.do_attach_tooltip(this, this.$label[0] || this.$element);
+ this.$label.off('dblclick').on('dblclick', function() {
+ console.log("Field '%s' of type '%s' in View: %o", self.name, (self.node.attrs.widget || self.field.type), self.view);
+ window.w = self;
+ console.log("window.w =", window.w);
+ });
}
+ if (!this.disable_utility_classes) {
+ this.off("change:required", this, this._set_required);
+ this.on("change:required", this, this._set_required);
+ this._set_required();
+ }
+ this._check_visibility();
+ this._check_css_flags();
},
- set_value: function(value) {
- this.value = value;
- this.invalid = false;
- this.update_dom();
- this.on_value_changed();
- },
- set_value_from_ui: function() {
- this.on_value_changed();
- },
- on_value_changed: function() {
+ /**
+ * Private. Do not use.
+ */
+ _set_required: function() {
+ this.$element.toggleClass('oe_form_required', this.get("required"));
},
- on_translate: function() {
- this.view.open_translate_dialog(this);
+ set_value: function(value_) {
+ this._inhibit_on_change = true;
+ this.set({'value': value_});
+ this._inhibit_on_change = false;
},
get_value: function() {
- return this.value;
+ return this.get('value');
},
is_valid: function() {
- return this.is_syntax_valid() && (! this.get('required') || ! this.is_false());
- return !this.invalid;
++ return this.is_syntax_valid() && !(this.get('required') && this.is_false());
},
- is_dirty: function() {
- return this.dirty && !this.readonly;
+ is_syntax_valid: function() {
+ return true;
},
- get_on_change_value: function() {
- return this.get_value();
+ /**
+ * Method useful to implement to ease validity testing. Must return true if the current
+ * value is similar to false in OpenERP.
+ */
+ is_false: function() {
+ return this.get('value') === false;
},
- update_dom: function(show_invalid) {
- this._super.apply(this, arguments);
+ _check_css_flags: function(show_invalid) {
if (this.field.translate) {
- this.$element.find('.oe_field_translate').toggle(!!this.view.datarecord.id);
+ this.$element.find('.oe_field_translate').toggle(!this.field_manager.is_create_mode());
}
if (!this.disable_utility_classes) {
- this.$element.toggleClass('disabled', this.readonly);
- this.$element.toggleClass('required', this.required);
- if (show_invalid) {
- this.$element.toggleClass('invalid', !this.is_valid());
+ if (this.field_manager.get('display_invalid_fields')) {
+ this.$element.toggleClass('oe_form_invalid', !this.is_valid());
}
}
},
this.definition_options = JSON.parse(str);
}
return this.definition_options;
- }
+ },
+ set_input_id: function(id) {
+ this.id_for_label = id;
+ },
});
-openerp.web.form.FieldChar = openerp.web.form.Field.extend({
+/**
+ * A mixin to apply on any field that has to completely re-render when its readonly state
+ * switch.
+ */
+instance.web.form.ReinitializeFieldMixin = {
+ /**
+ * Default implementation of start(), use it or call explicitly initialize_field().
+ */
+ start: function() {
+ this._super();
+ this.initialize_field();
+ },
+ initialize_field: function() {
+ this.on("change:effective_readonly", this, function() {
+ this.destroy_content();
+ this.renderElement();
+ this.initialize_content();
+ this.render_value();
+ });
+ this.initialize_content();
+ this.render_value();
+ },
+ /**
+ * Called to destroy anything that could have been created previously, called before a
+ * re-initialization.
+ */
+ destroy_content: function() {},
+ /**
+ * Called to initialize the content.
+ */
+ initialize_content: function() {},
+ /**
+ * Called to render the value. Should also be explicitly called at the end of a set_value().
+ */
+ render_value: function() {},
+};
+
+instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
template: 'FieldChar',
- init: function (view, node) {
- this._super(view, node);
+ widget_class: 'oe_form_field_char',
+ init: function (field_manager, node) {
+ this._super(field_manager, node);
this.password = this.node.attrs.password === 'True' || this.node.attrs.password === '1';
},
- start: function() {
- this._super.apply(this, arguments);
+ initialize_content: function() {
+ var self = this;
- this.$element.find('input').change(function() {
+ var $input = this.$element.find('input');
- $input.change(this.on_ui_change);
++ $input.find('input').change(function() {
+ self.set({'value': instance.web.parse_value(self.$element.find('input').val(), self)});
+ });
+ this.setupFocus($input);
},
- set_value: function(value) {
- this._super.apply(this, arguments);
- var show_value = openerp.web.format_value(value, this, '');
- this.$element.find('input').val(show_value);
- return show_value;
- },
- update_dom: function() {
- this._super.apply(this, arguments);
- this.$element.find('input').prop('readonly', this.readonly);
+ set_value: function(value_) {
+ this._super(value_);
+ this.render_value();
},
- set_value_from_ui: function() {
- this.value = openerp.web.parse_value(this.$element.find('input').val(), this);
- this._super();
+ render_value: function() {
+ var show_value = instance.web.format_value(this.get('value'), this, '');
+ if (!this.get("effective_readonly")) {
+ this.$element.find('input').val(show_value);
+ } else {
+ if (this.password) {
+ show_value = new Array(show_value.length + 1).join('*');
+ }
+ this.$element.text(show_value);
+ }
},
- validate: function() {
- this.invalid = false;
- try {
- var value = openerp.web.parse_value(this.$element.find('input').val(), this, '');
- this.invalid = this.required && value === '';
- } catch(e) {
- this.invalid = true;
+ is_syntax_valid: function() {
+ if (!this.get("effective_readonly")) {
+ try {
+ var value_ = instance.web.parse_value(this.$element.find('input').val(), this, '');
+ return true;
+ } catch(e) {
+ return false;
+ }
}
+ return true;
},
- focus: function($element) {
- this._super($element || this.$element.find('input:first'));
+ is_false: function() {
+ return this.get('value') === '' || this._super();
+ },
+ focus: function() {
+ this.delay_focus(this.$element.find('input:first'));
}
});
-openerp.web.form.FieldID = openerp.web.form.FieldChar.extend({
- update_dom: function() {
- this._super.apply(this, arguments);
- this.$element.find('input').prop('readonly', true);
- }
+instance.web.form.FieldID = instance.web.form.FieldChar.extend({
+
});
-openerp.web.form.FieldEmail = openerp.web.form.FieldChar.extend({
+instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
template: 'FieldEmail',
- start: function() {
- this._super.apply(this, arguments);
+ initialize_content: function() {
+ this._super();
- this.$element.find('button').click(this.on_button_clicked);
+ var $button = this.$element.find('button');
+ $button.click(this.on_button_clicked);
+ this.setupFocus($button);
},
+ render_value: function() {
+ if (!this.get("effective_readonly")) {
+ this._super();
+ } else {
+ this.$element.find('a')
+ .attr('href', 'mailto:' + this.get('value'))
+ .text(this.get('value'));
+ }
+ },
on_button_clicked: function() {
- if (!this.value || !this.is_valid()) {
+ if (!this.get('value') || !this.is_syntax_valid()) {
this.do_warn("E-mail error", "Can't send email to invalid e-mail address");
} else {
- location.href = 'mailto:' + this.value;
+ location.href = 'mailto:' + this.get('value');
}
}
});
-openerp.web.form.FieldUrl = openerp.web.form.FieldChar.extend({
+instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
template: 'FieldUrl',
- start: function() {
- this._super.apply(this, arguments);
+ initialize_content: function() {
+ this._super();
- this.$element.find('button').click(this.on_button_clicked);
+ var $button = this.$element.find('button');
+ $button.click(this.on_button_clicked);
+ this.setupFocus($button);
},
+ render_value: function() {
+ if (!this.get("effective_readonly")) {
+ this._super();
+ } else {
+ var tmp = this.get('value');
+ var s = /(\w+):(.+)/.exec(tmp);
+ if (!s) {
+ tmp = "http://" + this.get('value');
+ }
+ this.$element.find('a').attr('href', tmp).text(tmp);
+ }
+ },
on_button_clicked: function() {
- if (!this.value) {
+ if (!this.get('value')) {
this.do_warn("Resource error", "This resource is empty");
} else {
- window.open(this.value);
+ var url = $.trim(this.get('value'));
+ if(/^www\./i.test(url))
+ url = 'http://'+url;
+ window.open(url);
}
}
});
showButtonPanel: true
});
this.$element.find('img.oe_datepicker_trigger').click(function() {
- if (!self.get("effective_readonly") && !self.picker('widget').is(':visible')) {
- self.picker('setDate', self.get('value') ? instance.web.auto_str_to_date(self.get('value')) : new Date());
- self.$input_picker.show();
- self.picker('show');
- self.$input_picker.hide();
- if (self.readonly || self.picker('widget').is(':visible')) {
++ if (self.get("effective_readonly") || self.picker('widget').is(':visible')) {
+ self.$input.focus();
+ return;
}
- self.picker('setDate', self.value ? openerp.web.auto_str_to_date(self.value) : new Date());
++ self.picker('setDate', self.value ? instance.web.auto_str_to_date(self.value) : new Date());
+ self.$input_picker.show();
+ self.picker('show');
+ self.$input_picker.hide();
});
this.set_readonly(false);
- this.value = false;
+ this.set({'value': false});
},
picker: function() {
return $.fn[this.jqueryui_object].apply(this.$input_picker, arguments);
},
- on_picker_select: function(text, instance) {
+ on_picker_select: function(text, instance_) {
var date = this.picker('getDate');
- this.$input.val(date ? this.format_client(date) : '').change();
+ this.$input
+ .val(date ? this.format_client(date) : '')
+ .change()
+ .focus();
},
- set_value: function(value) {
- this.value = value;
- this.$input.val(value ? this.format_client(value) : '');
+ set_value: function(value_) {
+ this.set({'value': value_});
+ this.$input.val(value_ ? this.format_client(value_) : '');
},
get_value: function() {
- return this.value;
+ return this.get('value');
},
- set_value_from_ui: function() {
- var value = this.$input.val() || false;
- this.value = this.parse_client(value);
+ set_value_from_ui_: function() {
+ var value_ = this.$input.val() || false;
+ this.set({'value': this.parse_client(value_)});
},
set_readonly: function(readonly) {
this.readonly = readonly;
type_of_date: "date"
});
-openerp.web.form.FieldDatetime = openerp.web.form.Field.extend({
- template: "EmptyComponent",
+instance.web.form.FieldDatetime = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
+ template: "FieldDatetime",
build_widget: function() {
- return new openerp.web.DateTimeWidget(this);
+ return new instance.web.DateTimeWidget(this);
},
- start: function() {
- var self = this;
- this._super.apply(this, arguments);
- this.datewidget = this.build_widget();
- this.datewidget.on_change.add_last(this.on_ui_change);
- this.datewidget.appendTo(this.$element);
- this.setupFocus(this.datewidget.$input);
+ destroy_content: function() {
+ if (this.datewidget) {
+ this.datewidget.destroy();
+ this.datewidget = undefined;
+ }
},
- set_value: function(value) {
- this._super(value);
- this.datewidget.set_value(value);
+ initialize_content: function() {
+ if (!this.get("effective_readonly")) {
+ this.datewidget = this.build_widget();
+ this.datewidget.on_change.add_last(_.bind(function() {
+ this.set({'value': this.datewidget.get_value()});
+ }, this));
+ this.datewidget.appendTo(this.$element);
++ this.setupFocus(this.datewidget.$input);
+ }
},
- get_value: function() {
- return this.datewidget.get_value();
+ set_value: function(value_) {
+ this._super(value_);
+ this.render_value();
},
- update_dom: function() {
- this._super.apply(this, arguments);
- this.datewidget.set_readonly(this.readonly);
+ render_value: function() {
+ if (!this.get("effective_readonly")) {
+ this.datewidget.set_value(this.get('value'));
+ } else {
+ this.$element.text(instance.web.format_value(this.get('value'), this, ''));
+ }
+ },
+ is_syntax_valid: function() {
+ if (!this.get("effective_readonly")) {
+ return this.datewidget.is_valid_();
+ }
+ return true;
},
- validate: function() {
- this.invalid = !this.datewidget.is_valid(this.required);
+ is_false: function() {
+ return this.get('value') === '' || this._super();
},
- focus: function($element) {
- this._super($element || this.datewidget.$input);
+ focus: function() {
+ if (this.datewidget && this.datewidget.$input)
+ this.delay_focus(this.datewidget.$input);
}
});
}
});
-openerp.web.form.FieldText = openerp.web.form.Field.extend({
+instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
template: 'FieldText',
- start: function() {
- this._super.apply(this, arguments);
- var $textarea = this.$element.find('textarea');
- $textarea.change(this.on_ui_change);
- this.resized = false;
- this.setupFocus($textarea);
- },
- set_value: function(value) {
- this._super.apply(this, arguments);
- var show_value = openerp.web.format_value(value, this, '');
- this.$element.find('textarea').val(show_value);
- if (!this.resized && this.view.options.resize_textareas) {
- this.do_resize(this.view.options.resize_textareas);
- this.resized = true;
+ initialize_content: function() {
+ this.$textarea = this.$element.find('textarea');
+ if (!this.get("effective_readonly")) {
+ this.$textarea.change(_.bind(function() {
+ this.set({'value': instance.web.parse_value(this.$textarea.val(), this)});
+ }, this));
+ } else {
+ this.$textarea.attr('disabled', 'disabled');
}
++ this.setupFocus(this.$textarea);
},
- update_dom: function() {
+ set_value: function(value_) {
this._super.apply(this, arguments);
- this.$element.find('textarea').prop('readonly', this.readonly);
+ this.render_value();
},
- set_value_from_ui: function() {
- this.value = openerp.web.parse_value(this.$element.find('textarea').val(), this);
- this._super();
+ render_value: function() {
+ var show_value = instance.web.format_value(this.get('value'), this, '');
+ this.$textarea.val(show_value);
+ if (show_value && this.view.options.resize_textareas) {
+ this.do_resize(this.view.options.resize_textareas);
+ }
},
- validate: function() {
- this.invalid = false;
- try {
- var value = openerp.web.parse_value(this.$element.find('textarea').val(), this, '');
- this.invalid = this.required && value === '';
- } catch(e) {
- this.invalid = true;
+ is_syntax_valid: function() {
+ if (!this.get("effective_readonly")) {
+ try {
+ var value_ = instance.web.parse_value(this.$textarea.val(), this, '');
+ return true;
+ } catch(e) {
+ return false;
+ }
}
+ return true;
+ },
+ is_false: function() {
+ return this.get('value') === '' || this._super();
},
focus: function($element) {
- this._super($element || this.$element.find('textarea:first'));
+ this.delay_focus(this.$textarea);
},
do_resize: function(max_height) {
max_height = parseInt(max_height, 10);
$div.remove();
$input.height(new_height);
},
- reset: function() {
- this.resized = false;
- }
});
-openerp.web.form.FieldBoolean = openerp.web.form.Field.extend({
+instance.web.form.FieldBoolean = instance.web.form.AbstractField.extend({
template: 'FieldBoolean',
start: function() {
- var self = this;
- this._super.apply(this, arguments);
- var $input = this.$element.find('input');
- $input.click(self.on_ui_change);
- this.setupFocus($input);
- },
- set_value: function(value) {
this._super.apply(this, arguments);
- this.$element.find('input')[0].checked = value;
- },
- set_value_from_ui: function() {
- this.value = this.$element.find('input').is(':checked');
- this._super();
+ this.$checkbox = $("input", this.$element);
++ this.setupFocus(this.$checkbox);
+ this.$element.click(_.bind(function() {
+ this.set({'value': this.$checkbox.is(':checked')});
+ }, this));
+ var check_readonly = function() {
+ this.$checkbox.prop('disabled', this.get("effective_readonly"));
+ };
+ this.on("change:effective_readonly", this, check_readonly);
+ _.bind(check_readonly, this)();
},
- update_dom: function() {
+ set_value: function(value_) {
this._super.apply(this, arguments);
- this.$element.find('input').prop('disabled', this.readonly);
+ this.$checkbox[0].checked = value_;
},
- focus: function($element) {
- this._super($element || this.$element.find('input:first'));
+ focus: function() {
+ this.delay_focus(this.$checkbox);
}
});
// changing the selected value), takes the action as validating the
// row
var ischanging = false;
- this.$element.find('select')
- this._super.apply(this, arguments);
- var $select = this.$element.find('select');
- $select
- .change(this.on_ui_change)
++ var $select = this.$element.find('select')
+ .change(_.bind(function() {
+ this.set({'value': this.values[this.$element.find('select')[0].selectedIndex][0]});
+ }, this))
.change(function () { ischanging = true; })
.click(function () { ischanging = false; })
.keyup(function (e) {
e.stopPropagation();
ischanging = false;
});
+ this.setupFocus($select);
},
- set_value: function(value) {
- value = value === null ? false : value;
- value = value instanceof Array ? value[0] : value;
- this._super(value);
- var index = 0;
- for (var i = 0, ii = this.values.length; i < ii; i++) {
- if (this.values[i][0] === value) index = i;
+ set_value: function(value_) {
+ value_ = value_ === null ? false : value_;
+ value_ = value_ instanceof Array ? value_[0] : value_;
+ this._super(value_);
+ this.render_value();
+ },
+ render_value: function() {
+ if (!this.get("effective_readonly")) {
+ var index = 0;
+ for (var i = 0, ii = this.values.length; i < ii; i++) {
+ if (this.values[i][0] === this.get('value')) index = i;
+ }
+ this.$element.find('select')[0].selectedIndex = index;
+ } else {
+ var self = this;
+ var option = _(this.values)
+ .detect(function (record) { return record[0] === self.get('value'); });
+ this.$element.text(option ? option[1] : this.values[0][1]);
}
- this.$element.find('select')[0].selectedIndex = index;
- },
- set_value_from_ui: function() {
- this.value = this.values[this.$element.find('select')[0].selectedIndex][0];
- this._super();
- },
- update_dom: function() {
- this._super.apply(this, arguments);
- this.$element.find('select').prop('disabled', this.readonly);
},
- validate: function() {
- var value = this.values[this.$element.find('select')[0].selectedIndex];
- this.invalid = !(value && !(this.required && value[0] === false));
+ is_syntax_valid: function() {
+ if (this.get("effective_readonly")) {
+ return true;
+ }
+ var value_ = this.values[this.$element.find('select')[0].selectedIndex];
+ return !! value_;
},
- focus: function($element) {
- this._super($element || this.$element.find('select:first'));
+ focus: function() {
+ this.delay_focus(this.$element.find('select:first'));
}
});
});
})();
-openerp.web.form.dialog = function(content, options) {
- options = _.extend({
- width: '90%',
- height: 'auto',
- min_width: '800px'
- }, options || {});
- var dialog = new openerp.web.Dialog(null, options, content).open();
- return dialog.$element;
+/**
+ * A mixin containing some useful methods to handle completion inputs.
+ */
+instance.web.form.CompletionFieldMixin = {
+ init: function() {
+ this.limit = 7;
+ this.orderer = new instance.web.DropMisordered();
+ },
+ /**
+ * Call this method to search using a string.
+ */
+ get_search_result: function(search_val) {
+ var self = this;
+
+ var dataset = new instance.web.DataSet(this, this.field.relation, self.build_context());
+ var blacklist = this.get_search_blacklist();
+
+ return this.orderer.add(dataset.name_search(
+ search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
+ 'ilike', this.limit + 1)).pipe(function(data) {
+ self.last_search = data;
+ // possible selections for the m2o
+ var values = _.map(data, function(x) {
+ return {
+ label: _.str.escapeHTML(x[1]),
+ value:x[1],
+ name:x[1],
+ id:x[0]
+ };
+ });
+
+ // search more... if more results that max
+ if (values.length > self.limit) {
+ values = values.slice(0, self.limit);
+ values.push({label: _t("<em>Â Â Â Search More...</em>"), action: function() {
+ dataset.name_search(search_val, self.build_domain(), 'ilike'
+ , false, function(data) {
+ self._search_create_popup("search", data);
+ });
+ }});
+ }
+ // quick create
+ var raw_result = _(data.result).map(function(x) {return x[1];});
+ if (search_val.length > 0 && !_.include(raw_result, search_val)) {
+ values.push({label: _.str.sprintf(_t('<em>Â Â Â Create "<strong>%s</strong>"</em>'),
+ $('<span />').text(search_val).html()), action: function() {
+ self._quick_create(search_val);
+ }});
+ }
+ // create...
+ values.push({label: _t("<em>Â Â Â Create and Edit...</em>"), action: function() {
+ self._search_create_popup("form", undefined, {});
+ }});
+
+ return values;
+ });
+ },
+ get_search_blacklist: function() {
+ return [];
+ },
+ _quick_create: function(name) {
+ var self = this;
+ var slow_create = function () {
+ self._search_create_popup("form", undefined, {"default_name": name});
+ };
+ if (self.get_definition_options().quick_create === undefined || self.get_definition_options().quick_create) {
+ new instance.web.DataSet(this, this.field.relation, self.build_context())
+ .name_create(name, function(data) {
+ self.add_id(data[0]);
+ }).fail(function(error, event) {
+ event.preventDefault();
+ slow_create();
+ });
+ } else
+ slow_create();
+ },
+ // all search/create popup handling
+ _search_create_popup: function(view, ids, context) {
+ var self = this;
+ var pop = new instance.web.form.SelectCreatePopup(this);
+ pop.select_element(
+ self.field.relation,
+ {
+ title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + (this.string || this.name),
+ initial_ids: ids ? _.map(ids, function(x) {return x[0]}) : undefined,
+ initial_view: view,
+ disable_multiple_selection: true
+ },
+ self.build_domain(),
+ new instance.web.CompoundContext(self.build_context(), context || {})
+ );
+ pop.on_select_elements.add(function(element_ids) {
+ self.add_id(element_ids[0]);
++ self.focus();
+ });
+ },
+ /**
+ * To implement.
+ */
+ add_id: function(id) {},
};
-openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
- template: 'FieldMany2One',
- init: function(view, node) {
- this._super(view, node);
- this.limit = 7;
- this.value = null;
- this.cm_id = _.uniqueId('m2o_cm_');
+instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instance.web.form.CompletionFieldMixin, instance.web.form.ReinitializeFieldMixin, {
+ template: "FieldMany2One",
+ init: function(field_manager, node) {
+ this._super(field_manager, node);
+ instance.web.form.CompletionFieldMixin.init.call(this);
+ this.set({'value': false});
+ this.display_value = {};
this.last_search = [];
- this.tmp_value = undefined;
+ this.floating = false;
+ this.inhibit_on_change = false;
},
start: function() {
this._super();
+ instance.web.form.ReinitializeFieldMixin.start.call(this);
+ this.on("change:value", this, function() {
+ this.floating = false;
+ this.render_value();
+ });
+ },
+ initialize_content: function() {
+ if (!this.get("effective_readonly"))
+ this.render_editable();
+ this.render_value();
+ },
+ render_editable: function() {
var self = this;
this.$input = this.$element.find("input");
+
+ self.$input.tipsy({
+ title: function() {
+ return "No element was selected, you should create or select one from the dropdown list.";
+ },
+ trigger:'manual',
+ fade: true,
+ });
+
this.$drop_down = this.$element.find(".oe-m2o-drop-down-button");
- this.$menu_btn = this.$element.find(".oe-m2o-cm-button");
-
- // context menu
- var init_context_menu_def = $.Deferred().then(function(e) {
- var rdataset = new openerp.web.DataSetStatic(self, "ir.values", self.build_context());
- rdataset.call("get", ['action', 'client_action_relate',
- [[self.field.relation, false]], false, rdataset.get_context()], false, 0)
- .then(function(result) {
- self.related_entries = result;
-
- var $cmenu = $("#" + self.cm_id);
- $cmenu.append(QWeb.render("FieldMany2One.context_menu", {widget: self}));
- var bindings = {};
- bindings[self.cm_id + "_search"] = function() {
- if (self.readonly)
- return;
- self._search_create_popup("search");
- };
- bindings[self.cm_id + "_create"] = function() {
- if (self.readonly)
- return;
- self._search_create_popup("form");
- };
- bindings[self.cm_id + "_open"] = function() {
- if (!self.value) {
- self.focus();
- return;
- }
- var pop = new openerp.web.form.FormOpenPopup(self.view);
- pop.show_element(
- self.field.relation,
- self.value[0],
- self.build_context(),
- {
- title: _t("Open: ") + (self.string || self.name)
- }
- );
- pop.on_write_completed.add_last(function() {
- self.set_value(self.value[0]);
- self.focus();
- });
- };
- _.each(_.range(self.related_entries.length), function(i) {
- bindings[self.cm_id + "_related_" + i] = function() {
- self.open_related(self.related_entries[i]);
- };
- });
- var cmenu = self.$menu_btn.contextMenu(self.cm_id, {'noRightClick': true,
- bindings: bindings, itemStyle: {"color": ""},
- onContextMenu: function() {
- if(self.value) {
- $("#" + self.cm_id + " .oe_m2o_menu_item_mandatory").removeClass("oe-m2o-disabled-cm");
- } else {
- $("#" + self.cm_id + " .oe_m2o_menu_item_mandatory").addClass("oe-m2o-disabled-cm");
- }
- if (!self.readonly) {
- $("#" + self.cm_id + " .oe_m2o_menu_item_noreadonly").removeClass("oe-m2o-disabled-cm");
- } else {
- $("#" + self.cm_id + " .oe_m2o_menu_item_noreadonly").addClass("oe-m2o-disabled-cm");
- }
- return true;
- }, menuStyle: {width: "200px"}
- });
- $.async_when().then(function() {self.$menu_btn.trigger(e);});
+ this.$follow_button = $(".oe-m2o-cm-button", this.$element);
+
+ this.$follow_button.click(function() {
+ if (!self.get('value')) {
++ self.focus();
+ return;
+ }
+ var pop = new instance.web.form.FormOpenPopup(self.view);
+ pop.show_element(
+ self.field.relation,
+ self.get("value"),
+ self.build_context(),
+ {
+ title: _t("Open: ") + (self.string || self.name)
+ }
+ );
+ pop.on_write_completed.add_last(function() {
+ self.display_value = {};
+ self.render_value();
++ self.focus();
});
});
- var ctx_callback = function(e) {init_context_menu_def.resolve(e); e.preventDefault()};
- this.$menu_btn.click(ctx_callback);
// some behavior for input
this.$input.keyup(function() {
}
});
this.$drop_down.click(function() {
- if (self.readonly)
- return;
if (self.$input.autocomplete("widget").is(":visible")) {
self.$input.autocomplete("close");
+ self.$input.focus();
} else {
- if (self.value) {
+ if (self.get("value") && ! self.floating) {
self.$input.autocomplete("search", "");
} else {
self.$input.autocomplete("search");
}
- self.$input.focus();
}
});
+ var tip_def = $.Deferred();
+ var untip_def = $.Deferred();
+ var tip_delay = 200;
+ var tip_duration = 3000;
var anyoneLoosesFocus = function() {
- if (!self.$input.is(":focus") &&
- !self.$input.autocomplete("widget").is(":visible") &&
- !self.value) {
- if (self.value === undefined && self.last_search.length > 0) {
- self._change_int_ext_value(self.last_search[0]);
+ var used = false;
+ if (self.floating) {
+ if (self.last_search.length > 0) {
+ if (self.last_search[0][0] != self.get("value")) {
+ self.display_value = {};
+ self.display_value["" + self.last_search[0][0]] = self.last_search[0][1];
+ self.set({value: self.last_search[0][0]});
+ } else {
+ used = true;
+ self.render_value();
+ }
} else {
- self._change_int_ext_value(null);
+ used = true;
+ self.set({value: false});
+ self.render_value();
}
+ self.floating = false;
+ }
+ if (used) {
+ tip_def.reject();
+ untip_def.reject();
+ tip_def = $.Deferred();
+ tip_def.then(function() {
+ self.$input.tipsy("show");
+ });
+ setTimeout(function() {
+ tip_def.resolve();
+ untip_def.reject();
+ untip_def = $.Deferred();
+ untip_def.then(function() {
+ self.$input.tipsy("hide");
+ });
+ setTimeout(function() {untip_def.resolve();}, tip_duration);
+ }, tip_delay);
+ } else {
+ tip_def.reject();
}
};
this.$input.focusout(anyoneLoosesFocus);
}
isSelecting = false;
});
-
- this.setupFocus(this.$input.add(this.$menu_btn));
++ this.setupFocus(this.$input.add(this.$follow_button));
},
- // autocomplete component content handling
- get_search_result: function(request, response) {
- var search_val = request.term;
- var self = this;
- if (this.abort_last) {
- this.abort_last();
- delete this.abort_last;
- }
- var dataset = new openerp.web.DataSetStatic(this, this.field.relation, self.build_context());
-
- dataset.name_search(search_val, self.build_domain(), 'ilike',
- this.limit + 1, function(data) {
- self.last_search = data;
- // possible selections for the m2o
- var values = _.map(data, function(x) {
- return {
- label: _.str.escapeHTML(x[1]),
- value:x[1],
- name:x[1],
- id:x[0]
- };
- });
-
- // search more... if more results that max
- if (values.length > self.limit) {
- var open_search_popup = function(data) {
- self._change_int_value(null);
- self._search_create_popup("search", data);
- };
- values = values.slice(0, self.limit);
- values.push({label: _t("<em>Â Â Â Search More...</em>"), action: function() {
- if (!search_val) {
- // search optimisation - in case user didn't enter any text we
- // do not need to prefilter records; for big datasets (ex: more
- // that 10.000 records) calling name_search() could be very very
- // expensive!
- open_search_popup();
- return;
- }
- dataset.name_search(search_val, self.build_domain(),
- 'ilike', false, open_search_popup);
- }});
- }
- // quick create
- var raw_result = _(data.result).map(function(x) {return x[1];});
- if (search_val.length > 0 &&
- !_.include(raw_result, search_val) &&
- (!self.value || search_val !== self.value[1])) {
- values.push({label: _.str.sprintf(_t('<em>Â Â Â Create "<strong>%s</strong>"</em>'),
- $('<span />').text(search_val).html()), action: function() {
- self._quick_create(search_val);
- }});
- }
- // create...
- values.push({label: _t("<em>Â Â Â Create and Edit...</em>"), action: function() {
- self._change_int_value(null);
- self._search_create_popup("form", undefined, {"default_name": search_val});
- }});
-
- response(values);
- });
- this.abort_last = dataset.abort_last;
- },
- _quick_create: function(name) {
- var self = this;
- var slow_create = function () {
- self._change_int_value(null);
- self._search_create_popup("form", undefined, {"default_name": name});
- };
- if (self.get_definition_options().quick_create === undefined || self.get_definition_options().quick_create) {
- var dataset = new openerp.web.DataSetStatic(this, this.field.relation, self.build_context());
- dataset.name_create(name, function(data) {
- self._change_int_ext_value(data);
- }).fail(function(error, event) {
- event.preventDefault();
- slow_create();
- });
- } else
- slow_create();
- },
- // all search/create popup handling
- _search_create_popup: function(view, ids, context) {
+ render_value: function(no_recurse) {
var self = this;
- var pop = new openerp.web.form.SelectCreatePopup(this);
- pop.select_element(
- self.field.relation,
- {
- title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + (this.string || this.name),
- initial_ids: ids ? _.map(ids, function(x) {return x[0]}) : undefined,
- initial_view: view,
- disable_multiple_selection: true
- },
- self.build_domain(),
- new openerp.web.CompoundContext(self.build_context(), context || {})
- );
- pop.on_select_elements.add(function(element_ids) {
- var dataset = new openerp.web.DataSetStatic(self, self.field.relation, self.build_context());
- dataset.name_get([element_ids[0]], function(data) {
- self._change_int_ext_value(data[0]);
- self.focus();
- });
- });
- },
- _change_int_ext_value: function(value) {
- this._change_int_value(value);
- this.$input.val(this.value ? this.value[1] : "");
- },
- _change_int_value: function(value) {
- this.value = value;
- var back_orig_value = this.original_value;
- if (this.value === null || this.value) {
- this.original_value = this.value;
+ if (! this.get("value")) {
+ this.display_string("");
+ return;
}
- if (back_orig_value === undefined) { // first use after a set_value()
+ var display = this.display_value["" + this.get("value")];
+ if (display) {
+ this.display_string(display);
return;
}
- if (this.value !== undefined && ((back_orig_value ? back_orig_value[0] : null)
- !== (this.value ? this.value[0] : null))) {
- this.on_ui_change();
+ if (! no_recurse) {
+ var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context());
+ dataset.name_get([self.get("value")], function(data) {
+ self.display_value["" + self.get("value")] = data[0][1];
+ self.render_value(true);
+ });
}
},
- set_value: function(value) {
- value = value || null;
- this.invalid = false;
+ display_string: function(str) {
var self = this;
- this.tmp_value = value;
- self.update_dom();
- self.on_value_changed();
- var real_set_value = function(rval) {
- self.tmp_value = undefined;
- self.value = rval;
- self.original_value = undefined;
- self._change_int_ext_value(rval);
- };
- if (value && !(value instanceof Array)) {
- // name_get in a m2o does not use the context of the field
- var dataset = new openerp.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context());
- dataset.name_get([value], function(data) {
- real_set_value(data[0]);
- }).fail(function() {self.tmp_value = undefined;});
+ if (!this.get("effective_readonly")) {
+ this.$input.val(str);
} else {
- $.async_when().then(function() {real_set_value(value);});
- }
- },
- get_value: function() {
- if (this.tmp_value !== undefined) {
- if (this.tmp_value instanceof Array) {
- return this.tmp_value[0];
- }
- return this.tmp_value ? this.tmp_value : false;
+ this.$element.find('a')
+ .unbind('click')
+ .text(str)
+ .click(function () {
+ self.do_action({
+ type: 'ir.actions.act_window',
+ res_model: self.field.relation,
+ res_id: self.get("value"),
+ context: self.build_context(),
+ views: [[false, 'form']],
+ target: 'current'
+ });
+ return false;
+ });
}
- if (this.value === undefined)
- return this.original_value ? this.original_value[0] : false;
- return this.value ? this.value[0] : false;
},
- validate: function() {
- this.invalid = false;
- var val = this.tmp_value !== undefined ? this.tmp_value : this.value;
- if (val === null) {
- this.invalid = this.required;
+ set_value: function(value_) {
+ var self = this;
+ if (value_ instanceof Array) {
+ this.display_value = {};
+ this.display_value["" + value_[0]] = value_[1];
+ value_ = value_[0];
}
+ value_ = value_ || false;
+ this.inhibit_on_change = true;
+ this._super(value_);
+ this.inhibit_on_change = false;
},
- open_related: function(related) {
- var self = this;
- if (!self.value)
- return;
- var additional_context = {
- active_id: self.value[0],
- active_ids: [self.value[0]],
- active_model: self.field.relation
- };
- self.rpc("/web/action/load", {
- action_id: related[2].id,
- context: additional_context
- }, function(result) {
- result.result.context = _.extend(result.result.context || {}, additional_context);
- self.do_action(result.result);
- });
+ add_id: function(id) {
+ this.display_value = {};
+ this.set({value: id});
},
- focus: function ($element) {
- this._super($element || this.$input);
+ is_false: function() {
+ return ! this.get("value");
},
- update_dom: function() {
- this._super.apply(this, arguments);
- this.$input.prop('readonly', this.readonly);
+ focus: function () {
+ this.delay_focus(this.$input);
}
});
}
});
-openerp.web.form.One2ManyListView = openerp.web.ListView.extend({
+instance.web.form.One2ManyListView = instance.web.ListView.extend({
_template: 'One2Many.listview',
+ init: function (parent, dataset, view_id, options) {
+ this._super(parent, dataset, view_id, _.extend(options || {}, {
- ListType: openerp.web.form.One2ManyList
++ ListType: instance.web.form.One2ManyList
+ }));
+ },
+ is_valid: function () {
+ var form;
+ // A list not being edited is always valid
+ if (!(form = this.first_edition_form())) {
+ return true;
+ }
+ // If the form has not been modified, the view can only be valid
+ // NB: is_dirty will also be set on defaults/onchanges/whatever?
+ // oe_form_dirty seems to only be set on actual user actions
+ if (!form.$element.is('.oe_form_dirty')) {
+ return true;
+ }
+
+ // Otherwise validate internal form
+ return _(form.fields).chain()
+ .invoke(function () {
- this.validate();
- this.update_dom(true);
++ this._check_css_flag();
+ return this.is_valid();
+ })
+ .all(_.identity)
+ .value();
+ },
+ first_edition_form: function () {
+ var get_form = function (group_or_list) {
+ if (group_or_list.edition) {
+ return group_or_list.edition_form;
+ }
+ return _(group_or_list.children).chain()
+ .map(get_form)
+ .compact()
+ .first()
+ .value();
+ };
+ return get_form(this.groups);
+ },
do_add_record: function () {
if (this.options.editable) {
this._super.apply(this, arguments);
});
},
do_button_action: function (name, id, callback) {
+ var _super = _.bind(this._super, this);
+
+ this.o2m.view.do_save().then(function () {
+ _super(name, id, callback);
+ });
+ }
+ });
-openerp.web.form.One2ManyList = openerp.web.ListView.List.extend({
++instance.web.form.One2ManyList = instance.web.ListView.List.extend({
+ KEY_RETURN: 13,
+ // blurring caused by hitting the [Return] key, should skip the
+ // autosave-on-blur and let the handler for [Return] do its thing
+ __return_blur: false,
+ render_row_as_form: function () {
var self = this;
- var def = $.Deferred().then(callback).then(function() {self.o2m.view.reload();});
- return this._super(name, id, _.bind(def.resolve, def));
+ return this._super.apply(this, arguments).then(function () {
+ // Replace the "Save Row" button with "Cancel Edition"
+ self.edition_form.$element
+ .undelegate('button.oe-edit-row-save', 'click')
+ .delegate('button.oe-edit-row-save', 'click', function () {
+ self.cancel_pending_edition();
+ });
+
+ // Overload execute_action on the edition form to perform a simple
+ // reload_record after the action is done, rather than fully
+ // reload the parent view (or something)
+ var _execute_action = self.edition_form.do_execute_action;
+ self.edition_form.do_execute_action = function (action, dataset, record_id, _callback) {
+ return _execute_action.call(this, action, dataset, record_id, function () {
+ self.view.reload_record(
+ self.view.records.get(record_id));
+ });
+ };
+
+ $(self.edition_form).bind('form-blur', function () {
+ if (self.__return_blur) {
+ delete self.__return_blur;
+ return;
+ }
+ if (!self.edition_form.widget_is_stopped) {
+ self.view.ensure_saved();
+ }
+ });
+ });
+ },
+ on_row_keyup: function (e) {
+ if (e.which === this.KEY_RETURN) {
+ this.__return_blur = true;
+ }
+ this._super(e);
}
});
this.is_setted.resolve();
},
get_value: function() {
- return [commands.replace_with(this.dataset.ids)];
- },
- validate: function() {
- this.invalid = this.required && _(this.dataset.ids).isEmpty();
+ return [commands.replace_with(this.get('value'))];
},
- is_readonly: function() {
- return this.readonly || this.force_readonly;
++
++ is_false: function () {
++ return _(this.dataset.ids).isEmpty();
+ },
load_view: function() {
var self = this;
- this.list_view = new openerp.web.form.Many2ManyListView(this, this.dataset, false, {
- 'addable': self.is_readonly() ? null : _t("Add"),
- 'deletable': self.is_readonly() ? false : true,
+ this.list_view = new instance.web.form.Many2ManyListView(this, this.dataset, false, {
+ 'addable': self.get("effective_readonly") ? null : _t("Add"),
+ 'deletable': self.get("effective_readonly") ? false : true,
'selectable': self.multi_selection,
- 'isClarkGable': self.is_readonly() ? false : true
+ 'sortable': false,
+ 'reorderable': false,
});
var embedded = (this.field.views || {}).tree;
if (embedded) {
this.m2o.$element.toggle(sel !== false);
}
},
- start: function() {
+ destroy_content: function() {
+ if (this.selection) {
+ this.selection.destroy();
+ this.selection = undefined;
+ }
+ if (this.m2o) {
+ this.m2o.destroy();
+ this.m2o = undefined;
+ }
+ },
+ initialize_content: function() {
+ var self = this;
- this._super();
+ this.selection = new instance.web.form.FieldSelection(this, { attrs: {
+ name: 'selection'
+ }});
+ this.selection.view = this.view;
+ this.selection.set({force_readonly: this.get('effective_readonly')});
+ this.selection.on("change:value", this, this.on_selection_changed);
+ this.selection.$element = $(".oe_form_view_reference_selection", this.$element);
+ this.selection.renderElement();
this.selection.start();
+
+ this.m2o = new instance.web.form.FieldMany2One(this, { attrs: {
+ name: 'm2o'
+ }});
+ this.m2o.view = this.view;
+ this.m2o.set({force_readonly: this.get("effective_readonly")});
+ this.m2o.on("change:value", this, this.data_changed);
+ this.m2o.$element = $(".oe_form_view_reference_m2o", this.$element);
+ this.m2o.renderElement();
this.m2o.start();
+ $(this.selection).add($(this.m2o)).bind({
+ 'focus': function () { $(self).trigger('widget-focus'); },
+ 'blur': function () { $(self).trigger('widget-blur'); }
- })
++ });
},
- is_valid: function() {
- return this.required === false || typeof(this.get_value()) === 'string';
+ is_false: function() {
+ return typeof(this.get_value()) !== 'string';
},
- is_dirty: function() {
- return this.selection.is_dirty() || this.m2o.is_dirty();
+ set_value: function(value_) {
+ this._super(value_);
+ this.render_value();
},
- set_value: function(value) {
- this._super(value);
+ render_value: function() {
this.reference_ready = false;
var vals = [], sel_val, m2o_val;
- if (typeof(value) === 'string') {
- vals = value.split(',');
+ if (typeof(this.get('value')) === 'string') {
+ vals = this.get('value').split(',');
}
sel_val = vals[0] || false;
- m2o_val = vals[1] ? parseInt(vals[1], 10) : false;
- this.selection.set_value(sel_val);
+ m2o_val = vals[1] ? parseInt(vals[1], 10) : vals[1];
+ if (!this.get("effective_readonly")) {
+ this.selection.set_value(sel_val);
+ }
this.m2o.field.relation = sel_val;
this.m2o.set_value(m2o_val);
- this.m2o.$element.toggle(sel_val !== false);
this.reference_ready = true;
},
- get_value: function() {
+ data_changed: function() {
var model = this.selection.get_value(),
id = this.m2o.get_value();
if (typeof(model) === 'string' && typeof(id) === 'number') {
},
on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
},
- on_save_as: function() {
- $.blockUI();
- this.session.get_file({
- url: '/web/binary/saveas_ajax',
- data: {data: JSON.stringify({
- model: this.view.dataset.model,
- id: (this.view.datarecord.id || ''),
- field: this.name,
- filename_field: (this.node.attrs.filename || ''),
- context: this.view.dataset.get_context()
- })},
- complete: $.unblockUI,
- error: openerp.webclient.crashmanager.on_rpc_error
- });
+ on_save_as: function(ev) {
+ var value = this.get('value');
+ if (!value) {
+ this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));
+ ev.stopPropagation();
+ } else if (this._dirty_flag) {
+ var link = this.$('.oe_binary_file_save_data')[0];
+ link.download = this.filename || "download.bin"; // Works on only on Google Chrome
+ //link.target = '_blank';
+ link.href = "data:application/octet-stream;base64," + value;
+ } else {
+ $.blockUI();
+ this.session.get_file({
+ url: '/web/binary/saveas_ajax',
+ data: {data: JSON.stringify({
+ model: this.view.dataset.model,
+ id: (this.view.datarecord.id || ''),
+ field: this.name,
+ filename_field: (this.node.attrs.filename || ''),
+ context: this.view.dataset.get_context()
+ })},
+ complete: $.unblockUI,
+ error: instance.webclient.crashmanager.on_rpc_error
+ });
+ ev.stopPropagation();
+ return false;
+ }
},
+ set_filename: function(value) {
+ var filename = this.node.attrs.filename;
+ if (this.view.fields[filename]) {
+ this.view.fields[filename].set_value(value);
+ this.view.fields[filename].on_ui_change();
+ }
+ },
on_clear: function() {
- if (this.value !== false) {
- this.value = false;
+ if (this.get('value') !== false) {
this.binary_value = false;
- this.on_ui_change();
+ this.set({'value': false});
}
return false;
}
this.records = new Collection();
- this.set_groups(new instance.web.ListView.Groups(this));
+ this.set_groups(new (this.options.GroupsType)(this));
- if (this.dataset instanceof openerp.web.DataSetStatic) {
- this.groups.datagroup = new openerp.web.StaticDataGroup(this.dataset);
+ if (this.dataset instanceof instance.web.DataSetStatic) {
+ this.groups.datagroup = new instance.web.StaticDataGroup(this.dataset);
} else {
- this.groups.datagroup = new openerp.web.DataGroup(
+ this.groups.datagroup = new instance.web.DataGroup(
this, this.model,
dataset.get_domain(),
- dataset.get_context(),
- {});
+ dataset.get_context());
this.groups.datagroup.sort = this.dataset._sort;
}
this.no_leaf = false;
},
+ set_default_options: function (options) {
+ this._super(options);
+ _.defaults(this.options, {
- GroupsType: openerp.web.ListView.Groups,
- ListType: openerp.web.ListView.List
++ GroupsType: instance.web.ListView.Groups,
++ ListType: instance.web.ListView.List
+ });
+ },
+
/**
* Retrieves the view's number of records per page (|| section)
*
}
cancelled.then(function () {
self.view.unpad_columns();
- self.edition_form.stop();
+ self.edition_form.destroy();
self.edition_form.$element.remove();
delete self.edition_form;
+ self.dataset.index = null;
delete self.edition_id;
delete self.edition;
});
}
self.edition = true;
self.edition_id = record_id;
- $new_row.addClass("oe_form_container");
- self.edition_form = new instance.web.ListEditableFormView(self.view, self.dataset, false);
- self.edition_form.$element = $new_row;
- self.edition_form.editable_list = self;
- // HO HO
- // empty
- $.when(self.edition_form.on_loaded(self.get_form_fields_view())).then(function () {
- // put in $.when just in case FormView.on_loaded becomes asynchronous
+ self.dataset.index = _(self.dataset.ids).indexOf(record_id);
+ if (self.dataset.index === -1) {
+ self.dataset.index = null;
+ }
- self.edition_form = _.extend(new openerp.web.ListEditableFormView(self.view, self.dataset, false), {
- form_template: 'ListView.row.form',
- registry: openerp.web.list.form.widgets,
- $element: $new_row
++ self.edition_form = _.extend(new instance.web.ListEditableFormView(self.view, self.dataset, false), {
++ $element: $new_row,
++ editable_list: self
+ });
- // HA HA
- self.edition_form.appendTo();
+ // put in $.when just in case FormView.on_loaded becomes asynchronous
+ return $.when(self.edition_form.on_loaded(self.get_form_fields_view())).then(function () {
$new_row.find('> td')
- .addClass('oe-field-cell')
- .removeAttr('width')
.end()
.find('td:last').removeClass('oe-field-cell').end();
- if (self.options.selectable) {
- $new_row.prepend('<th>');
- }
- if (self.options.isClarkGable) {
- $new_row.prepend('<th>');
- }
// pad in case of groupby
_(self.columns).each(function (column) {
if (column.meta) {
}
},
do_push_state: function(state) {
- if (this.widget_parent && this.widget_parent.do_push_state) {
+ if (this.getParent() && this.getParent().do_push_state) {
if (this.inner_action) {
+ state['title'] = this.inner_action.name;
state['model'] = this.inner_action.res_model;
if (this.inner_action.id) {
state['action_id'] = this.inner_action.id;
</t>
</t>
</t>
-<t t-name="SearchView.extended_search">
- <t t-call="SearchView.util.expand">
- <t t-set="expand" t-value="false"/>
- <t t-set="label">Advanced Filters</t>
- <t t-set="content">
- <div class="searchview_extended_groups_list">
- </div>
- </t>
- </t>
-</t>
-<t t-name="SearchView.extended_search.group">
- <div t-att-id="widget.element_id" class="searchview_extended_group">
- <select class="searchview_extended_group_choice">
- <option value="any">Any of the following conditions must match</option>
- <option value="all">All the following conditions must match</option>
- <option value="none">None of the following conditions must match</option>
- </select>
- <a class="searchview_extended_delete_group"
- href="javascript:void(0)"><span></span></a>
- <div class="searchview_extended_propositions_list">
+<div t-name="SearchView.Filters" class="oe_searchview_filters oe_searchview_section">
+
+</div>
+<div t-name="SearchView.CustomFilters" class="oe_searchview_custom oe_searchview_section">
+ <div>
+ <h3><span class="oe_i">M</span> Custom Filters</h3>
+ <ul class="oe_searchview_custom_list"/>
+ <div class="oe_searchview_custom">
+ <h4>Save current filter</h4>
+ <form>
+ <p><input id="oe_searchview_custom_input" placeholder="Filter name"/></p>
+ <p><input id="oe_searchview_custom_public" type="checkbox"/>
+ <label for="oe_searchview_custom_public">Share with all users</label></p>
+ <button>Save</button>
+ </form>
</div>
- <a class="searchview_extended_add_proposition" href="javascript:void(0)">
- <span>Add condition</span></a>
- <div class="oe_adv_filters_and"><span>and</span></div>
</div>
-</t>
+ <div>
+ </div>
+</div>
+<div t-name="SearchView.advanced" class="oe_searchview_advanced">
+ <h4>Advanced Search</h4>
+ <form>
+ <ul>
+
+ </ul>
+ <button class="oe_add_condition button" type="button">Add a condition</button><br/>
+ <button class="oe_apply" type="submit">Apply</button>
+ </form>
+</div>
<t t-name="SearchView.extended_search.proposition">
- <div t-att-id="widget.element_id">
+ <li>
<select class="searchview_extended_prop_field">
<t t-foreach="widget.attrs.fields" t-as="field">
- <option t-if="typeof field.store === 'undefined' || field.store || field.fnct_search"
- t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
+ <option t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
t-att-value="field.name">
<t t-esc="field.string"/>
</option>
}
},
convert_event: function(evt) {
- var date_start = openerp.web.str_to_datetime(evt[this.date_start]),
- date_stop = this.date_stop ? openerp.web.str_to_datetime(evt[this.date_stop]) : null,
+ var date_start = instance.web.str_to_datetime(evt[this.date_start]),
+ date_stop = this.date_stop ? instance.web.str_to_datetime(evt[this.date_stop]) : null,
date_delay = evt[this.date_delay] || 1.0,
- res_text = '',
- res_description = [];
+ res_text = '';
if (this.info_fields) {
- var fld = evt[this.info_fields[0]];
- res_text = (typeof fld == 'object') ? fld[fld.length -1] : res_text = fld;
-
- var sliced_info_fields = this.info_fields.slice(1);
- for (var sl_fld in sliced_info_fields) {
- var slc_fld = evt[sliced_info_fields[sl_fld]];
- if (typeof slc_fld == 'object') {
- res_description.push(slc_fld[slc_fld.length - 1]);
- } else if (slc_fld) {
- res_description.push(slc_fld);
- }
- }
+ res_text = _.map(this.info_fields, function(fld) {
+ if(evt[fld] instanceof Array)
+ return evt[fld][1];
+ return evt[fld];
+ });
}
if (!date_stop && date_delay) {
date_stop = date_start.clone().addHours(date_delay);