Bhumi Thakkar (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation-account_bank_statement-bth
into
lp:~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation-account_bank_statement-bth/+merge/121574
Hello,
Based on type of field assign value.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation-account_bank_statement-bth/+merge/121574
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation-account_bank_statement-bth
into
lp:~openerp-dev/openobject-addons/trunk-remove-warnings-server-installation.
=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py 2012-08-07 11:31:37 +0000
+++ account/account_bank_statement.py 2012-08-28 10:09:00 +0000
@@ -450,16 +450,15 @@
cr.execute('SELECT balance_end_real \
FROM account_bank_statement \
WHERE journal_id = %s AND NOT state = %s \
- ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft'))
+ ORDER BY date DESC,id DESC LIMIT 1', (journal_id or 0, 'draft'))
res = cr.fetchone()
return res and res[0] or 0.0
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context=None):
balance_start = self._compute_balance_end_real(cr, uid, journal_id, context=context)
-
- journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id', 'company_id'], context=context)
- account_id = journal_data['default_debit_account_id']
- company_id = journal_data['company_id']
+ journal_data = self.pool.get('account.journal').read(cr, uid, journal_id or 0, ['default_debit_account_id', 'company_id'], context=context)
+ account_id = (journal_data and journal_data['default_debit_account_id']) or None
+ company_id = (journal_data and journal_data['company_id']) or None
return {'value': {'balance_start': balance_start, 'account_id': account_id, 'company_id': company_id}}
def unlink(self, cr, uid, ids, context=None):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp