[IMP] account_asset: Improved field name.
bzr revid: uco@tinyerp.com-20110519124121-olh1ntj9f0pf72tg
This commit is contained in:
parent
6493bc8aff
commit
029c429945
|
@ -37,7 +37,7 @@ class account_asset_category(osv.osv):
|
|||
'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account', required=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'skip_draft_state': fields.boolean('Change State Automatically', help="Check this if you want to skip draft state for asset when it is created by invoice."),
|
||||
'on_change_state': fields.boolean('Skip Draft State', help="Check this if you want to skip draft state for asset when it is created by invoice."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -46,7 +46,7 @@ class account_invoice_line(osv.osv):
|
|||
'purchase_value': line.price_subtotal
|
||||
}
|
||||
asset_id = asset_obj.create(cr, uid, vals, context=context)
|
||||
if line.asset_category_id.skip_draft_state:
|
||||
if line.asset_category_id.on_change_state:
|
||||
asset_obj.validate(cr, uid, [asset_id], context=context)
|
||||
return res
|
||||
account_invoice_line()
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<field name="account_asset_id"/>
|
||||
<field name="account_depreciation_id"/>
|
||||
<field name="account_expense_depreciation_id"/>
|
||||
<field name="skip_draft_state"/>
|
||||
<field name="on_change_state"/>
|
||||
<group col="4" colspan="4" groups="analytic.group_analytic_accounting">
|
||||
<separator string="Analytic information" colspan="4" />
|
||||
<newline/>
|
||||
|
|
Loading…
Reference in New Issue