minor fix

This commit is contained in:
wilson gomez 2022-02-04 17:54:10 -05:00
parent 775ccb7df9
commit e6c6753b96
1 changed files with 3 additions and 3 deletions

View File

@ -2823,7 +2823,7 @@ class AppWindow(FrontWindow):
'value': value,
'discount': discount,
})
print(value, discount, 'set_unit_price')
if rec:
self.model_sale_lines.update_record(rec)
self.set_amounts()
@ -3128,6 +3128,7 @@ class AppWindow(FrontWindow):
self._current_line_id = line['id']
to_write = {}
for k, v in data.items():
print(k, 'order de acciones')
if k in ['description', 'note']:
to_write[k] = v
elif k == 'unit_price' and float(v) != current_unit_price:
@ -3137,7 +3138,6 @@ class AppWindow(FrontWindow):
self._sign = '/'
value = current_unit_price - float(v)
self.set_discount(value, type_='fixed')
# self._process_price(v, line)
self._sign = None
elif k == 'quantity' and v != previous_qty:
qty_data = {
@ -3147,7 +3147,7 @@ class AppWindow(FrontWindow):
if self._config.get('use_price_list'):
qty_data['use_price_list'] = True
self.SaleLine.faster_set_quantity(qty_data)
elif k == 'update_base_price' and current_unit_price != base_price:
elif k == 'update_base_price':
self.set_unit_price(base_price, discount=False)
self.SaleLine.write([data['id']], to_write)