minor fixes add state in labels, escape key function change, translation and correction bugs

This commit is contained in:
Camilo Sarmiento 2020-06-29 19:11:08 -05:00
parent 645a96171e
commit dab0973d1e
10 changed files with 806 additions and 732 deletions

View file

@ -58,7 +58,14 @@ class Completer(QCompleter):
for r in records: for r in records:
row = [] row = []
for key in vkeys: for key in vkeys:
row.append(r[key]) if '.' in key:
attrs = key.split('.')
val = r.copy()
for a in attrs:
val = val[a]
else:
val = r[key]
row.append(val)
values.append(row) values.append(row)
return values return values
@ -106,8 +113,8 @@ class Field(QLineEdit):
self.set_completer(value.get('model'), value.get('fields'), self.set_completer(value.get('model'), value.get('fields'),
value.get('domain')) value.get('domain'))
def set_completer(self, tryton_model, fields, domain=[]): def set_completer(self, model, fields, domain=[]):
records = tryton_model.find(domain) records = model.find(domain)
self.completer = Completer(self.parent, records, fields) self.completer = Completer(self.parent, records, fields)
self.setCompleter(self.completer) self.setCompleter(self.completer)

View file

@ -443,7 +443,7 @@ class TableModel(QAbstractTableModel):
matchers = [t.lower() for t in searchText.split(' ')] matchers = [t.lower() for t in searchText.split(' ')]
self.filteredItems = [] self.filteredItems = []
for item in self.currentItems: for item in self.currentItems:
values = item.values() values = list(item.values())
values.pop(0) values.pop(0)
values_clear = list(filter(None, values)) values_clear = list(filter(None, values))
exists = all(mt in ''.join(values_clear).lower() for mt in matchers) exists = all(mt in ''.join(values_clear).lower() for mt in matchers)

View file

