[tryton-debian-vcs] tryton-modules-account-invoice branch upstream-2.6 created. 66bc635baaa90de02afa565177f02233b6314baa

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 16:55:22 UTC 2013


The following commit has been merged in the upstream-2.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-invoice.git;a=commitdiff;h=66bc635baaa90de02afa565177f02233b6314baa
commit 66bc635baaa90de02afa565177f02233b6314baa
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 17 13:14:00 2013 +0200

    Adding upstream version 2.6.5.

diff --git a/CHANGELOG b/CHANGELOG
index e75c3a4..90a706f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.5 - 2013-10-01
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.4 - 2013-05-02
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 7b0a56f..00ae1e3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_invoice
-Version: 2.6.4
+Version: 2.6.5
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/invoice.py b/invoice.py
index 8558afa..ea90b6a 100644
--- a/invoice.py
+++ b/invoice.py
@@ -2321,10 +2321,11 @@ class PayInvoice(Wizard):
                 self.start.amount, invoice.company.currency)
 
         if invoice.company.currency.is_zero(amount):
-            default['lines'] = [x.id for x in invoice.lines_to_pay]
+            lines = invoice.lines_to_pay
         else:
-            default['lines'], _ = \
-                invoice.get_reconcile_lines_for_amount(amount)
+            lines, _ = invoice.get_reconcile_lines_for_amount(amount)
+        default['lines'] = [x.id for x in lines]
+
         for line_id in default['lines'][:]:
             if line_id not in default['lines_to_pay']:
                 default['lines'].remove(line_id)
diff --git a/tryton.cfg b/tryton.cfg
index bc6cd4a..5cebe87 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.4
+version=2.6.5
 depends:
     account
     account_product
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index d19ec6d..ae8aad5 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-invoice
-Version: 2.6.4
+Version: 2.6.5
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
commit 76d5f1e0433cc501076d3c7b88d2c983d12a2cf9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat May 4 02:23:52 2013 +0200

    Adding upstream version 2.6.4.

diff --git a/CHANGELOG b/CHANGELOG
index 96b5965..e75c3a4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.4 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.3 - 2013-02-12
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index c304d45..7b0a56f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_invoice
-Version: 2.6.3
+Version: 2.6.4
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/invoice.py b/invoice.py
index 42358f4..8558afa 100644
--- a/invoice.py
+++ b/invoice.py
@@ -381,6 +381,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
     def _on_change_lines_taxes(self):
         pool = Pool()
         Tax = pool.get('account.tax')
+        InvoiceTax = pool.get('account.invoice.tax')
         res = {
             'untaxed_amount': Decimal('0.0'),
             'tax_amount': Decimal('0.0'),
@@ -454,7 +455,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
             if key not in tax_keys:
                 res['tax_amount'] += computed_taxes[key]['amount']
                 res['taxes'].setdefault('add', [])
-                value = Tax.default_get(Tax._fields.keys())
+                value = InvoiceTax.default_get(InvoiceTax._fields.keys())
                 value.update(computed_taxes[key])
                 res['taxes']['add'].append(value)
         if self.currency:
@@ -1175,6 +1176,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                             if not l.reconciliation] +
                         [l for l in new_invoice.lines_to_pay
                             if not l.reconciliation])
+        cls.update_taxes(new_invoices)
         return new_invoices
 
     @classmethod
@@ -1196,6 +1198,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
         for invoice in invoices:
             invoice.set_number()
             invoice.create_move()
+        cls.write(invoices, {
+                'state': 'open',
+                })
+        for invoice in invoices:
             invoice.print_invoice()
 
     @classmethod
@@ -1795,8 +1801,8 @@ class InvoiceLine(ModelSQL, ModelView):
             res[field] = getattr(getattr(self, field), 'id', None)
 
         res['taxes'] = []
-        for tax in self.taxes:
-            res['taxes'].append(('add', tax.id))
+        if self.taxes:
+            res['taxes'].append(('add', [tax.id for tax in self.taxes]))
         return res
 
 
@@ -2450,9 +2456,9 @@ class CreditInvoice(Wizard):
                 if invoice.payment_lines:
                     self.raise_user_error('refund_with_payement')
 
-        invoice_ids = Invoice.credit(invoices, refund=refund)
+        credit_invoices = Invoice.credit(invoices, refund=refund)
 
-        data = {'res_id': invoice_ids}
-        if len(invoice_ids) == 1:
+        data = {'res_id': [i.id for i in credit_invoices]}
+        if len(credit_invoices) == 1:
             action['views'].reverse()
         return action, data
diff --git a/tryton.cfg b/tryton.cfg
index 5e36081..bc6cd4a 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.3
+version=2.6.4
 depends:
     account
     account_product
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index 5cff6fe..d19ec6d 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-invoice
-Version: 2.6.3
+Version: 2.6.4
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-account-invoice



More information about the tryton-debian-vcs mailing list