Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Contacts (contacts)
• Discuss (mail) • Inventory (stock) • Sales (sale_management) • Invoicing (account) |
Lines of code | 2334 |
Technical Name |
barcode_terminal |
License | AGPL-3 |
Website | https://sites.google.com/view/svp-barcodecollector/home |
Versions | 16.0 17.0 18.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Contacts (contacts)
• Discuss (mail) • Inventory (stock) • Sales (sale_management) • Invoicing (account) |
Lines of code | 2334 |
Technical Name |
barcode_terminal |
License | AGPL-3 |
Website | https://sites.google.com/view/svp-barcodecollector/home |
Versions | 16.0 17.0 18.0 |
Overview
- Barcode Terminal is application for import and usage of data obtained from mobile barcode scanning app "SVP Barcode Collector". While it initially designed to use data of just mentioned "Barcode Collector" (further - BCC) - nevertheless, technically - it can be used for import of barcode collection data from any source, provided that it obey required format. Format is pretty simple - old plain CSV or XLS files, containing mandatory 'barcode' column and several supplementary columns, part of which is optional.
- "Barcode Collector" ("BCC") is Android barcode scanner designed to serve as Data Terminal in wide range of works where hardware laser scanner facilities usually engaged. It maintains it's own mobile database to store collections of scanned data: barcode, quantity and optional name and images attached. Collections ('tasks') may subsequently be shared to arbitrary destination in the form of XLS,CSV,JSON or XML files.
With Barcode Terminal in a couple of minutes we can prepare voluminous purchase order, or sale order - about hundred items in size, or just update images of products using mobile camera
Quick start
- 1) Collect data with mobile BCC application
- 2) Export obtained collection (task) by means of standard android sharing action to any channel suitable to transport data file to Odoo workstation. The most convenient options is e-mail or cloud data storage
- BCC is supplied with it's own comprehensive description - so lets won't stuck much on this subject
- 3) In Odoo open this application "Barcode terminal" and press "Upload" button to open wizard for data import.
Fig. 1 | ![]() |
- As a result we obtain "Barcode Collection" document, which is a convenient intermediate data structure for automated creation of various primary business document, by filling multiple product lines based on obtained barcode data. Here we can see collection attributes: Name and unique Version ID. This attributes are mandatory, but serves purely for identification. Name could be edited arbitrary. Comment is optional.Further there is multiline table, containing barcodes, and empty "Product" column.
Fig. 2
|
![]() |
Fig. 3
|
![]() |
If name field is empty in imported file - it filled by "dummy" names, generated from barcode itself. Clearly - there is no practical sense for business in this kind of names, but technically it helps to demonstrate quickly the abilities of program and principles of work.
- This way we can quickly replenish or update product catalogue of our Odoo database. But the main purpose of this application is the ability to generate different primary documents with recognized products. This function called here "Implementation". We can run it now by means of button "Implement".
Fig. 4 | ![]() |
It opens simple wizard dialog, where we can choose what exactly kind of document we would like to generate. Then we press button "Generate" and obtain prefilled form of new document.
Fig. 5 | ![]() |
Of course it's not complete - user have to add missing data manually, but this is much simpler, as the compilation of needed product lines often is most tedious and scrupulous part of work
Fig. 6 | ![]() |
That's it. At this moment we can save new document or discard - so no new record will be created.
Mail aliases
Mail aliases is standard Odoo automation feature that allows to create document from incoming e-mail. So each alias record sets up connection between message attributes and generation of certain document types. Barcode Terminal as well can leverage this facility to make work more convenient. As a result this will allow you to bypass the stage of manual file downloading (step - 3 from start guide ). On Android device you or your business client just export the job to email and after some time in Odoo side (new email is usually checked every 5 min.) you have new "Barcode Collection" documents.
Odoo messaging system is pretty flexible and has many variants of tuning. If you never use this aliases before - please refer to Odoo official documents for help to better understanding. Here I'd like just highlight the main key points from the users point of view - what is needed to make mail alias working.
Fig. 7 | ![]() |
- 1) First of all there must be "Alias Domain" set in Odoo settings for yous company (let's say it will be: @your_company_aliases.com).
- 2) Then you have to agree with sysadmin for you to use one of address of this domain as alias for "Barcode Collection" documents. Let it be for example: "barcode_terminal@your_company_aliases.com". You can choose arbitrary local part instead of "barcode_terminal". From admin you need only this mailbox to be working and able to receive incoming mail.
- 3) Then you set this local part of address in configuration record form (Barcode Terminal -> menu "Configuration" -> "Barcode collection E-Mail alias".) to obtain actual alias address.
![]() |
![]() |
Fig. 8 | Fig. 9 |
Once it set - it is ready to work. Technically we can configure several alias , but in fact you need just one.
We could as well consider another possible scenario. Supposing - you run a small company, you are on your own with Odoo base - director and sysadmin in one person. In this case probably the simplest way to make aliases working - to use one of free email services like gmail or outlook. So you- 1) get new gmail mailbox (e.g. bct_alias@gmail.com).
- 2) Then you have to setup this mailbox as new incoming mail server in Odoo settings and make sure that it is working and has status confirmed. (Fig 7 point 1)
- 3) Then set "@gmail.com" as "Alias Domain" (Fig 7 point 2)
- 4) Finally edit Barcode Terminal alias record as in previous case (Fig. 8, 9) to obtain alias with "bct_alias@gmail.com" address.
The only tricky part in this is may be - step #2. This famous global services are very easy to use with web UI or dedicated desktop clients, but when it comes about using with third-party applications - the task became more complicated via the need of setting up OAuth protocol. Luckily, Odoo documentation has comprehensive guides for this:
- https://www.odoo.com/documentation/18.0/applications/general/email_communication/google_oauth.html# and
- https://www.odoo.com/documentation/18.0/applications/general/email_communication/azure_oauth.html
It may seems confusing at first but if you fulfill all carefully, you should succeed. You may also choose to try other way: all around the world there are usually a lot of not so well known services not willing to maintain security in so high level. They often do things simpler - without OAuth - especially for free plans. With this all the setup process is to input username and password. One more detail worth mentioning , when testing aliases - is how they tell already processed messages. For "imap" protocol it being marked as read and next time ignored when checked. So if you are waiting for new document appear in Odoo and decide to see if the source message is in right place using client UI - it will be marked as read - and you should mark it unread for all this worked out properly.
There is preset default alias record - feel free to edit it according
to just described logic, or create new one, experimenting and choose
what is better for you. We just don't recommend to use for this your
private general-purpose mailbox, especially with POP access.
While it should work for test due to filtering, if you proceed using it
in production stage, it may turn out that Odoo will every 5 minutes
doing stupid work on filtering all the same tonnes of irrelevant
messages trying to find alias data. It is of course huge wasting of
resources and could impact overall performance. So it should be special
dedicated mailbox: new one or that purged before.
Extencibility and limitations
This last section has more technical character and is addressed rather to developers that would have an interest to customize program closer to end user real situation.
To provide "implementation" function - this program uses so called "implementation templates". It is auxiliary records , that set mapping correspondence between fields of "Barcode Collection" record fields and resulting fields of target primary documents. One can study it using configuration menu. There are several preset templates but new can be created as well. Business documents often the combination of two or more data models connected with some kind of relations, so - there provided wizard for selection of possible combinations of parent document headers and multiline part records, containing products. Result of such wizard is just a billet - you can add or remove field correspondences according to common sense. Further we utilize standard Odoo ability to open prefilled forms for new records using context. So far it sounds like pretty simple technics. And it works, but not always. Many of Odoo documents have it's own builtin automation calculations that may interfere or simply obliterate the results of context prefilling. In such cases we agree this app is not applicable. It is because this application is common purpose or "universal" by design. One other possible way to overcome described problems - would be - to try to extend or change existing documents. Here this approach is definitely NOT ACCEPTED . Main rule was - never change existing mechanisms - just add new possibilities. It means that there are no possible side effects of installing application as is. But this is of course should not necessary be so strict taboo for local customisers, working closer to users, observing local business logic. As an example of WYSIWYG technics failure is generation of Pricelist documents from Barcode Collections: In Odoo 16 and 18 it is not working. But there still one workaround exists. We call it "Forced generation". That is when new documents creation committed in database right away rather than present new form that you can save or cancel. May be this is not a kind of design someone could call elegant. But we preserve it as an option. It is disabled by default but can be enabled for some templates in configuration.
![]() |
![]() |
Fig. 10 | Fig. 11 |
Who knows , may be this is the kind of automation someone needs most of all. Ability to create pricelists from barcodes may appear useful in situations when manager have to set prices of products outdoor based on real-time product condition (e.g. vegetables or fruits)
Please log in to comment on this module