Browse Source

[BACKPORT] sequence_check_digit from 10.0 to 9.0

pull/1102/head
Thomas Binsfeld 7 years ago
parent
commit
22e81b058e
  1. 27
      sequence_check_digit/README.rst
  2. 3
      sequence_check_digit/__init__.py
  3. 2
      sequence_check_digit/__openerp__.py
  4. 2
      sequence_check_digit/i18n/es.po
  5. 3
      sequence_check_digit/models/__init__.py
  6. 4
      sequence_check_digit/models/ir_sequence.py
  7. 4
      sequence_check_digit/tests/test_check_digit.py
  8. 3
      sequence_check_digit/views/sequence_views.xml

27
sequence_check_digit/README.rst

@ -12,8 +12,8 @@ It is useful when some manual checks are required or on integrations.
The implemented codes can avoid modification of one character and flip of The implemented codes can avoid modification of one character and flip of
two consecutive characters. two consecutive characters.
Usage
=====
Configuration
=============
* Access sequences and configurate the model to use. * Access sequences and configurate the model to use.
* The model will check if the format of prefix, suffix and number is valid * The model will check if the format of prefix, suffix and number is valid
@ -27,13 +27,36 @@ Usage
* ISO 7064 Mod 37, 36: [0-9A-Z]* * ISO 7064 Mod 37, 36: [0-9A-Z]*
* ISO 7064 Mod 97, 10: [0-9A-Z]* * ISO 7064 Mod 97, 10: [0-9A-Z]*
Usage
=====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/9.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits Credits
======= =======
Images
------
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Contributors Contributors
------------ ------------
* Enric Tobella <etobella@creublanca.es> * Enric Tobella <etobella@creublanca.es>
* Thomas Binsfeld <thomas.binsfeld@acsone.eu> (https://www.acsone.eu/)
Do not contact contributors directly about support or help with technical issues.
Maintainer Maintainer
---------- ----------

3
sequence_check_digit/__init__.py

@ -1,4 +1 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from . import models from . import models

2
sequence_check_digit/__manifest__.py → sequence_check_digit/__openerp__.py

@ -4,7 +4,7 @@
{ {
"name": "Check Digit on Sequences", "name": "Check Digit on Sequences",
"version": "10.0.1.0.0",
"version": "9.0.1.0.0",
"category": "Reporting", "category": "Reporting",
"website": "https://github.com/OCA/server-tools", "website": "https://github.com/OCA/server-tools",
"author": "Creu Blanca, " "author": "Creu Blanca, "

2
sequence_check_digit/i18n/es.po

@ -4,7 +4,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 9.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-28 10:14+0000\n" "POT-Creation-Date: 2017-09-28 10:14+0000\n"
"PO-Revision-Date: 2017-09-28 10:14+0000\n" "PO-Revision-Date: 2017-09-28 10:14+0000\n"

3
sequence_check_digit/models/__init__.py

@ -1,4 +1 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from . import ir_sequence from . import ir_sequence

4
sequence_check_digit/models/ir_sequence.py

@ -2,8 +2,8 @@
# Copyright (C) 2017 Creu Blanca # Copyright (C) 2017 Creu Blanca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models, api, _
from odoo.exceptions import ValidationError
from openerp import fields, models, api, _
from openerp.exceptions import ValidationError
import logging import logging
try: try:

4
sequence_check_digit/tests/test_check_digit.py

@ -3,9 +3,9 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.tests import common
from openerp.tests import common
import logging import logging
from odoo.exceptions import ValidationError
from openerp.exceptions import ValidationError
try: try:
from stdnum.iso7064 import mod_97_10 from stdnum.iso7064 import mod_97_10

3
sequence_check_digit/views/sequence_views.xml

@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Creu Blanca <https://creublanca.es/>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -->
<odoo> <odoo>
<record id="sequence_view" model="ir.ui.view"> <record id="sequence_view" model="ir.ui.view">
<field name="model">ir.sequence</field> <field name="model">ir.sequence</field>

Loading…
Cancel
Save