Hello community,

here is the log from the commit of package trytond_account for openSUSE:Factory 
checked in at 2017-11-16 14:03:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond_account (Old)
 and      /work/SRC/openSUSE:Factory/.trytond_account.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond_account"

Thu Nov 16 14:03:22 2017 rev:7 rq:542140 version:4.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond_account/trytond_account.changes  
2017-10-06 11:03:40.779263093 +0200
+++ /work/SRC/openSUSE:Factory/.trytond_account.new/trytond_account.changes     
2017-11-16 14:03:26.356352804 +0100
@@ -1,0 +2,5 @@
+Thu Nov  9 06:05:25 UTC 2017 - [email protected]
+
+- Version 4.2.4 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond_account-4.2.3.tar.gz

New:
----
  trytond_account-4.2.4.tar.gz

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

Other differences:
------------------
++++++ trytond_account.spec ++++++
--- /var/tmp/diff_new_pack.RetMng/_old  2017-11-16 14:03:27.104325696 +0100
+++ /var/tmp/diff_new_pack.RetMng/_new  2017-11-16 14:03:27.108325551 +0100
@@ -18,7 +18,7 @@
 
 %define majorver 4.2
 Name:           trytond_account
-Version:        %{majorver}.3
+Version:        %{majorver}.4
 Release:        0
 Summary:        The "account" module for the Tryton ERP system
 License:        GPL-3.0+

++++++ trytond_account-4.2.3.tar.gz -> trytond_account-4.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/.drone.yml 
new/trytond_account-4.2.4/.drone.yml
--- old/trytond_account-4.2.3/.drone.yml        1970-01-01 01:00:00.000000000 
+0100
+++ new/trytond_account-4.2.4/.drone.yml        2017-03-14 23:27:04.000000000 
+0100
@@ -0,0 +1,9 @@
+image: python:all
+env:
+  - POSTGRESQL_URI=postgresql://[email protected]:5432/
+  - MYSQL_URI=mysql://[email protected]:3306/
+script:
+  - pip install tox
+  - tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" 
--skip-missing-interpreters
+services:
+  - postgres
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/.hgtags 
new/trytond_account-4.2.4/.hgtags
--- old/trytond_account-4.2.3/.hgtags   1970-01-01 01:00:00.000000000 +0100
+++ new/trytond_account-4.2.4/.hgtags   2017-11-08 23:53:51.000000000 +0100
@@ -0,0 +1,21 @@
+04925636777da31ceff8c5315ab32acc5d727931 1.0.0
+c25f8bf80f1f8f92954cfed3a6dd2f799bd370e4 1.2.0
+34f1b2a0557f504ee70664ff922faee63924aef0 1.4.0
+a8c16bf00272129b9797a6efc12c9983420b2993 1.6.0
+202fae34666e277acfdfba2fbace862a45227a52 1.8.0
+517ebee49a67cde0f2a31a49e4034df6eba82fdb 2.0.0
+7735bce170f90be4b121bf653d8932c7e095f7fc 2.2.0
+4eb06cd8e318992e19b19eba0858cff4a0dd4b3b 2.4.0
+0cff8a0b9011ea4f9b8b75db0350013156a3c1ad 2.6.0
+1f53b2073b99ca85ae3cfda949ad11e46d9a321a 2.8.0
+5d3bb6417e5b5e32831188a35f3f4994f841cb9c 3.0.0
+b36076424542460b028304527e52a664acee34cb 3.2.0
+6792c5a658623db911446d624d7ba7a6be10450f 3.4.0
+db38fd97df4741f543c64c2371d27dcc12ca175e 3.6.0
+2d47260fb405bc5b2be67cd70ba9b9c1260cc355 3.8.0
+d0145d5733d77a0ac7cdd2797abd85ad7f78ad34 4.0.0
+eab1bdb9e0326314b762ddabe495eb932dce7c5f 4.2.0
+9eb85ecdbafae9764a99f1d4da7c2842e8a22e95 4.2.1
+484754bcde68b979596074c4629582f45a547e5a 4.2.2
+bec481de6d76d5804cba0af82090d571b4c52ff9 4.2.3
+cd905538cbacf1e2e2e53225fed29372d8d4fd12 4.2.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/CHANGELOG 
new/trytond_account-4.2.4/CHANGELOG
--- old/trytond_account-4.2.3/CHANGELOG 2017-10-04 22:12:24.000000000 +0200
+++ new/trytond_account-4.2.4/CHANGELOG 2017-11-08 23:53:51.000000000 +0100
@@ -1,3 +1,6 @@
+Version 4.2.4 - 2017-11-08
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.3 - 2017-10-04
 * Bug fixes (see mercurial logs for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/PKG-INFO 
new/trytond_account-4.2.4/PKG-INFO
--- old/trytond_account-4.2.3/PKG-INFO  2017-10-04 22:12:25.000000000 +0200
+++ new/trytond_account-4.2.4/PKG-INFO  2017-11-08 23:53:52.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account
-Version: 4.2.3
+Version: 4.2.4
 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-4.2.3/fiscalyear.py 
new/trytond_account-4.2.4/fiscalyear.py
--- old/trytond_account-4.2.3/fiscalyear.py     2017-03-14 23:27:05.000000000 
+0100
+++ new/trytond_account-4.2.4/fiscalyear.py     2017-11-08 23:53:49.000000000 
+0100
@@ -140,7 +140,6 @@
     @classmethod
     def write(cls, *args):
         actions = iter(args)
-        args = []
         for fiscalyears, values in zip(actions, actions):
             if values.get('post_move_sequence'):
                 for fiscalyear in fiscalyears:
@@ -149,12 +148,6 @@
                             values['post_move_sequence']):
                         cls.raise_user_error('change_post_move_sequence', (
                                 fiscalyear.rec_name,))
