[tryton-debian-vcs] tryton-modules-project-invoice branch upstream updated. upstream/3.2.1-1-g0eac78b
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Oct 23 12:17:13 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-project-invoice.git;a=commitdiff;h=upstream/3.2.1-1-g0eac78b
commit 0eac78b1e468e56d969bc6de18018a5ab1dd84df
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Oct 21 11:29:17 2014 +0200
Adding upstream version 3.4.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 36c79db..7405999 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 3.2.1 - 2014-08-03
+Version 3.4.0 - 2014-10-20
* Bug fixes (see mercurial logs for details)
Version 3.2.0 - 2014-04-21
diff --git a/PKG-INFO b/PKG-INFO
index 4d18413..559890b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_project_invoice
-Version: 3.2.1
+Version: 3.4.0
Summary: Tryton module to invoice projects
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_project_invoice
=======================
diff --git a/locale/de_DE.po b/locale/de_DE.po
index f7c6caf..13c8d28 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -4,15 +4,15 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:project.work:"
msgid "There is no list price on work \"%s\"."
-msgstr "Fehlender Listenpreis für Arbeit \"%s\"."
+msgstr "Fehlender Listenpreis für Aufgabe \"%s\"."
msgctxt "error:project.work:"
msgid "There is no party on work \"%s\"."
-msgstr "Fehlende Partei für Arbeit \"%s\"."
+msgstr "Fehlende Partei für Aufgabe \"%s\"."
msgctxt "error:project.work:"
msgid "There is no product on work \"%s\"."
-msgstr "Fehlender Artikel für Arbeit \"%s\"."
+msgstr "Fehlender Artikel für Aufgabe \"%s\"."
msgctxt "error:timesheet.line:"
msgid "You can not delete invoiced line."
@@ -56,7 +56,7 @@ msgstr "Rechnungsausgang"
msgctxt "model:res.group,name:group_project_invoice"
msgid "Project Invoice"
-msgstr "Projekte Fakturierung"
+msgstr "Projekt Fakturierung"
msgctxt "selection:project.work,invoice_method:"
msgid "Manual"
@@ -64,11 +64,11 @@ msgstr "Manuell"
msgctxt "selection:project.work,invoice_method:"
msgid "On Effort"
-msgstr "Nach Arbeitsaufwand"
+msgstr "Nach veranschlagtem Aufwand"
msgctxt "selection:project.work,invoice_method:"
msgid "On Timesheet"
-msgstr "Nach Zeitaufwand"
+msgstr "Nach erfasstem Aufwand"
msgctxt "selection:project.work,project_invoice_method:"
msgid "Manual"
@@ -76,12 +76,12 @@ msgstr "Manuell"
msgctxt "selection:project.work,project_invoice_method:"
msgid "On Effort"
-msgstr "Nach Arbeitsaufwand"
+msgstr "Nach veranschlagtem Aufwand"
msgctxt "selection:project.work,project_invoice_method:"
msgid "On Timesheet"
-msgstr "Nach Zeitaufwand"
+msgstr "Nach erfasstem Aufwand"
msgctxt "view:project.work:"
msgid "Invoice"
-msgstr "Rechnung"
+msgstr "Rechnung erstellen"
diff --git a/locale/fr_FR.po b/locale/es_EC.po
similarity index 69%
copy from locale/fr_FR.po
copy to locale/es_EC.po
index edd6723..0496be7 100644
--- a/locale/fr_FR.po
+++ b/locale/es_EC.po
@@ -4,84 +4,84 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:project.work:"
msgid "There is no list price on work \"%s\"."
-msgstr "Il n'y a pas de liste de prix pour le travail \"%s\"."
+msgstr "No hay ninguna lista de precios en el trabajo \"%s\"."
msgctxt "error:project.work:"
msgid "There is no party on work \"%s\"."
-msgstr "Il n'y a pas de tiers sur le travail \"%s\"."
+msgstr "No hay ningún tercero en el trabajo \"%s\"."
msgctxt "error:project.work:"
msgid "There is no product on work \"%s\"."
-msgstr "Il n'y a pas de produit sur le travail \"%s\"."
+msgstr "No hay ningún producto en el trabajo \"%s\"."
msgctxt "error:timesheet.line:"
msgid "You can not delete invoiced line."
-msgstr "Vous ne pouvez supprimer une ligne facturée."
+msgstr "No puede eliminar una línea facturada."
msgctxt "error:timesheet.line:"
msgid "You can not modify invoiced line."
-msgstr "Vous ne pouvez pas modifier une ligne facturée."
+msgstr "No puede modificar una línea facturada."
msgctxt "field:project.work,hours_to_invoice:"
msgid "Hours to Invoice"
-msgstr "Heures à facturer"
+msgstr "Horas a Facturar"
msgctxt "field:project.work,invoice_line:"
msgid "Invoice Line"
-msgstr "Ligne de facture"
+msgstr "Línea de Factura"
msgctxt "field:project.work,invoice_method:"
msgid "Invoice Method"
-msgstr "Méthode de facturation"
+msgstr "Método de Facturación"
msgctxt "field:project.work,invoiced_amount:"
msgid "Invoiced Amount"
-msgstr "Montant facturé"
+msgstr "Valor Facturado"
msgctxt "field:project.work,invoiced_hours:"
msgid "Invoiced Hours"
-msgstr "Heures facturées"
+msgstr "Horas Facturadas"
msgctxt "field:project.work,project_invoice_method:"
msgid "Invoice Method"
-msgstr "Méthode de facturation"
+msgstr "Método de Facturación"
msgctxt "field:timesheet.line,invoice_line:"
msgid "Invoice Line"
-msgstr "Ligne de facture"
+msgstr "Línea de Factura"
msgctxt "model:ir.action,name:open_invoice"
msgid "Invoices"
-msgstr "Factures"
+msgstr "Facturas"
msgctxt "model:res.group,name:group_project_invoice"
msgid "Project Invoice"
-msgstr "Facture projet"
+msgstr "Facturación de Proyectos"
msgctxt "selection:project.work,invoice_method:"
msgid "Manual"
-msgstr "Manuelle"
+msgstr "Manual"
msgctxt "selection:project.work,invoice_method:"
msgid "On Effort"
-msgstr "Sur l'effort"
+msgstr "Por Esfuerzo Estimado"
msgctxt "selection:project.work,invoice_method:"
msgid "On Timesheet"
-msgstr "Sur feuille de présence"
+msgstr "Por Trabajo Realizado"
msgctxt "selection:project.work,project_invoice_method:"
msgid "Manual"
-msgstr "Manuel"
+msgstr "Manual"
msgctxt "selection:project.work,project_invoice_method:"
msgid "On Effort"
-msgstr "Sur l'effort"
+msgstr "Por Esfuerzo Estimado"
msgctxt "selection:project.work,project_invoice_method:"
msgid "On Timesheet"
-msgstr "Sur feuille de présence"
+msgstr "Por Trabajo Realizado"
msgctxt "view:project.work:"
msgid "Invoice"
-msgstr "Facture"
+msgstr "Factura"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index edd6723..ddbef93 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -4,15 +4,15 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:project.work:"
msgid "There is no list price on work \"%s\"."
-msgstr "Il n'y a pas de liste de prix pour le travail \"%s\"."
+msgstr "Il n'y a pas de liste de prix pour le travail « %s »."
msgctxt "error:project.work:"
msgid "There is no party on work \"%s\"."
-msgstr "Il n'y a pas de tiers sur le travail \"%s\"."
+msgstr "Il n'y a pas de tiers sur le travail « %s »."
msgctxt "error:project.work:"
msgid "There is no product on work \"%s\"."
-msgstr "Il n'y a pas de produit sur le travail \"%s\"."
+msgstr "Il n'y a pas de produit sur le travail « %s »."
msgctxt "error:timesheet.line:"
msgid "You can not delete invoiced line."
diff --git a/tests/test_project_invoice.py b/tests/test_project_invoice.py
index 1ae7354..22ee69a 100644
--- a/tests/test_project_invoice.py
+++ b/tests/test_project_invoice.py
@@ -3,7 +3,8 @@
import unittest
import doctest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends, doctest_dropdb
+from trytond.tests.test_tryton import test_view, test_depends
+from trytond.tests.test_tryton import doctest_setup, doctest_teardown
class ProjectInvoiceTestCase(unittest.TestCase):
@@ -27,10 +28,10 @@ def suite():
ProjectInvoiceTestCase))
suite.addTests(doctest.DocFileSuite(
'scenario_project_invoice_timesheet.rst',
- setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
+ setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
suite.addTests(doctest.DocFileSuite(
'scenario_project_invoice_effort.rst',
- setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
+ setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
diff --git a/tryton.cfg b/tryton.cfg
index df4cf4c..9ca07c2 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.2.1
+version=3.4.0
depends:
ir
project
diff --git a/trytond_project_invoice.egg-info/PKG-INFO b/trytond_project_invoice.egg-info/PKG-INFO
index 788b635..444a874 100644
--- a/trytond_project_invoice.egg-info/PKG-INFO
+++ b/trytond_project_invoice.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-project-invoice
-Version: 3.2.1
+Version: 3.4.0
Summary: Tryton module to invoice projects
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_project_invoice
=======================
diff --git a/trytond_project_invoice.egg-info/SOURCES.txt b/trytond_project_invoice.egg-info/SOURCES.txt
index a7678d8..16b0b82 100644
--- a/trytond_project_invoice.egg-info/SOURCES.txt
+++ b/trytond_project_invoice.egg-info/SOURCES.txt
@@ -10,15 +10,31 @@ timesheet.xml
tryton.cfg
work.xml
./__init__.py
+./project.xml
./timesheet.py
+./timesheet.xml
+./tryton.cfg
./work.py
+./work.xml
+./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/scenario_project_invoice_effort.rst
+./tests/scenario_project_invoice_timesheet.rst
./tests/test_project_invoice.py
+./view/work_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_project_invoice.egg-info/requires.txt b/trytond_project_invoice.egg-info/requires.txt
index 0608f3d..1698eac 100644
--- a/trytond_project_invoice.egg-info/requires.txt
+++ b/trytond_project_invoice.egg-info/requires.txt
@@ -1,8 +1,8 @@
python-sql
-trytond_project >= 3.2, < 3.3
-trytond_project_revenue >= 3.2, < 3.3
-trytond_timesheet >= 3.2, < 3.3
-trytond_account >= 3.2, < 3.3
-trytond_account_invoice >= 3.2, < 3.3
-trytond_product >= 3.2, < 3.3
-trytond >= 3.2, < 3.3
\ No newline at end of file
+trytond_project >= 3.4, < 3.5
+trytond_project_revenue >= 3.4, < 3.5
+trytond_timesheet >= 3.4, < 3.5
+trytond_account >= 3.4, < 3.5
+trytond_account_invoice >= 3.4, < 3.5
+trytond_product >= 3.4, < 3.5
+trytond >= 3.4, < 3.5
\ No newline at end of file
diff --git a/work.py b/work.py
index 765e61e..7f44401 100644
--- a/work.py
+++ b/work.py
@@ -10,7 +10,7 @@ from trytond.pyson import Eval, Bool, PYSONEncoder
from trytond.pool import Pool
from trytond.transaction import Transaction
from trytond.wizard import Wizard, StateAction
-from trytond.tools import reduce_ids
+from trytond.tools import reduce_ids, grouped_slice
__all__ = ['Work', 'OpenInvoice']
@@ -141,10 +141,9 @@ class Work:
pool = Pool()
InvoiceLine = pool.get('account.invoice.line')
- with Transaction().set_user(0, set_context=True):
- invoice_lines = InvoiceLine.browse([
- w.invoice_line.id for w in works
- if w.invoice_line])
+ invoice_lines = InvoiceLine.browse([
+ w.invoice_line.id for w in works
+ if w.invoice_line])
id2invoice_lines = dict((l.id, l) for l in invoice_lines)
amounts = {}
@@ -161,11 +160,10 @@ class Work:
pool = Pool()
InvoiceLine = pool.get('account.invoice.line')
- with Transaction().set_user(0, set_context=True):
- invoice_lines = InvoiceLine.browse([
- t.invoice_line.id for w in works
- for t in w.work.timesheet_lines
- if t.invoice_line])
+ invoice_lines = InvoiceLine.browse([
+ t.invoice_line.id for w in works
+ for t in w.work.timesheet_lines
+ if t.invoice_line])
id2invoice_lines = dict((l.id, l) for l in invoice_lines)
amounts = {}
@@ -189,8 +187,7 @@ class Work:
hours = {}
twork2work = dict((w.work.id, w.id) for w in works)
ids = twork2work.keys()
- for i in range(0, len(ids), cursor.IN_MAX):
- sub_ids = ids[i:i + cursor.IN_MAX]
+ for sub_ids in grouped_slice(ids):
red_sql = reduce_ids(line.work, sub_ids)
if invoiced:
where = line.invoice_line != None
@@ -249,8 +246,7 @@ class Work:
klass.write(records, {
'invoice_line': invoice_line.id,
})
- with Transaction().set_user(0, set_context=True):
- Invoice.update_taxes(invoices)
+ Invoice.update_taxes(invoices)
def _get_invoice(self):
"Return invoice for the work"
@@ -269,18 +265,17 @@ class Work:
if not self.party:
self.raise_user_error('missing_party', (self.rec_name,))
- with Transaction().set_user(0, set_context=True):
- return Invoice(
- company=self.company,
- type='out_invoice',
- journal=journal,
- party=self.party,
- invoice_address=self.party.address_get(type='invoice'),
- currency=self.company.currency,
- account=self.party.account_receivable,
- payment_term=self.party.customer_payment_term,
- description=self.work.name,
- )
+ return Invoice(
+ company=self.company,
+ type='out_invoice',
+ journal=journal,
+ party=self.party,
+ invoice_address=self.party.address_get(type='invoice'),
+ currency=self.company.currency,
+ account=self.party.account_receivable,
+ payment_term=self.party.customer_payment_term,
+ description=self.work.name,
+ )
def _group_lines_to_invoice_key(self, line):
"The key to group lines"
@@ -299,8 +294,7 @@ class Work:
quantity = sum(l['quantity'] for l in lines)
product = key['product']
- with Transaction().set_user(0, set_context=True):
- invoice_line = InvoiceLine()
+ invoice_line = InvoiceLine()
invoice_line.type = 'line'
invoice_line.quantity = Uom.compute_qty(hour, quantity,
product.default_uom)
--
tryton-modules-project-invoice
More information about the tryton-debian-vcs
mailing list