12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import Vue from 'vue'
- import App from '@/App'
- import VueModal from 'vue-js-modal'
- // import store from '@/store'
- // import currency from '@/components/filters/currency'
- // import absolute from '@/components/filters/absolute'
- // Vue.filter('currency', currency)
- // Vue.filter('absolute', absolute)
- Vue.use(VueModal)
- Vue.config.productionTip = false
- Vue.config.silent = true
- Vue.config.devTools = true
- openerp.eiru_bank_statement = (instance, local) => {
- local.BankStatementWidget = instance.Widget.extend({
- init(parent, action) {
- this._super(parent)
- this.mode = action.params.mode
- },
- start() {
- console.log(this);
- this.sidebarFold()
- this.vm = new Vue({
- // store,
- el: this.el,
- template: '<App />',
- components: {
- App
- },
- data: {
- mode: this.mode
- }
- })
- },
- destroy() {
- this.vm.$destroy()
- $(this.vm.$el).remove()
- this.vm = null
- this.sidebarUnfold()
- this._super.apply(this, arguments)
- },
- sidebarFold() {
- if (!instance.eiru_sidebar_toggler) return
- instance.eiru_sidebar_toggler.sidebar_fold()
- },
- sidebarUnfold() {
- if (!instance.eiru_sidebar_toggler) return
- instance.eiru_sidebar_toggler.sidebar_unfold()
- }
- })
- instance.web.client_actions.add('eiru_bank_statement.action_launch', 'instance.eiru_bank_statement.BankStatementWidget')
- }
|