Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package trytond_account for openSUSE:Factory 
checked in at 2022-01-10 23:53:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_account (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_account.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_account"

Mon Jan 10 23:53:39 2022 rev:29 rq:945351 version:5.0.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond_account/trytond_account.changes  
2021-12-07 00:02:14.183958759 +0100
+++ 
/work/SRC/openSUSE:Factory/.trytond_account.new.1892/trytond_account.changes    
    2022-01-10 23:54:16.812839936 +0100
@@ -1,0 +2,5 @@
+Mon Jan  3 14:15:33 UTC 2022 - Axel Braun <[email protected]>
+
+- Version 5.0.20 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_account-5.0.19.tar.gz
  trytond_account-5.0.19.tar.gz.asc

New:
----
  trytond_account-5.0.20.tar.gz
  trytond_account-5.0.20.tar.gz.asc

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

Other differences:
------------------
++++++ trytond_account.spec ++++++
--- /var/tmp/diff_new_pack.eGbNLA/_old  2022-01-10 23:54:17.312840374 +0100
+++ /var/tmp/diff_new_pack.eGbNLA/_new  2022-01-10 23:54:17.316840377 +0100
@@ -18,7 +18,7 @@
 
 %define majorver 5.0
 Name:           trytond_account
-Version:        %{majorver}.19
+Version:        %{majorver}.20
 Release:        0
 Summary:        The "account" module for the Tryton ERP system
 License:        GPL-3.0+
@@ -29,6 +29,7 @@
 Source3:        
https://keybase.io/cedrickrier/pgp_keys.asc?fingerprint=7C5A4360F6DF81ABA91FD54D6FF50AFE03489130#/%{name}.keyring
 BuildRequires:  fdupes
 BuildRequires:  python3-setuptools 
+BuildRequires:  python-rpm-macros
 Requires:       trytond 
 Requires:       trytond_company 
 Requires:       trytond_currency 

++++++ trytond_account-5.0.19.tar.gz -> trytond_account-5.0.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.19/.hgtags 
new/trytond_account-5.0.20/.hgtags
--- old/trytond_account-5.0.19/.hgtags  2021-11-05 00:20:49.000000000 +0100
+++ new/trytond_account-5.0.20/.hgtags  2022-01-01 18:51:25.000000000 +0100
@@ -38,3 +38,4 @@
 ab4f21ad3261e30b048a9dae8ab5de6ec1f7fa84 5.0.17
 fa0e8af653621c155163807ce40d8eb4340a95e5 5.0.18
 0e3d6055b0fab40f58093ffc0946d9f986b8721e 5.0.19
+c49460bc44ab9165338f80c4794dc071aed18557 5.0.20
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.19/CHANGELOG 
new/trytond_account-5.0.20/CHANGELOG
--- old/trytond_account-5.0.19/CHANGELOG        2021-11-05 00:20:48.000000000 
+0100
+++ new/trytond_account-5.0.20/CHANGELOG        2022-01-01 18:51:24.000000000 
+0100
@@ -1,3 +1,6 @@
+Version 5.0.20 - 2022-01-01
+* Bug fixes (see mercurial logs for details)
+
 Version 5.0.19 - 2021-11-04
 * Bug fixes (see mercurial logs for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.19/COPYRIGHT 
new/trytond_account-5.0.20/COPYRIGHT
--- old/trytond_account-5.0.19/COPYRIGHT        2021-11-05 00:20:48.000000000 
+0100
+++ new/trytond_account-5.0.20/COPYRIGHT        2022-01-01 18:51:24.000000000 
+0100
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2021 C??dric Krier.
+Copyright (C) 2008-2022 C??dric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2021 B2CK SPRL.
+Copyright (C) 2008-2022 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.19/PKG-INFO 
new/trytond_account-5.0.20/PKG-INFO
--- old/trytond_account-5.0.19/PKG-INFO 2021-11-05 00:20:50.671066300 +0100
+++ new/trytond_account-5.0.20/PKG-INFO 2022-01-01 18:51:26.953218200 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: trytond_account
-Version: 5.0.19
+Version: 5.0.20
 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.19/account.py 
new/trytond_account-5.0.20/account.py
--- old/trytond_account-5.0.19/account.py       2021-11-02 19:07:18.000000000 
+0100
+++ new/trytond_account-5.0.20/account.py       2021-12-28 01:28:18.000000000 
+0100
@@ -198,6 +198,7 @@
         pool = Pool()
         Account = pool.get('account.account')
         GeneralLedger = pool.get('account.general_ledger.account')
+        context = Transaction().context
 
         res = {}
         for type_ in types:
@@ -210,10 +211,13 @@
         for type_ in childs:
             type_sum[type_.id] = Decimal('0.0')
 
-        start_period_ids = GeneralLedger.get_period_ids('start_%s' % name)
-        end_period_ids = GeneralLedger.get_period_ids('end_%s' % name)
-        period_ids = list(
-            set(end_period_ids).difference(set(start_period_ids)))
+        if context.get('start_period') or context.get('end_period'):
+            start_period_ids = GeneralLedger.get_period_ids('start_%s' % name)
+            end_period_ids = GeneralLedger.get_period_ids('end_%s' % name)
+            period_ids = list(
+                set(end_period_ids).difference(set(start_period_ids)))
+        else:
+            period_ids = None
 
         with Transaction().set_context(periods=period_ids):
             accounts = Account.search([
@@ -1514,7 +1518,7 @@
                 ()),
             ],
         states={
-            'invisible': (Eval('start_period', 'False')
+            'invisible': (Eval('start_period', False)
                 | Eval('end_period', False)),
             },
         depends=['to_date', 'start_period', 'end_period'])
@@ -1525,7 +1529,7 @@
                 ()),
             ],
         states={
-            'invisible': (Eval('start_period', 'False')
+            'invisible': (Eval('start_period', False)
                 | Eval('end_period', False)),
             },
         depends=['from_date', 'start_period', 'end_period'])
