[Fix] Not able to save purchase invoice, due to invalid condition (#14355)
This commit is contained in:
parent
7c088ff623
commit
50d8c4a10f
@ -460,7 +460,7 @@ class BuyingController(StockController):
|
||||
def validate_items(self):
|
||||
# validate items to see if they have is_purchase_item or is_subcontracted_item enabled
|
||||
|
||||
if self.is_subcontracted:
|
||||
if hasattr(self, "is_subcontracted") and self.is_subcontracted == 'Yes':
|
||||
validate_item_type(self, "is_sub_contracted_item", "subcontracted")
|
||||
else:
|
||||
validate_item_type(self, "is_purchase_item", "purchase")
|
||||
|
Loading…
x
Reference in New Issue
Block a user