[tryton-debian-vcs] tryton-modules-bank branch upstream updated. upstream/3.2.0-1-g14f17e0
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Oct 23 12:14:49 UTC 2014
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-bank.git;a=commitdiff;h=upstream/3.2.0-1-g14f17e0
commit 14f17e0b767540362d80e63fd16ae0f1a3b0323e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Oct 21 11:29:08 2014 +0200
Adding upstream version 3.4.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 8d5871c..52319c8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 3.4.0 - 2014-10-20
+* Bug fixes (see mercurial logs for details)
+* Search also on compact number
+
Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
* Add IBAN format, validation and compact
diff --git a/PKG-INFO b/PKG-INFO
index 8fb45d3..cf710d8 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_bank
-Version: 3.2.0
+Version: 3.4.0
Summary: Tryton module with banks
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.2/
+Download-URL: http://downloads.tryton.org/3.4/
Description: trytond_bank
============
diff --git a/bank.py b/bank.py
index 0fd9a9c..783a807 100644
--- a/bank.py
+++ b/bank.py
@@ -1,6 +1,7 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from stdnum import iban
+from sql import operators, Literal
from trytond.model import ModelView, ModelSQL, fields
@@ -43,12 +44,13 @@ class BankAccountNumber(ModelSQL, ModelView):
__name__ = 'bank.account.number'
_rec_name = 'number'
account = fields.Many2One('bank.account', 'Account', required=True,
- ondelete='CASCADE')
+ ondelete='CASCADE', select=True)
type = fields.Selection([
('iban', 'IBAN'),
('other', 'Other'),
], 'Type', required=True)
number = fields.Char('Number')
+ number_compact = fields.Char('Number Compact', readonly=True)
sequence = fields.Integer('Sequence')
@classmethod
@@ -65,6 +67,28 @@ class BankAccountNumber(ModelSQL, ModelView):
table, _ = tables[None]
return [table.sequence == None, table.sequence]
+ @classmethod
+ def domain_number(cls, domain, tables):
+ table, _ = tables[None]
+ name, operator, value = domain
+ Operator = fields.SQL_OPERATORS[operator]
+ result = None
+ for field in (cls.number, cls.number_compact):
+ column = field.sql_column(table)
+ expression = Operator(column, field._domain_value(operator, value))
+ if isinstance(expression, operators.In) and not expression.right:
+ expression = Literal(False)
+ elif (isinstance(expression, operators.NotIn)
+ and not expression.right):
+ expression = Literal(True)
+ expression = field._domain_add_null(
+ column, operator, value, expression)
+ if result:
+ result |= expression
+ else:
+ result = expression
+ return result
+
@property
def compact_iban(self):
return (iban.compact(self.number) if self.type == 'iban'
@@ -76,6 +100,7 @@ class BankAccountNumber(ModelSQL, ModelView):
for values in vlist:
if values.get('type') == 'iban' and 'number' in values:
values['number'] = iban.format(values['number'])
+ values['number_compact'] = iban.compact(values['number'])
return super(BankAccountNumber, cls).create(vlist)
@classmethod
@@ -86,6 +111,7 @@ class BankAccountNumber(ModelSQL, ModelView):
values = values.copy()
if values.get('type') == 'iban' and 'number' in values:
values['number'] = iban.format(values['number'])
+ values['number_compact'] = iban.compact(values['number'])
args.extend((numbers, values))
super(BankAccountNumber, cls).write(*args)
@@ -94,9 +120,12 @@ class BankAccountNumber(ModelSQL, ModelView):
for number in sum(args[::2], []):
if number.type == 'iban':
formated_number = iban.format(number.number)
- if formated_number != number.number:
+ compacted_number = iban.compact(number.number)
+ if ((formated_number != number.number)
+ or (compacted_number != number.number_compact)):
to_write.extend(([number], {
'number': formated_number,
+ 'number_compact': compacted_number,
}))
if to_write:
cls.write(*to_write)
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 1158905..287f308 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Número"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Número compacte"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Nom"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index baa8af7..dca9eec 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Nummer"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Nummer Kompaktformat"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Name"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 1772a18..130c2c6 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Número"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Número compacto"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Nombre"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 2af7dec..c404c7e 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -52,7 +52,7 @@ msgstr "Creado por Usuario"
msgctxt "field:bank.account,currency:"
msgid "Currency"
-msgstr "Monedas"
+msgstr "Moneda"
msgctxt "field:bank.account,id:"
msgid "ID"
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Número"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Número Compacto"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Nombre"
@@ -188,7 +192,7 @@ msgstr "Cuentas Bancarias"
msgctxt "model:ir.ui.menu,name:menu_bank_form"
msgid "Banks"
-msgstr "Banco"
+msgstr "Bancos"
msgctxt "model:ir.ui.menu,name:menu_banking"
msgid "Banking"
@@ -224,7 +228,7 @@ msgstr "Cuentas Bancaria"
msgctxt "view:bank:"
msgid "Bank"
-msgstr "Bancos"
+msgstr "Banco"
msgctxt "view:bank:"
msgid "Banks"
diff --git a/locale/es_CO.po b/locale/es_EC.po
similarity index 91%
copy from locale/es_CO.po
copy to locale/es_EC.po
index 2af7dec..7e91787 100644
--- a/locale/es_CO.po
+++ b/locale/es_EC.po
@@ -4,11 +4,11 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:bank.account.number:"
msgid "Invalid IBAN \"%s\"."
-msgstr "Inválido IBAN \"%s\"."
+msgstr "IBAN \"%s\" no válido."
msgctxt "field:bank,bic:"
msgid "BIC"
-msgstr "CIB"
+msgstr "BIC / SWIFT"
msgctxt "field:bank,create_date:"
msgid "Create Date"
@@ -32,7 +32,7 @@ msgstr "Nombre"
msgctxt "field:bank,write_date:"
msgid "Write Date"
-msgstr "Modificado por Usuario"
+msgstr "Fecha de Modificación"
msgctxt "field:bank,write_uid:"
msgid "Write User"
@@ -52,7 +52,7 @@ msgstr "Creado por Usuario"
msgctxt "field:bank.account,currency:"
msgid "Currency"
-msgstr "Monedas"
+msgstr "Moneda"
msgctxt "field:bank.account,id:"
msgid "ID"
@@ -64,7 +64,7 @@ msgstr "Números"
msgctxt "field:bank.account,owners:"
msgid "Owners"
-msgstr "Propietario"
+msgstr "Titulares"
msgctxt "field:bank.account,rec_name:"
msgid "Name"
@@ -96,7 +96,7 @@ msgstr "ID"
msgctxt "field:bank.account-party.party,owner:"
msgid "Owner"
-msgstr "Propietario"
+msgstr "Titular"
msgctxt "field:bank.account-party.party,rec_name:"
msgid "Name"
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Número"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Número Compacto"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Nombre"
@@ -152,11 +156,11 @@ msgstr "Modificado por Usuario"
msgctxt "field:party.party,bank_accounts:"
msgid "Bank Accounts"
-msgstr "Cuenta Bancaria"
+msgstr "Cuentas Bancarias"
msgctxt "help:bank,bic:"
msgid "Bank/Business Identifier Code"
-msgstr "Código de Identificación del Banco"
+msgstr "Código de Identificación del Banco (BIC / SWIFT)"
msgctxt "model:bank,name:"
msgid "Bank"
@@ -172,7 +176,7 @@ msgstr "Cuenta Bancaria - Tercero"
msgctxt "model:bank.account.number,name:"
msgid "Bank Account Number"
-msgstr "Número de Cuenta de Bancaria"
+msgstr "Número de Cuenta Bancaria"
msgctxt "model:ir.action,name:act_bank_account_form"
msgid "Accounts"
@@ -184,11 +188,11 @@ msgstr "Bancos"
msgctxt "model:ir.ui.menu,name:menu_bank_account_form"
msgid "Accounts"
-msgstr "Cuentas Bancarias"
+msgstr "Cuentas"
msgctxt "model:ir.ui.menu,name:menu_bank_form"
msgid "Banks"
-msgstr "Banco"
+msgstr "Bancos"
msgctxt "model:ir.ui.menu,name:menu_banking"
msgid "Banking"
@@ -208,11 +212,11 @@ msgstr "Otro"
msgctxt "view:bank.account.number:"
msgid "Bank Account Number"
-msgstr "Números de Cuenta Bancaria"
+msgstr "Número de Cuenta Bancaria"
msgctxt "view:bank.account.number:"
msgid "Bank Account Numbers"
-msgstr "Números de Cuentas Bancarias"
+msgstr "Números de Cuenta Bancaria"
msgctxt "view:bank.account:"
msgid "Bank Account"
@@ -220,11 +224,11 @@ msgstr "Cuenta Bancaria"
msgctxt "view:bank.account:"
msgid "Bank Accounts"
-msgstr "Cuentas Bancaria"
+msgstr "Cuentas Bancarias"
msgctxt "view:bank:"
msgid "Bank"
-msgstr "Bancos"
+msgstr "Banco"
msgctxt "view:bank:"
msgid "Banks"
@@ -232,4 +236,4 @@ msgstr "Bancos"
msgctxt "view:party.party:"
msgid "Banking"
-msgstr "Banco"
+msgstr "Bancos"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 4aca89d..eb08ed5 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Número"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Número compacto"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Nombre"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index bbe1426..986868b 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:bank.account.number:"
msgid "Invalid IBAN \"%s\"."
-msgstr "IBAN invalide \"%s\"."
+msgstr "IBAN invalide « %s »."
msgctxt "field:bank,bic:"
msgid "BIC"
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Numéro"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Numéro compact"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Nom"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 5638dd0..459889c 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:bank.account.number:"
msgid "Invalid IBAN \"%s\"."
-msgstr "Neveljave IBAN \"%s\""
+msgstr "Neveljaven IBAN \"%s\""
msgctxt "field:bank,bic:"
msgid "BIC"
@@ -12,11 +12,11 @@ msgstr "BIC"
msgctxt "field:bank,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:bank,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:bank,id:"
msgid "ID"
@@ -44,11 +44,11 @@ msgstr "Banka"
msgctxt "field:bank.account,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:bank.account,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:bank.account,currency:"
msgid "Currency"
@@ -84,11 +84,11 @@ msgstr "Bančni račun"
msgctxt "field:bank.account-party.party,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:bank.account-party.party,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:bank.account-party.party,id:"
msgid "ID"
@@ -116,11 +116,11 @@ msgstr "Bančni račun"
msgctxt "field:bank.account.number,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:bank.account.number,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:bank.account.number,id:"
msgid "ID"
@@ -130,6 +130,10 @@ msgctxt "field:bank.account.number,number:"
msgid "Number"
msgstr "Številka"
+msgctxt "field:bank.account.number,number_compact:"
+msgid "Number Compact"
+msgstr "Račun skrčeno"
+
msgctxt "field:bank.account.number,rec_name:"
msgid "Name"
msgstr "Ime"
diff --git a/tryton.cfg b/tryton.cfg
index f2bee46..acf267f 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.2.0
+version=3.4.0
depends:
ir
party
diff --git a/trytond_bank.egg-info/PKG-INFO b/trytond_bank.egg-info/PKG-INFO
index e731258..b1a11e8 100644
--- a/trytond_bank.egg-info/PKG-INFO
+++ b/trytond_bank.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-bank
-Version: 3.2.0
+Version: 3.4.0
Summary: Tryton module with banks
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.2/
+Download-URL: http://downloads.tryton.org/3.4/
Description: trytond_bank
============
diff --git a/trytond_bank.egg-info/SOURCES.txt b/trytond_bank.egg-info/SOURCES.txt
index 4b1b5bf..5978305 100644
--- a/trytond_bank.egg-info/SOURCES.txt
+++ b/trytond_bank.egg-info/SOURCES.txt
@@ -10,14 +10,34 @@ setup.py
tryton.cfg
./__init__.py
./bank.py
+./bank.xml
./party.py
+./party.xml
+./tryton.cfg
+./locale/ca_ES.po
+./locale/de_DE.po
+./locale/es_AR.po
+./locale/es_CO.po
+./locale/es_EC.po
+./locale/es_ES.po
+./locale/fr_FR.po
+./locale/sl_SI.po
./tests/__init__.py
./tests/test_bank.py
+./view/bank_account_form.xml
+./view/bank_account_list.xml
+./view/bank_account_number_form.xml
+./view/bank_account_number_list.xml
+./view/bank_account_number_list_sequence.xml
+./view/bank_form.xml
+./view/bank_list.xml
+./view/party_form.xml
doc/index.rst
locale/ca_ES.po
locale/de_DE.po
locale/es_AR.po
locale/es_CO.po
+locale/es_EC.po
locale/es_ES.po
locale/fr_FR.po
locale/sl_SI.po
diff --git a/trytond_bank.egg-info/requires.txt b/trytond_bank.egg-info/requires.txt
index 14a05cf..887f9c4 100644
--- a/trytond_bank.egg-info/requires.txt
+++ b/trytond_bank.egg-info/requires.txt
@@ -1,4 +1,4 @@
python-stdnum
-trytond_party >= 3.2, < 3.3
-trytond_currency >= 3.2, < 3.3
-trytond >= 3.2, < 3.3
\ No newline at end of file
+trytond_party >= 3.4, < 3.5
+trytond_currency >= 3.4, < 3.5
+trytond >= 3.4, < 3.5
\ No newline at end of file
--
tryton-modules-bank
More information about the tryton-debian-vcs
mailing list