[IMP] Account: Charts of accounts (Remove domain from periods) and improved view
bzr revid: mra@mra-laptop-20100917103030-o2gqxsm10th4o3e9
This commit is contained in:
@@ -54,14 +54,14 @@ class account_chart(osv.osv_memory):
|
||||
|
||||
def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None):
|
||||
res = {}
|
||||
res['value'] = {'period_from': False, 'period_to': False}
|
||||
res['value'] = {}
|
||||
if fiscalyear_id:
|
||||
start_period = end_period = False
|
||||
cr.execute('''
|
||||
SELECT * FROM (SELECT p.id
|
||||
FROM account_period p
|
||||
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
|
||||
WHERE f.id = %s
|
||||
SELECT * FROM (SELECT p.id
|
||||
FROM account_period p
|
||||
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
|
||||
WHERE f.id = %s
|
||||
ORDER BY p.date_start ASC
|
||||
LIMIT 1) AS period_start
|
||||
UNION
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<form string="Account charts">
|
||||
<group colspan="4">
|
||||
<field name="fiscalyear" on_change="onchange_fiscalyear(fiscalyear)"/>
|
||||
<field name="target_move"/>
|
||||
<label align="0.7" colspan="4" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear)]"/>
|
||||
<field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear)]"/>
|
||||
<field name="target_move"/>
|
||||
<field name="period_from"/>
|
||||
<field name="period_to"/>
|
||||
</group>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
|
||||
Reference in New Issue
Block a user