Merge pull request #28994 from nextchamp-saqib/zero-qty-debit-note

fix: cannot create debit note with zero qty
This commit is contained in:
Deepesh Garg
2022-01-07 18:35:24 +05:30
committed by GitHub
3 changed files with 5 additions and 1 deletions

View File

@@ -113,7 +113,7 @@ class AccountsController(TransactionBase):
_('{0} is blocked so this transaction cannot proceed').format(supplier_name), raise_exception=1)
def validate(self):
if not self.get('is_return'):
if not self.get('is_return') and not self.get('is_debit_note'):
self.validate_qty_is_not_zero()
if self.get("_action") and self._action != "update_after_submit":