book: Feld 'start_date' + test,
line: balance-berechnung mit abstimmung gekoppelt + test, abstimmung: start/enddatum automatisch
This commit is contained in:
parent
5729ed0a07
commit
91a34e216b
13 changed files with 446 additions and 20 deletions
14
book.py
14
book.py
|
@ -68,6 +68,13 @@ class Book(Workflow, ModelSQL, ModelView):
|
|||
states=STATES, depends=DEPENDS+['company'])
|
||||
number_atcheck = fields.Boolean(string="number when 'Checking'",
|
||||
help="The numbering of the lines is done in the step Check. If the check mark is inactive, this happens with Done.")
|
||||
start_date = fields.Date(string='Initial Date', required=True,
|
||||
states={
|
||||
'readonly': Or(
|
||||
STATES['readonly'],
|
||||
Bool(Eval('lines')),
|
||||
),
|
||||
}, depends=DEPENDS+['lines'])
|
||||
start_balance = fields.Numeric(string='Initial Amount', required=True,
|
||||
states={
|
||||
'readonly': Or(
|
||||
|
@ -146,6 +153,13 @@ class Book(Workflow, ModelSQL, ModelView):
|
|||
def default_company():
|
||||
return Transaction().context.get('company') or None
|
||||
|
||||
@classmethod
|
||||
def default_start_date(cls):
|
||||
""" today
|
||||
"""
|
||||
IrDate = Pool().get('ir.date')
|
||||
return IrDate.today()
|
||||
|
||||
@classmethod
|
||||
def default_state(cls):
|
||||
return 'open'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue