minor fix
This commit is contained in:
parent
f3b49f5a3f
commit
0ac16c993e
10
app/main.py
10
app/main.py
|
@ -1,18 +1,16 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import base64
|
import base64
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import atexit
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from PySide6 import QtGui
|
from PySide6 import QtGui
|
||||||
from PySide6.QtCore import Qt, QTimer, QThread
|
from PySide6.QtCore import Qt
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QLabel, QHBoxLayout, QVBoxLayout,
|
QLabel, QHBoxLayout, QVBoxLayout,
|
||||||
QWidget)
|
QWidget)
|
||||||
|
@ -36,7 +34,7 @@ from .commons.custom_button import CustomButton
|
||||||
from .threads import DoInvoice
|
from .threads import DoInvoice
|
||||||
from .store import StoreView
|
from .store import StoreView
|
||||||
from .constants import (
|
from .constants import (
|
||||||
PATH_PRINTERS, DELTA_LOCALE, STRETCH, alignRight, alignLeft, alignCenter,
|
DELTA_LOCALE, STRETCH, alignRight, alignLeft, alignCenter,
|
||||||
alignHCenter, DIALOG_REPLY_NO, ZERO, RATE_CREDIT_LIMIT, CONVERSION_DIGITS,
|
alignHCenter, DIALOG_REPLY_NO, ZERO, RATE_CREDIT_LIMIT, CONVERSION_DIGITS,
|
||||||
SALE_FIELDS, KIND_REST, KIND_RETAIL, DIALOG_REPLY_YES,
|
SALE_FIELDS, KIND_REST, KIND_RETAIL, DIALOG_REPLY_YES,
|
||||||
)
|
)
|
||||||
|
@ -1558,8 +1556,8 @@ class AppWindow(FrontWindow):
|
||||||
sale = self.store.store
|
sale = self.store.store
|
||||||
if number:
|
if number:
|
||||||
if type_doc in ['order', 'delivery', 'quotation']:
|
if type_doc in ['order', 'delivery', 'quotation']:
|
||||||
if number != sale.get('number'):
|
if number != sale.get('number') and sale.get('id'):
|
||||||
sale_id = sale['id']
|
sale_id = sale.get('id')
|
||||||
else:
|
else:
|
||||||
sales = self.Sale.find([('number', '=', number)], fields=['id'])
|
sales = self.Sale.find([('number', '=', number)], fields=['id'])
|
||||||
sale = sales[0]
|
sale = sales[0]
|
||||||
|
|
Loading…
Reference in New Issue