minor fix

This commit is contained in:
wilsongomez 2022-03-03 12:33:41 -05:00
parent 237f17dfe8
commit 96894ced2f
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,7 @@ from datetime import datetime, timedelta, date
from collections import OrderedDict
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QLabel, QHBoxLayout, QVBoxLayout, QWidget)
from paramiko import Agent
from app.commons.image import Image
from .frontwindow import FrontWindow
from .tools import get_icon, to_float, to_numeric
@ -1879,8 +1880,8 @@ class AppWindow(FrontWindow):
if hasattr(self, 'field_agent') and sale.get('agent') \
and sale.get('commission'):
commission = sale.get('commission')
self.field_agent.setText(
'[' + str(int(commission)) + ']' + ' ' + sale['agent']['name'])
sale['agent']['name'] = '[' + str(commission) + ']' + ' ' + sale['agent']['name']
self.store.set(sale['agent'])
self.field_agent_id = sale['agent']['id']
self.field_agent_ask.setText(sale['agent']['name'])
self.field_commission_ask.setText(str(commission))

View File

@ -74,6 +74,7 @@ class StoreView(object):
val = v.get('rec_name') or v.get('name') or v['id']
else:
val = v
field.setText(str(val))
res = self.Sale.write([self.sale_id], values)
return res