[IMP] account_asset: usability, review of form views

bzr revid: qdp-launchpad@openerp.com-20120718122730-kvmfa63h5zlxj59v
This commit is contained in:
Quentin (OpenERP)
2012-07-18 14:27:30 +02:00
parent 11255b9a3b
commit cfc2c74e37
2 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ class account_asset_asset(osv.osv):
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n" \
" * Degressive: Calculated on basis of: Remaining Value * Degressive Factor"),
'method_number': fields.integer('Number of Depreciations', readonly=True, states={'draft':[('readonly',False)]}, help="Calculates Depreciation within specified interval"),
'method_period': fields.integer('Period Length', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="State here the time during 2 depreciations, in months"),
'method_period': fields.integer('Number of Months in a Period', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="State here the time during 2 depreciations, in months"),
'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),
+18 -18
View File
@@ -88,25 +88,25 @@
<field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header>
<sheet>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/> -
<field name="code" class="oe_inline" placeholder="Reference"/>
<div class="oe_button_box oe_right">
<button name="open_entries" string="Entries" type="object" class="oe_inline"/>
</h1>
<label for="category_id" class="oe_edit_only"/>
<h2>
<field name="category_id" on_change="onchange_category_id(category_id)"/>
</h2>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/>
</h1>
</div>
<group>
<group>
<field name="category_id" on_change="onchange_category_id(category_id)"/>
<field name="code"/>
<field name="parent_id"/>
<field name="partner_id"/>
</group>
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
<field name="purchase_date"/>
<field name="currency_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
</group>
</group>
<notebook colspan="4">
@@ -116,20 +116,20 @@
<field name="purchase_value"/>
<field name="salvage_value"/>
<field name="value_residual"/>
<field name="partner_id"/>
</group>
<group>
<field name="method"/>
<field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
<label for="method_time"/>
<div>
<field name="method_time" on_change="onchange_method_time(method_time)" class="oe_inline"/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" class="oe_inline" colspan="1"/>
</div>
<field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
</group>
</group>
<group>
<group>
<field name="method_time" on_change="onchange_method_time(method_time)"/>
<field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
<field name="method_period"/>
<field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
<button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" colspan="2"/>
</group>
</group>
</page>
@@ -177,7 +177,7 @@
<field name="history_ids" readonly="1"/>
</page>
<page string="Notes">
<field name="note"/>
<field name="note" placeholder="Add an internal note here..."/>
</page>
</notebook>
</sheet>