[FIX]account:create journal items
bzr revid: kbh@tinyerp.com-20120918132727-7ffkz0q737r5yzmq
This commit is contained in:
parent
8fa74a9741
commit
7ed74bec49
|
@ -215,8 +215,10 @@ class account_move_line(osv.osv):
|
|||
def _default_get(self, cr, uid, fields, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
|
||||
if not context.get('journal_id', False):
|
||||
context['journal_id'] = context.get('search_default_journal_id')
|
||||
if not context.get('period_id', False):
|
||||
context['period_id'] = context.get('search_default_period_id')
|
||||
account_obj = self.pool.get('account.account')
|
||||
period_obj = self.pool.get('account.period')
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
|
|
|
@ -1078,7 +1078,7 @@
|
|||
<group>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="journal_id"/>
|
||||
|
@ -1152,7 +1152,7 @@
|
|||
<field name="journal_id" readonly="False"/>
|
||||
<field name="period_id" readonly="False"/>
|
||||
<field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation'),('company_id', '=', company_id)]"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
|
||||
<newline/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
|
|
|
@ -92,7 +92,7 @@ class account_move_journal(osv.osv_memory):
|
|||
|
||||
journal = False
|
||||
if journal_id:
|
||||
journal = journal_pool.read(cr, uid, journal_id, ['name'], context=context).name
|
||||
journal = journal_pool.read(cr, uid, journal_id, ['name'], context=context).get('name',False)
|
||||
journal_string = _("Journal: %s") % tools.ustr(journal)
|
||||
else:
|
||||
journal_string = _("Journal: All")
|
||||
|
|
Loading…
Reference in New Issue