[REM] account_budget: Remove budget reports and associated wizards
These reports are broke since saas-7, very badly written, and have exactly the same layout than the form view. al approval
This commit is contained in:
@@ -2,5 +2,3 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import models
|
||||
import report
|
||||
import wizard
|
||||
|
||||
@@ -32,18 +32,10 @@ Three reports are available:
|
||||
'depends': ['account'],
|
||||
'data': [
|
||||
'data/account_budget_workflow.xml',
|
||||
'report/account_budget_report.xml',
|
||||
'report/analytic_account_budget_report_templates.xml',
|
||||
'report/budget_report_templates.xml',
|
||||
'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',
|
||||
'wizard/account_budget_crossovered_summary_report_views.xml',
|
||||
'wizard/account_budget_crossovered_report_views.xml',
|
||||
],
|
||||
'demo': ['data/account_budget_demo.xml', 'data/account_budget_demo.yml'],
|
||||
'test': [
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import crossovered_budget_report
|
||||
import analytic_account_budget_report
|
||||
import budget_report
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<report
|
||||
id="action_report_crossovered_budget"
|
||||
model="crossovered.budget"
|
||||
string="Budgets"
|
||||
report_type="qweb-pdf"
|
||||
name="account_budget.report_crossoveredbudget"
|
||||
file="account_budget.report_crossoveredbudget"
|
||||
menu="False"
|
||||
/>
|
||||
|
||||
<report
|
||||
id="action_report_budget"
|
||||
model="account.budget.post"
|
||||
string="Budget"
|
||||
report_type="qweb-pdf"
|
||||
name="account_budget.report_budget"
|
||||
file="account_budget.report_budget"
|
||||
menu="False"
|
||||
/>
|
||||
|
||||
<report
|
||||
id="action_report_analytic_account_budget"
|
||||
model="account.analytic.account"
|
||||
string="Budgets"
|
||||
report_type="qweb-pdf"
|
||||
name="account_budget.report_analyticaccountbudget"
|
||||
file="account_budget.report_analyticaccountbudget"
|
||||
menu="False"
|
||||
/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,156 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import osv
|
||||
from openerp.report import report_sxw
|
||||
|
||||
|
||||
class analytic_account_budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(analytic_account_budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update( {
|
||||
'funct': self.funct,
|
||||
'funct_total': self.funct_total,
|
||||
'time': time,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids=None, done=None, level=1):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
done = {}
|
||||
|
||||
global tot
|
||||
tot = {
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
result = []
|
||||
accounts = self.pool.get('account.analytic.account').browse(self.cr, self.uid, [object.id], self.context.copy())
|
||||
c_b_lines_obj = self.pool.get('crossovered.budget.lines')
|
||||
obj_c_budget = self.pool.get('crossovered.budget')
|
||||
|
||||
for account_id in accounts:
|
||||
res = {}
|
||||
b_line_ids = []
|
||||
for line in account_id.crossovered_budget_line:
|
||||
b_line_ids.append(line.id)
|
||||
if not b_line_ids:
|
||||
return []
|
||||
d_from = form['date_from']
|
||||
d_to = form['date_to']
|
||||
|
||||
self.cr.execute('SELECT DISTINCT(crossovered_budget_id) FROM crossovered_budget_lines WHERE id =ANY(%s)',(b_line_ids,))
|
||||
budget_ids = self.cr.fetchall()
|
||||
|
||||
context = {'wizard_date_from':d_from,'wizard_date_to':d_to}
|
||||
for i in range(0, len(budget_ids)):
|
||||
budget_name = obj_c_budget.browse(self.cr, self.uid, [budget_ids[i][0]])
|
||||
res= {
|
||||
'b_id':'-1',
|
||||
'a_id':'-1',
|
||||
'name':budget_name[0].name,
|
||||
'status':1,
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', b_line_ids), ('crossovered_budget_id','=',budget_ids[i][0])])
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0
|
||||
|
||||
done_budget = []
|
||||
for line in line_id:
|
||||
if line.id in b_line_ids:
|
||||
theo = pract = 0.00
|
||||
theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
if line.general_budget_id.id in done_budget:
|
||||
for record in result:
|
||||
if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
|
||||
record['theo'] += theo
|
||||
record['pln'] += line.planned_amount
|
||||
record['prac'] += pract
|
||||
record['perc'] += line.percentage
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += line.percentage
|
||||
else:
|
||||
res1 = {
|
||||
'b_id': line.general_budget_id.id,
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': theo,
|
||||
'pln': line.planned_amount,
|
||||
'prac': pract,
|
||||
'perc': line.percentage
|
||||
}
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += line.percentage
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
else:
|
||||
if line.general_budget_id.id in done_budget:
|
||||
continue
|
||||
else:
|
||||
res1={
|
||||
'b_id': line.general_budget_id.id,
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
if tot_theo == 0.00:
|
||||
tot_perc = 0.00
|
||||
else:
|
||||
tot_perc = float(tot_prac / tot_theo) * 100
|
||||
|
||||
result[-(len(done_budget) +1)]['theo'] = tot_theo
|
||||
tot['theo'] +=tot_theo
|
||||
result[-(len(done_budget) +1)]['pln'] = tot_pln
|
||||
tot['pln'] +=tot_pln
|
||||
result[-(len(done_budget) +1)]['prac'] = tot_prac
|
||||
tot['prac'] +=tot_prac
|
||||
result[-(len(done_budget) +1)]['perc'] = tot_perc
|
||||
if tot['theo'] == 0.00:
|
||||
tot['perc'] = 0.00
|
||||
else:
|
||||
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
|
||||
return result
|
||||
|
||||
def funct_total(self, form):
|
||||
result = []
|
||||
res = {}
|
||||
res = {
|
||||
'tot_theo': tot['theo'],
|
||||
'tot_pln': tot['pln'],
|
||||
'tot_prac': tot['prac'],
|
||||
'tot_perc': tot['perc']
|
||||
}
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
|
||||
class report_analyticaccountbudget(osv.AbstractModel):
|
||||
_name = 'report.account_budget.report_analyticaccountbudget'
|
||||
_inherit = 'report.abstract_report'
|
||||
_template = 'account_budget.report_analyticaccountbudget'
|
||||
_wrapped_report_class = analytic_account_budget_report
|
||||
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_analyticaccountbudget">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.internal_layout">
|
||||
<div class="page">
|
||||
<h2>Analytic Budget</h2>
|
||||
|
||||
<div class="row mt32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Analysis from</strong>
|
||||
<p><span t-esc="formatLang(data['form']['date_from'], date=True)"/> to
|
||||
<span t-esc="formatLang(data['form']['date_to'], date=True)"/></p>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Analytic Account</strong>
|
||||
<p t-field="o.name"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Currency</strong>
|
||||
<p t-esc="res_company.currency_id.name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-right">Theoretical Amt</th>
|
||||
<th class="text-right">Planned Amt</th>
|
||||
<th class="text-right">Practical Amt</th>
|
||||
<th class="text-right">Perc(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="funct(o, data['form'])" t-as="line">
|
||||
<tr t-if="line['status'] == 1">
|
||||
<td><strong t-esc="line['name']"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['perc'], digits=2)"/> %</td>
|
||||
</tr>
|
||||
<tr t-if="line['status'] != 1">
|
||||
<td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> %</td>
|
||||
</tr>
|
||||
</t>
|
||||
<tr t-foreach="funct_total(data['form'])" t-as="tot">
|
||||
<td><strong>Total:</strong></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,178 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import osv
|
||||
from openerp.report import report_sxw
|
||||
|
||||
tot = {}
|
||||
|
||||
class budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'funct': self.funct,
|
||||
'funct_total': self.funct_total,
|
||||
'time': time,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids=None, done=None, level=1):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
done = {}
|
||||
global tot
|
||||
tot = {
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
result = []
|
||||
|
||||
budgets = self.pool.get('account.budget.post').browse(self.cr, self.uid, [object.id], self.context.copy())
|
||||
c_b_lines_obj = self.pool.get('crossovered.budget.lines')
|
||||
acc_analytic_obj = self.pool.get('account.analytic.account')
|
||||
for budget_id in budgets:
|
||||
res = {}
|
||||
budget_ids = []
|
||||
d_from = form['date_from']
|
||||
d_to = form['date_to']
|
||||
|
||||
for line in budget_id.crossovered_budget_line:
|
||||
budget_ids.append(line.id)
|
||||
|
||||
if not budget_ids:
|
||||
return []
|
||||
self.cr.execute('SELECT DISTINCT(analytic_account_id) FROM crossovered_budget_lines WHERE id = ANY(%s)',(budget_ids,))
|
||||
an_ids = self.cr.fetchall()
|
||||
|
||||
context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
|
||||
for i in range(0, len(an_ids)):
|
||||
if not an_ids[i][0]:
|
||||
continue
|
||||
analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
|
||||
res={
|
||||
'b_id': '-1',
|
||||
'a_id': '-1',
|
||||
'name': analytic_name[0].name,
|
||||
'status': 1,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0])])
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0.00
|
||||
|
||||
done_budget = []
|
||||
for line in line_id:
|
||||
if line.id in budget_ids:
|
||||
theo = pract = 0.00
|
||||
theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
if line.general_budget_id.id in done_budget:
|
||||
for record in result:
|
||||
if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
|
||||
record['theo'] += theo
|
||||
record['pln'] += line.planned_amount
|
||||
record['prac'] += pract
|
||||
if record['theo'] <> 0.00:
|
||||
perc = (record['prac'] / record['theo']) * 100
|
||||
else:
|
||||
perc = 0.00
|
||||
record['perc'] = perc
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += perc
|
||||
else:
|
||||
if theo <> 0.00:
|
||||
perc = (pract / theo) * 100
|
||||
else:
|
||||
perc = 0.00
|
||||
res1 = {
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'b_id': line.general_budget_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': theo,
|
||||
'pln': line.planned_amount,
|
||||
'prac': pract,
|
||||
'perc': perc,
|
||||
}
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += perc
|
||||
if form['report'] == 'analytic-full':
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
else:
|
||||
|
||||
if line.general_budget_id.id in done_budget:
|
||||
continue
|
||||
else:
|
||||
res1={
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'b_id': line.general_budget_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
if form['report'] == 'analytic-full':
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
if tot_theo == 0.00:
|
||||
tot_perc = 0.00
|
||||
else:
|
||||
tot_perc = float(tot_prac / tot_theo) * 100
|
||||
if form['report'] == 'analytic-full':
|
||||
result[-(len(done_budget) +1)]['theo'] = tot_theo
|
||||
tot['theo'] += tot_theo
|
||||
result[-(len(done_budget) +1)]['pln'] = tot_pln
|
||||
tot['pln'] += tot_pln
|
||||
result[-(len(done_budget) +1)]['prac'] = tot_prac
|
||||
tot['prac'] += tot_prac
|
||||
result[-(len(done_budget) +1)]['perc'] = tot_perc
|
||||
else:
|
||||
result[-1]['theo'] = tot_theo
|
||||
tot['theo'] += tot_theo
|
||||
result[-1]['pln'] = tot_pln
|
||||
tot['pln'] += tot_pln
|
||||
result[-1]['prac'] = tot_prac
|
||||
tot['prac'] += tot_prac
|
||||
result[-1]['perc'] = tot_perc
|
||||
if tot['theo'] == 0.00:
|
||||
tot['perc'] = 0.00
|
||||
else:
|
||||
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
|
||||
return result
|
||||
|
||||
def funct_total(self, form):
|
||||
result = []
|
||||
res = {}
|
||||
res = {
|
||||
'tot_theo': tot['theo'],
|
||||
'tot_pln': tot['pln'],
|
||||
'tot_prac': tot['prac'],
|
||||
'tot_perc': tot['perc']
|
||||
}
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
|
||||
class report_budget(osv.AbstractModel):
|
||||
_name = 'report.account_budget.report_budget'
|
||||
_inherit = 'report.abstract_report'
|
||||
_template = 'account_budget.report_budget'
|
||||
_wrapped_report_class = budget_report
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_budget">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.internal_layout">
|
||||
<div class="page">
|
||||
<h2>Budget</h2>
|
||||
<div class="row mt32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Currency:</strong>
|
||||
<p t-esc="res_company.currency_id.name"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Printed at:</strong>
|
||||
<p><span t-esc="formatLang(time.strftime('%Y-%m-%d'), date=True)"/> at
|
||||
<span t-esc="time.strftime('%H:%M:%S')"/></p>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Analysis from:</strong>
|
||||
<p><span t-esc="formatLang(data['form']['date_from'], date=True)"/> to
|
||||
<span t-esc="formatLang(data['form']['date_to'], date=True)"/></p>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Budget:</strong>
|
||||
<p t-field="o.name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-right">Theoretical Amount</th>
|
||||
<th class="text-right">Planned Amount</th>
|
||||
<th class="text-right">Practical Amount</th>
|
||||
<th class="text-right">Perc(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="funct(o, data['form'])" t-as="line">
|
||||
<t t-if="line['status'] == 1">
|
||||
<tr>
|
||||
<td><strong t-esc="line['name']"/></td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="formatLang(line['theo'], dp='Account', currency_obj = res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(line['perc'],digits=2)"/> %</td>
|
||||
</tr>
|
||||
</t>
|
||||
<tr t-if="line['status'] != 1">
|
||||
<td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> % </td>
|
||||
</tr>
|
||||
</t>
|
||||
<tr t-foreach="funct_total(data['form'])" t-as="tot">
|
||||
<td><strong>Total:</strong></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj = res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj = res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
|
||||
<td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,179 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import osv
|
||||
from openerp.report import report_sxw
|
||||
|
||||
|
||||
class budget_report(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(budget_report, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'funct': self.funct,
|
||||
'funct_total': self.funct_total,
|
||||
'time': time,
|
||||
})
|
||||
self.context = context
|
||||
|
||||
def funct(self, object, form, ids=None, done=None, level=1):
|
||||
if ids is None:
|
||||
ids = {}
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not done:
|
||||
done = {}
|
||||
global tot
|
||||
tot = {
|
||||
'theo':0.00,
|
||||
'pln':0.00,
|
||||
'prac':0.00,
|
||||
'perc':0.00
|
||||
}
|
||||
result = []
|
||||
|
||||
budgets = self.pool.get('crossovered.budget').browse(self.cr, self.uid, [object.id], self.context.copy())
|
||||
c_b_lines_obj = self.pool.get('crossovered.budget.lines')
|
||||
acc_analytic_obj = self.pool.get('account.analytic.account')
|
||||
for budget_id in budgets:
|
||||
res = {}
|
||||
budget_lines = []
|
||||
budget_ids = []
|
||||
d_from = form['date_from']
|
||||
d_to = form['date_to']
|
||||
|
||||
for line in budget_id.crossovered_budget_line:
|
||||
budget_ids.append(line.id)
|
||||
|
||||
if not budget_ids:
|
||||
return []
|
||||
|
||||
self.cr.execute('SELECT DISTINCT(analytic_account_id) FROM crossovered_budget_lines WHERE id = ANY(%s)',(budget_ids,))
|
||||
an_ids = self.cr.fetchall()
|
||||
|
||||
context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
|
||||
for i in range(0, len(an_ids)):
|
||||
if not an_ids[i][0]:
|
||||
continue
|
||||
analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
|
||||
res={
|
||||
'b_id': '-1',
|
||||
'a_id': '-1',
|
||||
'name': analytic_name[0].name,
|
||||
'status': 1,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
result.append(res)
|
||||
|
||||
line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0]), ('date_to', '>=', d_from), ('date_from', '<=', d_to)])
|
||||
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
|
||||
tot_theo = tot_pln = tot_prac = tot_perc = 0.00
|
||||
|
||||
done_budget = []
|
||||
for line in line_id:
|
||||
if line.id in budget_ids:
|
||||
theo = pract = 0.00
|
||||
theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
|
||||
if line.general_budget_id.id in done_budget:
|
||||
for record in result:
|
||||
if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
|
||||
record['theo'] += theo
|
||||
record['pln'] += line.planned_amount
|
||||
record['prac'] += pract
|
||||
if record['theo'] <> 0.00:
|
||||
perc = (record['prac'] / record['theo']) * 100
|
||||
else:
|
||||
perc = 0.00
|
||||
record['perc'] = perc
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += perc
|
||||
else:
|
||||
if theo <> 0.00:
|
||||
perc = (pract / theo) * 100
|
||||
else:
|
||||
perc = 0.00
|
||||
res1 = {
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'b_id': line.general_budget_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': theo,
|
||||
'pln': line.planned_amount,
|
||||
'prac': pract,
|
||||
'perc': perc,
|
||||
}
|
||||
tot_theo += theo
|
||||
tot_pln += line.planned_amount
|
||||
tot_prac += pract
|
||||
tot_perc += perc
|
||||
if form['report'] == 'analytic-full':
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
else:
|
||||
|
||||
if line.general_budget_id.id in done_budget:
|
||||
continue
|
||||
else:
|
||||
res1={
|
||||
'a_id': line.analytic_account_id.id,
|
||||
'b_id': line.general_budget_id.id,
|
||||
'name': line.general_budget_id.name,
|
||||
'status': 2,
|
||||
'theo': 0.00,
|
||||
'pln': 0.00,
|
||||
'prac': 0.00,
|
||||
'perc': 0.00
|
||||
}
|
||||
if form['report'] == 'analytic-full':
|
||||
result.append(res1)
|
||||
done_budget.append(line.general_budget_id.id)
|
||||
if tot_theo == 0.00:
|
||||
tot_perc = 0.00
|
||||
else:
|
||||
tot_perc = float(tot_prac / tot_theo) * 100
|
||||
if form['report'] == 'analytic-full':
|
||||
result[-(len(done_budget) +1)]['theo'] = tot_theo
|
||||
tot['theo'] += tot_theo
|
||||
result[-(len(done_budget) +1)]['pln'] = tot_pln
|
||||
tot['pln'] += tot_pln
|
||||
result[-(len(done_budget) +1)]['prac'] = tot_prac
|
||||
tot['prac'] += tot_prac
|
||||
result[-(len(done_budget) +1)]['perc'] = tot_perc
|
||||
else:
|
||||
result[-1]['theo'] = tot_theo
|
||||
tot['theo'] += tot_theo
|
||||
result[-1]['pln'] = tot_pln
|
||||
tot['pln'] += tot_pln
|
||||
result[-1]['prac'] = tot_prac
|
||||
tot['prac'] += tot_prac
|
||||
result[-1]['perc'] = tot_perc
|
||||
if tot['theo'] == 0.00:
|
||||
tot['perc'] = 0.00
|
||||
else:
|
||||
tot['perc'] = float(tot['prac'] / tot['theo']) * 100
|
||||
return result
|
||||
|
||||
def funct_total(self, form):
|
||||
result = []
|
||||
res = {}
|
||||
res = {
|
||||
'tot_theo': tot['theo'],
|
||||
'tot_pln': tot['pln'],
|
||||
'tot_prac': tot['prac'],
|
||||
'tot_perc': tot['perc']
|
||||
}
|
||||
result.append(res)
|
||||
return result
|
||||
|
||||
|
||||
class report_crossoveredbudget(osv.AbstractModel):
|
||||
_name = 'report.account_budget.report_crossoveredbudget'
|
||||
_inherit = 'report.abstract_report'
|
||||
_template = 'account_budget.report_crossoveredbudget'
|
||||
_wrapped_report_class = budget_report
|
||||
@@ -1,81 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_crossoveredbudget">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.internal_layout">
|
||||
<div class="page">
|
||||
<h2>Budget</h2>
|
||||
|
||||
<div class="row mt32">
|
||||
<div class="col-xs-3">
|
||||
<strong>Analysis from:</strong>
|
||||
<p><span t-esc="formatLang(data['form']['date_from'], date=True)"/> to
|
||||
<span t-esc="formatLang(data['form']['date_to'], date=True)"/></p>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Budget:</strong>
|
||||
<p t-esc="o.name"/>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<strong>Currency:</strong>
|
||||
<p t-esc="res_company.currency_id.name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-right">Theoretical Amt</th>
|
||||
<th class="text-right">Planned Amt</th>
|
||||
<th class="text-right">Practical Amt</th>
|
||||
<th class="text-center">Perc(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="funct(o, data['form'])" t-as="line">
|
||||
<td>
|
||||
<span style="color: white;" t-esc="'... '*(line['status'] - 1)"/>
|
||||
<span t-esc="line['name']"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span t-esc="formatLang(line['perc'],digits=2)"/> %
|
||||
</td>
|
||||
</tr>
|
||||
<tr t-foreach="funct_total(data['form'])" t-as="tot">
|
||||
<td>
|
||||
<strong>Total:</strong>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import account_budget_crossovered_report
|
||||
import account_budget_analytic
|
||||
import account_budget_crossovered_summary_report
|
||||
import account_budget_report
|
||||
@@ -1,31 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
class account_budget_analytic(osv.osv_memory):
|
||||
|
||||
_name = 'account.budget.analytic'
|
||||
_description = 'Account Budget report for analytic account'
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'date_from': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_to': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
datas = {
|
||||
'ids': context.get('active_ids', []),
|
||||
'model': 'account.analytic.account',
|
||||
'form': data
|
||||
}
|
||||
datas['form']['ids'] = datas['ids']
|
||||
return self.pool['report'].get_action(cr, uid, [], 'account_budget.report_analyticaccountbudget', data=datas, context=context)
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_budget_analytic_view" model="ir.ui.view">
|
||||
<field name="name">account.budget.analytic.form</field>
|
||||
<field name="model">account.budget.analytic</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period">
|
||||
<group string="This wizard is used to print budget" col="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="check_report" string="Print" type="object" default_focus="1" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_budget_analytic" model="ir.actions.act_window">
|
||||
<field name="name">Print Budgets</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.budget.analytic</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_budget_analytic_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="account_budget_analytic_values">
|
||||
<field name="model_id" ref="analytic.model_account_analytic_account" />
|
||||
<field name="name">Print Budgets</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_budget_analytic'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
class account_budget_crossvered_report(osv.osv_memory):
|
||||
|
||||
_name = "account.budget.crossvered.report"
|
||||
_description = "Account Budget crossovered report"
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'date_from': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_to': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
datas = {
|
||||
'ids': context.get('active_ids', []),
|
||||
'model': 'crossovered.budget',
|
||||
'form': data
|
||||
}
|
||||
datas['form']['ids'] = datas['ids']
|
||||
datas['form']['report'] = 'analytic-full'
|
||||
return self.pool['report'].get_action(cr, uid, [], 'account_budget.report_crossoveredbudget', data=datas, context=context)
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_budget_crossvered_report_view" model="ir.ui.view">
|
||||
<field name="name">account.budget.crossvered.report.form</field>
|
||||
<field name="model">account.budget.crossvered.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period">
|
||||
<group string="This wizard is used to print budget" col="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="check_report" string="Print" type="object" default_focus="1" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_budget_crossvered_report" model="ir.actions.act_window">
|
||||
<field name="name">Print Budgets</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.budget.crossvered.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_budget_crossvered_report_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record model="ir.values" id="account_budget_crossvered_report_values">
|
||||
<field name="model_id" ref="account_budget.model_crossovered_budget" />
|
||||
<field name="name">Print Budgets</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_budget_crossvered_report'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">crossovered.budget</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,34 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
class account_budget_crossvered_summary_report(osv.osv_memory):
|
||||
"""
|
||||
This wizard provides the crossovered budget summary report'
|
||||
"""
|
||||
_name = 'account.budget.crossvered.summary.report'
|
||||
_description = 'Account Budget crossovered summary report'
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'date_from': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_to': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
datas = {
|
||||
'ids': context.get('active_ids',[]),
|
||||
'model': 'crossovered.budget',
|
||||
'form': data
|
||||
}
|
||||
datas['form']['ids'] = datas['ids']
|
||||
datas['form']['report'] = 'analytic-one'
|
||||
return self.pool['report'].get_action(cr, uid, [], 'account_budget.report_crossoveredbudget', data=datas, context=context)
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_budget_crossvered_summary_report_view" model="ir.ui.view">
|
||||
<field name="name">account.budget.crossvered.summary.report.form</field>
|
||||
<field name="model">account.budget.crossvered.summary.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period">
|
||||
<group string="This wizard is used to print summary of budgets">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="check_report" string="Print" type="object" default_focus="1" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_budget_crossvered_summary_report" model="ir.actions.act_window">
|
||||
<field name="name">Print Summary</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.budget.crossvered.summary.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_budget_crossvered_summary_report_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="account_budget_crossvered_summary_report_values">
|
||||
<field name="model_id" ref="account_budget.model_crossovered_budget" />
|
||||
<field name="name">Print Summary</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_budget_crossvered_summary_report'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">crossovered.budget</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
|
||||
class account_budget_report(osv.osv_memory):
|
||||
|
||||
_name = "account.budget.report"
|
||||
_description = "Account Budget report for analytic account"
|
||||
_columns = {
|
||||
'date_from': fields.date('Start of period', required=True),
|
||||
'date_to': fields.date('End of period', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'date_from': lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_to': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
datas = {
|
||||
'ids': context.get('active_ids', []),
|
||||
'model': 'account.budget.post',
|
||||
'form': data
|
||||
}
|
||||
datas['form']['ids'] = datas['ids']
|
||||
datas['form']['report'] = 'analytic-full'
|
||||
return self.pool['report'].get_action(cr, uid, [], 'account_budget.report_budget', data=datas, context=context)
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_budget_report_view" model="ir.ui.view">
|
||||
<field name="name">account.budget.report.form</field>
|
||||
<field name="model">account.budget.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Dates Period">
|
||||
<group string="Print Budgets" col="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="check_report" string="Print" type="object" default_focus="1" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_budget_report" model="ir.actions.act_window">
|
||||
<field name="name">Budgets</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.budget.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_budget_report_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="account_budget_report_values">
|
||||
<field name="model_id" ref="account_budget.model_account_budget_post" />
|
||||
<field name="name">Budgets</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_budget_report'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.budget.post</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user