[tryton-debian-vcs] tryton-modules-account-asset branch debian updated. debian/3.0.0-3-4-gd7226c6
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:04:40 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-account-asset.git;a=commitdiff;h=debian/3.0.0-3-4-gd7226c6
commit d7226c68fea145854d484ae51f27ccd54a2161ce
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:59:29 2014 +0200
Bumping minimal required Python version to 2.7.
diff --git a/debian/control b/debian/control
index d43e05a..3f48b68 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Standards-Version: 3.9.5
Homepage: http://www.tryton.org/
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=tryton/tryton-modules-account-asset.git
Vcs-Git: git://anonscm.debian.org/tryton/tryton-modules-account-asset.git
-X-Python-Version: >= 2.6
+X-Python-Version: >= 2.7
Package: tryton-modules-account-asset
Architecture: all
commit 607dabe486a94326f63c7907464268c1f2e3e7e4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:45:23 2014 +0200
Updating copyright.
diff --git a/debian/copyright b/debian/copyright
index e6973d6..0cc18e7 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,9 +2,9 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
Copyright: 2012 Nicolas Évrard
- 2012-2013 Cédric Krier
+ 2012-2014 Cédric Krier
2012-2013 Bertrand Chenal
- 2012-2013 B2CK SPRL
+ 2012-2014 B2CK SPRL
License: GPL-3+
Files: debian/*
commit 546901f186862274ce2581ef201977a846245ed8
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 22 14:20:28 2014 +0200
Merging upstream version 3.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index cd2dc58..aeba0cd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.0 - 2014-04-21
+* Bug fixes (see mercurial logs for details)
+
Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index ccc12ff..f5633cb 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
Copyright (C) 2012 Nicolas Évrard.
-Copyright (C) 2012-2013 Cédric Krier.
+Copyright (C) 2012-2014 Cédric Krier.
Copyright (C) 2012-2013 Bertrand Chenal.
-Copyright (C) 2012-2013 B2CK SPRL.
+Copyright (C) 2012-2014 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/INSTALL b/INSTALL
index a5a0c70..318f5fd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_account_asset
Prerequisites
-------------
- * Python 2.6 or later (http://www.python.org/)
+ * Python 2.7 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
* trytond_account (http://www.tryton.org/)
* trytond_product (http://www.tryton.org/)
diff --git a/MANIFEST.in b/MANIFEST.in
index fc0b03e..f2f691a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,13 +1,11 @@
include INSTALL
include README
-include TODO
include COPYRIGHT
include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
-include *.odt
include locale/*.po
include doc/*
include tests/*.rst
diff --git a/PKG-INFO b/PKG-INFO
index ef513fb..8527444 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_account_asset
-Version: 3.0.0
+Version: 3.2.0
Summary: Tryton module for assets management
Home-page: http://www.tryton.org/
Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
Description: trytond_account_asset
=====================
@@ -43,6 +43,7 @@ Description: trytond_account_asset
http://www.tryton.org/
+Keywords: tryton account asset
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -62,7 +63,6 @@ Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/asset.py b/asset.py
index 1fab996..684f642 100644
--- a/asset.py
+++ b/asset.py
@@ -7,7 +7,7 @@ from dateutil import relativedelta
from dateutil import rrule
from trytond.model import Workflow, ModelSQL, ModelView, fields
-from trytond.pyson import Eval, Bool
+from trytond.pyson import Eval, Bool, If
from trytond.pool import Pool
from trytond.transaction import Transaction
from trytond.wizard import Wizard, StateView, StateTransition, Button
@@ -38,13 +38,15 @@ class Asset(Workflow, ModelSQL, ModelView):
supplier_invoice_line = fields.Many2One('account.invoice.line',
'Supplier Invoice Line',
domain=[
- ('product', '=', Eval('product', -1)),
+ If(Eval('product', None) == None,
+ ('product', '=', -1),
+ ('product', '=', Eval('product', -1)),
+ ),
('invoice.type', '=', 'in_invoice'),
],
states={
'readonly': (Eval('lines', [0]) | (Eval('state') != 'draft')),
},
- on_change=['supplier_invoice_line', 'unit'],
depends=['product', 'state'])
customer_invoice_line = fields.Function(fields.Many2One(
'account.invoice.line', 'Customer Invoice Line'),
@@ -62,8 +64,8 @@ class Asset(Workflow, ModelSQL, ModelView):
},
depends=['state'],
required=True)
- currency_digits = fields.Function(fields.Integer('Currency Digits',
- on_change_with=['company']), 'on_change_with_currency_digits')
+ currency_digits = fields.Function(fields.Integer('Currency Digits'),
+ 'on_change_with_currency_digits')
quantity = fields.Float('Quantity',
digits=(16, Eval('unit_digits', 2)),
states={
@@ -73,14 +75,13 @@ class Asset(Workflow, ModelSQL, ModelView):
},
depends=['state', 'unit_digits'])
unit = fields.Many2One('product.uom', 'Unit',
- on_change_with=['product'],
states={
'readonly': (Bool(Eval('product'))
| (Eval('state') != 'draft')),
},
depends=['state'])
- unit_digits = fields.Function(fields.Integer('Unit Digits',
- on_change_with=['unit']), 'on_change_with_unit_digits')
+ unit_digits = fields.Function(fields.Integer('Unit Digits'),
+ 'on_change_with_unit_digits')
value = fields.Numeric('Value',
digits=(16, Eval('currency_digits', 2)),
states={
@@ -108,7 +109,6 @@ class Asset(Workflow, ModelSQL, ModelView):
required=True,
depends=['state'])
end_date = fields.Date('End Date',
- on_change_with=['end_date', 'product', 'start_date'],
states={
'readonly': (Eval('lines', [0]) | (Eval('state') != 'draft')),
},
@@ -210,11 +210,13 @@ class Asset(Workflow, ModelSQL, ModelView):
return journals[0].id
return None
+ @fields.depends('company')
def on_change_with_currency_digits(self, name=None):
if self.company:
return self.company.currency.digits
return 2
+ @fields.depends('supplier_invoice_line', 'unit')
def on_change_supplier_invoice_line(self):
pool = Pool()
Currency = pool.get('currency.currency')
@@ -236,13 +238,14 @@ class Asset(Workflow, ModelSQL, ModelView):
invoice.currency)
else:
new_values['value'] = invoice_line.amount
- new_values['purchase_date'] = invoice.invoice_date
- new_values['start_date'] = invoice.invoice_date
- if invoice_line.product.depreciation_duration:
- duration = relativedelta.relativedelta(
- months=int(invoice_line.product.depreciation_duration),
- days=-1)
- new_values['end_date'] = new_values['start_date'] + duration
+ if invoice.invoice_date:
+ new_values['purchase_date'] = invoice.invoice_date
+ new_values['start_date'] = invoice.invoice_date
+ if invoice_line.product.depreciation_duration:
+ duration = relativedelta.relativedelta(
+ months=int(invoice_line.product.depreciation_duration),
+ days=-1)
+ new_values['end_date'] = new_values['start_date'] + duration
if not self.unit:
new_values['quantity'] = invoice_line.quantity
@@ -253,16 +256,19 @@ class Asset(Workflow, ModelSQL, ModelView):
return new_values
+ @fields.depends('product')
def on_change_with_unit(self):
if not self.product:
return None
return self.product.default_uom.id
+ @fields.depends('unit')
def on_change_with_unit_digits(self, name=None):
if not self.unit:
return 2
return self.unit.digits
+ @fields.depends('end_date', 'product', 'start_date')
def on_change_with_end_date(self):
if all(getattr(self, k, None) for k in ('product', 'start_date')):
if self.product.depreciation_duration:
diff --git a/invoice.py b/invoice.py
index 3d5e93a..d2fc606 100644
--- a/invoice.py
+++ b/invoice.py
@@ -19,10 +19,9 @@ class InvoiceLine:
| (Eval('_parent_invoice', {}).get('type',
Eval('invoice_type')) != 'out_invoice')),
},
- on_change=['asset', 'unit'],
depends=['product', 'is_assets_depreciable'])
is_assets_depreciable = fields.Function(fields.Boolean(
- 'Is Assets depreciable', on_change_with=['product']),
+ 'Is Assets depreciable'),
'on_change_with_is_assets_depreciable')
@classmethod
@@ -33,6 +32,7 @@ class InvoiceLine:
'Asset can be used only once on invoice line!'),
]
+ @fields.depends('product', 'invoice')
def on_change_product(self):
new_values = super(InvoiceLine, self).on_change_product()
if (not self.product
@@ -45,6 +45,7 @@ class InvoiceLine:
self.product.account_asset_used.rec_name
return new_values
+ @fields.depends('asset', 'unit')
def on_change_asset(self):
Uom = Pool().get('product.uom')
@@ -64,6 +65,7 @@ class InvoiceLine:
}
return {}
+ @fields.depends('product')
def on_change_with_is_assets_depreciable(self, name=None):
if self.product:
return self.product.type == 'assets' and self.product.depreciable
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 9b5550c..d069e1c 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:account.asset:"
msgid "Asset \"%s\" must be in draft to be deleted!"
-msgstr "Heu de canviar a esborrany l'actiu \"%s\" per poder eliminar-lo."
+msgstr "Heu de canviar l'actiu \"%s\" a esborrany per poder-lo eliminar."
msgctxt "error:account.asset:"
msgid "Supplier Invoice Line can be used only once on asset!"
@@ -17,7 +17,7 @@ msgstr "L'actiu només es pot utilitzar un cop a la línia de factura."
msgctxt "error:purchase.line:"
msgid "It misses an \"Account Asset\" on product \"%s\"!"
-msgstr "Falta el \"Compte d'actius\" del producte \"%s\"."
+msgstr "Falta un \"Compte d'actiu\" al producte \"%s\"."
msgctxt "field:account.asset,account_journal:"
msgid "Journal"
@@ -113,7 +113,7 @@ msgstr "Unitat"
msgctxt "field:account.asset,unit_digits:"
msgid "Unit Digits"
-msgstr "Decimals unitaris"
+msgstr "Decimals de la unitat"
msgctxt "field:account.asset,update_moves:"
msgid "Update Moves"
@@ -149,7 +149,7 @@ msgstr "ID"
msgctxt "field:account.asset-update-account.move,move:"
msgid "Move"
-msgstr "Moviment"
+msgstr "Assentament"
msgctxt "field:account.asset-update-account.move,rec_name:"
msgid "Name"
@@ -177,7 +177,7 @@ msgstr "Amortització acumulada"
msgctxt "field:account.asset.line,acquired_value:"
msgid "Acquired Value"
-msgstr "Valor adquirit"
+msgstr "Valor adquisició"
msgctxt "field:account.asset.line,actual_value:"
msgid "Actual Value"
@@ -201,7 +201,7 @@ msgstr "Data"
msgctxt "field:account.asset.line,depreciable_basis:"
msgid "Depreciable Basis"
-msgstr "Base depreciable"
+msgstr "Base d'amortització"
msgctxt "field:account.asset.line,depreciation:"
msgid "Depreciation"
@@ -233,7 +233,7 @@ msgstr "Import"
msgctxt "field:account.asset.update.show_depreciation,counterpart_account:"
msgid "Counterpart Account"
-msgstr "Cuenta de contrapartida"
+msgstr "Compte de contrapartida"
msgctxt "field:account.asset.update.show_depreciation,date:"
msgid "Date"
@@ -273,11 +273,11 @@ msgstr "Actiu"
msgctxt "field:account.invoice.line,is_assets_depreciable:"
msgid "Is Assets depreciable"
-msgstr "És actiu despreciable"
+msgstr "És actiu amortitzable"
msgctxt "field:product.category,account_asset:"
msgid "Account Asset"
-msgstr "Comtpe de actiu"
+msgstr "Compte d'actiu"
msgctxt "field:product.category,account_asset_used:"
msgid "Account Asset Used"
@@ -289,11 +289,11 @@ msgstr "Compte d'amortització"
msgctxt "field:product.category,account_depreciation_used:"
msgid "Account Depreciation Used"
-msgstr "Compte d'amortització utilitzada"
+msgstr "Compte d'amortització utilitzat"
msgctxt "field:product.template,account_asset:"
msgid "Account Asset"
-msgstr "Comtpe de actiu"
+msgstr "Compte d'actiu"
msgctxt "field:product.template,account_asset_used:"
msgid "Account Asset Used"
@@ -305,15 +305,15 @@ msgstr "Compte d'amortització"
msgctxt "field:product.template,account_depreciation_used:"
msgid "Account Depreciation Used"
-msgstr "Compte d'amortització utilitzada"
+msgstr "Compte d'amortització utilitzat"
msgctxt "field:product.template,depreciable:"
msgid "Depreciable"
-msgstr "Depreciable"
+msgstr "Amortitzable"
msgctxt "field:product.template,depreciation_duration:"
msgid "Depreciation Duration"
-msgstr "Duración de la amortització"
+msgstr "Durada de l'amortització"
msgctxt "help:product.template,depreciation_duration:"
msgid "In months"
@@ -337,7 +337,7 @@ msgstr "Actiu - Actualitza - Moviment"
msgctxt "model:account.asset.create_moves.start,name:"
msgid "Create Moves Start"
-msgstr "Crea inici d'assentaments"
+msgstr "Crea assentaments - Inici"
msgctxt "model:account.asset.line,name:"
msgid "Asset Line"
@@ -345,11 +345,11 @@ msgstr "Línia d'actiu"
msgctxt "model:account.asset.update.show_depreciation,name:"
msgid "Update Asset Show Depreciation"
-msgstr "Actualitza vista depreciació actiu"
+msgstr "Actualitza actius - Mostra amortització"
msgctxt "model:account.asset.update.start,name:"
msgid "Update Asset Start"
-msgstr "Inici actualiza actius"
+msgstr "Actualitza actius - Inici"
msgctxt "model:account.journal,name:journal_asset"
msgid "Asset"
@@ -365,11 +365,11 @@ msgstr "Actius"
msgctxt "model:ir.action,name:wizard_create_moves"
msgid "Create Assets Moves"
-msgstr "Crea assentament d'actiu"
+msgstr "Crea assentaments d'actiu"
msgctxt "model:ir.action,name:wizard_update"
msgid "Update Asset"
-msgstr "Actualizar actius"
+msgstr "Actualitza actius"
msgctxt "model:ir.action.act_window.domain,name:act_asset_form_domain_all"
msgid "All"
@@ -385,7 +385,7 @@ msgstr "Esborrany"
msgctxt "model:ir.action.act_window.domain,name:act_asset_form_domain_running"
msgid "Running"
-msgstr "En curs"
+msgstr "En execució"
msgctxt "model:ir.sequence,name:sequence_asset"
msgid "Asset"
@@ -405,7 +405,7 @@ msgstr "Actius"
msgctxt "model:ir.ui.menu,name:menu_create_moves"
msgid "Create Assets Moves"
-msgstr "Crea assentament d'actiu"
+msgstr "Crea assentaments d'actiu"
msgctxt "selection:account.asset,depreciation_method:"
msgid "Linear"
@@ -429,15 +429,15 @@ msgstr "Esborrany"
msgctxt "selection:account.asset,state:"
msgid "Running"
-msgstr "En curs"
+msgstr "En execució"
msgctxt "view:account.asset.create_moves.start:"
msgid "Create Assets Moves"
-msgstr "Crea assentament d'actiu"
+msgstr "Crea assentaments d'actiu"
msgctxt "view:account.asset.create_moves.start:"
msgid "Create Assets Moves up to"
-msgstr "Crea moviments d'actiu fins"
+msgstr "Crea assentaments d'actiu fins"
msgctxt "view:account.asset.line:"
msgid "Asset Line"
@@ -453,7 +453,11 @@ msgstr "Assentament d'amortització d'actiu"
msgctxt "view:account.asset.update.start:"
msgid "Update Asset"
-msgstr "Actualiza actius"
+msgstr "Actualitza actius"
+
+msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "Esteu segur de tancar l'actiu?"
msgctxt "view:account.asset:"
msgid "Asset"
@@ -465,15 +469,15 @@ msgstr "Actius"
msgctxt "view:account.asset:"
msgid "Clear Lines"
-msgstr "Esborra apunts"
+msgstr "Esborra línies"
msgctxt "view:account.asset:"
msgid "Close"
-msgstr "Tancat"
+msgstr "Tanca"
msgctxt "view:account.asset:"
msgid "Create Lines"
-msgstr "Crea apunts"
+msgstr "Crea línies"
msgctxt "view:account.asset:"
msgid "Lines"
@@ -489,7 +493,7 @@ msgstr "Executa"
msgctxt "view:account.asset:"
msgid "Update Asset"
-msgstr "Actualiza actius"
+msgstr "Actualitza actius"
msgctxt "view:product.template:"
msgid "Depreciation"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index fd7804e..ec6bc8f 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -44,7 +44,7 @@ msgstr "Erstellt durch"
msgctxt "field:account.asset,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
msgctxt "field:account.asset,customer_invoice_line:"
msgid "Customer Invoice Line"
@@ -112,11 +112,11 @@ msgstr "Rechnungsposition Lieferant"
msgctxt "field:account.asset,unit:"
msgid "Unit"
-msgstr "Stück"
+msgstr "Einheit"
msgctxt "field:account.asset,unit_digits:"
msgid "Unit Digits"
-msgstr "Einheit Anzahl Stellen"
+msgstr "Nachkommastellen"
msgctxt "field:account.asset,update_moves:"
msgid "Update Moves"
@@ -400,7 +400,7 @@ msgstr "Anlage"
msgctxt "model:ir.ui.menu,name:menu_asset"
msgid "Assets"
-msgstr "Anlagen"
+msgstr "Anlagenverwaltung"
msgctxt "model:ir.ui.menu,name:menu_asset_form"
msgid "Assets"
@@ -459,6 +459,10 @@ msgid "Update Asset"
msgstr "Anlage aktualisieren"
msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "Anlage wirklich schließen?"
+
+msgctxt "view:account.asset:"
msgid "Asset"
msgstr "Anlage"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index ec25ae1..0f75a76 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -456,6 +456,10 @@ msgid "Update Asset"
msgstr "Actualizar activo"
msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "¿Está seguro que quiere cerrar el activo?"
+
+msgctxt "view:account.asset:"
msgid "Asset"
msgstr "Activo"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index d18b32c..7b8a865 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:account.asset:"
msgid "Asset \"%s\" must be in draft to be deleted!"
-msgstr "Activo \"%s\" debe estar en borrador antes de ser eliminado!"
+msgstr "El activo fijo \"%s\" debe estar en borrador antes de ser eliminado!"
msgctxt "error:account.asset:"
msgid "Supplier Invoice Line can be used only once on asset!"
@@ -16,11 +16,11 @@ msgstr "El activo solo puede ser usado una vez en línea de factura!"
msgctxt "error:purchase.line:"
msgid "It misses an \"Account Asset\" on product \"%s\"!"
-msgstr "Falta una \"Cuenta de Activo\" en producto \"%s\"!"
+msgstr "Falta la \"Cuenta de Activo Fijo\" en el producto \"%s\"!"
msgctxt "field:account.asset,account_journal:"
msgid "Journal"
-msgstr "Libro Diario"
+msgstr "Libro Contable"
msgctxt "field:account.asset,comment:"
msgid "Comment"
@@ -64,7 +64,7 @@ msgstr "ID"
msgctxt "field:account.asset,lines:"
msgid "Lines"
-msgstr "Líneas de Inventario"
+msgstr "Líneas"
msgctxt "field:account.asset,move:"
msgid "Account Move"
@@ -72,7 +72,7 @@ msgstr "Asiento Contable"
msgctxt "field:account.asset,product:"
msgid "Product"
-msgstr "Productos"
+msgstr "Producto"
msgctxt "field:account.asset,purchase_date:"
msgid "Purchase Date"
@@ -132,7 +132,7 @@ msgstr "Modificado por Usuario"
msgctxt "field:account.asset-update-account.move,asset:"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "field:account.asset-update-account.move,create_date:"
msgid "Create Date"
@@ -184,7 +184,7 @@ msgstr "Valor Actual"
msgctxt "field:account.asset.line,asset:"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "field:account.asset.line,create_date:"
msgid "Create Date"
@@ -228,7 +228,7 @@ msgstr "Modificado por Usuario"
msgctxt "field:account.asset.update.show_depreciation,amount:"
msgid "Amount"
-msgstr "Cantidad"
+msgstr "Valor"
msgctxt "field:account.asset.update.show_depreciation,counterpart_account:"
msgid "Counterpart Account"
@@ -260,19 +260,19 @@ msgstr "Valor Residual"
msgctxt "field:account.asset.update.start,value:"
msgid "Asset Value"
-msgstr "Valor de Activo"
+msgstr "Valor de Activo Fijo"
msgctxt "field:account.configuration,asset_sequence:"
msgid "Asset Reference Sequence"
-msgstr "Secuencia de Activos"
+msgstr "Secuencia de Activo Fijo"
msgctxt "field:account.invoice.line,asset:"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "field:account.invoice.line,is_assets_depreciable:"
msgid "Is Assets depreciable"
-msgstr "Es activo depreciable."
+msgstr "Es activo fijo depreciable."
msgctxt "field:product.category,account_asset:"
msgid "Account Asset"
@@ -328,11 +328,11 @@ msgstr "Depreciación"
msgctxt "model:account.asset,name:"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "model:account.asset-update-account.move,name:"
msgid "Asset - Update - Move"
-msgstr "Activo - Actualizar - Asiento"
+msgstr "Activo Fijo - Actualizar - Asiento"
msgctxt "model:account.asset.create_moves.start,name:"
msgid "Create Moves Start"
@@ -352,23 +352,23 @@ msgstr "Empezar a Actualizar Activo"
msgctxt "model:account.journal,name:journal_asset"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "model:account.journal.type,name:journal_type_asset"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "model:ir.action,name:act_asset_form"
msgid "Assets"
-msgstr "Activos"
+msgstr "Activos Fijos"
msgctxt "model:ir.action,name:wizard_create_moves"
msgid "Create Assets Moves"
-msgstr "Crear Asiento de Activos"
+msgstr "Crear Asiento de Activos Fijos"
msgctxt "model:ir.action,name:wizard_update"
msgid "Update Asset"
-msgstr "Actualizar Activo"
+msgstr "Actualizar Activo Fijo"
msgctxt "model:ir.action.act_window.domain,name:act_asset_form_domain_all"
msgid "All"
@@ -388,23 +388,23 @@ msgstr "En ejecución"
msgctxt "model:ir.sequence,name:sequence_asset"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "model:ir.sequence.type,name:sequence_type_asset"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "model:ir.ui.menu,name:menu_asset"
msgid "Assets"
-msgstr "Activos"
+msgstr "Activos Fijos"
msgctxt "model:ir.ui.menu,name:menu_asset_form"
msgid "Assets"
-msgstr "Activos"
+msgstr "Activos Fijos"
msgctxt "model:ir.ui.menu,name:menu_create_moves"
msgid "Create Assets Moves"
-msgstr "Crear Asiento de Activos"
+msgstr "Crear Asiento de Activos Fijos"
msgctxt "selection:account.asset,depreciation_method:"
msgid "Linear"
@@ -432,11 +432,11 @@ msgstr "En ejecución"
msgctxt "view:account.asset.create_moves.start:"
msgid "Create Assets Moves"
-msgstr "Crear Asiento de Activos"
+msgstr "Crear Asiento de Activos Fijos"
msgctxt "view:account.asset.create_moves.start:"
msgid "Create Assets Moves up to"
-msgstr "Crear Asientos de Activos Hasta"
+msgstr "Crear Asientos de Activos Fijos Hasta"
msgctxt "view:account.asset.line:"
msgid "Asset Line"
@@ -448,15 +448,19 @@ msgstr "Líneas de Activo"
msgctxt "view:account.asset.update.show_depreciation:"
msgid "Asset Depreciation Move"
-msgstr "Asiento de Depreciación de Activo"
+msgstr "Asiento de Depreciación de Activo Fijo"
msgctxt "view:account.asset.update.start:"
msgid "Update Asset"
-msgstr "Actualizar Activo"
+msgstr "Actualizar Activo Fijo"
+
+msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "Está seguro que quiere cerrar el año fiscal?"
msgctxt "view:account.asset:"
msgid "Asset"
-msgstr "Activo"
+msgstr "Activo Fijo"
msgctxt "view:account.asset:"
msgid "Assets"
@@ -480,7 +484,7 @@ msgstr "Líneas"
msgctxt "view:account.asset:"
msgid "Other Info"
-msgstr "Información Adicional"
+msgstr "Info Adicional"
msgctxt "view:account.asset:"
msgid "Run"
@@ -488,7 +492,7 @@ msgstr "Ejecutar"
msgctxt "view:account.asset:"
msgid "Update Asset"
-msgstr "Actualizar Activo"
+msgstr "Actualizar Activo Fijo"
msgctxt "view:product.template:"
msgid "Depreciation"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 4724f2d..fded50b 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:account.asset:"
msgid "Asset \"%s\" must be in draft to be deleted!"
-msgstr "Debe cambiar a borrador el activo \"%s\" antes de borrarlo."
+msgstr "Debe cambiar el activo \"%s\" a borrador antes de borrarlo."
msgctxt "error:account.asset:"
msgid "Supplier Invoice Line can be used only once on asset!"
@@ -17,7 +17,7 @@ msgstr "El activo sólo se puede usar una vez en la línea de factura."
msgctxt "error:purchase.line:"
msgid "It misses an \"Account Asset\" on product \"%s\"!"
-msgstr "Falta una \"Cuenta de activos\" en el producto \"%s\"."
+msgstr "Falta una \"Cuenta de activo\" en el producto \"%s\"."
msgctxt "field:account.asset,account_journal:"
msgid "Journal"
@@ -113,7 +113,7 @@ msgstr "Unidad"
msgctxt "field:account.asset,unit_digits:"
msgid "Unit Digits"
-msgstr "Dígitos unidad"
+msgstr "Decimales de la unidad"
msgctxt "field:account.asset,update_moves:"
msgid "Update Moves"
@@ -149,7 +149,7 @@ msgstr "ID"
msgctxt "field:account.asset-update-account.move,move:"
msgid "Move"
-msgstr "Movimiento"
+msgstr "Asiento"
msgctxt "field:account.asset-update-account.move,rec_name:"
msgid "Name"
@@ -177,7 +177,7 @@ msgstr "Amortización acumulada"
msgctxt "field:account.asset.line,acquired_value:"
msgid "Acquired Value"
-msgstr "Valor adquirido"
+msgstr "Valor adquisición"
msgctxt "field:account.asset.line,actual_value:"
msgid "Actual Value"
@@ -201,7 +201,7 @@ msgstr "Fecha"
msgctxt "field:account.asset.line,depreciable_basis:"
msgid "Depreciable Basis"
-msgstr "Base de amortizable"
+msgstr "Base de amortización"
msgctxt "field:account.asset.line,depreciation:"
msgid "Depreciation"
@@ -333,7 +333,7 @@ msgstr "Activo"
msgctxt "model:account.asset-update-account.move,name:"
msgid "Asset - Update - Move"
-msgstr "Asientos de actualización"
+msgstr "Activo - Actualización - Asiento"
msgctxt "model:account.asset.create_moves.start,name:"
msgid "Create Moves Start"
@@ -437,7 +437,7 @@ msgstr "Crear asientos de activo"
msgctxt "view:account.asset.create_moves.start:"
msgid "Create Assets Moves up to"
-msgstr "Crear asientos hasta"
+msgstr "Crear asientos de activo hasta"
msgctxt "view:account.asset.line:"
msgid "Asset Line"
@@ -456,6 +456,10 @@ msgid "Update Asset"
msgstr "Actualizar activo"
msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "¿Está seguro que quiere cerrar el activo?"
+
+msgctxt "view:account.asset:"
msgid "Asset"
msgstr "Activo"
@@ -465,7 +469,7 @@ msgstr "Activos"
msgctxt "view:account.asset:"
msgid "Clear Lines"
-msgstr "Borrar apuntes"
+msgstr "Borrar líneas"
msgctxt "view:account.asset:"
msgid "Close"
@@ -473,7 +477,7 @@ msgstr "Cerrar"
msgctxt "view:account.asset:"
msgid "Create Lines"
-msgstr "Crear apuntes"
+msgstr "Crear líneas"
msgctxt "view:account.asset:"
msgid "Lines"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index ae0d351..f289986 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -457,6 +457,10 @@ msgid "Update Asset"
msgstr "Mise à jour des actifs"
msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "Êtes-vous sûr de cloturer l'actif ?"
+
+msgctxt "view:account.asset:"
msgid "Asset"
msgstr "Actif"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 27679a6..a036fbf 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:account.asset:"
msgid "Asset \"%s\" must be in draft to be deleted!"
-msgstr "Sredstvo \"%s\" je možno brisati samo v stanju osnutka."
+msgstr "Sredstvo \"%s\" je možno brisati samo v stanju priprave."
msgctxt "error:account.asset:"
msgid "Supplier Invoice Line can be used only once on asset!"
@@ -28,7 +28,7 @@ msgstr "Opomba"
msgctxt "field:account.asset,company:"
msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
msgctxt "field:account.asset,create_date:"
msgid "Create Date"
@@ -380,7 +380,7 @@ msgstr "Zaprta"
msgctxt "model:ir.action.act_window.domain,name:act_asset_form_domain_draft"
msgid "Draft"
-msgstr "Osnutki"
+msgstr "Priprava"
msgctxt "model:ir.action.act_window.domain,name:act_asset_form_domain_running"
msgid "Running"
@@ -424,7 +424,7 @@ msgstr "Zaprto"
msgctxt "selection:account.asset,state:"
msgid "Draft"
-msgstr "Osnutek"
+msgstr "V pripravi"
msgctxt "selection:account.asset,state:"
msgid "Running"
@@ -455,6 +455,10 @@ msgid "Update Asset"
msgstr "Popravek sredstev"
msgctxt "view:account.asset:"
+msgid "Are you sure to close the asset?"
+msgstr "Ali res želite zapreti sredstvo?"
+
+msgctxt "view:account.asset:"
msgid "Asset"
msgstr "Sredstvo"
diff --git a/setup.py b/setup.py
index 8bf2ab8..bd9f05f 100644
--- a/setup.py
+++ b/setup.py
@@ -11,36 +11,53 @@ import ConfigParser
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+def get_require_version(name):
+ if minor_version % 2:
+ require = '%s >= %s.%s.dev0, < %s.%s'
+ else:
+ require = '%s >= %s.%s, < %s.%s'
+ require %= (name, major_version, minor_version,
+ major_version, minor_version + 1)
+ return require
+
config = ConfigParser.ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
if key in info:
info[key] = info[key].strip().splitlines()
-major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+version = info.get('version', '0.0.1')
+major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
+name = 'trytond_account_asset'
+
+download_url = 'http://downloads.tryton.org/%s.%s/' % (
+ major_version, minor_version)
+if minor_version % 2:
+ version = '%s.%s.dev0' % (major_version, minor_version)
+ download_url = (
+ 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
+ name[8:], name, version))
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
- requires.append('trytond_%s >= %s.%s, < %s.%s' %
- (dep, major_version, minor_version, major_version,
- minor_version + 1))
-requires.append('trytond >= %s.%s, < %s.%s' %
- (major_version, minor_version, major_version, minor_version + 1))
+ requires.append(get_require_version('trytond_%s' % dep))
+requires.append(get_require_version('trytond'))
-tests_require = ['proteus >= %s.%s, < %s.%s' %
- (major_version, minor_version, major_version, minor_version + 1)]
+tests_require = [get_require_version('proteus')]
-setup(name='trytond_account_asset',
- version=info.get('version', '0.0.1'),
+setup(name=name,
+ version=version,
description='Tryton module for assets management',
long_description=read('README'),
author='Tryton',
+ author_email='issue_tracker at tryton.org',
url='http://www.tryton.org/',
- download_url=("http://downloads.tryton.org/" +
- info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
+ download_url=download_url,
+ keywords='tryton account asset',
package_dir={'trytond.modules.account_asset': '.'},
packages=[
'trytond.modules.account_asset',
@@ -69,7 +86,6 @@ setup(name='trytond_account_asset',
'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
'Topic :: Office/Business :: Financial :: Accounting',
diff --git a/tests/scenario_account_asset.rst b/tests/scenario_account_asset.rst
index ba93267..6cede80 100644
--- a/tests/scenario_account_asset.rst
+++ b/tests/scenario_account_asset.rst
@@ -187,15 +187,15 @@ Depreciate the asset::
>>> asset = Asset()
>>> asset.product = asset_product
>>> asset.supplier_invoice_line = invoice_line
- >>> asset.value == Decimal('1000')
- True
+ >>> asset.value
+ Decimal('1000.00')
>>> asset.start_date == supplier_invoice.invoice_date
True
>>> asset.end_date == (supplier_invoice.invoice_date +
... relativedelta(years=2, days=-1))
True
- >>> asset.quantity == 1
- True
+ >>> asset.quantity
+ 1.0
>>> asset.unit == unit
True
>>> asset.residual_value = Decimal('100')
@@ -206,18 +206,18 @@ Depreciate the asset::
24
>>> [l.depreciation for l in asset.lines] == [Decimal('37.5')] * 24
True
- >>> asset.lines[0].actual_value == Decimal('962.5')
- True
- >>> asset.lines[0].accumulated_depreciation == Decimal('37.5')
- True
- >>> asset.lines[11].actual_value == Decimal('550')
- True
- >>> asset.lines[11].accumulated_depreciation == Decimal('450')
- True
- >>> asset.lines[-1].actual_value == Decimal('100')
- True
- >>> asset.lines[-1].accumulated_depreciation == Decimal('900')
- True
+ >>> asset.lines[0].actual_value
+ Decimal('962.50')
+ >>> asset.lines[0].accumulated_depreciation
+ Decimal('37.50')
+ >>> asset.lines[11].actual_value
+ Decimal('550.00')
+ >>> asset.lines[11].accumulated_depreciation
+ Decimal('450.00')
+ >>> asset.lines[-1].actual_value
+ Decimal('100.00')
+ >>> asset.lines[-1].accumulated_depreciation
+ Decimal('900.00')
>>> Asset.run([asset.id], config.context)
>>> asset.reload()
@@ -227,37 +227,42 @@ Create Moves for 3 months::
>>> create_moves.form.date = (supplier_invoice.invoice_date
... + relativedelta(months=3))
>>> create_moves.execute('create_moves')
- >>> (depreciation_account.debit, depreciation_account.credit) == \
- ... (Decimal('0'), Decimal('112.5'))
- True
- >>> (expense.debit, expense.credit) == \
- ... (Decimal('112.5'), Decimal('0'))
- True
+ >>> depreciation_account.debit
+ Decimal('0.00')
+ >>> depreciation_account.credit
+ Decimal('112.50')
+ >>> expense.debit
+ Decimal('112.50')
+ >>> expense.credit
+ Decimal('0.00')
Update the asset::
>>> update = Wizard('account.asset.update', [asset])
>>> update.form.value = Decimal('1100')
>>> update.execute('update_asset')
- >>> update.form.amount == Decimal('100')
- True
+ >>> update.form.amount
+ Decimal('100.00')
>>> update.execute('create_move')
>>> asset.reload()
- >>> asset.value == Decimal('1100')
- True
- >>> [l.depreciation for l in asset.lines[:3]] == [Decimal('37.5')] * 3
- True
+ >>> asset.value
+ Decimal('1100')
+ >>> [l.depreciation for l in asset.lines[:3]]
+ [Decimal('37.50'), Decimal('37.50'), Decimal('37.50')]
>>> [l.depreciation for l in asset.lines[3:-1]] == [Decimal('42.26')] * 20
True
- >>> asset.lines[-1].depreciation == Decimal('42.3')
- True
+ >>> asset.lines[-1].depreciation
+ Decimal('42.30')
>>> depreciation_account.reload()
- >>> (depreciation_account.debit, depreciation_account.credit) == \
- ... (Decimal('100'), Decimal('112.5'))
- True
+ >>> depreciation_account.debit
+ Decimal('100.00')
+ >>> depreciation_account.credit
+ Decimal('112.50')
>>> expense.reload()
- >>> (expense.debit, expense.credit) == (Decimal('112.5'), Decimal('100'))
- True
+ >>> expense.debit
+ Decimal('112.50')
+ >>> expense.credit
+ Decimal('100.00')
Create Moves for 3 other months::
@@ -266,13 +271,15 @@ Create Moves for 3 other months::
... + relativedelta(months=6))
>>> create_moves.execute('create_moves')
>>> depreciation_account.reload()
- >>> (depreciation_account.debit, depreciation_account.credit) == \
- ... (Decimal('100'), Decimal('239.28'))
- True
+ >>> depreciation_account.debit
+ Decimal('100.00')
+ >>> depreciation_account.credit
+ Decimal('239.28')
>>> expense.reload()
- >>> (expense.debit, expense.credit) == \
- ... (Decimal('239.28'), Decimal('100'))
- True
+ >>> expense.debit
+ Decimal('239.28')
+ >>> expense.credit
+ Decimal('100.00')
Sale the asset::
@@ -293,13 +300,17 @@ Sale the asset::
>>> asset.reload()
>>> asset.customer_invoice_line == customer_invoice.lines[0]
True
- >>> (revenue.debit, revenue.credit) == (Decimal('860.72'), Decimal('600'))
- True
+ >>> revenue.debit
+ Decimal('860.72')
+ >>> revenue.credit
+ Decimal('600.00')
>>> asset_account.reload()
- >>> (asset_account.debit, asset_account.credit) == \
- ... (Decimal('1000'), Decimal('1100'))
- True
+ >>> asset_account.debit
+ Decimal('1000.00')
+ >>> asset_account.credit
+ Decimal('1100.00')
>>> depreciation_account.reload()
- >>> (depreciation_account.debit, depreciation_account.credit) == \
- ... (Decimal('339.28'), Decimal('239.28'))
- True
+ >>> depreciation_account.debit
+ Decimal('339.28')
+ >>> depreciation_account.credit
+ Decimal('239.28')
diff --git a/tests/test_account_asset.py b/tests/test_account_asset.py
index 466cd19..fda4bce 100644
--- a/tests/test_account_asset.py
+++ b/tests/test_account_asset.py
@@ -1,55 +1,26 @@
-#!/usr/bin/env python
#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 sys
-import os
-DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
- '..', '..', '..', '..', '..', 'trytond')))
-if os.path.isdir(DIR):
- sys.path.insert(0, os.path.dirname(DIR))
-
import unittest
import doctest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends
-from trytond.backend.sqlite.database import Database as SQLiteDatabase
+from trytond.tests.test_tryton import test_view, test_depends, doctest_dropdb
class AccountAssetTestCase(unittest.TestCase):
- '''
- Test AccountAsset module.
- '''
+ 'Test AccountAsset module'
def setUp(self):
trytond.tests.test_tryton.install_module('account_asset')
def test0005views(self):
- '''
- Test views.
- '''
+ 'Test views'
test_view('account_asset')
def test0006depends(self):
- '''
- Test depends.
- '''
+ 'Test depends'
test_depends()
-def doctest_dropdb(test):
- '''
- Remove sqlite memory database
- '''
- database = SQLiteDatabase().connect()
- cursor = database.cursor(autocommit=True)
- try:
- database.drop(cursor, ':memory:')
- cursor.commit()
- finally:
- cursor.close()
-
-
def suite():
suite = trytond.tests.test_tryton.suite()
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
@@ -58,6 +29,3 @@ def suite():
setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 1f9f7fe..5e0a7f2 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.0
+version=3.2.0
depends:
ir
res
diff --git a/trytond_account_asset.egg-info/PKG-INFO b/trytond_account_asset.egg-info/PKG-INFO
index a3710dd..f9ac2d8 100644
--- a/trytond_account_asset.egg-info/PKG-INFO
+++ b/trytond_account_asset.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-account-asset
-Version: 3.0.0
+Version: 3.2.0
Summary: Tryton module for assets management
Home-page: http://www.tryton.org/
Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
Description: trytond_account_asset
=====================
@@ -43,6 +43,7 @@ Description: trytond_account_asset
http://www.tryton.org/
+Keywords: tryton account asset
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
@@ -62,7 +63,6 @@ Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/trytond_account_asset.egg-info/requires.txt b/trytond_account_asset.egg-info/requires.txt
index 12280e7..0e16497 100644
--- a/trytond_account_asset.egg-info/requires.txt
+++ b/trytond_account_asset.egg-info/requires.txt
@@ -1,4 +1,4 @@
-trytond_account >= 3.0, < 3.1
-trytond_product >= 3.0, < 3.1
-trytond_account_invoice >= 3.0, < 3.1
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond_account >= 3.2, < 3.3
+trytond_product >= 3.2, < 3.3
+trytond_account_invoice >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
diff --git a/view/asset_form.xml b/view/asset_form.xml
index 1fd0d09..abafe0e 100644
--- a/view/asset_form.xml
+++ b/view/asset_form.xml
@@ -39,7 +39,8 @@
<button name="run"
string="Run" icon="tryton-go-next"/>
<button name="close"
- string="Close" icon="tryton-close"/>
+ string="Close" icon="tryton-close"
+ confirm="Are you sure to close the asset?"/>
</group>
</group>
</page>
--
tryton-modules-account-asset
More information about the tryton-debian-vcs
mailing list