Commit Graph
47 Commits
Author SHA1 Message Date
Andrey Troitskiy 764bd645fc [FIX] hw_scale: added field 'disable' to namedtuple 'ScaleProtocol'
Introduced at bb015818ea
Getting error
TypeError: __new__() got an unexpected keyword argument 'disable'

closes odoo/odoo#28202
2018-11-06 10:12:50 +00:00
Gert Pellin bb015818ea [imp] hw_scale: Disable Adam if not used
Adam scales give a beep if it has no changed value to send. This commit
disable the beeping outside the weight screen
2018-10-02 08:38:21 +02:00
Gert Pellin b4bcf86f8e [FIX] hw_scale: read values from Adam scale
with migration from python2 to python3 not all regexes where converted
to byte-array.
2018-09-26 15:49:17 +02:00
Josse Colpaert e2a23995a1 [IMP] hw_scale: fix to avoid conflicts with other driver
There are two scales that are supported, but the Adam scale
possibly won't return any answer so there is no way to detect then
if it is an Adam scale or something else.  As we have not implemented
a detection method for the caliper driver yet, we exclude it from
the devices the scale can detect.  (by comparing /dev/serial/by-id
and by-path)
2018-09-25 23:01:40 +02:00
Priyanka KakadiyaandNimesh Jethva f5a96effb4 [REF] various: update manifests for better wording and names
Time has come to update a bit applications name, summary and website links.
Purpose is to have a website page correctly set for applications to be used
in conjunction with the newly-introduced discover button.

Names and summaries are updated to be more updated and shiny.

This commit is related to task ID 47179 and 1861544. Related PR are #22689
and #25556. First one is about classic applications while second one is about
website applications.

Co-Authored-By: Nimesh Jethva <nje@odoo.com>
2018-08-03 14:55:04 +02:00
Christophe Simonis e5fab318d9 [MERGE] forward port branch saas-11.2 up to 02f38beffb 2018-07-18 17:59:23 +02:00
Josse Colpaert 7d34f0218b [IMP] point_of_sale: posbox upgrade to stretch / python3
- transform odoo.py -> odoo-bin / recent branches + pip3 packages
- deactivate wpa_supplicant when starting dhcpcd automatically
- postgresql create clusters manually
- latest stretch raspbian image / add versatile-db.ptb for kernel-qemu
- ifconfig output change
- upgrade hw_-modules:
    hw_escpos: to python3
    hw_posbox_homepage: to v11: csrf does not work as it needs a database
    hw_posbox_upgrade: to python3 decode utf-8
    hw_scale: to python3
    hw_proxy: to python3

With the commit, the posbox will also work on the new Raspberry Pi 3b+
2018-07-13 15:10:12 +02:00
Martin Trigaux c71ce46b0e [FIX] hw_*: do not install the posbox modules
These modules are currently made to run with an odoo 8.0 server.
They are given as-it on the odoo repository but are intended to be run on the
posbox and not supported on a classic server.
2018-04-09 09:26:59 +02:00
Xavier Morel b897dcde15 [FIX] P3: import pattern which doesn't seem to work right
``import odoo.addons.foo as bar`` doesn't seem to properly trigger the
import hook in Python 3 (it blows up on decimal_precision and
base). Thus convert *all* examples of that pattern to the more
sensible ``from odoo.addons import foo as bar``.
2017-05-22 13:30:50 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Christophe Simonis e2fcace05e [MERGE] forward port branch 10.0 up to 13dc704 2016-11-17 15:27:29 +01:00
Christophe Simonis 13dc7041a6 [MERGE] forward port branch saas-12 up to 1ef4061 2016-11-17 15:24:36 +01:00
Christophe Simonis 1ef4061e68 [MERGE] forward port branch saas-11 up to 3b2f4e2 2016-11-17 14:48:43 +01:00
Christophe Simonis 7ee09ed0c1 [MERGE] forward port branch saas-6 up to 6d8d7a5 2016-11-17 13:11:04 +01:00
Christophe Simonis 6d8d7a5970 [MERGE] forward port branch 8.0 up to 8e8b792 2016-11-17 12:41:45 +01:00
Olivier Dony f579acf02f [FIX] hw_scale: update driver for rs232_devices map and support AdamAZExtra scale
This commit fixes the driver to respect the new device
registration mechanism via hw_proxy.rs232_devices.

