[IMP] account_budget: remove the sequence field from object and view, budget lines tree view: add a sum on fields: practical amount, planned amount, theoretical amount, there shouldn't be any menuitem for this object elsewhere than in configuration (configuration \ budgets \ budgetary positions)
bzr revid: mra@mra-laptop-20100901070100-zt18ndz3ufejgjh6
This commit is contained in:
parent
7133112f1e
commit
8f39cf5725
|
@ -40,13 +40,11 @@ class account_budget_post(osv.osv):
|
|||
'account_ids': fields.many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts'),
|
||||
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'general_budget_id', 'Budget Lines'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of budgetary position."),
|
||||
}
|
||||
_defaults = {
|
||||
'sequence': lambda *a: 1,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c)
|
||||
}
|
||||
_order = "sequence, name"
|
||||
_order = "name"
|
||||
|
||||
def spread(self, cr, uid, ids, fiscalyear_id=False, amount=0.0):
|
||||
dobj = self.pool.get('account.budget.post.dotation')
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Budgetary Position">
|
||||
<field name="sequence"/>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
|
@ -58,7 +57,8 @@
|
|||
<field name="view_id" ref="view_budget_post_tree"/>
|
||||
</record>
|
||||
<menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="5"/>
|
||||
<menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_31" sequence="2"/>
|
||||
<menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="5"/>
|
||||
<menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="2"/>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_budget_post_form">
|
||||
|
@ -70,7 +70,6 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="sequence"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Accounts">
|
||||
<field name="account_ids" colspan="4" nolabel="1"/>
|
||||
|
@ -88,9 +87,9 @@
|
|||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
<field name="planned_amount"/>
|
||||
<field name="practical_amount" select="1"/>
|
||||
<field name="theoritical_amount"/>
|
||||
<field name="planned_amount" sum="Planned Amount"/>
|
||||
<field name="practical_amount" select="1" sum="Practical Amount" />
|
||||
<field name="theoritical_amount" sum="Theoritical Amount"/>
|
||||
<field name="percentage"/>
|
||||
</tree>
|
||||
<form string="Budget Lines">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
|
Loading…
Reference in New Issue