From f751c2868cbee880b787ecc6d83062e494d6d0a9 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Wed, 1 Oct 2008 21:18:21 +0200 Subject: [PATCH 1/3] updated translation for de_DE --- de_DE.csv | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/de_DE.csv b/de_DE.csv index 045ccb34af..27be5e268a 100644 --- a/de_DE.csv +++ b/de_DE.csv @@ -4,6 +4,7 @@ error,purchase.line,0,"It miss an ""account_expense"" default property!","Es ist error,purchase.line,0,The supplier location is required!,Der Lagerort des Lieferanten muss eingegeben werden!,0 field,"product.template,product_suppliers",0,Suppliers,Lieferanten,0 field,"product.template,purchasable",0,Purchasable,Käuflich,0 +field,"product.template,purchase_uom",0,Purchase UOM,Einheit Einkauf,0 field,"purchase.line,amount",0,Amount,Betrag,0 field,"purchase.line,comment",0,Comment,Kommentar,0 field,"purchase.line,description",0,Description,Bezeichnung,0 @@ -20,7 +21,7 @@ field,"purchase.line,taxes",0,Taxes,Steuern,0 field,"purchase.line,type",0,Type,Typ,0 field,"purchase.line,unit",0,Unit,Einheit,0 field,"purchase.line,unit_digits",0,Unit Digits,Anzahl Stellen,0 -field,"purchase.line,unit_price",0,Unit Price,Preis / Einheit,0 +field,"purchase.line,unit_price",0,Unit Price,Einzelpreis,0 field,"purchase.product_supplier,code",0,Code,Artikelnummer Lieferant,0 field,"purchase.product_supplier,company",0,Company,Lieferfirma,0 field,"purchase.product_supplier,delivery_time",0,Delivery Time,Lieferfrist,0 @@ -36,7 +37,7 @@ field,"purchase.purchase,comment",0,Comment,Kommentar,0 field,"purchase.purchase,company",0,Company,Unternehmen,0 field,"purchase.purchase,contact_address",0,Contact Address,Kontaktadresse,0 field,"purchase.purchase,currency",0,Currency,Währung,0 -field,"purchase.purchase,currency_digits",0,Currency Digits,Währung signifikante Stellen ,0 +field,"purchase.purchase,currency_digits",0,Currency Digits,Währung (signifikante Stellen),0 field,"purchase.purchase,description",0,Description,Beschreibung,0 field,"purchase.purchase,invoice_address",0,Invoice Address,Rechnungsadresse,0 field,"purchase.purchase,invoice_exception",0,Invoices Exception,Rechnungsvorbehalt,0 @@ -92,7 +93,7 @@ odt,purchase.purchase,0,Taxes,Steuern,0 odt,purchase.purchase,0,Taxes:,Steuern:,0 odt,purchase.purchase,0,Total:,Gesamt:,0 odt,purchase.purchase,0,Total (excl. taxes):,Netto:,0 -odt,purchase.purchase,0,Unit Price,Preis / Einheit,0 +odt,purchase.purchase,0,Unit Price,Einzelpreis,0 odt,purchase.purchase,0,VAT:,USt:,0 selection,"purchase.line,type",0,Line,Position,0 selection,"purchase.line,type",0,Subtotal,Zwischensumme,0 From 2e067e496e5549fa33edf2eaf0d6d79c5df1c07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Oct 2008 15:05:33 +0200 Subject: [PATCH 2/3] Add on_change_quantity on purchase line for issue409 --- purchase.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index 8d14bc0009..5c5d623d25 100644 --- a/purchase.py +++ b/purchase.py @@ -728,7 +728,8 @@ class PurchaseLine(OSV): states={ 'invisible': "type != 'line'", 'required': "type == 'line'", - }) + }, on_change=['product', 'quantity', 'unit', + '_parent_purchase.currency', '_parent_purchase.party']) unit = fields.Many2One('product.uom', 'Unit', states={ 'required': "product", @@ -909,7 +910,7 @@ class PurchaseLine(OSV): res['unit_digits'] = product.purchase_uom.digits return res - def on_change_unit(self, cursor, user, ids, vals, context=None): + def on_change_quantity(self, cursor, user, ids, vals, context=None): product_obj = self.pool.get('product.product') if context is None: @@ -933,6 +934,9 @@ class PurchaseLine(OSV): context=ctx2)[vals['product']] return res + def on_change_unit(self, cursor, user, ids, vals, context=None): + return self.on_change_quantity(cursor, user, ids, vals, context=context) + def on_change_with_amount(self, cursor, user, ids, vals, context=None): currency_obj = self.pool.get('currency.currency') if vals.get('type') == 'line': From 5de75923c1d908b7ac471d59ad9d39ca9f9399ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Oct 2008 15:37:45 +0200 Subject: [PATCH 3/3] Use setuptools --- MANIFEST.in | 3 +++ setup.py | 35 ++++++++++++++--------------------- 2 files changed, 17 insertions(+), 21 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000..a71d60265f --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include *.xml +include *.odt +include *.csv diff --git a/setup.py b/setup.py index 5388ae1e42..846661c183 100644 --- a/setup.py +++ b/setup.py @@ -2,27 +2,22 @@ #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 distutils.core import setup -from distutils.command import sdist - - -class mysdist(sdist.sdist): - - def add_defaults(self): - sdist.sdist.add_defaults(self) - if self.distribution.has_pure_modules(): - build_py = self.get_finalized_command('build_py') - data = [] - for package in build_py.packages: - src_dir = build_py.get_package_dir(package) - data.extend(build_py.find_data_files(package, src_dir)) - self.filelist.extend(data) +from setuptools import setup, find_packages +import re info = eval(file('__tryton__.py').read()) -requires = ['trytond'] + ['trytond-' + x for x in info.get('depends', [])] +requires = [] +for dep in info.get('depends', []): + match = re.compile( + '(ir|res|workflow|webdav)((\s|$|<|>|<=|>=|==|!=).*?$)').match(dep) + if match: + dep = 'trytond' + match.group(2) + else: + dep = 'trytond_' + dep + requires.append(dep) -setup(name='trytond-' + info['name'].lower(), +setup(name='trytond_' + info['name'].lower(), version=info.get('version', '0'), description=info.get('description', ''), author=info.get('author', ''), @@ -45,14 +40,12 @@ setup(name='trytond-' + info['name'].lower(), 'Intended Audience :: Legal Industry', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Natural Language :: English', + 'Natural Language :: German', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Office/Business', 'Topic :: Office/Business :: Financial :: Accounting', ], license='GPL-3', - #requires=requires, - cmdclass={ - 'sdist': mysdist, - }, + install_requires=requires, )