Simulation bugfixes
Asset cleaning Accounting general cleaning bzr revid: fp@tinyerp.com-20567ff549f0dbcdcc593e959d310717d9074499
This commit is contained in:
parent
eb39f98cc4
commit
f8c8333bbd
|
@ -790,7 +790,7 @@
|
|||
<field name="period_id"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="active" select="2"/>
|
||||
<field name="state"/>
|
||||
<field name="state" select="2"/>
|
||||
</page><page string="Analytic Lines">
|
||||
<field name="analytic_lines" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
|
|
|
@ -234,16 +234,16 @@ class account_asset_property(osv.osv):
|
|||
_description = 'Asset property'
|
||||
_columns = {
|
||||
'name': fields.char('Method name', size=64, select=1),
|
||||
'type': fields.selection([('direct','Direct'),('indirect','Indirect')], 'Asset type', select=2, required=True),
|
||||
'type': fields.selection([('direct','Direct'),('indirect','Indirect')], 'Depr. method type', select=2, required=True),
|
||||
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
|
||||
'account_asset_id': fields.many2one('account.account', 'Asset account', required=True),
|
||||
'account_actif_id': fields.many2one('account.account', 'Actif account', required=True),
|
||||
'account_actif_id': fields.many2one('account.account', 'Depreciation account', required=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'journal_analytic_id': fields.many2one('account.analytic.journal', 'Analytic journal'),
|
||||
'account_analytic_id': fields.many2one('account.analytic.journal', 'Analytic journal'),
|
||||
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
|
||||
|
||||
'method': fields.selection([('linear','Linear'),('progressif','Progressive')], 'Assesment method', required=True),
|
||||
'method_time': fields.selection([('delay','Delay'),('end','Ending period')], 'Time Method', required=True),
|
||||
'method': fields.selection([('linear','Linear'),('progressif','Progressive')], 'Computation method', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'method_time': fields.selection([('delay','Delay'),('end','Ending period')], 'Time method', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'method_delay': fields.integer('Number of interval', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'method_period': fields.integer('Period per interval', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'method_end': fields.date('Ending date'),
|
||||
|
@ -254,7 +254,7 @@ class account_asset_property(osv.osv):
|
|||
'entry_actif_ids': fields.many2many('account.move.line', 'account_move_asset_actif_entry_rel', 'asset_property_id', 'move_id', 'Asset Entries'),
|
||||
'board_ids': fields.one2many('account.asset.board', 'asset_id', 'Asset board'),
|
||||
|
||||
'value_total': fields.function(_amount_total, method=True, digits=(16,2),string='Total value'),
|
||||
'value_total': fields.function(_amount_total, method=True, digits=(16,2),string='Gross value'),
|
||||
'value_residual': fields.function(_amount_residual, method=True, digits=(16,2), string='Residual value'),
|
||||
'state': fields.selection([('draft','Draft'), ('open','Open'), ('close','Close')], 'State', required=True),
|
||||
'history_ids': fields.one2many('account.asset.property.history', 'asset_property_id', 'History', readonly=True)
|
||||
|
@ -284,7 +284,7 @@ class account_asset_property_history(osv.osv):
|
|||
'name': fields.char('History name', size=64, select=1),
|
||||
'user_id': fields.many2one('res.users', 'User', required=True),
|
||||
'date': fields.date('Date', required=True),
|
||||
'asset_property_id': fields.many2one('account.asset.property', 'Property', required=True),
|
||||
'asset_property_id': fields.many2one('account.asset.property', 'Method', required=True),
|
||||
'method_delay': fields.integer('Number of interval'),
|
||||
'method_period': fields.integer('Period per interval'),
|
||||
'method_end': fields.date('Ending date'),
|
||||
|
|
|
@ -69,39 +69,40 @@
|
|||
<field name="period_id" select="2"/>
|
||||
<field name="category_id" select="1"/>
|
||||
<field name="property_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Properties">
|
||||
<notebook string="Properties" tabpos="up">
|
||||
<page string="General info">
|
||||
<form string="Depreciation methods">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<notebook string="Methods" tabpos="up" colspan="4">
|
||||
<page string="Depreciation">
|
||||
<separator string="Accounts information" colspan="4"/>
|
||||
<field name="account_asset_id"/>
|
||||
<field name="account_actif_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="type"/>
|
||||
<field name="account_analytic_id"/>
|
||||
<field name="journal_analytic_id"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<separator string="Asset method" colspan="4"/>
|
||||
<field name="method" readonly="True"/>
|
||||
<field name="method_time" readonly="True"/>
|
||||
<separator string="Depreciation duration" colspan="3"/>
|
||||
<button name="%(wizard_asset_modify)d" states="open" string="Change duration" type="action"/>
|
||||
<field name="method"/>
|
||||
<field name="method_time"/>
|
||||
<newline/>
|
||||
<field name="method_delay"/>
|
||||
<field name="method_period"/>
|
||||
<!-- <field name="method_end"/> -->
|
||||
<field name="value_total"/>
|
||||
<field name="value_residual"/>
|
||||
<field name="state" readonly="1"/>
|
||||
<group colspan="2" col="2">
|
||||
<button name="%(wizard_asset_modify)d" states="open" string="Modify method" type="action"/>
|
||||
<button name="%(wizard_asset_close)d" states="open" string="Close method" type="action"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Entries">
|
||||
<page string="Depreciation entries">
|
||||
<field name="entry_asset_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
<field name="entry_actif_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
</page>
|
||||
<page string="Change history">
|
||||
<field name="history_ids" colspan="4" nolabel="1" readonly="1"/>
|
||||
</page>
|
||||
<page string="Depreciation board">
|
||||
<field name="value_total"/>
|
||||
<field name="value_residual"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="state" readonly="1"/>
|
||||
<button name="%(wizard_asset_close)d" states="open" string="Close method" type="action"/>
|
||||
</form>
|
||||
</field>
|
||||
<field name="state" readonly="1"/>
|
||||
|
|
|
@ -45,12 +45,12 @@ def _state_simul_get(self, cr, uid, context={}):
|
|||
obj = self.pool.get('account.journal.simulation')
|
||||
ids = obj.search(cr, uid, [])
|
||||
res = obj.read(cr, uid, ids, ['code', 'name'], context)
|
||||
return [('valid','Valid')]+ [(r['code'], r['name']) for r in res]
|
||||
return [('valid','Base')]+ [(r['code'], r['name']) for r in res]
|
||||
|
||||
class account_journal(osv.osv):
|
||||
_inherit = "account.journal"
|
||||
_columns = {
|
||||
'state': fields.selection(_state_simul_get, 'State', required=True),
|
||||
'state': fields.selection(_state_simul_get, 'Status', required=True),
|
||||
'parent_ids': fields.many2many('account.journal', 'account_journal_simulation_rel', 'journal_src_id', 'journal_dest_id', 'Childs journal'),
|
||||
'child_ids': fields.many2many('account.journal', 'account_journal_simulation_rel', 'journal_dest_id', 'journal_src_id', 'Parent journal'),
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ account_journal()
|
|||
|
||||
class account_move_line(osv.osv):
|
||||
_inherit = "account.move.line"
|
||||
def search(self, cr, uid, crit, offset=0, limit=None, order=None, context={}):
|
||||
def search_not_run(self, cr, uid, crit, offset=0, limit=None, order=None, context={}):
|
||||
if not 'fiscalyear' in context:
|
||||
context['fiscalyear'] = self.pool.get('account.fiscalyear').find(cr, uid)
|
||||
ok = True
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
<field name="arch" type="xml">
|
||||
<field name="update_posted" position="after">
|
||||
<field name="state"/>
|
||||
<separator string="Child journals" colspan="4"/>
|
||||
<field name="child_ids" colspan="4"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue