Browse Source

[FIX] relation connection status

robert 6 years ago
parent
commit
f208c8d3d1
2 changed files with 4 additions and 2 deletions
  1. 2 1
      controllers/main.py
  2. 2 1
      src/store/actions.js

+ 2 - 1
controllers/main.py

@@ -7,6 +7,7 @@ import logging
 
 LOGGER = logging.getLogger(__name__)
 
+
 class PosSales(http.Controller):
  
     #################
@@ -86,7 +87,7 @@ class PosSales(http.Controller):
                 'user': get_current_user(),
                 'currencies': currencies,
                 'customers': get_customers(image_type=image_type),
-                'products': get_products(image_type=image_type)
+                'products': get_products(image_type, map(lambda x: x.get('locationStock').get('id'), warehouses))
             }
 
         # Take data for payment

+ 2 - 1
src/store/actions.js

@@ -12,7 +12,7 @@ const actions = {
         commit('setLoading', true)
         commit('setCompleted', false)
 
-        if (!getters.isWired) {
+        if (!getters.isWired && getters.mode == 'sale') {
             commit('setLoading', false)
             return
         }
@@ -22,6 +22,7 @@ const actions = {
                 mode: getters.mode
             }
         }).then(({ data }) => {
+            console.log(data)
             commit('setLoading', false)
             commit('toggleFooterButtonsVisibility')