@ -2,7 +2,7 @@
QAbstractButton { QAbstractButton {
font-family: "DejaVu Sans"; font-family: "DejaVu Sans";
border-style: groove; border-style: groove;
font: 22pt; font: 18pt;
color: rgb(102, 102, 102); color: rgb(102, 102, 102);
background-color: rgb(242, 242, 242); background-color: rgb(242, 242, 242);
min-height: 45px; min-height: 45px;
@ -23,38 +23,38 @@ QAbstractButton {
} }
#field_default { #field_default {
font : 26px; font : 22px;
} }
#field_large_gray, #label_large_gray { #field_large_gray, #label_large_gray {
font : 26px; font : 22px;
color : rgb(54, 54, 54); color : rgb(54, 54, 54);
} }
#field_large_blue, #label_large_blue { #field_large_blue, #label_large_blue {
font : 26px; font : 22px;
color : rgb(0, 30, 80); color : rgb(0, 30, 80);
} }
#field_large_orange, #label_large_orange { #field_large_orange, #label_large_orange {
font : 26px; font : 22px;
color : rgb(235, 160, 15); color : rgb(235, 160, 15);
} }
#label_qty, #spin_box_qty, #row_field_price, #label_qty, #spin_box_qty, #row_field_price,
#label_price, #row_field_note, #label_fraction, #row_field_qty, #label_price, #row_field_note, #label_fraction, #row_field_qty,
#field_fraction { #field_fraction {
font : 26px; font : 22px;
alignment : center; alignment : center;
} }
#row_field_description { #row_field_description {
font : 26px; font : 22px;
color : #242424; color : #242424;
} }
#label_product { #label_product {
font : bold 24px; font : bold 20px;
alignment : center; alignment : center;
color : #242424; color : #242424;
} }
@ -85,14 +85,14 @@ QSpinBox::down-button {
#label_position, #label_salesman, #label_payment_term, #label_position, #label_salesman, #label_payment_term,
#label_party, #label_global_discount, #field_invoice, #label_invoice, #label_party, #label_global_discount, #field_invoice, #label_invoice,
#label_agent, #label_date, #label_order_number, #label_default { #label_agent, #label_date, #label_order_number, #label_default {
font : 26px; font : 22px;
color : rgb(150, 150, 150); color : rgb(150, 150, 150);
min-height : 10px; min-height : 10px;
min-width : 10px; min-width : 10px;
} }
#field_amount, #field_sign { #field_amount, #field_sign {
font : bold 48px; font : bold 42px;
color : rgb(43, 60, 77); color : rgb(43, 60, 77);
min-height : 40px; min-height : 40px;
max-height : 100px; max-height : 100px;
@ -114,13 +114,13 @@ QSpinBox::down-button {
#table_payment { #table_payment {
color : rgb(70, 70, 70); color : rgb(70, 70, 70);
font : 14pt; font : 12pt;
max-height : 80px; max-height : 80px;
} }
#table_sale_lines { #table_sale_lines {
color : rgb(70, 70, 70); color : rgb(70, 70, 70);
font : 14pt; font : 12pt;
} }
#label_paid, #label_change, #label_discount, #label_total_amount, #label_paid, #label_change, #label_discount, #label_total_amount,
@ -128,7 +128,7 @@ QSpinBox::down-button {
#field_total_amount, #field_change, #field_discount, #field_paid, #field_total_amount, #field_change, #field_discount, #field_paid,
#field_untaxed_amount, #field_taxes_amount { #field_untaxed_amount, #field_taxes_amount {
min-height : 10px; min-height : 10px;
font: bold 20pt; font: bold 16pt;
} }
#img_pixmap_pos { #img_pixmap_pos {

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -317,7 +317,7 @@ class MainWindow(FrontWindow):
if self._commission_activated: if self._commission_activated:
_PosSale['fields'].extend(['agent', 'agent.party.name', 'commission']) _PosSale['fields'].extend(['agent', 'agent.party.name', 'commission'])
modules.set_models([_Agent, _Commission]) # modules.set_models([_Agent, _Commission])
self.User = FastModel('res.user', self.ctx) self.User = FastModel('res.user', self.ctx)
self._user, = self.User.find([('login', '=', self.user)]) self._user, = self.User.find([('login', '=', self.user)])
@ -338,6 +338,9 @@ class MainWindow(FrontWindow):
self.Party = FastModel('party.party', self.ctx) self.Party = FastModel('party.party', self.ctx)
self.Taxes = FastModel('account.tax', self.ctx) self.Taxes = FastModel('account.tax', self.ctx)
self.ActionReport = FastModel('ir.action.report', self.ctx) self.ActionReport = FastModel('ir.action.report', self.ctx)
if self._commission_activated:
self.Agent = FastModel('commission.agent', self.ctx)
self.Comission = FastModel('commission', self.ctx)
models_to_work = [_PosSale] models_to_work = [_PosSale]
@ -508,6 +511,33 @@ class MainWindow(FrontWindow):
left_head.addWidget(self.field_amount, 0) left_head.addWidget(self.field_amount, 0)
info_fields = [ info_fields = [
('invoice_type', {
'name': self.tr('INVOICE TYPE'),
'placeholder': False,
'type': 'selection',
'on_change': 'action_invoice_type_selection_changed',
'values': [
('', ''),
('C', self.tr('COMPUTADOR')),
('M', self.tr('MANUAL')),
('P', self.tr('POS')),
('1', self.tr('VENTA ELECTRONICA')),
('2', self.tr('VENTA DE EXPORTACION')),
# ('3', self.tr('FACTURA POR CONTINGENCIA FACTURADOR')),
# ('4', self.tr('FACTURA POR CONTINGENCIA DIAN')),
('91', self.tr('NOTA CREDITO ELECTRONICA')),
('92', self.tr('NOTA DEBITO ELECTRONICA')),
],
'size': self.screen_size,
'color': 'gray'
}),
('state', {
'name': self.tr('STATE'),
'readonly': True,
'placeholder': False,
'size': self.screen_size,
'color': 'gray'
}),
('party', { ('party', {
'name': self.tr('CUSTOMER'), 'name': self.tr('CUSTOMER'),
'readonly': True, 'readonly': True,
@ -529,6 +559,13 @@ class MainWindow(FrontWindow):
'size': self.screen_size, 'size': self.screen_size,
'color': 'gray' 'color': 'gray'
}), }),
('order_number', {
'name': self.tr('No ORDER'),
'placeholder': False,
'readonly': True,
'size': self.screen_size,
'color': 'gray'
}),
('payment_term', { ('payment_term', {
'name': self.tr('PAYMENT TERM'), 'name': self.tr('PAYMENT TERM'),
'readonly': True, 'readonly': True,
@ -537,35 +574,9 @@ class MainWindow(FrontWindow):
'size': self.screen_size, 'size': self.screen_size,
'color': 'gray' 'color': 'gray'
}), }),
('order_number', {
'name': self.tr('No ORDER'),
'placeholder': False,
'readonly': True,
'size': self.screen_size,
'color': 'gray'
}),
('invoice_type', {
'name': self.tr('INVOICE TYPE'),
'placeholder': False,
'type': 'selection',
'on_change': 'action_invoice_type_selection_changed',
'values': [
('', ''),
('C', self.tr('COMPUTADOR')),
('M', self.tr('MANUAL')),
('P', self.tr('POS')),
('1', self.tr('VENTA ELECTRONICA')),
('2', self.tr('VENTA DE EXPORTACION')),
('3', self.tr('FACTURA POR CONTINGENCIA FACTURADOR')),
('4', self.tr('FACTURA POR CONTINGENCIA DIAN')),
('91', self.tr('NOTA CREDITO ELECTRONICA')),
('92', self.tr('NOTA DEBITO ELECTRONICA')),
],
'size': self.screen_size,
'color': 'gray'
}),
] ]
self.field_invoice_type = None self.field_invoice_type = None
self.field_state = None
if self.tablet_mode or self._config['show_position_pos']: if self.tablet_mode or self._config['show_position_pos']:
info_fields.append(('position', { info_fields.append(('position', {
@ -994,6 +1005,7 @@ class MainWindow(FrontWindow):
return return
if not self.validate_payment_term(): if not self.validate_payment_term():
return return
self.field_invoice_type.set_enabled(False)
sale_id = self._sale['id'] sale_id = self._sale['id']
res, msg = self.ModSale.faster_process({'sale_id': sale_id}) res, msg = self.ModSale.faster_process({'sale_id': sale_id})
# Remove deprecation res['res'] # Remove deprecation res['res']
@ -1054,6 +1066,8 @@ class MainWindow(FrontWindow):
self.update_total_amount() self.update_total_amount()
def action_salesman(self): def action_salesman(self):
if self._state in ['accept', 'cash']:
return
self.dialog_salesman.exec_() self.dialog_salesman.exec_()
def action_tax(self): def action_tax(self):
@ -1229,10 +1243,10 @@ class MainWindow(FrontWindow):
self.field_agent_id = self.field_agent_ask.get_id() self.field_agent_id = self.field_agent_ask.get_id()
if self.field_agent_id and commission: if self.field_agent_id and commission:
agent, = self._Agent.find([ agent, = self.Agent.find([
('id', '=', self.field_agent_id), ('id', '=', self.field_agent_id),
]) ])
if commission <= agent['plan.percentage']: if commission <= agent['plan']['percentage']:
self._PosSale.write([self._sale['id']], { self._PosSale.write([self._sale['id']], {
'agent': self.field_agent_id, 'agent': self.field_agent_id,
'commission': int(commission), 'commission': int(commission),
@ -1252,10 +1266,14 @@ class MainWindow(FrontWindow):
self.field_commission_amount.setText(str(total)) self.field_commission_amount.setText(str(total))
def action_party(self): def action_party(self):
if self._state in ['accept', 'cash']:
return
self.dialog_search_parties.clear_rows() self.dialog_search_parties.clear_rows()
self.dialog_search_parties.execute() self.dialog_search_parties.execute()
def action_global_discount(self, sale_id=None): def action_global_discount(self, sale_id=None):
if self._state in ['accept', 'cash']:
return
self.dialog_global_discount.exec_() self.dialog_global_discount.exec_()
discount = self.field_global_discount_ask.text() discount = self.field_global_discount_ask.text()
if discount and discount.isdigit(): if discount and discount.isdigit():
@ -1304,6 +1322,8 @@ class MainWindow(FrontWindow):
self.dialog_payment_term.exec_() self.dialog_payment_term.exec_()
def action_new_sale(self): def action_new_sale(self):
if self._state in ['accept', 'cash']:
return
if not self._sale['id']: if not self._sale['id']:
return return
if self._ask_new_sale(): if self._ask_new_sale():
@ -1359,6 +1379,8 @@ class MainWindow(FrontWindow):
self.dialog_search_products.show() self.dialog_search_products.show()
def action_search_sale(self): def action_search_sale(self):
if self._state in ['accept', 'cash']:
return
delta = str(datetime.now() - timedelta(4)) delta = str(datetime.now() - timedelta(4))
if self.type_pos_user == 'cashier': if self.type_pos_user == 'cashier':
dom = ['OR', [ dom = ['OR', [
@ -1454,6 +1476,7 @@ class MainWindow(FrontWindow):
self._sale.update(sale) self._sale.update(sale)
self.table_payment_lines.reset() self.table_payment_lines.reset()
self.field_order_number.setText(sale['number'] or '') self.field_order_number.setText(sale['number'] or '')
self.field_state.setText(sale['state'] or '')
self._set_sale_date() self._set_sale_date()
if hasattr(self, 'field_position'): if hasattr(self, 'field_position'):
self.field_position.setText(sale['position'] or '') self.field_position.setText(sale['position'] or '')
@ -1474,8 +1497,8 @@ class MainWindow(FrontWindow):
self.field_invoice.setText('') self.field_invoice.setText('')
if self.field_delivery_charge: if self.field_delivery_charge:
self.field_delivery_charge.set_enabled(True) self.field_delivery_charge.set_enabled(True)
if self._sale.get('delivery_charge'): if sale.get('delivery_charge'):
self.field_delivery_charge.set_from_id(self._sale['delivery_charge']) self.field_delivery_charge.set_from_id(sale['delivery_charge'])
if sale.get('table_assigned'): if sale.get('table_assigned'):
self.field_table_assigned.setText(sale['table_assigned.name'] or '') self.field_table_assigned.setText(sale['table_assigned.name'] or '')
@ -1900,11 +1923,11 @@ class MainWindow(FrontWindow):
('agent_ask', { ('agent_ask', {
'name': self.tr('AGENT'), 'name': self.tr('AGENT'),
'type': 'relation', 'type': 'relation',
'model': self._Agent, 'model': self.Agent,
'domain': [('active', '=', True)], 'domain': [],
'fields': [ 'fields': [
('id', self.tr('ID')), ('id', self.tr('ID')),
('party.name', self.tr('NAME')), ('party.rec_name', self.tr('NAME')),
('party.id_number', self.tr('ID NUMBER')), ('party.id_number', self.tr('ID NUMBER')),
]}), ]}),
('commission_ask', {'name': self.tr('COMMISSION')}), ('commission_ask', {'name': self.tr('COMMISSION')}),
@ -1945,6 +1968,7 @@ class MainWindow(FrontWindow):
self.field_global_discount_ask.setText('') self.field_global_discount_ask.setText('')
self.field_amount.zero() self.field_amount.zero()
self.field_order_number.setText('') self.field_order_number.setText('')
self.field_state.setText('')
self.current_comment = '' self.current_comment = ''
if self.field_delivery_charge: if self.field_delivery_charge:
self.field_delivery_charge.set_from_id('') self.field_delivery_charge.set_from_id('')
@ -2004,6 +2028,7 @@ class MainWindow(FrontWindow):
self.payment_ctx = {} self.payment_ctx = {}
self.is_clear_right_panel = False self.is_clear_right_panel = False
self.table_sale_lines.setEnabled(True) self.table_sale_lines.setEnabled(True)
self.field_invoice_type.set_enabled(True)
self.clear_data() self.clear_data()
self.clear_left_panel() self.clear_left_panel()
self._sale = self._PosSale.new_sale([], { self._sale = self._PosSale.new_sale([], {
@ -2014,8 +2039,9 @@ class MainWindow(FrontWindow):
'sale_device': self.device['id'], 'sale_device': self.device['id'],
'payment_term': self.default_payment_term['id'] 'payment_term': self.default_payment_term['id']
}, self._context) }, self._context)
self.field_party.setText(self._sale['party_name'])
self.field_invoice_type.set_from_id(self._sale['invoice_type']) self.field_invoice_type.set_from_id(self._sale['invoice_type'])
self.field_state.setText(self._sale['state'])
# FIXME ADD MORE # FIXME ADD MORE
self._sale.update({ self._sale.update({
'total_amount': 0 'total_amount': 0
@ -2572,7 +2598,9 @@ class MainWindow(FrontWindow):
elif key == Qt.Key_Backspace: elif key == Qt.Key_Backspace:
self.key_backspace_pressed() self.key_backspace_pressed()
elif key == Qt.Key_Escape: elif key == Qt.Key_Escape:
self.close() if not self._state in ['accept', 'cash']:
self._clear_context()
# self.close()
elif key == Qt.Key_F1: elif key == Qt.Key_F1:
self.create_dialog_help() self.create_dialog_help()
elif key == Qt.Key_F9: elif key == Qt.Key_F9:
@ -2623,8 +2651,10 @@ class MainWindow(FrontWindow):
self.action_comment() self.action_comment()
elif key == Qt.Key_Question: elif key == Qt.Key_Question:
self.action_tax() self.action_tax()
else: sale = self.get_current_sale()
pass self.field_state.setText(sale['state'])
# else:
# pass
@property @property
def state(self): def state(self):

View file

@ -2,11 +2,11 @@
QAbstractButton { QAbstractButton {
font-family: "DejaVu Sans"; font-family: "DejaVu Sans";
border-style: groove; border-style: groove;
font: 20pt; font: 16pt;
color: rgb(102, 102, 102); color: rgb(102, 102, 102);
background-color: rgb(242, 242, 242); background-color: rgb(242, 242, 242);
min-height: 45px; min-height: 40px;
min-width : 100px; min-width : 90px;
border-color: rgb(208, 208, 208); border-color: rgb(208, 208, 208);
border-width: 0.5px; border-width: 0.5px;
} }
@ -23,38 +23,38 @@ QAbstractButton {
} }
#field_default { #field_default {
font : 22px; font : 18px;
} }
#field_medium_gray, #label_medium_gray { #field_medium_gray, #label_medium_gray {
font : 22px; font : 18px;
color : rgb(54, 54, 54); color : rgb(54, 54, 54);
} }
#field_medium_blue, #label_medium_blue { #field_medium_blue, #label_medium_blue {
font : 22px; font : 18px;
color : rgb(0, 30, 80); color : rgb(0, 30, 80);
} }
#field_medium_orange, #label_medium_orange { #field_medium_orange, #label_medium_orange {
font : 22px; font : 18px;
color : rgb(235, 160, 15); color : rgb(235, 160, 15);
} }
#label_qty, #spin_box_qty, #row_field_price, #label_qty, #spin_box_qty, #row_field_price,
#label_price, #row_field_note, #label_fraction, #row_field_qty, #label_price, #row_field_note, #label_fraction, #row_field_qty,
#field_fraction { #field_fraction {
font : 22px; font : 18px;
alignment : center; alignment : center;
} }
#row_field_description { #row_field_description {
font : 22px; font : 18px;
color : #242424; color : #242424;
} }
#label_product { #label_product {
font : bold 24px; font : bold 20px;
alignment : center; alignment : center;
color : #242424; color : #242424;
} }
@ -67,14 +67,14 @@ QSpinBox {
QSpinBox::up-button { QSpinBox::up-button {
subcontrol-position: right; subcontrol-position: right;
height: 40px; height: 32px;
width: 40px; width: 32px;
} }
QSpinBox::down-button { QSpinBox::down-button {
subcontrol-position: left; subcontrol-position: left;
height: 40px; height: 32px;
width: 40px; width: 32px;
} }
#field_invoice { #field_invoice {
@ -85,14 +85,14 @@ QSpinBox::down-button {
#label_position, #label_salesman, #label_payment_term, #label_position, #label_salesman, #label_payment_term,
#label_party, #label_global_discount, #field_invoice, #label_invoice, #label_party, #label_global_discount, #field_invoice, #label_invoice,
#label_agent, #label_date, #label_order_number, #label_default { #label_agent, #label_date, #label_order_number, #label_default {
font : 20px; font : 16px;
color : rgb(150, 150, 150); color : rgb(150, 150, 150);
min-height : 10px; min-height : 10px;
min-width : 10px; min-width : 8px;
} }
#field_amount, #field_sign { #field_amount, #field_sign {
font : bold 42px; font : bold 38px;
color : rgb(43, 60, 77); color : rgb(43, 60, 77);
min-height : 40px; min-height : 40px;
max-height : 100px; max-height : 100px;
@ -114,13 +114,13 @@ QSpinBox::down-button {
#table_payment { #table_payment {
color : rgb(70, 70, 70); color : rgb(70, 70, 70);
font : 14pt; font : 12pt;
max-height : 80px; max-height : 80px;
} }
#table_sale_lines { #table_sale_lines {
color : rgb(70, 70, 70); color : rgb(70, 70, 70);
font : 14pt; font : 12pt;
} }
#label_paid, #label_change, #label_discount, #label_total_amount, #label_paid, #label_change, #label_discount, #label_total_amount,
@ -128,7 +128,7 @@ QSpinBox::down-button {
#field_total_amount, #field_change, #field_discount, #field_paid, #field_total_amount, #field_change, #field_discount, #field_paid,
#field_untaxed_amount, #field_taxes_amount { #field_untaxed_amount, #field_taxes_amount {
min-height : 10px; min-height : 10px;
font: bold 20pt; font: bold 16pt;
} }
#img_pixmap_pos { #img_pixmap_pos {

