[tryton-debian-vcs] tryton-modules-account branch upstream-2.6 created. fd42e3c0e564ac39ae0b314dd946aa3fd0989c15
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Nov 27 16:52:50 UTC 2013
The following commit has been merged in the upstream-2.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account.git;a=commitdiff;h=fd42e3c0e564ac39ae0b314dd946aa3fd0989c15
commit fd42e3c0e564ac39ae0b314dd946aa3fd0989c15
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Oct 17 13:12:21 2013 +0200
Adding upstream version 2.6.6.
diff --git a/CHANGELOG b/CHANGELOG
index 4b0aca1..0f7b4d7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.6 - 2013-10-01
+* Bug fixes (see mercurial logs for details)
+
Version 2.6.5 - 2013-06-09
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 5a323e0..5d4a1fd 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account
-Version: 2.6.5
+Version: 2.6.6
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/account.py b/account.py
index 57f7f11..7935627 100644
--- a/account.py
+++ b/account.py
@@ -391,11 +391,11 @@ class AccountTemplate(ModelSQL, ModelView):
@classmethod
def search_rec_name(cls, name, clause):
templates = cls.search([
- ('code',) + clause[1:],
+ ('code',) + tuple(clause[1:]),
], limit=1)
if templates:
- return [('code',) + clause[1:]]
- return [(cls._rec_name,) + clause[1:]]
+ return [('code',) + tuple(clause[1:])]
+ return [(cls._rec_name,) + tuple(clause[1:])]
def _get_account_value(self, account=None):
'''
@@ -830,11 +830,11 @@ class Account(ModelSQL, ModelView):
@classmethod
def search_rec_name(cls, name, clause):
accounts = cls.search([
- ('code',) + clause[1:],
+ ('code',) + tuple(clause[1:]),
], limit=1)
if accounts:
- return [('code',) + clause[1:]]
- return [(cls._rec_name,) + clause[1:]]
+ return [('code',) + tuple(clause[1:])]
+ return [(cls._rec_name,) + tuple(clause[1:])]
@classmethod
def copy(cls, accounts, default=None):
@@ -997,8 +997,8 @@ class AccountDeferral(ModelSQL, ModelView):
@classmethod
def search_rec_name(cls, name, clause):
deferrals = cls.search(['OR',
- ('account.rec_name',) + clause[1:],
- ('fiscalyear.rec_name',) + clause[1:],
+ ('account.rec_name',) + tuple(clause[1:]),
+ ('fiscalyear.rec_name',) + tuple(clause[1:]),
])
return [('id', 'in', [d.id for d in deferrals])]
diff --git a/journal.py b/journal.py
index e777a66..50b5272 100644
--- a/journal.py
+++ b/journal.py
@@ -171,11 +171,11 @@ class Journal(ModelSQL, ModelView):
@classmethod
def search_rec_name(cls, name, clause):
journals = cls.search([
- ('code',) + clause[1:],
+ ('code',) + tuple(clause[1:]),
], limit=1, order=[])
if journals:
- return [('code',) + clause[1:]]
- return [(cls._rec_name,) + clause[1:]]
+ return [('code',) + tuple(clause[1:])]
+ return [(cls._rec_name,) + tuple(clause[1:])]
class JournalPeriod(ModelSQL, ModelView):
diff --git a/move.py b/move.py
index cff5c53..ba76fb3 100644
--- a/move.py
+++ b/move.py
@@ -551,8 +551,10 @@ class Line(ModelSQL, ModelView):
# Migration from 1.2
table.not_null_action('blocked', action='remove')
- # Migration from 2.4: remove name
+ # Migration from 2.4: remove name, active
table.not_null_action('name', action='remove')
+ table.not_null_action('active', action='remove')
+ table.index_action('active', action='remove')
@classmethod
def default_date(cls):
diff --git a/tryton.cfg b/tryton.cfg
index 11099a9..324a4f2 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.6.5
+version=2.6.6
depends:
company
currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index cc589a0..9463489 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-account
-Version: 2.6.5
+Version: 2.6.6
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
commit 3d755f3253aa3b608692acecc0328445e87f210c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Jun 10 18:14:22 2013 +0200
Adding upstream version 2.6.5.
diff --git a/CHANGELOG b/CHANGELOG
index 1b44143..4b0aca1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.5 - 2013-06-09
+* Bug fixes (see mercurial logs for details)
+
Version 2.6.4 - 2013-05-02
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index cc500c5..5a323e0 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account
-Version: 2.6.4
+Version: 2.6.5
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/move.py b/move.py
index 5d3fea8..cff5c53 100644
--- a/move.py
+++ b/move.py
@@ -640,22 +640,34 @@ class Line(ModelSQL, ModelView):
for tax in line.account.taxes:
if move.journal.type == 'revenue':
if line.debit:
- base_id = tax.credit_note_base_code.id
- code_id = tax.credit_note_tax_code.id
- account_id = tax.credit_note_account.id
+ base_id = (tax.credit_note_base_code.id
+ if tax.credit_note_base_code else None)
+ code_id = (tax.credit_note_tax_code.id
+ if tax.credit_note_tax_code else None)
+ account_id = (tax.credit_note_account.id
+ if tax.credit_note_account else None)
else:
- base_id = tax.invoice_base_code.id
- code_id = tax.invoice_tax_code.id
- account_id = tax.invoice_account.id
+ base_id = (tax.invoice_base_code.id
+ if tax.invoice_base_code else None)
+ code_id = (tax.invoice_tax_code.id
+ if tax.invoice_tax_code else None)
+ account_id = (tax.invoice_account.id
+ if tax.invoice_account else None)
else:
if line.debit:
- base_id = tax.invoice_base_code.id
- code_id = tax.invoice_tax_code.id
- account_id = tax.invoice_account.id
+ base_id = (tax.invoice_base_code.id
+ if tax.invoice_base_code else None)
+ code_id = (tax.invoice_tax_code.id
+ if tax.invoice_tax_code else None)
+ account_id = (tax.invoice_account.id
+ if tax.invoice_account else None)
else:
- base_id = tax.credit_note_base_code.id
- code_id = tax.credit_note_tax_code.id
- account_id = tax.credit_note_account.id
+ base_id = (tax.credit_note_base_code.id
+ if tax.credit_note_base_code else None)
+ code_id = (tax.credit_note_tax_code.id
+ if tax.credit_note_tax_code else None)
+ account_id = (tax.credit_note_account.id
+ if tax.credit_note_account else None)
if base_id in line_code_taxes or not base_id:
taxes.setdefault((account_id, code_id, tax.id), None)
for tax_line in line.tax_lines:
@@ -702,11 +714,14 @@ class Line(ModelSQL, ModelView):
tax_amount = Decimal('0.0')
for tax_line in Tax.compute(line.account.taxes,
line.debit or line.credit, 1):
- if (tax_line['tax'][key + '_account'].id \
- or line.account.id) == account_id \
- and tax_line['tax'][key + '_tax_code'].id \
- == code_id \
- and tax_line['tax'].id == tax_id:
+ tax_account = getattr(tax_line['tax'],
+ key + '_account')
+ tax_code = getattr(tax_line['tax'], key + '_tax_code')
+ if ((tax_account.id if tax_account
+ else line.account.id) == account_id
+ and (tax_code.id if tax_code else None
+ == code_id)
+ and tax_line['tax'].id == tax_id):
if line.debit:
line_amount += tax_line['amount']
else:
@@ -723,7 +738,7 @@ class Line(ModelSQL, ModelView):
if ('credit' in fields):
values['credit'] = line_amount < Decimal('0.0') \
and - line_amount or Decimal('0.0')
- if 'account' in fields:
+ if 'account' in fields and account_id:
values['account'] = account_id
values['account.rec_name'] = Account(
account_id).rec_name
@@ -833,13 +848,14 @@ class Line(ModelSQL, ModelView):
base_amounts = {}
for tax_line in Tax.compute(self.account.taxes,
debit or credit, 1):
- code_id = tax_line['tax'][key + '_base_code'].id
+ code = getattr(tax_line['tax'], key + '_base_code')
+ code_id = code.id if code else None
if not code_id:
continue
tax_id = tax_line['tax'].id
base_amounts.setdefault((code_id, tax_id), Decimal('0.0'))
base_amounts[code_id, tax_id] += tax_line['base'] * \
- tax_line['tax'][key + '_tax_sign']
+ getattr(tax_line['tax'], key + '_tax_sign')
for code_id, tax_id in base_amounts:
if not base_amounts[code_id, tax_id]:
continue
diff --git a/tax.py b/tax.py
index 2d3c69b..d92e217 100644
--- a/tax.py
+++ b/tax.py
@@ -309,7 +309,8 @@ class OpenChartTaxCode(Wizard):
def do_open_(self, action):
if self.start.method == 'fiscalyear':
action['pyson_context'] = PYSONEncoder().encode({
- 'fiscalyear': self.start.fiscalyear.id,
+ 'fiscalyear': (self.start.fiscalyear.id
+ if self.start.fiscalyear else None),
})
if self.start.fiscalyear:
action['name'] += ' - %s' % self.start.fiscalyear.rec_name
diff --git a/tryton.cfg b/tryton.cfg
index a553dd4..11099a9 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.6.4
+version=2.6.5
depends:
company
currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index a0f7d1d..cc589a0 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-account
-Version: 2.6.4
+Version: 2.6.5
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
commit 6d53899efd9e1b19cd15115aed873934113dd76a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat May 4 02:23:46 2013 +0200
Adding upstream version 2.6.4.
diff --git a/CHANGELOG b/CHANGELOG
index 445bbd1..1b44143 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.4 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
Version 2.6.3 - 2013-02-12
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 1d45f4f..cc500c5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account
-Version: 2.6.3
+Version: 2.6.4
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/account.py b/account.py
index 03c8091..57f7f11 100644
--- a/account.py
+++ b/account.py
@@ -240,8 +240,7 @@ class Type(ModelSQL, ModelView):
('type', 'in', [t.id for t in childs]),
])
for account in accounts:
- type_sum[account.type.id] += account.company.currency.round(
- account.debit - account.credit)
+ type_sum[account.type.id] += account.balance
for type_ in types:
childs = cls.search([
diff --git a/journal.py b/journal.py
index 81ac2c8..e777a66 100644
--- a/journal.py
+++ b/journal.py
@@ -283,7 +283,8 @@ class CloseJournalPeriod(Wizard):
def transition_close(self):
JournalPeriod = Pool().get('account.journal.period')
- JournalPeriod.close(JournalPeriod(Transaction().context['active_ids']))
+ JournalPeriod.close(
+ JournalPeriod.browse(Transaction().context['active_ids']))
return 'end'
@@ -295,5 +296,6 @@ class ReOpenJournalPeriod(Wizard):
def transition_reopen(self):
JournalPeriod = Pool().get('account.journal.period')
- JournalPeriod.open_(JournalPeriod(Transaction().context['active_ids']))
+ JournalPeriod.open_(
+ JournalPeriod.browse(Transaction().context['active_ids']))
return 'end'
diff --git a/move.py b/move.py
index cdf3758..5d3fea8 100644
--- a/move.py
+++ b/move.py
@@ -197,7 +197,7 @@ class Move(ModelSQL, ModelView):
for move in moves:
if move.state == 'posted':
cls.raise_user_error('modify_posted_move',
- error_args=(move.name,))
+ error_args=(move.rec_name,))
@classmethod
def search_rec_name(cls, name, clause):
@@ -1611,6 +1611,7 @@ class GeneralJournal(Report):
clause = [
('date', '>=', data['from_date']),
('date', '<=', data['to_date']),
+ ('period.fiscalyear.company', '=', data['company']),
]
if data['posted']:
clause.append(('state', '=', 'posted'))
diff --git a/tryton.cfg b/tryton.cfg
index e2674bb..a553dd4 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.6.3
+version=2.6.4
depends:
company
currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index 42ff61e..a0f7d1d 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-account
-Version: 2.6.3
+Version: 2.6.4
Summary: Tryton module for accounting
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-account
More information about the tryton-debian-vcs
mailing list