@@ -1574,17 +1578,25 @@
                 and self.end_period.fiscalyear != self.fiscalyear):
             self.end_period = None
 
+    @fields.depends('start_period')
     def on_change_start_period(self):
-        self.from_date = self.to_date = None
+        if self.start_period:
+            self.from_date = self.to_date = None
 
+    @fields.depends('end_period')
     def on_change_end_period(self):
-        self.from_date = self.to_date = None
+        if self.end_period:
+            self.from_date = self.to_date = None
 
+    @fields.depends('from_date')
     def on_change_from_date(self):
-        self.start_period = self.end_period = None
+        if self.from_date:
+            self.start_period = self.end_period = None
 
+    @fields.depends('to_date')
     def on_change_to_date(self):
-        self.start_period = self.end_period = None
+        if self.to_date:
+            self.start_period = self.end_period = None
 
 
 class GeneralLedgerLine(ModelSQL, ModelView):
@@ -1822,27 +1834,41 @@
             ('fiscalyear', '=', Eval('fiscalyear')),
             ('start_date', '<=', (Eval('end_period'), 'start_date'))
             ],
-        depends=['end_period', 'fiscalyear'])
+        states={
+            'invisible': Eval('from_date', False) | Eval('to_date', False),
+            },
+        depends=['end_period', 'fiscalyear', 'from_date', 'to_date'])
     end_period = fields.Many2One('account.period', 'End Period',
         domain=[
             ('fiscalyear', '=', Eval('fiscalyear')),
             ('start_date', '>=', (Eval('start_period'), 'start_date')),
             ],
-        depends=['start_period', 'fiscalyear'])
+        states={
+            'invisible': Eval('from_date', False) | Eval('to_date', False),
+            },
+        depends=['start_period', 'fiscalyear', 'from_date', 'to_date'])
     from_date = fields.Date("From Date",
         domain=[
             If(Eval('to_date') & Eval('from_date'),
                 ('from_date', '<=', Eval('to_date')),
                 ()),
             ],
-        depends=['to_date'])
+        states={
+            'invisible': (
+                Eval('start_period', False) | Eval('end_period', False)),
+            },
+        depends=['to_date', 'start_period', 'end_period'])
     to_date = fields.Date("To Date",
         domain=[
             If(Eval('from_date') & Eval('to_date'),
                 ('to_date', '>=', Eval('from_date')),
                 ()),
             ],
-        depends=['from_date'])
+        states={
+            'invisible': (
+                Eval('start_period', False) | Eval('end_period', False)),
+            },
+        depends=['from_date', 'start_period', 'end_period'])
     company = fields.Many2One('company.company', 'Company', required=True)
     posted = fields.Boolean('Posted Move', help='Show only posted move')
     comparison = fields.Boolean('Comparison')