-            values = values.copy()
-            if 'periods' in values:
-                operator = ['delete', 'remove', 'create', 'write', 'add']
-                values['periods'].sort(lambda x, y:
-                    cmp(operator.index(x[0]), operator.index(y[0])))
-            args.extend((fiscalyears, values))
         super(FiscalYear, cls).write(*args)
 
     @classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/localize.xsl 
new/trytond_account-4.2.4/localize.xsl
--- old/trytond_account-4.2.3/localize.xsl      1970-01-01 01:00:00.000000000 
+0100
+++ new/trytond_account-4.2.4/localize.xsl      2016-12-13 18:10:38.000000000 
+0100
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+    <xsl:param name="lang"/>
+    <xsl:template match="record[@id]">
+        <xsl:copy>
+            <xsl:attribute name="id">
+                <xsl:value-of select="attribute::id"/>_<xsl:value-of 
select="$lang"/>
+            </xsl:attribute>
+            <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+    </xsl:template>
+    <xsl:template match="@*">
+        <xsl:choose>
+            <xsl:when test="name()='id' or name()='lang'"></xsl:when>
+            <xsl:when test="name()='ref'">
+                <xsl:attribute name="ref">
+                    <xsl:value-of select="."/>_<xsl:value-of select="$lang"/>
+                </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:copy/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    <xsl:template match="node()">
+        <xsl:choose>
+            <xsl:when test="@lang=$lang or not(@lang)">
+                <xsl:copy>
+                    <xsl:apply-templates select="@*|node()"/>
+                </xsl:copy>
+            </xsl:when>
+        </xsl:choose>
+    </xsl:template>
+</xsl:transform>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/move.py 
new/trytond_account-4.2.4/move.py
--- old/trytond_account-4.2.3/move.py   2017-08-08 18:48:25.000000000 +0200
+++ new/trytond_account-4.2.4/move.py   2017-11-08 23:53:49.000000000 +0100
@@ -1181,9 +1181,10 @@
 
     @classmethod
     def search_move_field(cls, name, clause):
