[tryton-debian-vcs] tryton-modules-party branch debian updated. debian/3.2.0-1-6-g9cfc360
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Oct 23 12:16:16 UTC 2014
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-party.git;a=commitdiff;h=debian/3.2.0-1-6-g9cfc360
commit 9cfc3604bdc51f55c0f54f0136887489c3606a81
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Oct 23 13:32:02 2014 +0200
Releasing debian version 3.4.0-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 9377e57..72e1778 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+tryton-modules-party (3.4.0-1) unstable; urgency=medium
+
+ * Updating signing key while using now plain .asc files instead of .pgp
+ binaries.
+ * Adding actual upstream signing key.
+ * Updating to Standards-Version: 3.9.6, no changes needed.
+ * Merging upstream version 3.4.0.
+ * Adding python-sql to Depends.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Tue, 21 Oct 2014 20:24:08 +0200
+
tryton-modules-party (3.2.0-1) unstable; urgency=medium
* Removing LC_ALL=C.UTF-8 as build environment.
commit 134e3970f982396669f4db34ea29297f2d754717
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Oct 21 12:13:56 2014 +0200
Adding python-sql to Depends.
diff --git a/debian/control b/debian/control
index 1290044..a465876 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,9 @@ Package: tryton-modules-party
Architecture: all
Depends:
${misc:Depends}, ${python:Depends}, tryton-server (>= ${version:major}),
- tryton-modules-country (>= ${version:major}), python-pkg-resources
+ tryton-modules-country (>= ${version:major}),
+ python-sql,
+ python-pkg-resources
Recommends: python-vatnumber
Description: Tryton Application Platform (Party Module)
Tryton is a high-level general purpose application platform written in Python
commit 932d21d61ee14e76ed8eec8d9fd1fcabfc1f46da
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Oct 21 11:29:14 2014 +0200
Merging upstream version 3.4.0.
diff --git a/CHANGELOG b/CHANGELOG
index 8b4a6b9..b0eb961 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 3.4.0 - 2014-10-20
+* Bug fixes (see mercurial logs for details)
+* Add autocomplete on zip and city
+
Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 9dda96b..ea08479 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_party
-Version: 3.2.0
+Version: 3.4.0
Summary: Tryton module with parties and addresses
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_party
=============
diff --git a/address.py b/address.py
index 7827e68..daf1b90 100644
--- a/address.py
+++ b/address.py
@@ -5,6 +5,7 @@ from trytond.model import ModelView, ModelSQL, fields
from trytond.pyson import Eval, If
from trytond.transaction import Transaction
from trytond import backend
+from trytond.pool import Pool
__all__ = ['Address']
@@ -66,6 +67,42 @@ class Address(ModelSQL, ModelView):
def default_active():
return True
+ _autocomplete_limit = 100
+
+ def _autocomplete_domain(self):
+ domain = []
+ if self.country:
+ domain.append(('country', '=', self.country.id))
+ if self.subdivision:
+ domain.append(['OR',
+ ('subdivision', '=', self.subdivision.id),
+ ('subdivision', '=', None),
+ ])
+ return domain
+
+ def _autocomplete_search(self, domain, name):
+ pool = Pool()
+ Zip = pool.get('country.zip')
+ if domain:
+ records = Zip.search(domain, limit=self._autocomplete_limit)
+ if len(records) < self._autocomplete_limit:
+ return sorted({getattr(z, name) for z in records})
+ return []
+
+ @fields.depends('city', 'country', 'subdivision')
+ def autocomplete_zip(self):
+ domain = self._autocomplete_domain()
+ if self.city:
+ domain.append(('city', 'ilike', '%%%s%%' % self.city))
+ return self._autocomplete_search(domain, 'zip')
+
+ @fields.depends('zip', 'country', 'subdivision')
+ def autocomplete_city(self):
+ domain = self._autocomplete_domain()
+ if self.zip:
+ domain.append(('zip', 'ilike', '%s%%' % self.zip))
+ return self._autocomplete_search(domain, 'city')
+
def get_full_address(self, name):
full_address = ''
if self.name:
diff --git a/contact_mechanism.py b/contact_mechanism.py
index 211aef6..b7bed09 100644
--- a/contact_mechanism.py
+++ b/contact_mechanism.py
@@ -33,7 +33,9 @@ class ContactMechanism(ModelSQL, ModelView):
type = fields.Selection(_TYPES, 'Type', required=True, states=STATES,
sort=False, depends=DEPENDS)
- value = fields.Char('Value', select=True, states=STATES, depends=DEPENDS)
+ value = fields.Char('Value', select=True, states=STATES, depends=DEPENDS
+ # Add all function fields to ensure to always fill them via on_change
+ + ['email', 'website', 'skype', 'sip', 'other_value'])
comment = fields.Text('Comment', states=STATES, depends=DEPENDS)
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE', states=STATES, select=True, depends=DEPENDS)
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index d300617..e76ed02 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -275,10 +275,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Код"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Дължина на кода"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Код (само за четене)"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 0e6ebb7..cd04216 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -9,8 +9,8 @@ msgstr "No podeu modificar el tercer de l'adreça \"%s\"."
msgctxt "error:party.category:"
msgid "Invalid category name \"%s\": You can not use \" / \" in name field."
msgstr ""
-"Nom de categoria \"%s\" no és correcte: No podeu utilitzar \" / \" en el "
-"camp nom."
+"El nom de la categoria \"%s\" no és correcte: No podeu utilitzar \" / \" en "
+"el camp nom."
msgctxt "error:party.category:"
msgid "The name of a party category must be unique by parent."
@@ -18,7 +18,7 @@ msgstr "El nom de la categoria del tercer ha de ser únic segons el pare."
msgctxt "error:party.check_vies:"
msgid "The VIES service is unavailable, try again later."
-msgstr "El servei VIES no està disponible, intenteu de nou més tard."
+msgstr "El servei VIES no està disponible, intenteu-ho de nou més tard."
msgctxt "error:party.contact_mechanism:"
msgid "You can not modify the party of contact mechanism \"%s\"."
@@ -276,10 +276,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Codi"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Dígits del codi"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Codi només lectura"
@@ -395,8 +391,7 @@ msgstr ""
msgctxt "help:party.party,vat_country:"
msgid "Setting VAT country will enable validation of the VAT number."
-msgstr ""
-"En especificar el país del NIF s'habilitarà la verificació del número."
+msgstr "Introduint el país del NIF s'habilitarà la verificació del número."
msgctxt "help:party.party,vat_number:"
msgid "Value Added Tax number"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 8ebcb5c..baa7561 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -275,10 +275,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr ""
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr ""
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 4a7692e..f1fd4f6 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -277,10 +277,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Code Partei"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Code Länge"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Code (nur lesbar)"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 421031a..9032c7b 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -277,10 +277,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Código"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Dígitos del código"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Código sólo lectura"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 31734ba..03bb469 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -276,10 +276,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Código"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Dígitos del Código"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Código de Sólo Lectura"
diff --git a/locale/es_CO.po b/locale/es_EC.po
similarity index 92%
copy from locale/es_CO.po
copy to locale/es_EC.po
index 31734ba..67ccabd 100644
--- a/locale/es_CO.po
+++ b/locale/es_EC.po
@@ -4,29 +4,29 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:party.address:"
msgid "You can not modify the party of address \"%s\"."
-msgstr "Usted no puede modificar la dirección del tercero \"%s\" "
+msgstr "No puede modificar el tercero de la dirección \"%s\"."
msgctxt "error:party.category:"
msgid "Invalid category name \"%s\": You can not use \" / \" in name field."
msgstr ""
-"Inválida categoría de nombre \"%s\": Usted no puede usar \"/\" en el nombre"
-" del campo."
+"Nombre de categoría \"%s\" no es válido: No puede utilizar \" / \" en el "
+"campo nombre."
msgctxt "error:party.category:"
msgid "The name of a party category must be unique by parent."
-msgstr "¡El nombre de una categoría de tercero debe ser único por cada padre!"
+msgstr "El nombre de una categoría de tercero debe ser único por cada padre."
msgctxt "error:party.check_vies:"
msgid "The VIES service is unavailable, try again later."
-msgstr "El servicio VIES no está disponible, inténtelo de nuevo más tarde"
+msgstr "El servicio VIES no está disponible, inténtelo de nuevo más tarde."
msgctxt "error:party.contact_mechanism:"
msgid "You can not modify the party of contact mechanism \"%s\"."
-msgstr "Usted no puede modificar los medios de contacto del tercero \"%s\" "
+msgstr "No puede modificar el tercero del medio de contacto \"%s\"."
msgctxt "error:party.party:"
msgid "Invalid VAT number \"%(vat)s\" on party \"%(party)s\"."
-msgstr "Inválido número NIT \"%(vat)s\" en tercero \"%(party)s\"."
+msgstr "El número de RUC \"%(vat)s\" del tercero \"%(party)s\" no es válido."
msgctxt "error:party.party:"
msgid "The code of the party must be unique."
@@ -78,15 +78,15 @@ msgstr "Secuencia"
msgctxt "field:party.address,street:"
msgid "Street"
-msgstr "Dirección"
+msgstr "Calle"
msgctxt "field:party.address,streetbis:"
msgid "Street (bis)"
-msgstr "Dirección (bis)"
+msgstr "Calle (bis)"
msgctxt "field:party.address,subdivision:"
msgid "Subdivision"
-msgstr "Departamento"
+msgstr "Provincia"
msgctxt "field:party.address,write_date:"
msgid "Write Date"
@@ -150,7 +150,7 @@ msgstr "ID"
msgctxt "field:party.check_vies.result,parties_failed:"
msgid "Parties Failed"
-msgstr "Terceros Incorrectos"
+msgstr "Terceros Erróneos"
msgctxt "field:party.check_vies.result,parties_succeed:"
msgid "Parties Succeed"
@@ -276,10 +276,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Código"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Dígitos del Código"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Código de Sólo Lectura"
@@ -318,7 +314,7 @@ msgstr "Idioma"
msgctxt "field:party.party,mobile:"
msgid "Mobile"
-msgstr "Móvil"
+msgstr "Celular"
msgctxt "field:party.party,name:"
msgid "Name"
@@ -334,15 +330,15 @@ msgstr "Nombre"
msgctxt "field:party.party,vat_code:"
msgid "VAT Code"
-msgstr "Núm. Id."
+msgstr "Núm. de RUC"
msgctxt "field:party.party,vat_country:"
msgid "VAT Country"
-msgstr "País del NIT"
+msgstr "País del RUC"
msgctxt "field:party.party,vat_number:"
msgid "VAT Number"
-msgstr "Número Identificación"
+msgstr "RUC"
msgctxt "field:party.party,website:"
msgid "Website"
@@ -391,17 +387,17 @@ msgstr "Modificado por Usuario"
msgctxt "help:party.configuration,party_lang:"
msgid "The value set on this field will preset the language on new parties"
msgstr ""
-"El valor de este campo predeterminada el idioma de las nuevos terceros"
+"El valor de este campo será el idioma por defecto de los nuevos terceros."
msgctxt "help:party.party,vat_country:"
msgid "Setting VAT country will enable validation of the VAT number."
msgstr ""
-"Al especificar el país del NIT se habilitará la verificación de dicho "
+"Al especificar el país del RUC se habilitará la verificación de dicho "
"número."
msgctxt "help:party.party,vat_number:"
msgid "Value Added Tax number"
-msgstr "Número de Identificación"
+msgstr "Número de Registro Único de Contribuyente"
msgctxt "model:ir.action,name:act_address_form"
msgid "Addresses"
@@ -461,7 +457,7 @@ msgstr "Configuración"
msgctxt "model:ir.ui.menu,name:menu_party"
msgid "Party"
-msgstr "Gestión de Terceros"
+msgstr "Terceros"
msgctxt "model:ir.ui.menu,name:menu_party_configuration"
msgid "Party Configuration"
@@ -501,7 +497,7 @@ msgstr "Tercero"
msgctxt "model:party.party-party.category,name:"
msgid "Party - Category"
-msgstr "Tercero - Categoría"
+msgstr "Terceros - Categoría"
msgctxt "model:res.group,name:group_party_admin"
msgid "Party Administration"
@@ -525,7 +521,7 @@ msgstr "Jabber"
msgctxt "selection:party.contact_mechanism,type:"
msgid "Mobile"
-msgstr "Móvil"
+msgstr "Celular"
msgctxt "selection:party.contact_mechanism,type:"
msgid "Other"
@@ -561,7 +557,7 @@ msgstr "Categoría"
msgctxt "view:party.check_vies.no_result:"
msgid "VAT Information Exchange System"
-msgstr "NIT Sistema de Intercambio de Información"
+msgstr "Sistema de Intercambio de Información RUC "
msgctxt "view:party.check_vies.no_result:"
msgid "You must have a recent version of \"vatnumber\" installed!"
@@ -569,7 +565,7 @@ msgstr "¡Debe tener una versión reciente de \"vatnumber\" instalada!"
msgctxt "view:party.check_vies.result:"
msgid "VAT Information Exchange System Results"
-msgstr "NIT Resultados del Sistema de Intercambio de Información"
+msgstr "Resultados del Sistema de Intercambio de Información RUC "
msgctxt "view:party.configuration:"
msgid "Party Configuration"
@@ -601,7 +597,7 @@ msgstr "Tercero"
msgctxt "view:party.party:"
msgid "VAT"
-msgstr "NIT"
+msgstr "RUC"
msgctxt "wizard_button:party.check_vies,no_result,end:"
msgid "Ok"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index f232530..2811102 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -9,8 +9,8 @@ msgstr "No puede modificar el tercero de la dirección \"%s\"."
msgctxt "error:party.category:"
msgid "Invalid category name \"%s\": You can not use \" / \" in name field."
msgstr ""
-"Nombre de categoría \"%s\" no es correcto: No puede utilizar \" / \" en el "
-"campo nombre."
+"El nombre de la categoría \"%s\" no es correcto: No puede utilizar \" / \" "
+"en el campo nombre."
msgctxt "error:party.category:"
msgid "The name of a party category must be unique by parent."
@@ -276,10 +276,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Código"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Dígitos del código"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Código sólo lectura"
@@ -396,8 +392,7 @@ msgstr ""
msgctxt "help:party.party,vat_country:"
msgid "Setting VAT country will enable validation of the VAT number."
msgstr ""
-"Al especificar el país del NIF se habilitará la verificación de dicho "
-"número."
+"Introduciendo el país del NIF se habilitará la verificación de dicho número."
msgctxt "help:party.party,vat_number:"
msgid "Value Added Tax number"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 1b5ae2e..cbb4280 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -4,12 +4,12 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:party.address:"
msgid "You can not modify the party of address \"%s\"."
-msgstr "Vous ne pouvez modifier le tier de l'adresse \"%s\"."
+msgstr "Vous ne pouvez modifier le tiers de l'adresse « %s »."
msgctxt "error:party.category:"
msgid "Invalid category name \"%s\": You can not use \" / \" in name field."
msgstr ""
-"Nom de catégorie \"%s\" invalide: vous ne pouvez utiliser \"/\" dans le "
+"Nom de catégorie « %s » invalide: vous ne pouvez utiliser « / » dans le "
"champ nom. "
msgctxt "error:party.category:"
@@ -22,11 +22,11 @@ msgstr "Le service VIES n'est pas disponible, veuillez essayer plus tard."
msgctxt "error:party.contact_mechanism:"
msgid "You can not modify the party of contact mechanism \"%s\"."
-msgstr "Vous ne pouvez pas modifier le tier sur le moyen de contact \"%s\"."
+msgstr "Vous ne pouvez pas modifier le tiers sur le moyen de contact « %s »."
msgctxt "error:party.party:"
msgid "Invalid VAT number \"%(vat)s\" on party \"%(party)s\"."
-msgstr "Le numéro de TVA \"%(vat)s\" sur le tiers \"%(party)s\" est invalide."
+msgstr "Le numéro de TVA « %(vat)s » sur le tiers « %(party)s » est invalide."
msgctxt "error:party.party:"
msgid "The code of the party must be unique."
@@ -98,7 +98,7 @@ msgstr "Mis à jour par"
msgctxt "field:party.address,zip:"
msgid "Zip"
-msgstr "Code Postal"
+msgstr "Code postal"
msgctxt "field:party.category,active:"
msgid "Active"
@@ -276,10 +276,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Code"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Longueur du code"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Code en lecture seule"
@@ -564,7 +560,7 @@ msgstr "VIES"
msgctxt "view:party.check_vies.no_result:"
msgid "You must have a recent version of \"vatnumber\" installed!"
-msgstr "Vous devez avoir une version récente de \"vatnumber\" installée"
+msgstr "Vous devez avoir une version récente de « vatnumber » installée !"
msgctxt "view:party.check_vies.result:"
msgid "VAT Information Exchange System Results"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 21af37d..555f6b2 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -276,10 +276,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Code"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Lengte code"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr ""
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 5cb87fe..c751e5a 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -278,10 +278,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Код"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Длина Кода"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Код только для чтения"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 7610cee..6b3f01f 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -44,11 +44,11 @@ msgstr "Država"
msgctxt "field:party.address,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:party.address,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:party.address,full_address:"
msgid "Full Address"
@@ -108,11 +108,11 @@ msgstr "Podkategorije"
msgctxt "field:party.category,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:party.category,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:party.category,id:"
msgid "ID"
@@ -156,11 +156,11 @@ msgstr "Partnerji uspešno preverjeni"
msgctxt "field:party.configuration,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:party.configuration,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:party.configuration,id:"
msgid "ID"
@@ -196,11 +196,11 @@ msgstr "Komentar"
msgctxt "field:party.contact_mechanism,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:party.contact_mechanism,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:party.contact_mechanism,email:"
msgid "E-Mail"
@@ -274,10 +274,6 @@ msgctxt "field:party.party,code:"
msgid "Code"
msgstr "Šifra"
-msgctxt "field:party.party,code_length:"
-msgid "Code Length"
-msgstr "Dolžina šifre"
-
msgctxt "field:party.party,code_readonly:"
msgid "Code Readonly"
msgstr "Šifra samo za branje"
@@ -288,11 +284,11 @@ msgstr "Kontakti"
msgctxt "field:party.party,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:party.party,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:party.party,email:"
msgid "E-Mail"
@@ -360,11 +356,11 @@ msgstr "Kategorija"
msgctxt "field:party.party-party.category,create_date:"
msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
msgctxt "field:party.party-party.category,create_uid:"
msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
msgctxt "field:party.party-party.category,id:"
msgid "ID"
diff --git a/party.py b/party.py
index 2911175..e2e5f17 100644
--- a/party.py
+++ b/party.py
@@ -1,6 +1,9 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import logging
+
+from sql.functions import CharLength
+
from trytond.model import ModelView, ModelSQL, fields
from trytond.wizard import Wizard, StateTransition, StateView, Button
from trytond.pyson import Bool, Eval
@@ -38,7 +41,6 @@ class Party(ModelSQL, ModelView):
'readonly': Eval('code_readonly', True),
},
depends=['code_readonly'])
- code_length = fields.Integer('Code Length', select=True, readonly=True)
code_readonly = fields.Function(fields.Boolean('Code Readonly'),
'get_code_readonly')
lang = fields.Many2One("ir.lang", 'Language', states=STATES,
@@ -85,7 +87,7 @@ class Party(ModelSQL, ModelView):
@staticmethod
def order_code(tables):
table, _ = tables[None]
- return [table.code_length, table.code]
+ return [CharLength(table.code), table.code]
@staticmethod
def default_active():
@@ -158,22 +160,10 @@ class Party(ModelSQL, ModelView):
if not values.get('code'):
config = Configuration(1)
values['code'] = Sequence.get_id(config.party_sequence.id)
- values['code_length'] = len(values['code'])
values.setdefault('addresses', None)
return super(Party, cls).create(vlist)
@classmethod
- def write(cls, *args):
- actions = iter(args)
- args = []
- for parties, values in zip(actions, actions):
- if values.get('code'):
- values = values.copy()
- values['code_length'] = len(values['code'])
- args.extend((parties, values))
- super(Party, cls).write(*args)
-
- @classmethod
def copy(cls, parties, default=None):
if default is None:
default = {}
diff --git a/setup.py b/setup.py
index d84ff71..3582e9b 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ if minor_version % 2:
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
-requires = []
+requires = ['python-sql']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
diff --git a/tryton.cfg b/tryton.cfg
index c78920a..2dee6b2 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.2.0
+version=3.4.0
depends:
country
ir
diff --git a/trytond_party.egg-info/PKG-INFO b/trytond_party.egg-info/PKG-INFO
index a98f5f2..370c6db 100644
--- a/trytond_party.egg-info/PKG-INFO
+++ b/trytond_party.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-party
-Version: 3.2.0
+Version: 3.4.0
Summary: Tryton module with parties and addresses
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_party
=============
diff --git a/trytond_party.egg-info/SOURCES.txt b/trytond_party.egg-info/SOURCES.txt
index 2e2d904..8df8b42 100644
--- a/trytond_party.egg-info/SOURCES.txt
+++ b/trytond_party.egg-info/SOURCES.txt
@@ -14,12 +14,46 @@ setup.py
tryton.cfg
./__init__.py
./address.py
+./address.xml
./category.py
+./category.xml
./configuration.py
+./configuration.xml
./contact_mechanism.py
+./contact_mechanism.xml
+./label.odt
./party.py
+./party.xml
+./tryton.cfg
+./icons/tryton-party.svg
+./locale/bg_BG.po
+./locale/ca_ES.po
+./locale/cs_CZ.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/nl_NL.po
+./locale/ru_RU.po
+./locale/sl_SI.po
./tests/__init__.py
./tests/test_party.py
+./view/address_form.xml
+./view/address_tree.xml
+./view/address_tree_sequence.xml
+./view/category_form.xml
+./view/category_list.xml
+./view/category_tree.xml
+./view/check_vies_no_result.xml
+./view/check_vies_result.xml
+./view/configuration_form.xml
+./view/contact_mechanism_form.xml
+./view/contact_mechanism_tree.xml
+./view/contact_mechanism_tree_sequence.xml
+./view/party_form.xml
+./view/party_tree.xml
doc/index.rst
icons/tryton-party.svg
locale/bg_BG.po
@@ -28,6 +62,7 @@ locale/cs_CZ.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/nl_NL.po
diff --git a/trytond_party.egg-info/requires.txt b/trytond_party.egg-info/requires.txt
index 83006b9..72fe966 100644
--- a/trytond_party.egg-info/requires.txt
+++ b/trytond_party.egg-info/requires.txt
@@ -1,5 +1,6 @@
-trytond_country >= 3.2, < 3.3
-trytond >= 3.2, < 3.3
+python-sql
+trytond_country >= 3.4, < 3.5
+trytond >= 3.4, < 3.5
[VAT]
vatnumber
\ No newline at end of file
--
tryton-modules-party
More information about the tryton-debian-vcs
mailing list