Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD/MIG] l10n_ch_qr_bill_scan #753

Open
wants to merge 13 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 156 additions & 0 deletions l10n_ch_qr_bill_scan/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
==========================
Switzerland - QR-bill scan
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:199f832d0a0d115987d15af813a95fb21f1c5ed2e3f0bb6f64fcb12a5dfc8542
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-switzerland/tree/16.0/l10n_ch_qr_bill_scan
:alt: OCA/l10n-switzerland
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-switzerland-16-0/l10n-switzerland-16-0-l10n_ch_qr_bill_scan
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-switzerland&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Import Vendor bills with a PayEye scanner.

The QR bills are introduced in Switzerland since the 30th of June 2020.

**Table of contents**

.. contents::
:local:

Installation
============

This module depends on `account_invoice_import` which is located in `edi` and has dependencies on `community-data-files`.
So the repositories `edi` and `community-data-files` must be present on the system.

Optionally you can also import Vendor bills directly from a PDF.
To enable this feature those additional dependencies must be
installed on your Odoo server:

pip install pyzbar,numpy,pdf2image,opencv-python-headless

If you are looking to generate QR-bill, this feature is already available
in Odoo in the Switzerland localization module (`l10n_ch`).

Configuration
=============

In order to configure the type of invoice created per partner.

Make sure your os have these package:

sudo apt-get update
sudo apt-get install poppler-utils libzbar0


Got to:
- `Accounting` or `Invoicing`
- `Configuration`
- `Import Vendor Bill`
- `Import Bills`

you will find the configuration of each partner.


In order to automatically create bank accounts on QR-bill import:

Go to:

- `Accounting` or `Invoicing`
- `Configuration`
- `Settings`
- `Invoice Import`

And activate `Auto-create Bank`

.. figure:: https://raw.githubusercontent.com/OCA/l10n-switzerland/16.0/l10n_ch_qr_bill_scan/static/description/auto-create-bank.png
:alt: auto create bank
:width: 600 px

Usage
=====

To import your invoices Launch the wizard `Invoicing` -> `Vendors` -> `Import Vendor Bill`.

In there you can either directly the QR code of the QR-bill or you can import a PDF/image file.

If it's the first time you import a Bill from a Vendor the wizard will ask you to create the partner and to set an import configuration for that partner.
A configuration let you set which expense account you want the invoice to be imported with.


To quickly import a series of invoices, use the button `Import Next Invoice` from the Vendor bill form.

Known issues / Roadmap
======================

TODO:

- Read the Swico standard from Billing info
- Read Alternative parameters

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-switzerland/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-switzerland/issues/new?body=module:%20l10n_ch_qr_bill_scan%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* Yannick Vaucher <yannick.vaucher@camptocamp.com>
* Juliette BLANC <juliette.blanc@camptocamp.com>
* Son Ho <sonhd@trobz.com>

Other credits
~~~~~~~~~~~~~

The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/l10n-switzerland <https://github.com/OCA/l10n-switzerland/tree/16.0/l10n_ch_qr_bill_scan>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions l10n_ch_qr_bill_scan/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import wizard
from . import tools
20 changes: 20 additions & 0 deletions l10n_ch_qr_bill_scan/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Switzerland - QR-bill scan",
"summary": "Scan QR-bill to create vendor bills",
"version": "16.0.1.0.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"category": "Localization",
"website": "https://github.com/OCA/l10n-switzerland",
"license": "AGPL-3",
"external_dependencies": {
"deb": ["libzbar0", "poppler-utils"],
"python": ["pyzbar", "pdf2image", "numpy", "opencv-python-headless"],
},
"depends": ["l10n_ch", "account_invoice_import"],
"data": ["wizard/account_invoice_import_view.xml"],
"auto_install": False,
"installable": True,
}
Binary file added l10n_ch_qr_bill_scan/data/CH-Cross_7mm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added l10n_ch_qr_bill_scan/data/QR-patch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions l10n_ch_qr_bill_scan/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
In order to configure the type of invoice created per partner.

Make sure your os have these package:

sudo apt-get update
sudo apt-get install poppler-utils libzbar0


Got to:
- `Accounting` or `Invoicing`
- `Configuration`
- `Import Vendor Bill`
- `Import Bills`

you will find the configuration of each partner.


In order to automatically create bank accounts on QR-bill import:

Go to:

- `Accounting` or `Invoicing`
- `Configuration`
- `Settings`
- `Invoice Import`

And activate `Auto-create Bank`

.. figure:: ../static/description/auto-create-bank.png
:alt: auto create bank
:width: 600 px
3 changes: 3 additions & 0 deletions l10n_ch_qr_bill_scan/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
* Juliette BLANC <juliette.blanc@camptocamp.com>
* Son Ho <sonhd@trobz.com>
1 change: 1 addition & 0 deletions l10n_ch_qr_bill_scan/readme/CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp
3 changes: 3 additions & 0 deletions l10n_ch_qr_bill_scan/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Import Vendor bills with a PayEye scanner.

The QR bills are introduced in Switzerland since the 30th of June 2020.
11 changes: 11 additions & 0 deletions l10n_ch_qr_bill_scan/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This module depends on `account_invoice_import` which is located in `edi` and has dependencies on `community-data-files`.
So the repositories `edi` and `community-data-files` must be present on the system.

Optionally you can also import Vendor bills directly from a PDF.
To enable this feature those additional dependencies must be
installed on your Odoo server:

pip install pyzbar,numpy,pdf2image,opencv-python-headless

If you are looking to generate QR-bill, this feature is already available
in Odoo in the Switzerland localization module (`l10n_ch`).
4 changes: 4 additions & 0 deletions l10n_ch_qr_bill_scan/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TODO:

- Read the Swico standard from Billing info
- Read Alternative parameters
9 changes: 9 additions & 0 deletions l10n_ch_qr_bill_scan/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
To import your invoices Launch the wizard `Invoicing` -> `Vendors` -> `Import Vendor Bill`.

In there you can either directly the QR code of the QR-bill or you can import a PDF/image file.

If it's the first time you import a Bill from a Vendor the wizard will ask you to create the partner and to set an import configuration for that partner.
A configuration let you set which expense account you want the invoice to be imported with.


To quickly import a series of invoices, use the button `Import Next Invoice` from the Vendor bill form.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading