[REF] cleaing account
bzr revid: mra@mra-laptop-20101015063348-1karrzxmopp28zlz
This commit is contained in:
parent
db483e1145
commit
0dc5d800f2
|
@ -36,7 +36,6 @@ class account_move_line(osv.osv):
|
|||
fiscalyear_obj = self.pool.get('account.fiscalyear')
|
||||
fiscalperiod_obj = self.pool.get('account.period')
|
||||
fiscalyear_ids = []
|
||||
fiscalperiod_ids = []
|
||||
if context is None:
|
||||
context = {}
|
||||
initial_bal = context.get('initial_bal', False)
|
||||
|
@ -130,7 +129,7 @@ class account_move_line(osv.osv):
|
|||
'move_id':obj_line.id,
|
||||
'user_id': uid
|
||||
}
|
||||
new_id = self.pool.get('account.analytic.line').create(cr,uid,vals_lines)
|
||||
self.pool.get('account.analytic.line').create(cr,uid,vals_lines)
|
||||
return True
|
||||
|
||||
def _default_get_move_form_hook(self, cursor, user, data):
|
||||
|
@ -1127,7 +1126,7 @@ class account_move_line(osv.osv):
|
|||
self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
|
||||
move_id = vals.get('move_id', False)
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, context['journal_id'])
|
||||
is_new_move = False
|
||||
# is_new_move = False
|
||||
if not move_id:
|
||||
if journal.centralisation:
|
||||
#Check for centralisation
|
||||
|
@ -1147,7 +1146,7 @@ class account_move_line(osv.osv):
|
|||
vals['move_id'] = move_id
|
||||
else:
|
||||
raise osv.except_osv(_('No piece number !'), _('Can not create an automatic sequence for this piece !\n\nPut a sequence in the journal definition for automatic numbering or create a sequence manually for this piece.'))
|
||||
is_new_move = True
|
||||
# is_new_move = True
|
||||
|
||||
ok = not (journal.type_control_ids or journal.account_control_ids)
|
||||
if ('account_id' in vals):
|
||||
|
@ -1262,7 +1261,7 @@ class account_move_line(osv.osv):
|
|||
if check and ((not context.get('no_store_function')) or journal.entry_posted):
|
||||
tmp = self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context)
|
||||
if journal.entry_posted and tmp:
|
||||
rs = self.pool.get('account.move').button_validate(cr,uid, [vals['move_id']],context)
|
||||
self.pool.get('account.move').button_validate(cr,uid, [vals['move_id']],context)
|
||||
return result
|
||||
account_move_line()
|
||||
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import operator
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
import time
|
||||
|
||||
import pooler
|
||||
import rml_parse
|
||||
from report import report_sxw
|
||||
from common_report_header import common_report_header
|
||||
|
|
|
@ -78,11 +78,9 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
|
|||
db_pool = pooler.get_pool(self.cr.dbname)
|
||||
|
||||
#Getting Profit or Loss Balance from profit and Loss report
|
||||
result_pl = self.obj_pl.get_data(data)
|
||||
self.res_bl = self.obj_pl.final_result()
|
||||
|
||||
account_pool = db_pool.get('account.account')
|
||||
year_pool = db_pool.get('account.fiscalyear')
|
||||
|
||||
types = [
|
||||
'liability',
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
##############################################################################
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import tools
|
||||
|
||||
class account_fiscalyear_close(osv.osv_memory):
|
||||
"""
|
||||
|
@ -57,7 +56,6 @@ class account_fiscalyear_close(osv.osv_memory):
|
|||
obj_acc_move_line = self.pool.get('account.move.line')
|
||||
obj_acc_account = self.pool.get('account.account')
|
||||
obj_acc_journal_period = self.pool.get('account.journal.period')
|
||||
obj_rec = self.pool.get('account.move.reconcile')
|
||||
|
||||
data = self.read(cr, uid, ids, context=context)
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import tools
|
||||
|
||||
class account_fiscalyear_close_state(osv.osv_memory):
|
||||
"""
|
||||
|
|
|
@ -44,7 +44,6 @@ class account_bs_report(osv.osv_memory):
|
|||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
res = super(account_bs_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
|
||||
doc = etree.XML(res['arch'])
|
||||
nodes = doc.xpath("//field[@name='journal_ids']")
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
##############################################################################
|
||||
|
||||
import time
|
||||
import datetime
|
||||
from datetime import timedelta
|
||||
from lxml import etree
|
||||
|
||||
from osv import fields, osv
|
||||
|
@ -46,7 +44,6 @@ class account_common_report(osv.osv_memory):
|
|||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
res = super(account_common_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
|
||||
if context.get('active_model', False) == 'account.account' and view_id:
|
||||
doc = etree.XML(res['arch'])
|
||||
|
@ -111,8 +108,6 @@ class account_common_report(osv.osv_memory):
|
|||
if context is None:
|
||||
context = {}
|
||||
result = {}
|
||||
period_obj = self.pool.get('account.period')
|
||||
fiscal_obj = self.pool.get('account.fiscalyear')
|
||||
result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False
|
||||
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
|
||||
result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
|
||||
|
@ -132,7 +127,6 @@ class account_common_report(osv.osv_memory):
|
|||
def check_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
obj_move = self.pool.get('account.move.line')
|
||||
data = {}
|
||||
data['ids'] = context.get('active_ids', [])
|
||||
data['model'] = context.get('active_model', 'ir.ui.menu')
|
||||
|
|
Loading…
Reference in New Issue