|
@@ -180,14 +180,18 @@ const actions = {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ dispatch('notify', 'Estás conectado nuevamente. Sincronizaremos sus datos en segundo plano')
|
|
|
|
+
|
|
axios.post('/eiru_sales/finish', {
|
|
axios.post('/eiru_sales/finish', {
|
|
jsonrpc: '2.0',
|
|
jsonrpc: '2.0',
|
|
method: 'call',
|
|
method: 'call',
|
|
params: {
|
|
params: {
|
|
data: getters.data
|
|
data: getters.data
|
|
}
|
|
}
|
|
|
|
+ }).then(() => {
|
|
|
|
+ dispatch('notify', 'Los datos fueron sincronizados con éxito')
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
- dispatch('notify', 'La transacción no terminó correctamente')
|
|
|
|
|
|
+ dispatch('notify', 'Los datos no fueron sincronizados correctamente')
|
|
})
|
|
})
|
|
|
|
|
|
commit('resetData')
|
|
commit('resetData')
|
|
@@ -273,6 +277,10 @@ const actions = {
|
|
|
|
|
|
key = key.replace('Module', '')
|
|
key = key.replace('Module', '')
|
|
|
|
|
|
|
|
+ if (key === 'data') {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+
|
|
dispatch(`reset${key[0].toUpperCase()}${key.slice(1)}`)
|
|
dispatch(`reset${key[0].toUpperCase()}${key.slice(1)}`)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -287,7 +295,7 @@ const actions = {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- dispatch('notify', 'Estás trabajando sin conexión. Se ocultará el menú superior mientras sigas sin conexión')
|
|
|
|
|
|
+ dispatch('notify', 'Estás sin conexión. Ocultaremos el menú superior mientras sigas trabajando')
|
|
},
|
|
},
|
|
hideTopbar(_, isWired) {
|
|
hideTopbar(_, isWired) {
|
|
if (!openerp.eiru_topbar_toggler) {
|
|
if (!openerp.eiru_topbar_toggler) {
|