It also refactors the code to more easily support multiple
scale protocols, and introduces support for the ADAM Equipment
AZExtra scale protocol. (Might be compatible with other ADAM
Equipment scales)

Support for th AZExtra scale is experimental at the moment,
especially given two annoying problems with this model:
 -  they do not support proper probing (stays mute until a
    non-zero weight is measured), so they have to be probed
    last and *assumed* to work
 -  the scale beeps when a read attempt is made and the
    weight is not stable yet, or the weight has been already
    read previously. This constant beeping during operation
    is mitigated by extra delays between readings, but might
    still prove to be a major issue for supporting this scale.
2016-11-14 17:11:57 +01:00
Martin Trigaux fb74fec3f5 [I18N] export 10.0 source terms 2016-09-07 11:08:42 +02:00
Olivier Dony 859d443863 [IMP] *: rename manifest files for v10 naming convention 2016-09-05 11:57:50 +02:00
Rohan Patel d007e73f69 [MIG] hw_scale : Migrated to new API. 2016-08-04 12:37:08 +02:00
Christophe Simonis 5a3a06f26f [MERGE] forward port of branch saas-11 up to d4d09df 2016-07-04 13:16:34 +02:00
Yannick Tivisse 692d41c686 [IMP] Classified each module in its category to display them correctly on odoo/apps
To be displayed correctly on odoo app (In a given category and not only in all or hidden)
the module category in the __openerp__.py file should be one of these:

    "Accounting",
    "Discuss",
    "Document Management",
    "eCommerce",
    "Human Resources",
    "Industries",
    "Localization",
    "Manufacturing",
    "Marketing",
    "Point of Sale",
    "Productivity",
    "Project",
    "Purchases",
    "Sales",
    "Warehouse",
    "Website",
    "Extra Tools",

'Accounting & Finance' will not work, as 'Project Management', ...
2016-06-30 13:27:46 +02:00
Denis Ledoux 49a9eba6e2 [FIX] point_of_sale, hw_scale: typo weighting -> weighing 2016-06-13 17:54:39 +02:00
Christophe Simonis e46f65ab26 [MERGE] forward port of branch saas-6 up to 62fc257 2016-03-04 15:03:39 +01:00
Christophe Simonis 62fc2571c0 [MERGE] forward port of branch 8.0 up to 40fdb84 2016-03-04 14:33:37 +01:00
Joren Van Onder c23eb23267 [FIX] hw_scale: use a larger timeout during initial probe
I'm not sure why the serial timeout is so aggressive, but I assume there
is a reason for it. During probing however, we shouldn't use such an
aggressive timeout because if we miss the device during initial startup
we'll never find it since we only probe devices once.
2016-03-02 16:48:41 +01:00
Joren Van Onder 290eb4ea2e [FIX] hw_blackbox_be, hw_scale: don't rely on serial ID to be unique
After plugging in multiple identical serial to USB interfaces, only the
last one will be available under /dev/serial/by-id/ because they'll have
identical IDs. Instead use /dev/serial/by-path/ which does not have this
issue.
2016-03-02 13:51:40 +01:00
Joren Van Onder acf027ac98 [IMP] hw_scale: allow third party USB to serial interfaces
We support the Mettler Toledo scales which have their own built-in USB
to serial interface. Due to continuing issues with that built-in
interface we will also support the scale configured in raw RS-232 mode
which seems to be more reliable.

