Hello community,

here is the log from the commit of package trytond_account for openSUSE:Factory 
checked in at 2020-11-12 22:45:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_account (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_account.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_account"

Thu Nov 12 22:45:49 2020 rev:23 rq:847929 version:5.0.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond_account/trytond_account.changes  
2020-10-21 14:39:02.213627452 +0200
+++ 
/work/SRC/openSUSE:Factory/.trytond_account.new.24930/trytond_account.changes   
    2020-11-12 22:45:51.622546941 +0100
@@ -1,0 +2,5 @@
+Wed Nov 11 18:11:08 UTC 2020 - Axel Braun <[email protected]>
+
+- Version 5.0.16 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_account-5.0.15.tar.gz

New:
----
  trytond_account-5.0.16.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trytond_account.spec ++++++
--- /var/tmp/diff_new_pack.9kf2Tw/_old  2020-11-12 22:45:52.370547723 +0100
+++ /var/tmp/diff_new_pack.9kf2Tw/_new  2020-11-12 22:45:52.374547726 +0100
@@ -18,7 +18,7 @@
 
 %define majorver 5.0
 Name:           trytond_account
-Version:        %{majorver}.15
+Version:        %{majorver}.16
 Release:        0
 Summary:        The "account" module for the Tryton ERP system
 License:        GPL-3.0+

++++++ trytond_account-5.0.15.tar.gz -> trytond_account-5.0.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.15/.hgtags 
new/trytond_account-5.0.16/.hgtags
--- old/trytond_account-5.0.15/.hgtags  2020-10-18 20:51:04.000000000 +0200
+++ new/trytond_account-5.0.16/.hgtags  2020-11-11 16:25:56.000000000 +0100
@@ -34,3 +34,4 @@
 8f4e688536ac292bc71d807cf9b673d1e11932a8 5.0.13
 9d179878f40d39042158c4b815a17b433d1d50e5 5.0.14
 0ac0f588dfbdc29b8f951ba8b334be89da783046 5.0.15
+e7b4b8e0d7213ad2051531c759f7567bcbb9af8e 5.0.16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.15/CHANGELOG 
new/trytond_account-5.0.16/CHANGELOG
--- old/trytond_account-5.0.15/CHANGELOG        2020-10-18 20:51:04.000000000 
+0200
+++ new/trytond_account-5.0.16/CHANGELOG        2020-11-11 16:25:55.000000000 
+0100
@@ -1,3 +1,6 @@
+Version 5.0.16 - 2020-11-11
+* Bug fixes (see mercurial logs for details)
+
 Version 5.0.15 - 2020-10-18
 * Bug fixes (see mercurial logs for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.15/PKG-INFO 
new/trytond_account-5.0.16/PKG-INFO
--- old/trytond_account-5.0.15/PKG-INFO 2020-10-18 20:51:06.000000000 +0200
+++ new/trytond_account-5.0.16/PKG-INFO 2020-11-11 16:25:57.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: trytond_account
-Version: 5.0.15
+Version: 5.0.16
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.15/general_ledger.fodt 
new/trytond_account-5.0.16/general_ledger.fodt
--- old/trytond_account-5.0.15/general_ledger.fodt      2019-02-10 
23:19:38.000000000 +0100
+++ new/trytond_account-5.0.16/general_ledger.fodt      2020-10-30 
19:56:49.000000000 +0100
@@ -894,7 +894,7 @@
       <text:p text:style-name="P10"><text:placeholder 
text:placeholder-type="text">&lt;line.description or 
&apos;&apos;&gt;</text:placeholder><text:line-break/><text:placeholder 
text:placeholder-type="text">&lt;line.move_description or 
&apos;&apos;&gt;</text:placeholder></text:p>
      </table:table-cell>
      <table:table-cell table:style-name="Table3.G11" 
office:value-type="string">
-      <text:p text:style-name="P10"><text:placeholder 
text:placeholder-type="text">&lt;line.origin.rec_name if line.origin and 
line.origin.id &gt;= 0 else &apos;&apos;&gt;</text:placeholder></text:p>
+      <text:p text:style-name="P10"><text:placeholder 
text:placeholder-type="text">&lt;getattr(line.origin, &apos;rec_name&apos;, 
&apos;&apos;)&gt;</text:placeholder></text:p>
      </table:table-cell>
      <table:table-cell table:style-name="Table3.H11" 
office:value-type="string">
       <text:p text:style-name="P10"><text:placeholder 
text:placeholder-type="text">&lt;line.state_string&gt;</text:placeholder></text:p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.15/tax.py 
new/trytond_account-5.0.16/tax.py
--- old/trytond_account-5.0.15/tax.py   2020-04-25 12:53:00.000000000 +0200
+++ new/trytond_account-5.0.16/tax.py   2020-11-04 23:37:17.000000000 +0100
@@ -386,9 +386,27 @@
             ('type', '=', self.amount),
             ]
         if self.type == 'invoice':
-            domain.append(('amount', '>', 0))
+            domain.append(['OR',
+                    [('amount', '>', 0), ['OR',
+                            ('move_line.debit', '>', 0),
+                            ('move_line.credit', '>', 0),
+                            ]],
+                    [('amount', '<', 0), ['OR',
+                            ('move_line.debit', '<', 0),
+                            ('move_line.credit', '<', 0),
+                            ]],
+                    ])
         elif self.type == 'credit':
-            domain.append(('amount', '<', 0))
+            domain.append(['OR',
+                    [('amount', '<', 0), ['OR',
+                            ('move_line.debit', '>', 0),
+                            ('move_line.credit', '>', 0),
+                            ]],
+                    [('amount', '>', 0), ['OR',
+                            ('move_line.debit', '<', 0),
+                            ('move_line.credit', '<', 0),
+                            ]],
+                    ])
         return domain
 
     @classmethod
@@ -786,17 +804,29 @@
 
         columns = []
         amount = tax_line.amount
+        debit = move_line.debit
+        credit = move_line.credit
         if backend.name() == 'sqlite':
             amount = TaxLine.amount.sql_cast(tax_line.amount)
+            debit = MoveLine.debit.sql_cast(debit)
+            credit = MoveLine.credit.sql_cast(credit)
+        is_invoice = (
+            ((amount > 0) & ((debit > 0) | (credit > 0)))
+            | ((amount < 0) & ((debit < 0) | (credit < 0)))
+            )
+        is_credit = (
+            ((amount < 0) & ((debit > 0) | (credit > 0)))
+            | ((amount > 0) & ((debit < 0) | (credit < 0)))
+            )
         for name, clause in [
                 ('invoice_base_amount',
-                    (amount > 0) & (tax_line.type == 'base')),
+                    is_invoice & (tax_line.type == 'base')),
                 ('invoice_tax_amount',
-                    (amount > 0) & (tax_line.type == 'tax')),
+                    is_invoice & (tax_line.type == 'tax')),
                 ('credit_base_amount',
-                    (amount < 0) & (tax_line.type == 'base')),
+                    is_credit & (tax_line.type == 'base')),
                 ('credit_tax_amount',
-                    (amount < 0) & (tax_line.type == 'tax')),
+                    is_credit & (tax_line.type == 'tax')),
                 ]:
             if name not in names:
                 continue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.15/tryton.cfg 
new/trytond_account-5.0.16/tryton.cfg
--- old/trytond_account-5.0.15/tryton.cfg       2020-08-02 17:50:47.000000000 
+0200
+++ new/trytond_account-5.0.16/tryton.cfg       2020-10-18 20:51:16.000000000 
+0200
@@ -1,5 +1,5 @@
 [tryton]
-version=5.0.15
+version=5.0.16
 depends:
     company
     currency
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_account-5.0.15/trytond_account.egg-info/PKG-INFO 
new/trytond_account-5.0.16/trytond_account.egg-info/PKG-INFO
--- old/trytond_account-5.0.15/trytond_account.egg-info/PKG-INFO        
2020-10-18 20:51:05.000000000 +0200
+++ new/trytond_account-5.0.16/trytond_account.egg-info/PKG-INFO        
2020-11-11 16:25:56.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: trytond-account
-Version: 5.0.15
+Version: 5.0.16
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to