Minor fixes
This commit is contained in:
parent
938a8e3286
commit
c0cd88f064
|
@ -83,23 +83,27 @@ class CustomButton(QPushButton):
|
||||||
label_title.setObjectName('label_title')
|
label_title.setObjectName('label_title')
|
||||||
rows.append(label_title)
|
rows.append(label_title)
|
||||||
|
|
||||||
|
label_custom_button = None
|
||||||
if desc_extractor:
|
if desc_extractor:
|
||||||
desc = record.get(desc_extractor)
|
desc = record.get(desc_extractor)
|
||||||
if not desc:
|
if not desc:
|
||||||
desc = record.get('rec_name')
|
desc = record.get('rec_name')
|
||||||
if len(desc) > 29:
|
if len(desc) > 29:
|
||||||
desc = desc[0:29]
|
desc = desc[0:29]
|
||||||
label_custom_button = QLabel(desc, self)
|
if len(rows) > 0:
|
||||||
label_custom_button.setAlignment(Qt.AlignCenter | Qt.AlignCenter)
|
label_custom_button = QLabel(desc, self)
|
||||||
label_custom_button.setObjectName('label_custom_button')
|
label_custom_button.setAlignment(Qt.AlignCenter | Qt.AlignCenter)
|
||||||
rows.append(label_custom_button)
|
label_custom_button.setObjectName('label_custom_button')
|
||||||
|
rows.append(label_custom_button)
|
||||||
|
else:
|
||||||
|
self.setText(desc)
|
||||||
|
|
||||||
if len(rows) == 1:
|
if len(rows) > 1:
|
||||||
pass
|
|
||||||
elif len(rows) > 1:
|
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
for w in rows:
|
for w in rows:
|
||||||
vbox.addWidget(w, 1)
|
vbox.addWidget(w, 1)
|
||||||
|
# if label_custom_button:
|
||||||
|
# label_custom_button.move(vbox.rect().center())
|
||||||
self.setLayout(vbox)
|
self.setLayout(vbox)
|
||||||
|
|
||||||
method = getattr(parent, method)
|
method = getattr(parent, method)
|
||||||
|
|
|
@ -80,7 +80,7 @@ QAbstractButton:pressed {
|
||||||
max-height: 50px;
|
max-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#field_invoice_type {
|
#field_invoice_type, #field_kind {
|
||||||
color : #424242;
|
color : #424242;
|
||||||
min-height: 25px;
|
min-height: 25px;
|
||||||
font : 16pt;
|
font : 16pt;
|
||||||
|
|
|
@ -1,3 +1,22 @@
|
||||||
|
#standard_button {
|
||||||
|
border-style: groove;
|
||||||
|
font: 12pt;
|
||||||
|
color: rgb(80, 80, 80);
|
||||||
|
background-color: white;
|
||||||
|
height: 80px;
|
||||||
|
font-weight: bold;
|
||||||
|
border-width: 0px;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#standard_button::hover {
|
||||||
|
background-color: rgb(227, 255, 159);
|
||||||
|
}
|
||||||
|
|
||||||
|
#standard_button::pressed {
|
||||||
|
background-color: rgb(195, 228, 113);
|
||||||
|
}
|
||||||
|
|
||||||
#product_button {
|
#product_button {
|
||||||
font-family: "DejaVu Sans";
|
font-family: "DejaVu Sans";
|
||||||
|
@ -37,7 +56,9 @@
|
||||||
padding-right: auto;
|
padding-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
color: rgb(70, 70, 70);
|
background-color: rgb(70, 70, 70);
|
||||||
|
/* color: rgb(70, 70, 70); */
|
||||||
|
color: rgb(193, 41, 41);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +72,8 @@
|
||||||
font-family: "DejaVu Sans";
|
font-family: "DejaVu Sans";
|
||||||
border-style: groove;
|
border-style: groove;
|
||||||
font: 10pt;
|
font: 10pt;
|
||||||
color: rgb(102, 102, 102);
|
color: rgb(80, 80, 80);
|
||||||
|
font-weight: bold;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
min-height: 130px;
|
min-height: 130px;
|
||||||
max-height: 160px;
|
max-height: 160px;
|
||||||
|
|
|
@ -1,16 +1,23 @@
|
||||||
|
|
||||||
#standard_button {
|
#standard_button {
|
||||||
border-style: groove;
|
border-style: groove;
|
||||||
font: 7pt;
|
font: 10pt;
|
||||||
color: rgb(80, 80, 80);
|
color: rgb(80, 80, 80);
|
||||||
background-color: white;
|
background-color: white;
|
||||||
max-height: 60px;
|
height: 60px;
|
||||||
max-width : 140px;
|
font-weight: bold;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#standard_button::hover {
|
||||||
|
background-color: rgb(227, 255, 159);
|
||||||
|
}
|
||||||
|
|
||||||
|
#standard_button::pressed {
|
||||||
|
background-color: rgb(195, 228, 113);
|
||||||
|
}
|
||||||
|
|
||||||
#product_button {
|
#product_button {
|
||||||
border-style: groove;
|
border-style: groove;
|
||||||
font: 6pt;
|
font: 6pt;
|
||||||
|
@ -59,16 +66,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#category_button {
|
#category_button {
|
||||||
font-family: "DejaVu Sans";
|
font-family: "DejaVu Sans";
|
||||||
border-style: groove;
|
border-style: groove;
|
||||||
font: 8pt;
|
font: 9pt;
|
||||||
color: rgb(102, 102, 102);
|
color: rgb(80, 80, 80);
|
||||||
background-color : white;
|
font-weight: bold;
|
||||||
min-height: 90px;
|
background-color: white;
|
||||||
max-height: 120px;
|
min-height: 130px;
|
||||||
border-width: 0px;
|
max-height: 160px;
|
||||||
border-radius: 5px;
|
width : 130px;
|
||||||
text-align: center;
|
border-width: 0px;
|
||||||
|
border-radius: 10px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#category_button::hover {
|
#category_button::hover {
|
||||||
|
|
|
@ -553,15 +553,7 @@ class DialogPrintInvoice(QWidget):
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
view = [
|
view = [
|
||||||
('invoice_number_ask', {'name': self.tr('INVOICE NUMBER')}),
|
('invoice_number_ask', {'name': self.tr('ORDER / INVOICE NUMBER')}),
|
||||||
('printer_ask', {
|
|
||||||
'name': self.tr('PRINTER'),
|
|
||||||
'type': 'selection',
|
|
||||||
'values': [
|
|
||||||
(1, 'POS'),
|
|
||||||
(2, 'LASER')
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
('type_ask', {
|
('type_ask', {
|
||||||
'name': self.tr('TYPE'),
|
'name': self.tr('TYPE'),
|
||||||
'type': 'selection',
|
'type': 'selection',
|
||||||
|
@ -571,6 +563,14 @@ class DialogPrintInvoice(QWidget):
|
||||||
('delivery', self.tr('DELIVERY'))
|
('delivery', self.tr('DELIVERY'))
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
('printer_ask', {
|
||||||
|
'name': self.tr('PRINTER'),
|
||||||
|
'type': 'selection',
|
||||||
|
'values': [
|
||||||
|
(1, 'POS'),
|
||||||
|
(2, 'LASER')
|
||||||
|
],
|
||||||
|
}),
|
||||||
]
|
]
|
||||||
return QuickDialog(self._parent, 'action', data=view)
|
return QuickDialog(self._parent, 'action', data=view)
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ class StoreView(object):
|
||||||
field.setText('')
|
field.setText('')
|
||||||
|
|
||||||
field_ask = getattr(self.parent, 'field_' + k + '_ask', None)
|
field_ask = getattr(self.parent, 'field_' + k + '_ask', None)
|
||||||
|
if field_ask == 'invoice_number_ask':
|
||||||
|
continue
|
||||||
if field_ask and hasattr(field_ask, 'setText'):
|
if field_ask and hasattr(field_ask, 'setText'):
|
||||||
field_ask.setText('')
|
field_ask.setText('')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue