[SPLIT] account_budget: split files according to the models
This commit is contained in:
@@ -38,6 +38,7 @@ Three reports are available:
|
||||
'report/crossovered_budget_report_templates.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/account_budget_security.xml',
|
||||
'views/account_analytic_account_views.xml',
|
||||
'views/account_budget_views.xml',
|
||||
'wizard/account_budget_analytic_views.xml',
|
||||
'wizard/account_budget_report_views.xml',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import account_budget
|
||||
import account_budget
|
||||
import account_analytic_account
|
||||
@@ -0,0 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
class account_analytic_account(osv.osv):
|
||||
_inherit = "account.analytic.account"
|
||||
|
||||
_columns = {
|
||||
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'analytic_account_id', 'Budget Lines'),
|
||||
}
|
||||
@@ -203,9 +203,3 @@ class crossovered_budget_lines(osv.osv):
|
||||
}
|
||||
|
||||
|
||||
class account_analytic_account(osv.osv):
|
||||
_inherit = "account.analytic.account"
|
||||
|
||||
_columns = {
|
||||
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'analytic_account_id', 'Budget Lines'),
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
|
||||
<field name="name">account.analytic.account.form.inherit.budget</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
||||
<field name="priority" eval="50"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='main']" position='after'>
|
||||
<notebook groups="account.group_account_user">
|
||||
<page string="Budget Items">
|
||||
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree">
|
||||
<tree string="Budget Items" editable="top">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
<field name="planned_amount" widget="monetary"/>
|
||||
<field name="practical_amount" sum="Practical Amount" widget="monetary"/>
|
||||
<field name="theoritical_amount" sum="Theoritical Amount" widget="monetary"/>
|
||||
<field name="percentage"/>
|
||||
</tree>
|
||||
<form string="Budget Items">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
<field name="planned_amount" widget="monetary"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -267,42 +267,5 @@
|
||||
src_model="account.analytic.account"
|
||||
id="act_account_analytic_account_cb_lines"/>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_account_analytic_account_form_inherit_budget">
|
||||
<field name="name">account.analytic.account.form.inherit.budget</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
|
||||
<field name="priority" eval="50"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='main']" position='after'>
|
||||
<notebook groups="account.group_account_user">
|
||||
<page string="Budget Items">
|
||||
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree">
|
||||
<tree string="Budget Items" editable="top">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
<field name="planned_amount" widget="monetary"/>
|
||||
<field name="practical_amount" sum="Practical Amount" widget="monetary"/>
|
||||
<field name="theoritical_amount" sum="Theoritical Amount" widget="monetary"/>
|
||||
<field name="percentage"/>
|
||||
</tree>
|
||||
<form string="Budget Items">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
<field name="planned_amount" widget="monetary"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user