diff --git a/addons/account/static/src/css/account_move_reconciliation.css b/addons/account/static/src/css/account_move_reconciliation.css index f4136a79ef4..85ae6cae740 100644 --- a/addons/account/static/src/css/account_move_reconciliation.css +++ b/addons/account/static/src/css/account_move_reconciliation.css @@ -1,99 +1,5 @@ -.openerp .oe_extended_form_view .oe_formview { - background-color: #eeeeee; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - border:2px solid; - } - -.openerp .oe_extended_form_view .oe_form_nosheet { - margin: 2px; +.openerp .oe_account_reconciliation { + border-bottom: 1px solid #CACACA; + padding: 5px; } - -.openerp .oe_pager_button { - float: left; - height: 22px; - line-height: 24px; - display: inline-block; - border: 1px solid #ababab; - color: #4c4c4c; - cursor: pointer; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - padding: 0 5px 0 5px; - margin: 0 2px 0 2px; - float: left; -} -.openerp .oe_pager_button:hover{ - text-decoration:none !important; -} - -.openerp .oe_reconcile_button { - float: left; - display: inline-block; - background-color: #EFEFEF; - background-image: -moz-linear-gradient(center top , #EFEFEF, #D8D8D8); - border: 1px solid #ABABAB; - border-radius: 3px 3px 3px 3px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset; - color: #4C4C4C !important; - display: inline-block; - font-size: 13px; - margin: 0 3px 0 3px; - padding: 3px 12px; - cursor: pointer; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); -} - -.openerp .oe_reconcile_button:hover { - text-decoration:none !important; - background-color: #E3E3E3; - background-image: -moz-linear-gradient(center top , #E3E3E3, #F6F6F6); - box-shadow: none; -} - -.openerp .oe_reconcile_button a:hover { - text-decoration: none -} -.openerp .oe_extended_form_view .oe_form_field:empty { - display: inline-block !important; -} - -.openerp .oe_extended_form_view .oe_datepicker_root { - display: inline-block; - min-width: 100px; -} -.openerp .oe_extended_form_view .oe_form_field { - width: auto; -} - -.openerp .oe_extended_form_view .oe_form_field_progressbar.ui-progressbar { - width: 200px !important; -} -.openerp .oe_extended_form_view div.oe_reconcile_row{ - margin-top:7px; -} -.openerp .oe_list_content > tbody > tr > td > button.reconcile_btn { - color: white; - background-color: #8a89ba; - background-image: -webkit-gradient(linear, left top, left bottom, from(#8a89ba), to(#807fb4)); - background-image: -webkit-linear-gradient(top, #8a89ba, #807fb4); - background-image: -moz-linear-gradient(top, #8a89ba, #807fb4); - background-image: -ms-linear-gradient(top, #8a89ba, #807fb4); - background-image: -o-linear-gradient(top, #8a89ba, #807fb4); - background-image: linear-gradient(to bottom, #8a89ba, #807fb4); - padding: 0 5px 0 5px; -} -.openerp .oe_list_content > tbody > tr > td > button.reconcile_btn:hover { - color: white; - background-color: #807fb4; - background-image: -webkit-gradient(linear, left top, left bottom, from(#807fb4), to(#8a89ba)); - background-image: -webkit-linear-gradient(top, #807fb4, #8a89ba); - background-image: -moz-linear-gradient(top, #807fb4, #8a89ba); - background-image: -ms-linear-gradient(top, #807fb4, #8a89ba); - background-image: -o-linear-gradient(top, #807fb4, #8a89ba); - background-image: linear-gradient(to bottom, #807fb4, #8a89ba); -} \ No newline at end of file diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js index 92827832ad3..6399cdbca5d 100644 --- a/addons/account/static/src/js/account_move_reconciliation.js +++ b/addons/account/static/src/js/account_move_reconciliation.js @@ -88,124 +88,4 @@ openerp.account = function (instance) { }, }); - /*instance.web.views.add('form_clone', 'instance.account.extend_form_view'); - - instance.account.extend_viewmanager = instance.web.ViewManagerAction.include({ - start: function () { - this._super(); - if (this.action.context && this.action.context.extended_view_id && this.action.context.extended_model) { - this.setup_exended_form_view(this.action.context.extended_model, this.action.context.extended_view_id); - } - }, - setup_exended_form_view: function (view_model, view_id) { - var self = this; - var from_view = this.registry.get_object('form_clone'); - this.dataset_form = new instance.web.DataSetSearch(this, view_model, this.action.context, this.action.domain); - this.dataset_loaded = this.dataset_form.read_slice(); - var obj_from_view = new from_view(self, self.dataset_form, view_id, {}); - obj_from_view.template = 'ExtendedFormView'; - var view_form = obj_from_view.appendTo(self.$el.find('.oe_extended_form_view')); - $.when(view_form, this.dataset_loaded).then(function () { - obj_from_view.on_pager_action('first'); - }); - } - }); - - instance.account.extend_form_view = instance.web.FormView.extend({ - on_loaded: function (data) { - this._super.apply(this, arguments); - var self = this; - this.$el.find(".oe_reconcile").on('click', this.do_reconcilation); - this.$el.find(".oe_nothing_to_reconcile").on('click', this.do_nothing_to_reconcile); - this.$el.on('click', 'a[data-pager-action]', function () { - var action = $(this).data('pager-action'); - self.on_pager_action(action); - }); - }, - do_reconcilation: function (event) { - var self = this; - if (!self.datarecord.id) { - return false; - } - var list_view = this.getParent().views['list'].controller; - var ids = list_view.get_selected_ids(); - if (ids.length === 0) { - instance.web.dialog($("
").text(_t("You must choose at least one record.")), { - title: _t("Warning"), - modal: true - }); - return false; - } - var additional_context = _.extend({ - active_id: ids[0], - active_ids: ids, - active_model: list_view.dataset.model - }); - self.rpc("/web/action/load", { - action_id: py.eval(event.target.name), - context: additional_context - }, function (result) { - result.result.context = _.extend(result.result.context || {}, - additional_context); - result.result.flags = result.result.flags || {}; - result.result.flags.new_window = true; - self.do_action(result.result, function () { - self.dataset.read_slice().done(function () { - self.on_pager_action('next'); - }); - }); - }); - return true; - }, - - - do_nothing_to_reconcile: function () { - var self = this; - if (!self.datarecord.id) { - return false; - } - // how do you want this to not fail ??? - var event = null; - this.dataset.call(event.target.name, [ - [self.datarecord.id], self.dataset.context]).then(function () { - self.dataset.read_slice().done(function () { - self.on_pager_action('next'); - }); - }); - return true; - }, - - do_update_pager: function (hide_index) { - var index = this.dataset.index + 1; - if (this.dataset.ids.length === 0) index = 0; - index = hide_index ? '-' : index; - this.$el.find('span.oe_pager_index_extend').html(index).end().find('span.oe_pager_count_extend').html(this.dataset.ids.length); - }, - - do_search_move_line: function (partner_ids) { - var viewmanager = this.getParent(); - viewmanager.action.context.next_partner_only = true; - viewmanager.action.context.partner_id = partner_ids; - viewmanager.searchview.do_search(); - }, - - on_pager_action: function (action) { - var self = this; - - if (this.dataset.ids.length === 0) { - self.datarecord = {}; - _(this.fields).each(function (field, f) { - field.set_value(self.datarecord[f] || false); - }); - self.do_update_pager(); - self.do_search_move_line([]); - } else { - $.when(this._super(action)).then(function () { - var id = self.get_fields_values().partner_id; - self.do_search_move_line([id]); - }); - } - }, - });*/ - -}; \ No newline at end of file +}; diff --git a/addons/account/static/src/xml/account_move_reconciliation.xml b/addons/account/static/src/xml/account_move_reconciliation.xml index e93790ba58d..d975af69d37 100644 --- a/addons/account/static/src/xml/account_move_reconciliation.xml +++ b/addons/account/static/src/xml/account_move_reconciliation.xml @@ -4,17 +4,15 @@ -
+