Add number and sequence on statement line
issue4013 review9451005
This commit is contained in:
1 parent
f4357d611c
commit
b993f7180f
5 files changed
+16
-1
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Add number and sequence on statement line
|
||||
* Switch journal debit/credit account usage
|
||||
|
||||
Version 3.2.0 - 2014-04-21
|
||||
|
||||
@@ -345,6 +345,8 @@ class Line(ModelSQL, ModelView):
|
||||
__name__ = 'account.statement.line'
|
||||
statement = fields.Many2One('account.statement', 'Statement',
|
||||
required=True, ondelete='CASCADE')
|
||||
sequence = fields.Integer('Sequence')
|
||||
number = fields.Char('Number')
|
||||
date = fields.Date('Date', required=True)
|
||||
amount = fields.Numeric('Amount', required=True,
|
||||
digits=(16, Eval('_parent_statement', {}).get('currency_digits', 2)))
|
||||
@@ -369,6 +371,7 @@ class Line(ModelSQL, ModelView):
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Line, cls).__setup__()
|
||||
cls._order.insert(0, ('sequence', 'ASC'))
|
||||
cls._error_messages.update({
|
||||
'debit_credit_account_statement_journal': ('Please provide '
|
||||
'debit and credit account on statement journal "%s".'),
|
||||
@@ -383,6 +386,11 @@ class Line(ModelSQL, ModelView):
|
||||
'Amount should be a positive or negative value.'),
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
def order_sequence(tables):
|
||||
table, _ = tables[None]
|
||||
return [table.sequence == None, table.sequence]
|
||||
|
||||
@staticmethod
|
||||
def default_amount():
|
||||
return Decimal(0)
|
||||
|
||||
@@ -4,6 +4,10 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Statement Line">
|
||||
<label name="statement"/>
|
||||
<field name="statement" colspan="3"/>
|
||||
<label name="number"/>
|
||||
<field name="number"/>
|
||||
<label name="sequence"/>
|
||||
<field name="sequence"/>
|
||||
<label name="date"/>
|
||||
<field name="date"/>
|
||||
<label name="amount"/>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Statement Lines">
|
||||
<field name="statement"/>
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="amount"/>
|
||||
<field name="party"/>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Statement Lines" editable="bottom">
|
||||
<tree string="Statement Lines" editable="bottom" sequence="sequence">
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="amount" sum="Amount"/>
|
||||
<field name="party"/>
|
||||
|
||||
Reference in new issue
Block a user