@@ -1912,10 +1938,34 @@
     def default_comparison(cls):
         return False
 
-    @fields.depends('fiscalyear')
+    @fields.depends('fiscalyear', 'start_period', 'end_period')
     def on_change_fiscalyear(self):
-        self.start_period = None
-        self.end_period = None
+        if (self.start_period
+                and self.start_period.fiscalyear != self.fiscalyear):
+            self.start_period = None
+        if (self.end_period
+                and self.end_period.fiscalyear != self.fiscalyear):
+            self.end_period = None
+
+    @fields.depends('start_period')
+    def on_change_start_period(self):
+        if self.start_period:
+            self.from_date = self.to_date = None
+
+    @fields.depends('end_period')
+    def on_change_end_period(self):
+        if self.end_period:
+            self.from_date = self.to_date = None
+
+    @fields.depends('from_date')
+    def on_change_from_date(self):
+        if self.from_date:
+            self.start_period = self.end_period = None
+
+    @fields.depends('to_date')
+    def on_change_to_date(self):
+        if self.to_date:
+            self.start_period = self.end_period = None
 
     @classmethod
     def view_attributes(cls):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.19/move.py 
new/trytond_account-5.0.20/move.py
--- old/trytond_account-5.0.19/move.py  2021-05-06 23:57:21.000000000 +0200
+++ new/trytond_account-5.0.20/move.py  2021-12-24 00:06:58.000000000 +0100
@@ -958,7 +958,9 @@
                     ('start_date', '<=', date),
                     ('end_date', '>=', date),
                     ('company', '=', company),
-                    ], limit=1)
+                    ],
+                order=[('start_date', 'DESC')],
+                limit=1)
             if fiscalyears:
                 fiscalyear_id = fiscalyears[0].id
             else:
@@ -1376,15 +1378,25 @@
     open_ = StateAction('account.act_move_line_form')
 
     def do_open_(self, action):
-        FiscalYear = Pool().get('account.fiscalyear')
+        pool = Pool()
+        FiscalYear = pool.get('account.fiscalyear')
+        context = Transaction().context
 
-        if not Transaction().context.get('fiscalyear'):
+        date = context.get('date')
+        fiscalyear = context.get('fiscalyear')
+        if date:
+            fiscalyears = FiscalYear.search([
+                    ('start_date', '<=', date),
+                    ('end_date', '>=', date),
+                    ],
+                order=[('start_date', 'DESC')],
+                limit=1)
+        elif fiscalyear:
+            fiscalyears = [FiscalYear(fiscalyear)]
+        else:
             fiscalyears = FiscalYear.search([
                     ('state', '=', 'open'),
                     ])
-        else:
-            fiscalyears = [FiscalYear(Transaction().context['fiscalyear'])]
-
         periods = [p for f in fiscalyears for p in f.periods]
 
         action['pyson_domain'] = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-5.0.19/tryton.cfg 
new/trytond_account-5.0.20/tryton.cfg
--- old/trytond_account-5.0.19/tryton.cfg       2021-06-17 21:42:38.000000000 
+0200
+++ new/trytond_account-5.0.20/tryton.cfg       2021-11-05 00:21:00.000000000 
+0100
@@ -1,5 +1,5 @@
 [tryton]
-version=5.0.19
+version=5.0.20
 depends:
     company
     currency
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_account-5.0.19/trytond_account.egg-info/PKG-INFO 
new/trytond_account-5.0.20/trytond_account.egg-info/PKG-INFO
--- old/trytond_account-5.0.19/trytond_account.egg-info/PKG-INFO        
2021-11-05 00:20:49.000000000 +0100
+++ new/trytond_account-5.0.20/trytond_account.egg-info/PKG-INFO        
2022-01-01 18:51:26.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: trytond-account
-Version: 5.0.19
+Version: 5.0.20
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton

Reply via email to