minor fix
This commit is contained in:
parent
610baa5cef
commit
8292e69d03
|
@ -770,7 +770,10 @@ class AppWindow(FrontWindow):
|
|||
rec = {}
|
||||
try:
|
||||
quantity = Decimal(eval_value)
|
||||
product_id = self._sale_line['product']['id']
|
||||
try:
|
||||
product_id = self._sale_line['product']['id']
|
||||
except:
|
||||
product_id = self._sale_line['product']
|
||||
if product_id and self.stock_context:
|
||||
_product, = self.Product.find(
|
||||
[('id', '=', product_id)],
|
||||
|
@ -778,6 +781,7 @@ class AppWindow(FrontWindow):
|
|||
)
|
||||
if _product and 'quantity' in _product:
|
||||
if not self._check_stock_quantity(_product, quantity):
|
||||
print('retorna esta')
|
||||
return False
|
||||
if self._current_line_id:
|
||||
self._sale_line['quantity'] = float(quantity)
|
||||
|
|
Loading…
Reference in New Issue