Skip to content

Commit

Permalink
[FIX] account: default value for with_last_closing_balance field set …
Browse files Browse the repository at this point in the history
…to True
  • Loading branch information
qdp-odoo committed Jul 1, 2014
1 parent a49ebae commit f2a2a8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addons/account/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ class account_journal(osv.osv):
_name = "account.journal"
_description = "Journal"
_columns = {
'with_last_closing_balance' : fields.boolean('Opening With Last Closing Balance'),
'with_last_closing_balance': fields.boolean('Opening With Last Closing Balance', help="For cash or bank journal, this option should be unchecked when the starting balance should always set to 0 for new documents."),
'name': fields.char('Journal Name', required=True),
'code': fields.char('Code', size=5, required=True, help="The code will be displayed on reports."),
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'), ('cash', 'Cash'), ('bank', 'Bank and Checks'), ('general', 'General'), ('situation', 'Opening/Closing Situation')], 'Type', size=32, required=True,
Expand Down Expand Up @@ -745,7 +745,7 @@ class account_journal(osv.osv):

_defaults = {
'cash_control' : False,
'with_last_closing_balance' : False,
'with_last_closing_balance' : True,
'user_id': lambda self, cr, uid, context: uid,
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
}
Expand Down
2 changes: 1 addition & 1 deletion addons/account/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
<field name="internal_account_id" domain="[('type','!=','view')]"/>
</group>
<group string="Miscellaneous">
<field name="with_last_closing_balance"/>
<field name="with_last_closing_balance" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
<field name="cash_control" attrs="{'invisible':[('type','not in', ('cash',))]}"/>
</group>
</group>
Expand Down

0 comments on commit f2a2a8c

Please sign in to comment.