[REF] account

bzr revid: vth@tinyerp.com-20101013094527-fsm7bxmikmwopk2t
This commit is contained in:
vth 2010-10-13 15:15:27 +05:30
parent 6e6ed69a03
commit 0ea617db0e
11 changed files with 20 additions and 19 deletions

View File

@ -26,6 +26,7 @@ from osv import fields, osv
from tools.translate import _
import decimal_precision as dp
import tools
from operator import itemgetter
class account_move_line(osv.osv):
_name = "account.move.line"
@ -901,7 +902,7 @@ class account_move_line(osv.osv):
fields['period_id'] = all_journal
fields['journal_id'] = all_journal
from operator import itemgetter
fld = sorted(fld, key=itemgetter(1))
widths = {

View File

@ -33,7 +33,7 @@ class res_company(osv.osv):
method=True,
view_load=True,
domain="[('type', '=', 'payable')]",
help="This Account is used for transferring Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profit & Loss Report"),
help="This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profit & Loss Report"),
}
_defaults = {

View File

@ -28,11 +28,11 @@ from osv import osv
class account_analytic_journal(osv.osv):
_name = 'account.analytic.journal'
_columns = {
'name' : fields.char('Journal Name', size=64, required=True),
'code' : fields.char('Journal Code', size=8),
'active' : fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the analytic journal without removing it."),
'name': fields.char('Journal Name', size=64, required=True),
'code': fields.char('Journal Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the analytic journal without removing it."),
'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
'line_ids' : fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
'company_id': fields.many2one('res.company', 'Company', required=True),
}
_defaults = {

View File

@ -137,7 +137,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
future_past[i[0]] = i[1]
# Use one query per period and store results in history (a list variable)
# Each history will contain : history[1] = {'<partner_id>': <partner_debit-credit>}
# Each history will contain: history[1] = {'<partner_id>': <partner_debit-credit>}
history = []
for i in range(5):
args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids),self.date_from,)

View File

@ -72,7 +72,7 @@ class journal_print(report_sxw.rml_parse, common_report_header):
if self.target_move == 'posted':
move_state = ['posted']
self.cr.execute('SELECT a.currency_id ,a.code, a.name, c.code AS currency_code, l.currency_id, l.amount_currency, SUM(debit) AS debit, SUM(credit) AS credit \
self.cr.execute('SELECT a.currency_id, a.code, a.name, c.code AS currency_code, l.currency_id, l.amount_currency, SUM(debit) AS debit, SUM(credit) AS credit \
from account_move_line l \
LEFT JOIN account_move am ON (l.move_id=am.id) \
LEFT JOIN account_account a ON (l.account_id=a.id) \

View File

@ -87,7 +87,7 @@ class journal_print(report_sxw.rml_parse, common_report_header):
move_state = ['draft','posted']
if self.target_move == 'posted':
move_state = ['posted']
self.cr.execute('SELECT j.code, j.name, l.amount_currency,c.code AS currency_code,l.currency_id , '
self.cr.execute('SELECT j.code, j.name, l.amount_currency,c.code AS currency_code,l.currency_id, '
'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
'FROM account_move_line l '
'LEFT JOIN account_move am ON (l.move_id=am.id) '
@ -111,7 +111,7 @@ class journal_print(report_sxw.rml_parse, common_report_header):
def _get_account(self, data):
if data['model'] == 'account.journal.period':
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
return super(journal_print ,self)._get_account(data)
return super(journal_print, self)._get_account(data)
def _get_fiscalyear(self, data):
if data['model'] == 'account.journal.period':

View File

@ -286,7 +286,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
# return 0.0
# result_tmp = 0.0
# result_init = 0.0
# if self.reconcil :
# if self.reconcil:
# RECONCILE_TAG = " "
# else:
# RECONCILE_TAG = "AND reconcile_id IS NULL"
@ -317,7 +317,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
# "AND m.state IN %s "
# "AND account_id IN %s" \
# " " + RECONCILE_TAG + " " \
# "AND " + self.query + " " ,
# "AND " + self.query + " ",
# (tuple(self.partner_ids), tuple(move_state) ,tuple(self.account_ids),))
# contemp = self.cr.fetchone()
# if contemp != None:
@ -335,7 +335,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
# return 0.0
# result_tmp = 0.0
# result_init = 0.0
# if self.reconcil :
# if self.reconcil:
# RECONCILE_TAG = " "
# else:
# RECONCILE_TAG = "AND reconcile_id IS NULL"
@ -366,7 +366,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
# "AND m.state IN %s "
# "AND account_id IN %s" \
# " " + RECONCILE_TAG + " " \
# "AND " + self.query + " " ,
# "AND " + self.query + " ",
# (tuple(self.partner_ids), tuple(move_state), tuple(self.account_ids),))
# contemp = self.cr.fetchone()
# if contemp != None:

View File

@ -74,7 +74,7 @@ class temp_range(osv.osv):
_description = 'A Temporary table used for Dashboard view'
_columns = {
'name' : fields.char('Range',size=64)
'name': fields.char('Range',size=64)
}
temp_range()
@ -177,7 +177,7 @@ class report_invoice_created(osv.osv):
('cancel','Cancelled')
],'State', readonly=True),
'origin': fields.char('Source Document', size=64, readonly=True, help="Reference of the document that generated this invoice report."),
'create_date' : fields.datetime('Create Date', readonly=True)
'create_date': fields.datetime('Create Date', readonly=True)
}
_order = 'create_date'

View File

@ -35,7 +35,7 @@ class account_bs_report(osv.osv_memory):
_columns = {
'display_type': fields.boolean("Landscape Mode"),
'reserve_account_id': fields.many2one('account.account', 'Reserve & Profit/Loss Account',required = True,
help='This Account is used for trasfering Profit/Loss(If It is Profit : Amount will be added, Loss : Amount will be duducted.), Which is calculated from Profilt & Loss Report', domain = [('type','=','payable')]),
help='This Account is used for trasfering Profit/Loss(If It is Profit: Amount will be added, Loss : Amount will be duducted.), Which is calculated from Profilt & Loss Report', domain = [('type','=','payable')]),
}
_defaults={

View File

@ -100,7 +100,7 @@ class account_common_report(osv.osv_memory):
return self.pool.get('account.journal').search(cr, uid ,[])
_defaults = {
'fiscalyear_id' : _get_fiscalyear,
'fiscalyear_id': _get_fiscalyear,
'journal_ids': _get_all_journal,
'filter': 'filter_no',
'chart_account_id': _get_account,

View File

@ -28,7 +28,7 @@ class account_common_partner_report(osv.osv_memory):
_columns = {
'result_selection': fields.selection([('customer','Receivable Accounts'),
('supplier','Payable Accounts'),
('customer_supplier' ,'Receivable and Payable Accounts')],
('customer_supplier','Receivable and Payable Accounts')],
"Partner's", required=True),
}