@ -0,0 +1,42 @@ |
|||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Bill Digitization |
|||
================= |
|||
This module creates bill from scanned bill document. |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
Developer: (V16) Sruthi Renjith, Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
License |
|||
------- |
|||
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Sruthi Renjith (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,57 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Sruthi Renjith (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
'name': 'Bill Digitization', |
|||
'version': '16.0.1.0.0', |
|||
'category': 'Accounting', |
|||
'summary': """Converting traditional paper-based bills into digital |
|||
formats.""", |
|||
'description': """Reading scanned documents with extension .jpg, .jpeg and |
|||
.png using specialized hardware and converting them into |
|||
vendor bills in odoo. It makes use of the Optical Character |
|||
Recognition (OCR) technology to convert scanned images into |
|||
editable text""", |
|||
'author': "Cybrosys Techno Solutions", |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['base', 'base_accounting_kit'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/res_config_settings_views.xml', |
|||
'wizard/digitize_bill_views.xml', |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'bill_digitization/static/src/js/digitize_button.js', |
|||
'bill_digitization/static/src/xml/digitize_button.xml', |
|||
], |
|||
}, |
|||
'external_dependencies': { |
|||
'python': ['PIL', 'pytesseract'] |
|||
}, |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False |
|||
} |
@ -0,0 +1,5 @@ |
|||
## Module <bill_digitization> |
|||
#### 04.11.2023 |
|||
#### Version 16.0.1.0.0 |
|||
#### ADD |
|||
- Initial commit for Bill Digitization |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Sruthi Renjith (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import res_config_settings |
@ -0,0 +1,32 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Sruthi Renjith (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ResConfigSettings(models.TransientModel): |
|||
""" Class to add a boolean in config settings """ |
|||
_inherit = "res.config.settings" |
|||
|
|||
digitize_bill = fields.Boolean( |
|||
string="Digitize Bill", |
|||
config_parameter='bill_digitization.digitize_bill', |
|||
help="Enable the button to digitize bills") |
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 398 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,664 @@ |
|||
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;"> |
|||
<!-- TITLE BAR --> |
|||
<div class="d-flex align-items-center justify-content-between" |
|||
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
|||
<img src="assets/misc/logo.png" width="162" height="60" |
|||
style="width:auto !important; height:60px !important"/> |
|||
<div> |
|||
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Community |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF TITLE BAR --> |
|||
|
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12"> |
|||
<!-- APP HERO --> |
|||
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> |
|||
Bill Digitization</h1> |
|||
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> |
|||
Creating Vendor Bill from Scanned Document</p> |
|||
</div> |
|||
<!-- END OF APP HERO --> |
|||
<img src="assets/screenshots/hero.gif" |
|||
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- NAVIGATION SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/compass.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Explore This |
|||
Module</h2> |
|||
</div> |
|||
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#overview"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn |
|||
more about this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#config"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Configuration</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
configuration of this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#features"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
features of this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#screenshots"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
screenshots for this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<!-- END OF NAVIGATION SECTION --> |
|||
|
|||
<!-- OVERVIEW SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="overview"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pie-chart.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Overview |
|||
</h2> |
|||
</div> |
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 py-4"> |
|||
Bill Digitization allows user to create vendor bill from scanned |
|||
documents. |
|||
User can read .jpg, .jpeg and .png scanned files. |
|||
</div> |
|||
</div> |
|||
<!-- END OF OVERVIEW SECTION --> |
|||
|
|||
<!-- CONFIGURATION SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="config"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/config.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Configuration |
|||
</h2> |
|||
</div> |
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 py-4"> |
|||
Need to install the following python packages |
|||
1. PIL (pip3 install PIL) |
|||
2. pytesseract (pip3 install pytesseract) |
|||
3. tesseract-ocr (sudo apt-get install tesseract-ocr) |
|||
</div> |
|||
</div> |
|||
<!-- END OF CONFIGURATION SECTION --> |
|||
|
|||
<!-- FEATURES SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="features"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/features.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Features |
|||
</h2> |
|||
</div> |
|||
<div class="row" |
|||
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div class="d-flex align-items-start" |
|||
style="margin-top: 40px; margin-bottom: 40px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<div> |
|||
<span |
|||
style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Boolean Field on Configuration Settings to Choose Digitization Need</span> |
|||
</div> |
|||
</div> |
|||
<div class="d-flex align-items-start" |
|||
style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<div> |
|||
<span |
|||
style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">A Button on Vendor Bill Tree View to Read Documents</span> |
|||
</div> |
|||
</div> |
|||
<div class="d-flex align-items-start" |
|||
style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<div> |
|||
<span |
|||
style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">A View that Shows the Vendor Bill with All the Fetched Data</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF FEATURES SECTION --> |
|||
|
|||
<!-- SCREENSHOTS SECTION --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
|||
id="screenshots"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pictures.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Screenshots |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Option to Enable Digitization</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
This allows the user to choose digitization.</p> |
|||
<img src="assets/screenshots/boolean.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Digitization Button</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Button to read scanned documents.</p> |
|||
<img src="assets/screenshots/button.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Digitization Wizard</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
A wizard that allows to read document.</p> |
|||
<img src="assets/screenshots/wizard.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Sample Bill</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Sample bill</p> |
|||
<img src="assets/screenshots/sample_bill.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
Vendor Bill</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Vendor bill with scanned document data</p> |
|||
<img src="assets/screenshots/vendor_bill.png" |
|||
class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
|||
(The example format for scanned document is added in the |
|||
module.)</h3> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SCREENSHOTS SECTION --> |
|||
|
|||
<!-- SUGGESTED PRODUCTS --> |
|||
<div class="row"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center" |
|||
style="text-align: center; padding: 2.5rem 1rem !important;"> |
|||
<h2 style="color: #212529 !important;">Suggested Products</h2> |
|||
<hr |
|||
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/> |
|||
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
|||
<!-- The slideshow --> |
|||
<div class="carousel-inner" style="padding: 30px;"> |
|||
<div class="carousel-item active" |
|||
style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/base_accounting_kit/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="./assets/modules/module01.gif"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/base_account_budget/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="./assets/modules/module02.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/dynamic_accounts_report/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="./assets/modules/module03.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item active" |
|||
style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/hr_payroll_account_community/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="./assets/modules/module04.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/account_partner_ledger_filter/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="./assets/modules/module05.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/account_payment_approval/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="./assets/modules/module06.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Left and right controls --> |
|||
<a class="carousel-control-prev" href="#demo1" data-slide="prev" |
|||
style="width:35px; color:#000"> <span |
|||
class="carousel-control-prev-icon"><i |
|||
class="fa fa-chevron-left" |
|||
style="font-size:24px"></i></span> |
|||
</a> <a class="carousel-control-next" href="#demo1" |
|||
data-slide="next" |
|||
style="width:35px; color:#000"> |
|||
<span class="carousel-control-next-icon"><i |
|||
class="fa fa-chevron-right" |
|||
style="font-size:24px"></i></span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SUGGESTED PRODUCTS --> |
|||
|
|||
<!-- OUR SERVICES --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/star.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our Services |
|||
</h2> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/cogs.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Customization</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/wrench.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/lifebuoy.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Support</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/user.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Hire |
|||
Odoo |
|||
Developer</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/puzzle.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Integration</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/update.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Migration</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/consultation.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Consultancy</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/training.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/license.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Licensing Consultancy</h6> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF OUR SERVICES --> |
|||
|
|||
<!-- OUR INDUSTRIES --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/corporate.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our |
|||
Industries |
|||
</h2> |
|||
</div> |
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/trading-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Trading |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easily procure |
|||
and |
|||
sell your products</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/pos-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
POS |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easy |
|||
configuration |
|||
and convivial experience</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/education-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Education |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
A platform for |
|||
educational management</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/manufacturing-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Manufacturing |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Plan, track and |
|||
schedule your operations</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="./assets/icons/ecom-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
E-commerce & Website |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Mobile |
|||
friendly, |
|||
awe-inspiring product pages</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="./assets/icons/service-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Service Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Keep track of |
|||
services and invoice</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="./assets/icons/restaurant-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Restaurant |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Run your bar or |
|||
restaurant methodically</p> |
|||
</div> |
|||
</div> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="./assets/icons/hotel-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Hotel Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
An |
|||
all-inclusive |
|||
hotel management application</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF OUR INDUSTRIES --> |
|||
|
|||
<!-- SUPPORT --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/customer-support.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Support |
|||
</h2> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/support.png" height="48" width="48" |
|||
style="width: 42px; height: 42px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>Need Help?</h4> |
|||
<p style="line-height: 100%;">Got questions or need help? |
|||
Get in touch.</p> |
|||
<a href="mailto:odoo@cybrosys.com"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
odoo@cybrosys.com</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/whatsapp.png" height="52" width="52" |
|||
style="width: 52px; height: 52px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>WhatsApp</h4> |
|||
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p> |
|||
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
+91 86068 |
|||
27707</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
|||
<img src="assets/misc/logo.png" width="144" height="31" |
|||
style="width:144px; height: 31px; margin-top: 40px;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SUPPORT --> |
@ -0,0 +1,36 @@ |
|||
/** @odoo-module */ |
|||
import { ListController } from '@web/views/list/list_controller'; |
|||
import { patch } from "@web/core/utils/patch"; |
|||
const { useState } = owl; |
|||
var rpc = require('web.rpc'); |
|||
var core = require('web.core'); |
|||
var _t = core._t; |
|||
|
|||
patch(ListController.prototype, "DigitizeList", { |
|||
/* Making button visibility false in default */ |
|||
async setup(){ |
|||
this.state = useState({ |
|||
button_state : false |
|||
}) |
|||
this._super(); |
|||
/* Getting the value of the field */ |
|||
const digitizeBillParam = await rpc.query({ |
|||
model: 'ir.config_parameter', |
|||
method: 'get_param', |
|||
args: ['bill_digitization.digitize_bill'], |
|||
}); |
|||
this.state.button_state = digitizeBillParam |
|||
}, |
|||
/* Opening a wizard on button click */ |
|||
onClickDigitize() { |
|||
this.actionService.doAction({ |
|||
name: _t("Upload Bill"), |
|||
type: "ir.actions.act_window", |
|||
res_model: "digitize.bill", |
|||
view_type : 'form', |
|||
view_mode : 'form', |
|||
views: [[false, "form"]], |
|||
target: 'new', |
|||
}); |
|||
}, |
|||
}) |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!-- Template for adding a button in the view by inheriting the view --> |
|||
<templates xml:space="preserve"> |
|||
<t t-name="account.ListView.Buttons" t-inherit="web.ListView.Buttons" |
|||
t-inherit-mode="primary" owl="1" t-options="{'view_class': 'BillView'}"> |
|||
<xpath expr="//button[hasclass('o_list_button_add')]" position="after"> |
|||
<t t-if="this.props.context.default_move_type == 'in_invoice'"> |
|||
<button id="button_digitize_id" t-if="this.state.button_state" |
|||
class="btn btn-primary o_list_button_digitize" |
|||
style="margin-left:10px;" |
|||
t-on-click="onClickDigitize"> |
|||
Digitize Bill |
|||
</button> |
|||
</t> |
|||
</xpath> |
|||
</t> |
|||
</templates> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Inheriting the view of res_config_setting --> |
|||
<record id="res_config_settings_view_form" model="ir.ui.view"> |
|||
<field name="name">res.config.settings.view.form.inherit.bill.digitization</field> |
|||
<field name="model">res.config.settings</field> |
|||
<field name="inherit_id" |
|||
ref="account.res_config_settings_view_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//div[@id='account_vendor_bills']" |
|||
position="inside"> |
|||
<div class="col-xs-12 col-md-6 o_setting_box" |
|||
id="digitize_bill"> |
|||
<div class="o_setting_left_pane"> |
|||
<field name="digitize_bill"/> |
|||
</div> |
|||
<div class="o_setting_right_pane" |
|||
name="digitize_bill_right_pane"> |
|||
<label for="digitize_bill"/> |
|||
<div class="text-muted"> |
|||
Digitize bill from scanned documents with .jpg, .jpeg or .png extension using OCR and Artificial Intelligence |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Sruthi Renjith (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import digitize_bill |
@ -0,0 +1,395 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Sruthi Renjith (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
import io |
|||
import pytesseract |
|||
import re |
|||
from PIL import Image |
|||
from odoo import Command, fields, models, _ |
|||
from odoo.exceptions import ValidationError |
|||
|
|||
|
|||
class DigitizeBill(models.TransientModel): |
|||
""" To read documents and to convert into vendor bills """ |
|||
_name = "digitize.bill" |
|||
_description = "Digitize Bill" |
|||
|
|||
bill = fields.Binary(string="Document", required=True, |
|||
help="Choose a scanned document") |
|||
file_name = fields.Char(string="File Name", help="Name of the file") |
|||
|
|||
def record_lines(self, product_lines_newline_name_qty_price_amount, |
|||
product_lines_name_qty_amount, |
|||
product_lines_qty_name_amount, |
|||
product_lines_name_qty_price_amount1, |
|||
product_lines_name_price_qty_amount_with_dollar, |
|||
product_lines_name_price_qty_amount, |
|||
product_lines_name_amount, |
|||
product_lines_name_qty_price_amount2, |
|||
product_lines_double_line_name, |
|||
product_lines_code_name, |
|||
product_lines_quantity_part, |
|||
product_lines_vendor_bill_pattern, |
|||
product_lines_quantity_price_amount_pattern, |
|||
product_lines_quantity_price_amount_pattern2, |
|||
product_line_name_with_extra_line): |
|||
""" Function to extract bill data from text read by pytesseract """ |
|||
products = [] |
|||
price = [] |
|||
subtotal = [] |
|||
quantity = [] |
|||
if (product_lines_newline_name_qty_price_amount or |
|||
product_lines_name_qty_price_amount1 or |
|||
product_lines_name_qty_price_amount2): |
|||
if product_lines_name_qty_price_amount1: |
|||
product_lines_newline_name_qty_price_amount = ( |
|||
product_lines_name_qty_price_amount1) |
|||
if product_lines_name_qty_price_amount2: |
|||
product_lines_newline_name_qty_price_amount = ( |
|||
product_lines_name_qty_price_amount2) |
|||
# Fetching products and create new ones |
|||
products = [self.env['product.product'].search( |
|||
[('name', '=', line[0])], limit=1) or |
|||
self.env['product.product'].create( |
|||
{'name': line[0]}) |
|||
for line in |
|||
product_lines_newline_name_qty_price_amount] |
|||
# Creating lists for prices and subtotals |
|||
price = [line[2] for line in |
|||
product_lines_newline_name_qty_price_amount] |
|||
subtotal = [line[3] for line in |
|||
product_lines_newline_name_qty_price_amount] |
|||
elif product_lines_name_qty_amount: |
|||
# Fetching products and create new ones |
|||
products = [ |
|||
self.env['product.product'].search([('name', '=', line[0])], |
|||
limit=1) or |
|||
self.env['product.product'].create({'name': line[0]}) |
|||
for line in product_lines_name_qty_amount] |
|||
# Calculating unit prices |
|||
price = [ |
|||
float(line[2]) / float(line[1]) if float(line[1]) != 0 else 0 |
|||
for line in product_lines_name_qty_amount] |
|||
# Creating a list for subtotals |
|||
subtotal = [line[2] for line in product_lines_name_qty_amount] |
|||
elif product_lines_qty_name_amount: |
|||
# Fetching products and create new ones |
|||
products = [ |
|||
self.env['product.product'].search([('name', '=', line[1])], |
|||
limit=1) or |
|||
self.env['product.product'].create({'name': line[1]}) |
|||
for line in product_lines_qty_name_amount] |
|||
# Calculating unit prices |
|||
price = [ |
|||
float(line[2]) / float(line[0]) if float(line[0]) != 0 else 0 |
|||
for line in product_lines_qty_name_amount] |
|||
# Creating a list for subtotals |
|||
subtotal = [line[2] for line in product_lines_qty_name_amount] |
|||
elif (product_lines_name_price_qty_amount_with_dollar or |
|||
product_lines_name_price_qty_amount): |
|||
if product_lines_name_price_qty_amount: |
|||
product_lines_name_price_qty_amount_with_dollar = ( |
|||
product_lines_name_price_qty_amount) |
|||
# Fetching products and create new ones |
|||
products = [ |
|||
self.env['product.product'].search([('name', '=', line[0])], |
|||
limit=1) or |
|||
self.env['product.product'].create({'name': line[0]}) |
|||
for line in product_lines_name_price_qty_amount_with_dollar] |
|||
# Extracting item prices and amounts |
|||
price = [line[1].replace('$', '') if '$' in line[1] else line[1] |
|||
for line in |
|||
product_lines_name_price_qty_amount_with_dollar] |
|||
subtotal = [line[3].replace('$', '') if '$' in line[3] else line[3] |
|||
for line in |
|||
product_lines_name_price_qty_amount_with_dollar] |
|||
elif product_lines_name_amount: |
|||
# Fetching products and create new ones |
|||
products = [ |
|||
self.env['product.product'].search([('name', '=', line[0])], |
|||
limit=1) or |
|||
self.env['product.product'].create({'name': line[0]}) |
|||
for line in product_lines_name_amount] |
|||
# Extracting item amounts and create a list for subtotals |
|||
subtotal = [line[1].replace('$', '') if '$' in line[1] else line[1] |
|||
for line in product_lines_name_amount] |
|||
elif product_lines_code_name: |
|||
name_list_one = [] |
|||
if product_line_name_with_extra_line: |
|||
for code, name in product_line_name_with_extra_line: |
|||
product_info = f"{code} {name}" |
|||
name_list_one.append(product_info) |
|||
names = [item.strip() for item in |
|||
product_lines_code_name[0].split('\n') if item.strip()] |
|||
if name_list_one and len(name_list_one) > len(names): |
|||
names = name_list_one |
|||
if product_lines_quantity_part: |
|||
order_lines = [line.strip() for line in |
|||
product_lines_quantity_part[0].split('\n') if |
|||
line.strip()] |
|||
elif product_lines_quantity_price_amount_pattern: |
|||
order_lines = [line.strip() for line in |
|||
product_lines_quantity_price_amount_pattern[ |
|||
0].split('\n') if |
|||
line.strip()] |
|||
elif product_lines_quantity_price_amount_pattern2: |
|||
order_lines = [line.strip() for line in |
|||
product_lines_quantity_price_amount_pattern2[ |
|||
0].split('\n') if |
|||
line.strip()] |
|||
else: |
|||
order_lines = [] |
|||
# Create the 'products' list |
|||
products = [ |
|||
self.env['product.product'].search([('name', '=', name)], |
|||
limit=1) or |
|||
self.env['product.product'].create({'name': name}) |
|||
for name in names] |
|||
# Creating the unit price list |
|||
price = [float(line.split()[1].replace(',', '')) if line else 0 for |
|||
line in order_lines] |
|||
# Calculating and Creating the 'subtotal' list |
|||
subtotal = [float(line.split()[1].replace(',', '')) * float( |
|||
line.split()[0]) if line else 0 for line in order_lines] |
|||
# Creating the quantity list |
|||
quantity = [float(line.split()[0]) if line else 0 for line in |
|||
order_lines] |
|||
elif product_lines_vendor_bill_pattern: |
|||
products = [ |
|||
self.env['product.product'].search([('name', '=', item[0])], |
|||
limit=1) or |
|||
self.env['product.product'].create({'name': item[0]}) |
|||
for item in product_lines_vendor_bill_pattern] |
|||
quantity = [float(item[1]) for item in |
|||
product_lines_vendor_bill_pattern] |
|||
price = [float(item[2]) for item in |
|||
product_lines_vendor_bill_pattern] |
|||
subtotal = [float(item[2]) * float(item[1]) for item in |
|||
product_lines_vendor_bill_pattern] |
|||
if product_lines_double_line_name: |
|||
for line in product_lines_double_line_name: |
|||
product_name = line[0] + ' ' + line[1] |
|||
product = self.env['product.product'].search( |
|||
[('name', '=', product_name)], limit=1) |
|||
if not product: |
|||
product = self.env['product.product'].create({ |
|||
'name': product_name |
|||
}) |
|||
products.append(product) |
|||
if '$' in line[5]: |
|||
line[5] = line[5].replace('$', '') |
|||
subtotal.append(line[5]) |
|||
item_price = line[4].replace('$', '') if '$' in line[4] else \ |
|||
line[4] |
|||
price.append(item_price) |
|||
if bool(quantity): |
|||
# Looping lists to create product line values |
|||
move_line_vals = [ |
|||
(0, 0, { |
|||
'product_id': product.id, |
|||
'name': 'Outside Bill', |
|||
'price_unit': price_amount, |
|||
'price_subtotal': total_amount, |
|||
'quantity': qty, |
|||
'tax_ids': [Command.set([])], |
|||
'move_id': self.id, |
|||
}) |
|||
for product, price_amount, total_amount, qty in |
|||
zip(products, price, subtotal, quantity) |
|||
] |
|||
elif bool(price): |
|||
# Looping three lists to create product line values |
|||
move_line_vals = [ |
|||
(0, 0, { |
|||
'product_id': product.id, |
|||
'name': 'Outside Bill', |
|||
'price_unit': price_amount, |
|||
'price_subtotal': total_amount, |
|||
'tax_ids': [Command.set([])], |
|||
'move_id': self.id, |
|||
}) |
|||
for product, price_amount, total_amount in |
|||
zip(products, price, subtotal) |
|||
] |
|||
else: |
|||
move_line_vals = [ |
|||
(0, 0, { |
|||
'product_id': product.id, |
|||
'name': 'Outside Bill', |
|||
'price_subtotal': total_amount, |
|||
'tax_ids': [Command.set([])], |
|||
'move_id': self.id, |
|||
}) |
|||
for product, total_amount in zip(products, subtotal) |
|||
] |
|||
return move_line_vals |
|||
|
|||
def create_record(self, text): |
|||
""" Function to create vendor bill """ |
|||
# Different patterns or regular expressions to identify the data |
|||
# from the text |
|||
newline_name_qty_price_amount = \ |
|||
r'\n([A-Za-z ]+) (\d+) (\d+\.\d{2}) (\d+\.\d{2})' |
|||
name_qty_amount = r'\n([A-Za-z ]+) (\d+) (\d+\.\d{2})' |
|||
qty_name_amount = r'\n(\d+) ([A-Za-z ]+) (\d+\.\d{2})' |
|||
name_qty_price_amount1 = r'\s*([A-Za-z() \d]+) (\d+) (\d+) (\d+)' |
|||
name_price_qty_amount_with_dollar = \ |
|||
r'\n(\$?\w+(?: \w+)*) (\$[\d.]+) (\d+) (\$[\d.]+)' |
|||
name_price_qty_amount = \ |
|||
r'\n(\$?\w+(?: \w+)*) (\[\d.]+) (\d+) (\[\d.]+)' |
|||
name_amount = r'\n(\$?\w+(?: \w+)*) (\d+\.\d{2})' |
|||
name_qty_price_amount2 = r"([\w\s]+)\s+(\d+)\s+(\d+)\s+\$(\d+)" |
|||
double_line_name = \ |
|||
r'([\w\s]+)\s([\w\s]+)\s*([\w\s]+)\s*(\d+)\s*(\$\d+' \ |
|||
r'\.\d{2})\s*(\d+\.\d{2})' |
|||
code_name = r'Description\n([\s\S]*?)(?=\n\n)' |
|||
quantity_price_pattern = r'Quantity Unit Price Taxes\n([\s\S]*?)(?=\n\n)' |
|||
vendor_bill_pattern = r'\[[A-Z0-9-]+\] (.+?) (\d+\.\d+) (\d+\.\d+) (\d+\.\d+%?) \$ (\d+\.\d+)' |
|||
quantity_price_amount_pattern = r'Quantity Unit Price Taxes Amount\n((?:\d+\.\d+\s+\d+\.\d+\s+\d+\.\d+% \$\s+\d+\.\d+\n)+)' |
|||
quantity_price_amount_pattern2 = r'Quantity Unit Price Taxes Amount([\s\S]*?)(?:Untaxed Amount|Tax|Total|$)' |
|||
name_with_extra_line = r'\[([A-Z0-9-]+)\] (.+)' |
|||
|
|||
# Pattern to match date and bill number from the text |
|||
date_pattern = r'\d{1,2}/\d{1,2}/\d{2,4}' |
|||
bill_no_pattern = r'Bill\sNo\.: (\d{4})' |
|||
# Pattern to match the year format of date |
|||
# (two digit or four digit format) |
|||
year_pattern = re.compile(r'\d{2}') |
|||
# Matching each pattern with the text and fetching the matching |
|||
# data from it |
|||
try: |
|||
product_lines_newline_name_qty_price_amount = re.findall( |
|||
newline_name_qty_price_amount, text) |
|||
product_lines_name_qty_amount = re.findall(name_qty_amount, text) |
|||
product_lines_qty_name_amount = re.findall(qty_name_amount, text) |
|||
product_lines_name_qty_price_amount1 = re.findall( |
|||
name_qty_price_amount1, text) |
|||
product_lines_name_price_qty_amount_with_dollar = re.findall( |
|||
name_price_qty_amount_with_dollar, |
|||
text) |
|||
product_lines_name_price_qty_amount = re.findall( |
|||
name_price_qty_amount, text) |
|||
product_lines_name_amount = re.findall(name_amount, text) |
|||
product_lines_name_qty_price_amount2 = re.findall( |
|||
name_qty_price_amount2, text) |
|||
product_lines_double_line_name = re.findall(double_line_name, text) |
|||
date_match = re.search(date_pattern, text) |
|||
bill_no_match = re.search(bill_no_pattern, text) |
|||
product_lines_code_name = re.findall(code_name, text) |
|||
product_lines_quantity_part = re.findall( |
|||
quantity_price_pattern, text) |
|||
product_lines_vendor_bill_pattern = re.findall( |
|||
vendor_bill_pattern, text) |
|||
product_lines_quantity_price_amount_pattern = re.findall( |
|||
quantity_price_amount_pattern, text) |
|||
product_lines_quantity_price_amount_pattern2 = re.findall( |
|||
quantity_price_amount_pattern2, text) |
|||
product_line_name_with_extra_line = re.findall( |
|||
name_with_extra_line, text) |
|||
except Exception: |
|||
raise ValidationError(_("Cannot find the pattern")) |
|||
date_object = '' |
|||
if date_match: |
|||
# Reading the date value if the date pattern match any data |
|||
date_value = date_match.group() |
|||
match = year_pattern.search(date_value) |
|||
if date_value == '%d/%m/%y' or date_value == '%d/%m/%Y': |
|||
date_object = fields.datetime.strptime( |
|||
date_value, '%d/%m/%y') if match and len( |
|||
date_value.split('/')[ |
|||
-1]) == 2 else fields.datetime.strptime( |
|||
date_value, '%d/%m/%Y') |
|||
elif date_value == '%m/%d/%y' or date_value == '%m/%d/%Y': |
|||
date_object = fields.datetime.strptime( |
|||
date_value, '%m/%d/%y') if match and len( |
|||
date_value.split('/')[ |
|||
-1]) == 2 else fields.datetime.strptime( |
|||
date_value, '%m/%d/%Y') |
|||
date = date_object.strftime( |
|||
'%Y-%m-%d') if date_object else fields.Date.today() |
|||
else: |
|||
date = fields.Date.today() |
|||
# Fetching the bill number if te pattern matches |
|||
bill_no = bill_no_match.group(1) if bill_no_match else '' |
|||
# Calling the function to get the product lines of the bill |
|||
move_line_vals = self.record_lines( |
|||
product_lines_newline_name_qty_price_amount, |
|||
product_lines_name_qty_amount, |
|||
product_lines_qty_name_amount, |
|||
product_lines_name_qty_price_amount1, |
|||
product_lines_name_price_qty_amount_with_dollar, |
|||
product_lines_name_price_qty_amount, |
|||
product_lines_name_amount, product_lines_name_qty_price_amount2, |
|||
product_lines_double_line_name, |
|||
product_lines_code_name, |
|||
product_lines_quantity_part, |
|||
product_lines_vendor_bill_pattern, |
|||
product_lines_quantity_price_amount_pattern, |
|||
product_lines_quantity_price_amount_pattern2, |
|||
product_line_name_with_extra_line) |
|||
# After getting all the data, creating a record in the |
|||
# vendor bill |
|||
bill_record = self.env['account.move'].create([{ |
|||
'move_type': 'in_invoice', |
|||
'ref': bill_no, |
|||
'date': date, |
|||
'invoice_date': date, |
|||
'invoice_line_ids': move_line_vals, |
|||
}]) |
|||
return bill_record |
|||
|
|||
def action_add_document(self): |
|||
""" Function that reading the file in the format .jpg, .jpeg and .png |
|||
and converting into text using OCR python package """ |
|||
try: |
|||
file_attachment = self.env["ir.attachment"].search( |
|||
['|', ('res_field', '!=', False), ('res_field', '=', False), |
|||
('res_id', '=', self.id), |
|||
('res_model', '=', 'digitize.bill')], |
|||
limit=1) |
|||
file_path = file_attachment._full_path(file_attachment.store_fname) |
|||
with open(file_path, mode='rb') as file: |
|||
binary_data = file.read() |
|||
img = Image.open(io.BytesIO(binary_data)) |
|||
# Resizing the image to improve the clarity |
|||
resized_img = img.resize((img.width * 2, img.height * 2), |
|||
resample=Image.BICUBIC) |
|||
except Exception: |
|||
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")) |
|||
# Calling the function to create vendor bill |
|||
bill_record = self.create_record(text) |
|||
# Opening the vendor bill using its id |
|||
return { |
|||
'name': "Invoice", |
|||
'type': 'ir.actions.act_window', |
|||
'view_type': 'form', |
|||
'view_mode': 'form', |
|||
'res_model': 'account.move', |
|||
'res_id': bill_record.id, |
|||
'view_id': self.env.ref('account.view_move_form').id, |
|||
'target': 'current', |
|||
} |
@ -0,0 +1,36 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Wizard view to upload files --> |
|||
<record id="digitize_bill_view_form" model="ir.ui.view"> |
|||
<field name="name">digitize.bill.view.form</field> |
|||
<field name="model">digitize.bill</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<p><center><i>Upload images or pdf file format</i></center> |
|||
</p> |
|||
<group> |
|||
<group> |
|||
<field name="bill" filename="file_name"/> |
|||
<field name="file_name" invisible="1"/> |
|||
</group> |
|||
</group> |
|||
<footer> |
|||
<button name="action_add_document" class="oe_highlight" |
|||
string="ADD" type="object" |
|||
help="Add a bill document"/> |
|||
</footer> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<!-- Record for wizard action --> |
|||
<record id="digitize_bill_action" model="ir.actions.act_window"> |
|||
<field name="name">Digitize Bill</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">digitize.bill</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="digitize_bill_view_form"/> |
|||
<field name="target">new</field> |
|||
</record> |
|||
</odoo> |