Browse Source

[FIX] Bug Fixed 'bill_digitization'

18.0
AjmalCybro 7 days ago
parent
commit
88cd73622a
  1. 5
      bill_digitization/doc/RELEASE_NOTES.md
  2. 21
      bill_digitization/static/description/index.html
  3. 9
      bill_digitization/wizard/digitize_bill.py

5
bill_digitization/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 18.0.1.0.0
#### ADD
- Initial commit for Bill Digitization
#### 15.12.2025
#### Version 18.0.1.0.0
#### UPDT
- Index updated with required Python package information

21
bill_digitization/static/description/index.html

@ -370,6 +370,27 @@
style="">
</div>
<!-- screenshots section-->
<div class="position-relative mb-4"
style="border-radius:10px; background-color:#f4f4f4">
<div class="p-md-5 p-3 position-relative">
<div class="row">
<div class="col-md-12">
<h1 style="font-weight:bold; font-size:calc(1.1rem + 1vw); line-height:120%; text-align:center; text-transform:capitalize; font-size: 40px;
font-weight: 700;">
<span style="color:#121212; font-size:calc(1.1rem + 1vw)">Install
</span>
<span style="color: #7f54b3; font-size:calc(1.1rem + 1vw)">Python Packages</span>
</h1>
</div>
<div class="col-md-12 mb-4">
<p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:#64728f">
Make sure the following Python packages are installed on your system:</p>
<p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:#64728f">
PIL (pip3 install PIL),pytesseract (pip3 install pytesseract),tesseract-ocr (sudo apt-get install tesseract-ocr)</p>
</div>
</div>
</div>
</div>
<div class="position-relative mb-4"
style="border-radius:10px; background-color:#f4f4f4">
<div class="p-md-5 p-3 position-relative">

9
bill_digitization/wizard/digitize_bill.py

@ -381,10 +381,11 @@ class DigitizeBill(models.TransientModel):
raise ValidationError(_("Cannot identify data"))
# Converting the image into text using OCR python package
# pytesseract
try:
text = pytesseract.image_to_string(resized_img)
except Exception:
raise ValidationError(_("Data cannot read"))
# try:
text = pytesseract.image_to_string(resized_img)
# except Exception:
# print('Exception',Exception)
# raise ValidationError(_("Data cannot read"))
# Calling the function to create vendor bill
bill_record = self.create_record(text)
# Opening the vendor bill using its id

Loading…
Cancel
Save