123456789101112131415161718192021222324252627282930313233343536373839 |
- import Vue from 'vue'
- import App from '@/App'
- import VModal from 'vue-js-modal'
- import store from '@/store'
- Vue.use(VModal)
- Vue.config.productionTip = false
- Vue.config.silent = true
- openerp.eiru_pos = (instance, local) => {
- local.PosWidget = instance.Widget.extend({
- start() {
- instance.eiru_theme.instance.hide()
- this.vm = new Vue({
- store,
- el: this.el,
- template: '<App />',
- components: {
- App
- },
- data: {
- pos_instance: this
- }
- });
- },
- destroy() {
- this.vm.$destroy()
- $(this.vm.$el).remove()
- this.vm = null
- instance.eiru_theme.instance.show()
- }
- })
- instance.web.client_actions.add('eiru_pos.action_launch', 'instance.eiru_pos.PosWidget')
- }
|