[REF]
bzr revid: mra@mra-laptop-20101025045336-ovh54n0q31db0hfp
This commit is contained in:
parent
f5d0fd93c0
commit
0e233a7dcb
|
@ -365,7 +365,7 @@ class account_move_line(osv.osv):
|
||||||
return [('id', '=', '0')]
|
return [('id', '=', '0')]
|
||||||
return [('id', 'in', [x[0] for x in res])]
|
return [('id', 'in', [x[0] for x in res])]
|
||||||
|
|
||||||
def _invoice_search(self, cursor, user, obj, name, args, context):
|
def _invoice_search(self, cursor, user, obj, name, args, context=None):
|
||||||
if not args:
|
if not args:
|
||||||
return []
|
return []
|
||||||
invoice_obj = self.pool.get('account.invoice')
|
invoice_obj = self.pool.get('account.invoice')
|
||||||
|
@ -410,7 +410,7 @@ class account_move_line(osv.osv):
|
||||||
return [('id', '=', '0')]
|
return [('id', '=', '0')]
|
||||||
return [('id', 'in', [x[0] for x in res])]
|
return [('id', 'in', [x[0] for x in res])]
|
||||||
|
|
||||||
def _get_move_lines(self, cr, uid, ids, context={}):
|
def _get_move_lines(self, cr, uid, ids, context=None):
|
||||||
result = []
|
result = []
|
||||||
for move in self.pool.get('account.move').browse(cr, uid, ids, context=context):
|
for move in self.pool.get('account.move').browse(cr, uid, ids, context=context):
|
||||||
for line in move.line_id:
|
for line in move.line_id:
|
||||||
|
@ -460,7 +460,7 @@ class account_move_line(osv.osv):
|
||||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
|
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_date(self, cr, uid, context):
|
def _get_date(self, cr, uid, context=None):
|
||||||
period_obj = self.pool.get('account.period')
|
period_obj = self.pool.get('account.period')
|
||||||
dt = time.strftime('%Y-%m-%d')
|
dt = time.strftime('%Y-%m-%d')
|
||||||
if ('journal_id' in context) and ('period_id' in context):
|
if ('journal_id' in context) and ('period_id' in context):
|
||||||
|
@ -476,7 +476,9 @@ class account_move_line(osv.osv):
|
||||||
dt = period.date_start
|
dt = period.date_start
|
||||||
return dt
|
return dt
|
||||||
|
|
||||||
def _get_currency(self, cr, uid, context={}):
|
def _get_currency(self, cr, uid, context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
if not context.get('journal_id', False):
|
if not context.get('journal_id', False):
|
||||||
return False
|
return False
|
||||||
cur = self.pool.get('account.journal').browse(cr, uid, context['journal_id']).currency
|
cur = self.pool.get('account.journal').browse(cr, uid, context['journal_id']).currency
|
||||||
|
@ -1247,4 +1249,4 @@ class account_move_line(osv.osv):
|
||||||
|
|
||||||
account_move_line()
|
account_move_line()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue