[tryton-debian-vcs] tryton-modules-account-fr branch upstream-4.2 updated. upstream/4.2.0-1-gef36582

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Jun 11 22:34:50 UTC 2017


The following commit has been merged in the upstream-4.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-fr.git;a=commitdiff;h=upstream/4.2.0-1-gef36582

commit ef3658220612656f76fc24008002c1dd53f94753
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Jun 11 22:59:22 2017 +0200

    Adding upstream version 4.2.1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index c414017..b4295ff 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.1 - 2017-06-06
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.0 - 2016-11-28
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 842b29e..ee66f8a 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
-Copyright (C) 2010-2016 Cédric Krier.
+Copyright (C) 2010-2017 Cédric Krier.
 Copyright (C) 2010-2011 Bertrand Chenal.
-Copyright (C) 2010-2016 Nicolas Évrard.
-Copyright (C) 2010-2016 B2CK SPRL.
+Copyright (C) 2010-2017 Nicolas Évrard.
+Copyright (C) 2010-2017 B2CK SPRL.
 Copyright (C) 2014-2015 Raphaël Hertzog.
 
 This program is free software: you can redistribute it and/or modify
diff --git a/PKG-INFO b/PKG-INFO
index 6d558aa..d1a5d7d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_fr
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton module with French chart of accounts
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/account.py b/account.py
index 9017054..25e4007 100644
--- a/account.py
+++ b/account.py
@@ -124,13 +124,16 @@ class AccountFrFEC(Wizard):
     def get_format_date(self):
         pool = Pool()
         Lang = pool.get('ir.lang')
-        fr, = Lang.search([('code', '=', 'fr_FR')])
-        return lambda value: Lang.strftime(value, fr.code, '%Y%m%d')
+        return lambda value: Lang.strftime(value, 'fr_FR', '%Y%m%d')
 
     def get_format_number(self):
         pool = Pool()
         Lang = pool.get('ir.lang')
-        fr, = Lang.search([('code', '=', 'fr_FR')])
+        fr = Lang(
+            decimal_point=',',
+            thousands_sep='',
+            grouping='[]',
+            )
         return lambda value: Lang.format(fr, '%.2f', value)
 
     def get_start_balance(self):
@@ -147,10 +150,15 @@ class AccountFrFEC(Wizard):
             accounts = Account.search([])
 
         for account in accounts:
-            if not account.credit and not account.debit:
+            if account.credit == account.debit:
                 continue
+            if account.debit > account.credit:
+                debit, credit = account.debit - account.credit, 0
+            else:
+                debit, credit = 0, account.debit - account.credit
             yield [
-                self.start.deferral_journal.code,
+                self.start.deferral_journal.code
+                or self.start.deferral_journal.name,
                 self.start.deferral_journal.name,
                 self.start.deferral_post_number,
                 format_date(self.start.fiscalyear.start_date),
@@ -158,11 +166,11 @@ class AccountFrFEC(Wizard):
                 account.name,
                 '',
                 '',
-                '',
+                '-',
                 format_date(self.start.fiscalyear.start_date),
-                '',
-                format_number(account.debit or 0),
-                format_number(account.credit or 0),
+                '-',
+                format_number(debit),
+                format_number(credit),
                 '',
                 '',
                 format_date(self.start.fiscalyear.start_date),
@@ -195,7 +203,7 @@ class AccountFrFEC(Wizard):
         if line.reconciliation and line.reconciliation.date <= end_date:
             reconciliation = line.reconciliation
         return [
-            line.move.journal.code,
+            line.move.journal.code or line.move.journal.name,
             line.move.journal.name,
             line.move.post_number,
             format_date(line.move.date),
@@ -203,9 +211,9 @@ class AccountFrFEC(Wizard):
             line.account.name,
             line.party.code if line.party else '',
             line.party.name if line.party else '',
-            self.get_reference(line),
+            self.get_reference(line) or '-',
             format_date(self.get_reference_date(line)),
-            description(),
+            description() or '-',
             format_number(line.debit or 0),
             format_number(line.credit or 0),
             reconciliation.rec_name if reconciliation else '',
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/tryton.cfg b/tryton.cfg
index d3e3040..61c1609 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.0
+version=4.2.1
 depends:
     account
     party_siret
diff --git a/trytond_account_fr.egg-info/PKG-INFO b/trytond_account_fr.egg-info/PKG-INFO
index 00eb2ff..f1f07d3 100644
--- a/trytond_account_fr.egg-info/PKG-INFO
+++ b/trytond_account_fr.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-fr
-Version: 4.2.0
+Version: 4.2.1
 Summary: Tryton module with French chart of accounts
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-account-fr



More information about the tryton-debian-vcs mailing list