fix validate reservation with typ_pos_user
This commit is contained in:
parent
5473b16566
commit
edcc6fc056
|
@ -705,6 +705,10 @@ class DialogAdvance(QuickDialog):
|
|||
]
|
||||
super(DialogAdvance, self).__init__(parent, 'action', data=data)
|
||||
|
||||
def clean(self):
|
||||
self.parent.field_amount_ask.clear()
|
||||
self.parent.field_reservation_ask.setChecked(False)
|
||||
|
||||
class DialogVoucher(QuickDialog):
|
||||
def __init__(self, parent):
|
||||
data = ('voucher_ask', {'name': 'NUMERO DE COMPROBANTE'})
|
||||
|
|
|
@ -1407,11 +1407,20 @@ class AppWindow(FrontWindow):
|
|||
self.dialog_info_product.show()
|
||||
|
||||
def action_add_advance(self):
|
||||
if self.type_pos_user not in ('cashier', 'frontend_admin'):
|
||||
self.dialog('user_without_permission')
|
||||
return
|
||||
|
||||
if self._sale.get('state') == 'draft':
|
||||
self.Sale.quote({'id': self._sale['id']})
|
||||
self.load_sale(self._sale['id'])
|
||||
|
||||
if self._sale.get('state') == 'quotation':
|
||||
self.dialog_payment.exec_()
|
||||
flag = True
|
||||
# dialog_advance.addAction
|
||||
while flag:
|
||||
self.dialog_advance.clean()
|
||||
res = self.dialog_advance.exec_()
|
||||
amount = self.field_amount_ask.text()
|
||||
reservation = self.field_reservation_ask.isChecked()
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "5.0.53"
|
||||
__version__ = "5.0.54"
|
Loading…
Reference in New Issue