View file

@ -2,7 +2,7 @@
QAbstractButton { QAbstractButton {
font-family: "DejaVu Sans"; font-family: "DejaVu Sans";
border-style: groove; border-style: groove;
font: 12pt; font: 18pt;
color: rgb(102, 102, 102); color: rgb(102, 102, 102);
background-color: rgb(242, 242, 242); background-color: rgb(242, 242, 242);
min-height: 50px; min-height: 50px;
@ -23,110 +23,113 @@ QAbstractButton {
} }
#label_default { #label_default {
font : 14pt; font : 20pt;
color : rgb(102, 102, 102); color : rgb(102, 102, 102);
min-height : 10px; min-height : 10px;
min-width : 10px; min-width : 80px;
} }
#field_default { #field_default {
font: bold 14pt; font: bold 20pt;
min-height : 10px; min-height : 10px;
} }
#field_small_gray, #label_small_gray { #field_small_gray, #label_small_gray {
font : 16px; font : 15px;
width: auto;
color : rgb(54, 54, 54); color : rgb(54, 54, 54);
} }
#field_medium_gray, #label_medium_gray { #field_medium_gray, #label_medium_gray {
font : 24px; font : 15px;
color : rgb(54, 54, 54); color : rgb(54, 54, 54);
} }
#field_big_gray, #label_big_gray { #field_big_gray, #label_big_gray {
font : 32px; font : 20px;
color : rgb(54, 54, 54); color : rgb(54, 54, 54);
} }
#field_small_blue, #label_small_blue { #field_small_blue, #label_small_blue {
font : 16px; font : 15px;
width: auto;
color : rgb(0, 30, 80); color : rgb(0, 30, 80);
} }
#field_medium_blue, #label_medium_blue { #field_medium_blue, #label_medium_blue {
font : 24px; font : 15px;
color : rgb(0, 30, 80); color : rgb(0, 30, 80);
} }
#field_big_blue, #label_big_blue { #field_big_blue, #label_big_blue {
font : bold 32px; font : bold 20px;
color : rgb(0, 30, 80); color : rgb(0, 30, 80);
} }
#field_small_orange, #label_small_orange { #field_small_orange, #label_small_orange {
font : 16px; font : 15px;
width: auto;
color : rgb(235, 160, 15); color : rgb(235, 160, 15);
} }
#field_medium_orange, #label_medium_orange { #field_medium_orange, #label_medium_orange {
font : 24px; font : 15px;
color : rgb(235, 160, 15); color : rgb(235, 160, 15);
} }
#field_big_orange, #label_big_orange { #field_big_orange, #label_big_orange {
font : bold 32px; font : bold 20px;
color : rgb(235, 160, 15); color : rgb(235, 160, 15);
} }
QDialog { QDialog {
min-height : 300px; min-height : 200px;
max-height : 400px; max-height : 300px;
min-width : 500px; min-width : 100px;
} }
#label_gray { #label_gray {
font: bold 14pt; font: bold 15pt;
min-height : 10px; min-height : 10px;
min-width : 10px; min-width : 20px;
color: rgb(102, 102, 102); color: rgb(102, 102, 102);
} }
#label_blue { #label_blue {
font: bold 14pt; font: bold 15pt;
color: rgb(17, 84, 102); color: rgb(17, 84, 102);
min-height : 10px; min-height : 10px;
min-width : 10px; min-width : 20px;
} }
#label_message { #label_message {
font : 14pt; font : 8pt;
min-height : 45px; min-height : 35px;
min-width : 10px; min-width : 20px;
} }
#field_invoice { #field_invoice {
font : 15pt; font : 9pt;
min-height : 45px; min-height : 30px;
min-width : 110px; min-width : 80px;
} }
#label_input { #label_input {
font : 15pt; font : 8pt;
min-height : 45px; min-height : 20px;
min-width : 200px; min-width : 180px;
} }
#field_sign { #field_sign {
font: bold 26pt; font: bold 18pt;
min-height : 70px; min-height : 20px;
max-width: 100px; max-width: 80px;
} }
#field_amount { #field_amount {
font: 24pt; font: 18pt;
min-height : 60px; min-height : 40px;
max-width: 310px; max-width: 280px;
} }
#field_total_amount, #label_total_amount { #field_total_amount, #label_total_amount {
@ -135,13 +138,13 @@ QDialog {
#table_sale_lines { #table_sale_lines {
color : rgb(70, 70, 70); color : rgb(70, 70, 70);
font : 11pt; font : 7pt;
max-height: 380px; max-height: 300px;
} }
#label_product, #label_qty, #spin_box_qty, #row_field_price, #label_product, #label_qty, #spin_box_qty, #row_field_price,
#label_price, #row_field_note { #label_price, #row_field_note {
font : 24px; font : 20px;
alignment : center; alignment : center;
} }
@ -153,12 +156,12 @@ QSpinBox {
QSpinBox::up-button { QSpinBox::up-button {
subcontrol-position: right; subcontrol-position: right;
height: 38px; height: 28px;
width: 38px; width: 28px;
} }
QSpinBox::down-button { QSpinBox::down-button {
subcontrol-position: left; subcontrol-position: left;
height: 38px; height: 28px;
width: 38px; width: 28px;
} }

View file

@ -12,7 +12,7 @@ From main directory:
3. Release translation 3. Release translation
lrelease app/translations/i18n_es.ts lrelease app/locale/i18n_es.ts

View file

@ -1,3 +1,3 @@
# Execute in terminal $pylupdate5 project.pro # Execute in terminal $pylupdate5 project.pro
SOURCES = app/mainwindow.py app/reporting.py app/buttonpad.py SOURCES = app/mainwindow.py app/reporting.py app/buttonpad.py app/commons/buttons.py app/commons/dblogin.py app/commons/dialogs.py app/commons/forms.py app/commons/frontwindow.py app/commons/menu_list.py app/commons/search_window.py
TRANSLATIONS = app/locale/i18n_es.ts TRANSLATIONS = app/locale/i18n_es.ts