+        nested = clause[0].lstrip(name)
         if name.startswith('move_'):
             name = name[5:]
-        return [('move.' + name,) + tuple(clause[1:])]
+        return [('move.' + name + nested,) + tuple(clause[1:])]
 
     @fields.depends('move','_parent_move.state')
     def on_change_with_move_state(self, name=None):
@@ -1216,7 +1217,7 @@
         if self.amount_second_currency is not None:
             return self.amount_second_currency * sign
         else:
-            return self.debit - self.credit * sign
+            return (self.debit - self.credit) * sign
 
     def get_amount_currency(self, name):
         if self.second_currency:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/period.py 
new/trytond_account-4.2.4/period.py
--- old/trytond_account-4.2.3/period.py 2017-03-14 23:27:05.000000000 +0100
+++ new/trytond_account-4.2.4/period.py 2017-11-08 23:53:49.000000000 +0100
@@ -101,7 +101,7 @@
 
     @classmethod
     def search_company(cls, name, clause):
-        return [('fiscalyear.%s' % name,) + tuple(clause[1:])]
+        return [('fiscalyear.' + clause[0],) + tuple(clause[1:])]
 
     @classmethod
     def validate(cls, periods):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/scripts/fix_party 
new/trytond_account-4.2.4/scripts/fix_party
--- old/trytond_account-4.2.3/scripts/fix_party 1970-01-01 01:00:00.000000000 
+0100
+++ new/trytond_account-4.2.4/scripts/fix_party 2016-12-13 18:10:38.000000000 
+0100
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+import sys
+from argparse import ArgumentParser
+
+from proteus import Model, config
+
+from trytond.pool import Pool
+from trytond.transaction import Transaction
+
+
+def allow_modify_party(database):
+    with Transaction().start(database, 'admin'):
+        pool = Pool()
+        Line = pool.get('account.move.line')
+        Line._check_modify_exclude.add('party')
+        try:
+            Line._reconciliation_modify_disallow.remove('party')
+        except KeyError:
+            pass
+
+
+def get_modules():
+    Module = Model.get('ir.module')
+    modules = Module.find([
+            ('state', '=', 'installed'),
+            ])
+    return [m.name for m in modules]
+
+
+def get_empty_party():
+    Line = Model.get('account.move.line')
+    return Line.find([
+            ('party', '=', None),
+            ('account.party_required', '=', True),
+            ])
+
+
+def get_party(line, modules):
+    for module, getter in MODULES_PARTY.items():
+        if module not in modules:
+            continue
+        party = getter(line)
+        if party:
+            return party
+
+
+def get_party_account_invoice(line):
+    Invoice = Model.get('account.invoice')
+
+    if isinstance(line.origin, Invoice):
+        return line.origin.party
+
+
+def get_party_account_statement(line):
+    Statement = Model.get('account.statement')
+
+    if isinstance(line.origin, Statement):
+        for statement_line in line.origin.lines:
+            if statement_line.move == line.move:
+                return statement_line.party
+
+MODULES_PARTY = {
+    'account_invoice': get_party_account_invoice,
+    'account_statement': get_party_account_statement,
+    }
+
+
+def get_set_party():
+    Line = Model.get('account.move.line')
+    return Line.find([
+            ('party', '!=', None),
+            ('account.party_required', '=', False),
+            ])
+
+
+def main(database, config_file=None):
+    config.set_trytond(database, config_file=config_file)
+
+    allow_modify_party(database)
+
+    modules = get_modules()
+
+    Line = Model.get('account.move.line')
+
+    lines = get_empty_party()
+    for line in lines:
+        line.party = get_party(line, modules)
+        if not line.party:
+            print >> sys.stderr, 'Can not fix line: %s' % line.rec_name
+    Line.save(lines)
+
+    lines = get_set_party()
+    for line in lines:
+        line.party = None
+    Line.save(lines)
+
+
+if __name__ == '__main__':
+    parser = ArgumentParser()
+    parser.add_argument('-d', '--database', dest='database')
+    parser.add_argument('-c', '--config', dest='config_file',
+        help='the trytond config file')
+
+    args = parser.parse_args()
+    if not args.database:
+        parser.error('Missing database')
+    main(args.database, args.config_file)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/tox.ini 
new/trytond_account-4.2.4/tox.ini
--- old/trytond_account-4.2.3/tox.ini   1970-01-01 01:00:00.000000000 +0100
+++ new/trytond_account-4.2.4/tox.ini   2017-03-14 23:27:05.000000000 +0100
@@ -0,0 +1,18 @@
+[tox]
+envlist = 
{py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+    {py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
+    pypy-postgresql: psycopg2cffi >= 2.5
+    mysql: MySQL-python
+    sqlite: sqlitebck
+setenv =
+    sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
+    postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
+    mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
+    sqlite: DB_NAME={env:SQLITE_NAME::memory:}
+    postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
+    mysql: DB_NAME={env:MYSQL_NAME:test}
+install_command = pip install --pre --find-links https://trydevpi.tryton.org/ 
{opts} {packages}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond_account-4.2.3/tryton.cfg 
new/trytond_account-4.2.4/tryton.cfg
--- old/trytond_account-4.2.3/tryton.cfg        2017-08-08 18:48:50.000000000 
+0200
+++ new/trytond_account-4.2.4/tryton.cfg        2017-10-04 22:12:45.000000000 
+0200
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.3
+version=4.2.4
 depends:
     company
     currency
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/trytond_account-4.2.3/trytond_account.egg-info/PKG-INFO 
new/trytond_account-4.2.4/trytond_account.egg-info/PKG-INFO
--- old/trytond_account-4.2.3/trytond_account.egg-info/PKG-INFO 2017-10-04 
22:12:25.000000000 +0200
+++ new/trytond_account-4.2.4/trytond_account.egg-info/PKG-INFO 2017-11-08 
23:53:52.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account
-Version: 4.2.3
+Version: 4.2.4
 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-4.2.3/trytond_account.egg-info/SOURCES.txt 
new/trytond_account-4.2.4/trytond_account.egg-info/SOURCES.txt
--- old/trytond_account-4.2.3/trytond_account.egg-info/SOURCES.txt      
2017-10-04 22:12:25.000000000 +0200
+++ new/trytond_account-4.2.4/trytond_account.egg-info/SOURCES.txt      
2017-11-08 23:53:52.000000000 +0100
@@ -1,16 +1,24 @@
+.drone.yml
+.hgtags
 CHANGELOG
 COPYRIGHT
 INSTALL
 LICENSE
 MANIFEST.in
 README
+__init__.py
+account.py
 account.xml
 aged_balance.odt
+configuration.py
 configuration.xml
+fiscalyear.py
 fiscalyear.xml
 general_journal.odt
 general_ledger.odt
+journal.py
 journal.xml
+localize.xsl
 minimal_chart.xml
 minimal_chart_bg.xml
 minimal_chart_ca.xml
@@ -22,12 +30,18 @@
 minimal_chart_pt.xml
 minimal_chart_ru.xml
 minimal_chart_sl.xml
+move.py
 move.xml
+move_template.py
 move_template.xml
+party.py
 party.xml
+period.py
 period.xml
 setup.py
+tax.py
 tax.xml
+tox.ini
 trial_balance.odt
 tryton.cfg
 ./__init__.py
@@ -212,10 +226,14 @@
 locale/ru.po
 locale/sl.po
 locale/zh_CN.po
+scripts/fix_party
+tests/__init__.py
 tests/scenario_account_reconciliation.rst
 tests/scenario_move_cancel.rst
 tests/scenario_move_template.rst
 tests/scenario_reports.rst
+tests/test_account.py
+tests/tools.py
 trytond_account.egg-info/PKG-INFO
 trytond_account.egg-info/SOURCES.txt
 trytond_account.egg-info/dependency_links.txt


Reply via email to