minor fix

This commit is contained in:
wilsongomez 2022-10-20 11:23:19 -05:00
parent 1845df03f6
commit 6cb012c2a7
2 changed files with 3 additions and 2 deletions

View File

@ -2497,7 +2497,7 @@ class AppWindow(FrontWindow):
if product_id:
product, = self.Product.find([('id', '=', product_id)], fields=[
'id', 'name', 'code', 'rec_name', 'quantity'], ctx=self.stock_context)
quantity = Decimal(line['quantity'])
quantity = Decimal(str(round(float(line['quantity']),5)))
if 'quantity' in product and not self._check_stock_quantity(product, quantity):
return False
return True
@ -2568,6 +2568,7 @@ class AppWindow(FrontWindow):
return True
qty_ = round(Decimal(product['quantity']), 2)
if self._password_force_assign:
print((request_qty and qty_ < request_qty) or (qty_ <= 0), qty_, request_qty)
if (request_qty and qty_ < request_qty) or (qty_ <= 0):
self.message_bar.set('without_stock_quantity', product['name'])
self.dialog_force_assign.exec_()

View File

@ -1 +1 @@
__version__ = "5.0.54"
__version__ = "5.0.55"