[tryton-debian-vcs] tryton-modules-account-invoice branch upstream-1.6 created. f854a22e434bda7ab2b4c84cac0df0fe85f6a982

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-1.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-invoice.git;a=commitdiff;h=f854a22e434bda7ab2b4c84cac0df0fe85f6a982
commit f854a22e434bda7ab2b4c84cac0df0fe85f6a982
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 20 20:58:04 2010 +0100

    Adding upstream version 1.6.1.

diff --git a/CHANGELOG b/CHANGELOG
index 21c26eb..2706953 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.6.1 - 2010-11-02
+* Bug fixes (see mercurial logs for details)
+
 Version 1.6.0 - 2010-05-13
 * Bug fixes (see mercurial logs for details)
 * Add default search value on invoice
diff --git a/PKG-INFO b/PKG-INFO
index 0cf3f07..6b96421 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: trytond_account_invoice
-Version: 1.6.0
+Version: 1.6.1
 Summary: Financial and Accounting Module with:
     - Payment Term
     - Invoice / Credit Note
diff --git a/__tryton__.py b/__tryton__.py
index d083c99..a4037f6 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -6,7 +6,7 @@
     'name_es_CO': 'Facturación',
     'name_es_ES': 'Facturación',
     'name_fr_FR': 'Facturation',
-    'version': '1.6.0',
+    'version': '1.6.1',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/invoice.py b/invoice.py
index b4f8bc4..11130f7 100644
--- a/invoice.py
+++ b/invoice.py
@@ -544,6 +544,8 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
         rule_obj = self.pool.get('ir.rule')
         line_obj = self.pool.get('account.invoice.line')
         tax_obj = self.pool.get('account.invoice.tax')
+        type_name = FIELDS[self.total_amount._type].sql_type(
+                self.total_amount)[0]
 
         invoice_query, invoice_val = rule_obj.domain_get(
             cursor, user, 'account.invoice', context=context)
@@ -568,14 +570,17 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
                     'GROUP BY invoice  '
                 ') AS u '
                 'GROUP BY u.invoice '
-                'HAVING (SUM(u.total_amount) ' + clause[1] + ' %s)',
-                invoice_val + invoice_val + [clause[2]])
+                'HAVING (CAST(SUM(u.total_amount) AS ' + type_name + ') '
+                    + clause[1] + ' %s)',
+                invoice_val + invoice_val + [str(clause[2])])
         return [('id', 'in', [x[0] for x in cursor.fetchall()])]
 
     def search_untaxed_amount(self, cursor, user, name, clause, context=None):
         rule_obj = self.pool.get('ir.rule')
         line_obj = self.pool.get('account.invoice.line')
         tax_obj = self.pool.get('account.invoice.tax')
+        type_name = FIELDS[self.untaxed_amount._type].sql_type(
+                self.untaxed_amount)[0]
 
         invoice_query, invoice_val = rule_obj.domain_get(
             cursor, user, 'account.invoice', context=context)
@@ -586,15 +591,17 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
                         '"' + line_obj._table + '".invoice) '
                 'WHERE ' + invoice_query + ' '
                 'GROUP BY invoice '
-                'HAVING (COALESCE(SUM(quantity * unit_price), 0) ' + \
-                        clause[1] + ' %s)',
-                invoice_val + [clause[2]])
+                'HAVING (CAST(COALESCE(SUM(quantity * unit_price), 0) '
+                    'AS ' + type_name + ') ' + clause[1] + ' %s)',
+                invoice_val + [str(clause[2])])
         return [('id', 'in', [x[0] for x in cursor.fetchall()])]
 
     def search_tax_amount(self, cursor, user, name, clause, context=None):
         rule_obj = self.pool.get('ir.rule')
         line_obj = self.pool.get('account.invoice.line')
         tax_obj = self.pool.get('account.invoice.tax')
+        type_name = FIELDS[self.tax_amount._type].sql_type(
+                self.tax_amount)[0]
 
         invoice_query, invoice_val = rule_obj.domain_get(
             cursor, user, 'account.invoice', context=context)
@@ -605,8 +612,9 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
                         '"' + tax_obj._table + '".invoice) '
                 'WHERE ' + invoice_query + ' '
                 'GROUP BY invoice '
-                'HAVING (COALESCE(SUM(amount), 0) ' + clause[1] + ' %s)',
-                invoice_val + [clause[2]])
+                'HAVING (CAST(COALESCE(SUM(amount), 0) '
+                    'AS ' + type_name + ') ' + clause[1] + ' %s)',
+                invoice_val + [str(clause[2])])
         return [('id', 'in', [x[0] for x in cursor.fetchall()])]
 
     def button_draft(self, cursor, user, ids, context=None):
@@ -1198,7 +1206,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
                 continue
             value = invoice_tax_obj._credit(cursor, user, tax,
                     context=context)
-            res[taxes].append(('create', value))
+            res['taxes'].append(('create', value))
         return res
 
     def credit(self, cursor, user, ids, refund=False, context=None):
@@ -2464,8 +2472,6 @@ class PayInvoice(Wizard):
                 line_ids = data['form']['lines'][0][1] + \
                         [x.id for x in invoice.payment_lines
                                 if not x.reconciliation]
-                if line_id:
-                    line_ids += [line_id]
                 if line_ids:
                     move_line_obj.reconcile(cursor, user, line_ids,
                             journal_id=data['form']['journal_writeoff'],
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index a98a5c4..8bc5920 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: trytond-account-invoice
-Version: 1.6.0
+Version: 1.6.1
 Summary: Financial and Accounting Module with:
     - Payment Term
     - Invoice / Credit Note
-- 
tryton-modules-account-invoice



More information about the tryton-debian-vcs mailing list