[FIX]: fix a problme of account move line normal / dynamic view
[FIX]: fix a problem of opening balance for the cash statement [FIX]: fix a small activity problem of voucher workflow [FIX]: make appropreate side for journal list [FIX]: change the code for cash journal under demo data bzr revid: mga@tinyerp.com-20100814090508-xkimy8djq0jqdg8j
This commit is contained in:
parent
09104edf60
commit
700157f459
|
@ -320,26 +320,26 @@ class account_cash_statement(osv.osv):
|
|||
'name':number
|
||||
})
|
||||
|
||||
# if len(statement.starting_details_ids) > 0:
|
||||
# sid = []
|
||||
# for line in statement.starting_details_ids:
|
||||
# sid.append(line.id)
|
||||
# cash_pool.unlink(cr, uid, sid)
|
||||
#
|
||||
# cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
# rs = cr.fetchone()
|
||||
# rs = rs and rs[0] or None
|
||||
# if rs:
|
||||
# statement = statement_pool.browse(cr, uid, rs)
|
||||
# balance_start = statement.balance_end_real or 0.0
|
||||
# open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
# for sid in open_ids:
|
||||
# default = {
|
||||
# 'ending_id': False,
|
||||
# 'starting_id':ids[0]
|
||||
# }
|
||||
# cash_pool.copy(cr, uid, sid, default)
|
||||
#
|
||||
cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
rs = cr.fetchone()
|
||||
rs = rs and rs[0] or None
|
||||
if rs:
|
||||
if len(statement.starting_details_ids) > 0:
|
||||
sid = []
|
||||
for line in statement.starting_details_ids:
|
||||
sid.append(line.id)
|
||||
cash_pool.unlink(cr, uid, sid)
|
||||
|
||||
statement = statement_pool.browse(cr, uid, rs)
|
||||
balance_start = statement.balance_end_real or 0.0
|
||||
open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
for sid in open_ids:
|
||||
default = {
|
||||
'ending_id': False,
|
||||
'starting_id':ids[0]
|
||||
}
|
||||
cash_pool.copy(cr, uid, sid, default)
|
||||
|
||||
vals.update({
|
||||
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'state':'open',
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<data noupdate="1">
|
||||
|
||||
<!--
|
||||
Fiscal year
|
||||
-->
|
||||
Fiscal year
|
||||
-->
|
||||
|
||||
<record id="data_fiscalyear" model="account.fiscalyear">
|
||||
<field eval="'Fiscal Year '+time.strftime('%Y')" name="name"/>
|
||||
|
@ -15,8 +15,8 @@
|
|||
</record>
|
||||
|
||||
<!--
|
||||
Fiscal Periods
|
||||
-->
|
||||
Fiscal Periods
|
||||
-->
|
||||
|
||||
<record id="period_1" model="account.period">
|
||||
<field eval="'01/'+time.strftime('%Y')" name="name"/>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
|
||||
<separator col="4" colspan="4" string="Bank and Cost Account"/>
|
||||
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<field colspan="4" mode="tree" height="200" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<form string="">
|
||||
<field name="acc_name"/>
|
||||
<field name="account_type"/>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<form position="attributes">
|
||||
<attribute name="string">Extra Accounting Modules Installation</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string"
|
||||
>Install Extra Accounting Modules In Your Accounting System</attribute>
|
||||
</separator>
|
||||
|
@ -129,17 +129,17 @@
|
|||
<field name="restart">always</field>
|
||||
</record>
|
||||
|
||||
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
|
||||
<field name="model">ir.actions.todo</field>
|
||||
<field name="name">account_installer_action_replace</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_account_configuration_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
|
||||
<field name="model">ir.actions.todo</field>
|
||||
<field name="name">account_installer_action_replace</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_account_configuration_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -856,12 +856,14 @@ class account_move_line(osv.osv):
|
|||
result['fields']['journal_id']['selection'] = journal_list
|
||||
return result
|
||||
|
||||
if not context.get('view_mode', False):
|
||||
return result
|
||||
|
||||
fld = []
|
||||
fields = {}
|
||||
flds = []
|
||||
title = "Accounting Entries" #self.view_header_get(cr, uid, view_id, view_type, context)
|
||||
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write">\n\t''' % (title)
|
||||
|
||||
|
||||
ids = journal_pool.search(cr, uid, [])
|
||||
journals = journal_pool.browse(cr, uid, ids)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<field name="res_model">account.move.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_account_move_journal_form"/>
|
||||
<field name="context">{'journal_type':'sale'}</field>
|
||||
<field name="context">{'journal_type':'sale','view_mode':True}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem action="action_account_moves_sale" sequence="4" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL"/>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<field name="res_model">account.move.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_account_move_journal_form"/>
|
||||
<field name="context">{'journal_type':'purchase'}</field>
|
||||
<field name="context">{'journal_type':'purchase','view_mode':True}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem action="action_account_moves_purchase" sequence="4" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables" icon="STOCK_JUSTIFY_FILL"/>
|
||||
|
@ -58,7 +58,7 @@
|
|||
<field name="res_model">account.move.journal</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_account_move_journal_form"/>
|
||||
<field name="context">{'journal_type':'bank'}</field>
|
||||
<field name="context">{'journal_type':'bank','view_mode':True}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -78,11 +78,11 @@
|
|||
<field name="signal">recheck_voucher</field>
|
||||
</record>
|
||||
|
||||
<record id="t10" model="workflow.transition">
|
||||
<field name="act_from" ref="act_done"/>
|
||||
<field name="act_to" ref="act_audit"/>
|
||||
<field name="signal">audit_complete</field>
|
||||
</record>
|
||||
<!-- <record id="t10" model="workflow.transition">-->
|
||||
<!-- <field name="act_from" ref="act_done"/>-->
|
||||
<!-- <field name="act_to" ref="act_audit"/>-->
|
||||
<!-- <field name="signal">audit_complete</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="t5" model="workflow.transition">
|
||||
<field name="act_from" ref="act_recheck"/>
|
||||
|
|
Loading…
Reference in New Issue