mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
analytic enhancement
This commit is contained in:
committed by
Akim Juillerat
parent
89cf08ddaf
commit
05e5ab12a6
@@ -4,7 +4,7 @@
|
||||
# OpenERP, Open Source Management Solution
|
||||
#
|
||||
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
|
||||
# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
|
||||
# Copyright (c) 2014-2015 Noviat nv/sa (www.noviat.com).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
@@ -22,7 +22,7 @@
|
||||
##############################################################################
|
||||
{
|
||||
'name': 'Assets Management',
|
||||
'version': '2.4',
|
||||
'version': '2.5',
|
||||
'depends': ['account'],
|
||||
'conflicts': ['account_asset'],
|
||||
'author': "OpenERP & Noviat,Odoo Community Association (OCA)",
|
||||
|
||||
@@ -1100,6 +1100,8 @@ class account_asset_asset(orm.Model):
|
||||
type='many2one',
|
||||
relation='res.currency',
|
||||
store=True, readonly=True,),
|
||||
'account_analytic_id': fields.many2one(
|
||||
'account.analytic.account', 'Analytic account'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -1172,6 +1174,7 @@ class account_asset_asset(orm.Model):
|
||||
'method_period': category_obj.method_period,
|
||||
'method_progress_factor': category_obj.method_progress_factor,
|
||||
'prorata': category_obj.prorata,
|
||||
'account_analytic_id': category_obj.account_analytic_id,
|
||||
}
|
||||
return res
|
||||
|
||||
@@ -1575,7 +1578,7 @@ class account_asset_depreciation_line(orm.Model):
|
||||
elif type == 'expense':
|
||||
debit = amount > 0 and amount or 0.0
|
||||
credit = amount < 0 and -amount or 0.0
|
||||
analytic_id = asset.category_id.account_analytic_id.id
|
||||
analytic_id = asset.account_analytic_id.id
|
||||
move_line_data = {
|
||||
'name': asset.name,
|
||||
'ref': depreciation_line.name,
|
||||
|
||||
@@ -126,8 +126,9 @@
|
||||
</group>
|
||||
<separator string="Other Information" colspan="4"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="category_id" on_change="onchange_category_id(category_id)" attrs="{'required':[('type','=','normal')]}" colspan="4"/>
|
||||
<field name="category_id" on_change="onchange_category_id(category_id)" attrs="{'required':[('type','=','normal')]}"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user