[MERGE] merge from dev3
bzr revid: ara@tinyerp.com-20110209045631-aacgw8dg6vozxyxz
This commit is contained in:
commit
db892909f0
|
@ -395,7 +395,7 @@ class account_account(osv.osv):
|
|||
'reconcile': False,
|
||||
'active': True,
|
||||
'currency_mode': 'current',
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.account', context=c),
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account.account', context=c),
|
||||
}
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
|
@ -1121,9 +1121,8 @@ class account_move(osv.osv):
|
|||
res_ids = set(id[0] for id in cr.fetchall())
|
||||
ids = ids and (ids & res_ids) or res_ids
|
||||
if ids:
|
||||
return [('id','in',tuple(ids))]
|
||||
else:
|
||||
return [('id', '=', '0')]
|
||||
return [('id', 'in', tuple(ids))]
|
||||
return [('id', '=', '0')]
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Number', size=64, required=True),
|
||||
|
@ -1207,7 +1206,6 @@ class account_move(osv.osv):
|
|||
'SET state=%s '\
|
||||
'WHERE id IN %s',
|
||||
('posted', tuple(valid_moves),))
|
||||
|
||||
return True
|
||||
|
||||
def button_validate(self, cursor, user, ids, context=None):
|
||||
|
@ -1522,7 +1520,6 @@ class account_move_reconcile(osv.osv):
|
|||
result.append((r.id,r.name))
|
||||
return result
|
||||
|
||||
|
||||
account_move_reconcile()
|
||||
|
||||
#----------------------------------------------------------
|
||||
|
@ -1834,7 +1831,6 @@ class account_tax(osv.osv):
|
|||
obj_partener_address = self.pool.get('res.partner.address')
|
||||
for tax in taxes:
|
||||
# we compute the amount for the current tax object and append it to the result
|
||||
|
||||
data = {'id':tax.id,
|
||||
'name':tax.description and tax.description + " - " + tax.name or tax.name,
|
||||
'account_collected_id':tax.account_collected_id.id,
|
||||
|
@ -2049,6 +2045,7 @@ class account_tax(osv.osv):
|
|||
r['amount'] = round(r['amount'] * quantity, prec)
|
||||
total += r['amount']
|
||||
return res
|
||||
|
||||
account_tax()
|
||||
|
||||
# ---------------------------------------------------------
|
||||
|
@ -2177,13 +2174,11 @@ class account_subscription(osv.osv):
|
|||
'name': fields.char('Name', size=64, required=True),
|
||||
'ref': fields.char('Reference', size=16),
|
||||
'model_id': fields.many2one('account.model', 'Model', required=True),
|
||||
|
||||
'date_start': fields.date('Start Date', required=True),
|
||||
'period_total': fields.integer('Number of Periods', required=True),
|
||||
'period_nbr': fields.integer('Period', required=True),
|
||||
'period_type': fields.selection([('day','days'),('month','month'),('year','year')], 'Period Type', required=True),
|
||||
'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State', required=True, readonly=True),
|
||||
|
||||
'lines_id': fields.one2many('account.subscription.line', 'subscription_id', 'Subscription Lines')
|
||||
}
|
||||
_defaults = {
|
||||
|
@ -2354,9 +2349,9 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
|||
_name = 'account.addtmpl.wizard'
|
||||
|
||||
def _get_def_cparent(self, cr, uid, context=None):
|
||||
acc_obj=self.pool.get('account.account')
|
||||
tmpl_obj=self.pool.get('account.account.template')
|
||||
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
|
||||
acc_obj = self.pool.get('account.account')
|
||||
tmpl_obj = self.pool.get('account.account.template')
|
||||
tids = tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
|
||||
if not tids or not tids[0]['parent_id']:
|
||||
return False
|
||||
ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]], ['code'])
|
||||
|
@ -2364,7 +2359,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
|
|||
if not ptids or not ptids[0]['code']:
|
||||
raise osv.except_osv(_('Error !'), _('Cannot locate parent code for template account!'))
|
||||
res = acc_obj.search(cr, uid, [('code','=',ptids[0]['code'])])
|
||||
|
||||
return res and res[0] or False
|
||||
|
||||
_columns = {
|
||||
|
|
|
@ -657,7 +657,9 @@ class account_invoice(osv.osv):
|
|||
def _convert_ref(self, cr, uid, ref):
|
||||
return (ref or '').replace('/','')
|
||||
|
||||
def _get_analytic_lines(self, cr, uid, id):
|
||||
def _get_analytic_lines(self, cr, uid, id, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
inv = self.browse(cr, uid, id)
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
|
||||
|
@ -667,7 +669,7 @@ class account_invoice(osv.osv):
|
|||
else:
|
||||
sign = -1
|
||||
|
||||
iml = self.pool.get('account.invoice.line').move_line_get(cr, uid, inv.id)
|
||||
iml = self.pool.get('account.invoice.line').move_line_get(cr, uid, inv.id, context=context)
|
||||
for il in iml:
|
||||
if il['account_analytic_id']:
|
||||
if inv.type in ('in_invoice', 'in_refund'):
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="112.0,86.0,106.0,63.0,85.0,75.0" style="Table3">
|
||||
<blockTable colWidths="112.0,86.0,102.0,70.0,82.0,75.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Partner</para>
|
||||
|
@ -241,7 +241,7 @@
|
|||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_2">[[repeatIn(o.line_ids, 'line') ]]</para>
|
||||
<blockTable colWidths="112.0,86.0,106.0,64.0,85.0,75.0" style="Table4">
|
||||
<blockTable colWidths="112.0,86.0,102.0,70.0,82.0,75.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[line.partner_id and line.partner_id.name or '-' ]]</para>
|
||||
|
|
Loading…
Reference in New Issue