index.js 689 B

1234567891011121314151617181920212223242526272829
  1. import Vue from 'vue'
  2. import App from '@/App'
  3. import store from '@/store'
  4. Vue.config.productionTip = false
  5. Vue.config.silent = true
  6. openerp.eiru_pos = (instance, local) => {
  7. local.PosWidget = instance.Widget.extend({
  8. start() {
  9. this.vm = new Vue({
  10. store,
  11. el: this.el,
  12. template: '<App />',
  13. components: {
  14. App
  15. }
  16. });
  17. },
  18. destroy() {
  19. this.vm.$destroy()
  20. $(this.vm.$el).remove()
  21. this.vm = null
  22. }
  23. })
  24. instance.web.client_actions.add('eiru_pos.action_launch', 'instance.eiru_pos.PosWidget')
  25. }