minor fix invoice manual

This commit is contained in:
Wilson Gomez 2023-08-03 08:33:42 -05:00
parent f209fbc461
commit 2761c3ea7f
1 changed files with 7 additions and 1 deletions

View File

@ -416,6 +416,9 @@ class AppWindow(FrontWindow):
if self.shop.get('electronic_authorization'):
invoice_type.append(('1', ('VENTA ELECTRONICA')))
if self.shop.get('manual_authorization'):
invoice_type.append(('M', ('MANUAL')))
self.field_invoice_type = ComboBox(self, 'invoice_type', {
'values': invoice_type,
'on_change': 'action_invoice_type_selection_changed'
@ -1462,7 +1465,10 @@ class AppWindow(FrontWindow):
def action_invoice_type_selection_changed(self, index):
val = self.field_invoice_type.get_id()
if val and self._sale and self._sale.get('id'):
self.Sale.write([self._sale['id']], {'invoice_type': val})
args = {'invoice_type': val}
if val == 'M':
args['invoice_method'] = 'manual'
self.Sale.write([self._sale['id']], args)
self.label_input.setFocus()
def action_tax_selection_changed(self):