This means that in order to connect the scale you'll need a third party
USB to serial interface (unless you have built-in serial interfaces, but
the POSBox doesn't).

The main difficulty this poses is that using this approach we cannot use
the name of the interface to find the device. When using the built-in
interface of the scale the interface would identify with an ID
containing 'mettler' and 'toledo'. When using a third party interface
the ID will instead contain information about the third party
interface. To fix this we use a probe-based approach, probing every
available serial interface until we find one that returns a response to
our probe. This approach will work with both third party interfaces and
the built-in interface of the scale.

Contrary to probe-based approach used in hw_blackbox_be this one is
slightly more complicated because hw_scale is written in such a way that
it is 'plug and play', which means that as long as the module is running
it will continually try to find a scale. This is fine, but we don't want
to keep sending probes to eg. Fiscal Data Modules, which could lead to
issues. Therefore we will only probe every device once. When we lose an
existing, confirmed connection to a scale we will however keep retrying
to connect to that particular device.
2016-03-02 13:51:40 +01:00
Martin Trigaux 613286b0e8 [I18N] export application terms of all modules
Now that most refactoring has been merged

It is better to have red a great work of another culture in translation than never to have read it at all.
― Henry Gratton Doyle
2015-09-07 17:21:58 +02:00
Martin Trigaux 6c51a80aa4 [I18N] export application terms of all modules 2015-08-25 12:01:38 +02:00
Yannick Tivisse 0decfd94d1 [IMP] __openerp.py__ files : remove all occurence of authors and website
where it was 'Odoo SA', 'OpenERP SA', 'OpenERP s.a.', 'OpenERP SA', 'OpenERP'
      or 'http(s)://openerp.com' or 'http(s)://www.odoo.com'
2015-08-20 16:15:59 +02:00
Christophe Simonis 73e652818b [MERGE] forward port of branch saas-6 up to 8d95f6d 2015-08-15 16:57:35 +02:00
Christophe Simonis 171d001985 [MERGE] forward port of branch 8.0 up to 02954ba 2015-08-11 16:56:47 +02:00
Joren Van Onder 59b5f136bf [IMP] point_of_sale: add patches from posbox branch
This commit contains the patches from the now obsolete 'posbox'
branch. These patches were written by Martin Donies (@mdo-odoo) and
Frédéric Van der Essen (@fvdsn).
2015-08-11 15:13:17 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Christophe Simonis 0da722aa6a [MERGE] forward port of branch 8.0 up to bff6dff 2015-05-11 15:12:24 +02:00
Olivier Dony 5b19ae8a59 [FIX] hw_*: enforce Python dependencies + disable if missing dependency
Prevents installing the hw_* modules at all when the python
dependencies are missing. If they were already installed
do not start the hardware threads to avoid wasting resources
and logging errors
2015-05-08 12:49:19 +02:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Christophe Simonis 31bf30d2d0 [MERGE] forward port of branch 8.0 up to ed1c173 2014-09-05 15:28:22 +02:00
Fabien Pinckaers 8aca457e34 [IMP] Updated website urls on modules and info page 2014-08-26 21:40:18 +02:00
Mathias Neef 3066e42bb7 Update __openerp__.py
Little mistake in the descreption seen during translation.
2014-08-20 10:16:53 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Frédéric van der Essen a57f44393d [FIX] hw_scale: don't crash if the serial connection gets broken
bzr revid: fva@openerp.com-20140428095246-w6pyo8y7rrhsvsjl
2014-04-28 11:52:46 +02:00
Frédéric van der Essen c0d62797c9 [FIX] hw_scale: remove useless driver test script
bzr revid: fva@openerp.com-20140425124005-pugnyq6gsl0gw8yx
2014-04-25 14:40:05 +02:00
Frédéric van der Essen 24852d7ec9 [FIX] hw_scale: remove useless python module
bzr revid: fva@openerp.com-20140425123246-lexb4viqi6k7zwgq
2014-04-25 14:32:46 +02:00
Frédéric van der Essen 3f0a8e8931 [IMP] point_of_sale, hw_scale: various small fixes and improvements for the scale module
bzr revid: fva@openerp.com-20140425122220-q7rw1dve8bgs25as
2014-04-25 14:22:20 +02:00
Frédéric van der Essen f3da22c067 [IMP] point_of_sale, hw_scale: first commit for the hw_scale module, which handles scale connections for the POS
bzr revid: fva@openerp.com-20140424171259-hi9ma6w0fkdfrqnv
2014-04-24 19:12:59 +02:00