minor fix

This commit is contained in:
Wilson Gomez 2023-05-13 10:59:06 -05:00
parent 0aede17329
commit ff17658c90
1 changed files with 2 additions and 2 deletions

View File

@ -1988,7 +1988,7 @@ class AppWindow(FrontWindow):
self.clear_right_panel()
self.store.clear()
self._clear_invoice_number = False
if self._commission_activated:
if self._commission_activated and self.enviroment == 'retail':
fields = MODELS_RETAIL['sale.sale']['fields']
fields.extend(['agent.rec_name', 'commission'])
sale, = self.Sale.find([('id', '=', sale_id)], fields=fields)
@ -2011,7 +2011,7 @@ class AppWindow(FrontWindow):
if sale.get('table_assigned.'):
self.field_table_assigned.setText(
sale['table_assigned.']['name'] or '')
print(sale, 'validate data')
consumer = sale.get('consumer.', None)
if consumer:
self.field_consumer.setText(consumer['name'] or '')