[IMP] Account: Generic Chart Of Account modify and misc changes
bzr revid: mra@mra-laptop-20100816111833-n5eornoi3rhwks4f
This commit is contained in:
parent
83a0799e2f
commit
06e635e61e
|
@ -114,8 +114,6 @@ module named account_voucher.
|
|||
'report/account_invoice_report_view.xml',
|
||||
'report/account_entries_report_view.xml',
|
||||
'report/account_report_view.xml',
|
||||
'report/account_analytic_report_view.xml',
|
||||
'report/account_account_report_view.xml',
|
||||
'report/account_analytic_entries_report_view.xml',
|
||||
'board_account_view.xml',
|
||||
"wizard/account_report_profit_loss_view.xml",
|
||||
|
|
|
@ -86,6 +86,12 @@
|
|||
<field name="field">state</field>
|
||||
<field eval="14" name="sequence"/>
|
||||
</record>
|
||||
<record id="bank_col20" model="account.journal.column">
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="field">reconcile_id</field>
|
||||
<field eval="20" name="sequence"/>
|
||||
</record>
|
||||
|
||||
<record id="account_journal_bank_view_multi" model="account.journal.view">
|
||||
<field name="name">Bank/Cash Journal (Multi-Currency) View</field>
|
||||
|
@ -166,6 +172,12 @@
|
|||
<field name="field">state</field>
|
||||
<field eval="16" name="sequence"/>
|
||||
</record>
|
||||
<record id="bank_col20_multi" model="account.journal.column">
|
||||
<field name="view_id" ref="account_journal_bank_view_multi"/>
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="field">reconcile_id</field>
|
||||
<field eval="20" name="sequence"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="account_journal_view" model="account.journal.view">
|
||||
|
@ -328,6 +340,12 @@
|
|||
<field name="field">state</field>
|
||||
<field eval="14" name="sequence"/>
|
||||
</record>
|
||||
<record id="sp_journal_col20" model="account.journal.column">
|
||||
<field name="view_id" ref="account_sp_journal_view"/>
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="field">reconcile_id</field>
|
||||
<field eval="20" name="sequence"/>
|
||||
</record>
|
||||
|
||||
<record id="account_sp_refund_journal_view" model="account.journal.view">
|
||||
<field name="name">Sale/Purchase Refund Journal View</field>
|
||||
|
@ -420,6 +438,13 @@
|
|||
<field name="field">state</field>
|
||||
<field eval="14" name="sequence"/>
|
||||
</record>
|
||||
<record id="sp_refund_journal_col20" model="account.journal.column">
|
||||
<field name="view_id" ref="account_sp_refund_journal_view"/>
|
||||
<field name="name">Reconcile</field>
|
||||
<field name="field">reconcile_id</field>
|
||||
<field eval="20" name="sequence"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Account Journal Sequences
|
||||
-->
|
||||
|
|
|
@ -219,10 +219,12 @@ class account_installer(osv.osv_memory):
|
|||
vals_seq = {
|
||||
'name': _('Bank Journal '),
|
||||
'code': 'account.journal',
|
||||
'prefix': 'BAN/',
|
||||
'padding': 5
|
||||
}
|
||||
seq_id = obj_sequence.create(cr,uid,vals_seq)
|
||||
|
||||
#create the bank journal
|
||||
#create the bank journals
|
||||
vals_journal = {}
|
||||
vals_journal['name']= _('Bank Journal ')
|
||||
vals_journal['code']= _('BNK')
|
||||
|
@ -238,9 +240,21 @@ class account_installer(osv.osv_memory):
|
|||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
for val in record.bank_accounts_id:
|
||||
if val.account_type == 'cash':type = cash_type_id
|
||||
elif val.account_type == 'bank':type = bank_type_id
|
||||
else:type = check_type_id
|
||||
seq_prefix = None
|
||||
seq_padding = 5
|
||||
if val.account_type == 'cash':
|
||||
type = cash_type_id
|
||||
seq_prefix = "CSH/"
|
||||
elif val.account_type == 'bank':
|
||||
type = bank_type_id
|
||||
seq_prefix = "BAN/"
|
||||
elif val.account_type == 'check':
|
||||
type = check_type_id
|
||||
seq_prefix = "CHK/"
|
||||
else:
|
||||
type = check_type_id
|
||||
seq_padding = None
|
||||
|
||||
vals_bnk = {'name': val.acc_name or '',
|
||||
'currency_id': val.currency_id.id or False,
|
||||
'code': str(110400 + code_cnt),
|
||||
|
@ -252,6 +266,8 @@ class account_installer(osv.osv_memory):
|
|||
vals_seq_child = {
|
||||
'name': _(vals_bnk['name']),
|
||||
'code': 'account.journal',
|
||||
'prefix': seq_prefix,
|
||||
'padding': seq_padding
|
||||
}
|
||||
seq_id = obj_sequence.create(cr, uid, vals_seq_child)
|
||||
|
||||
|
@ -272,7 +288,7 @@ class account_installer(osv.osv_memory):
|
|||
code_cnt += 1
|
||||
|
||||
|
||||
#reactivate the parent_store functionnality on account_account
|
||||
#reactivate the parent_store functionality on account_account
|
||||
self.pool._init = False
|
||||
self.pool.get('account.account')._parent_store_compute(cr)
|
||||
|
||||
|
@ -292,8 +308,20 @@ class account_installer(osv.osv_memory):
|
|||
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
|
||||
|
||||
if seq_journal:
|
||||
seq_id_sale = obj_sequence.search(cr,uid,[('name','=','Sale Journal')])[0]
|
||||
seq_id_purchase = obj_sequence.search(cr,uid,[('name','=','Purchase Journal')])[0]
|
||||
seq_sale = {
|
||||
'name': 'Sale Journal',
|
||||
'code': 'account.journal',
|
||||
'prefix': 'INV/',
|
||||
'padding': 4
|
||||
}
|
||||
seq_id_sale = obj_sequence.create(cr, uid, seq_sale)
|
||||
seq_purchase = {
|
||||
'name': 'Purchase Journal',
|
||||
'code': 'account.journal',
|
||||
'prefix': 'VEN/',
|
||||
'padding': 4
|
||||
}
|
||||
seq_id_purchase = obj_sequence.create(cr, uid, seq_purchase)
|
||||
else:
|
||||
seq_id_sale = seq_id
|
||||
seq_id_purchase = seq_id
|
||||
|
@ -323,7 +351,42 @@ class account_installer(osv.osv_memory):
|
|||
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.property_account_expense_categ.id]
|
||||
|
||||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
# Creating Journals Sales Refund and Purchase Refund
|
||||
vals_journal={}
|
||||
data_id = mod_obj.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_refund_journal_view')])
|
||||
data = mod_obj.browse(cr, uid, data_id[0])
|
||||
view_id = data.res_id
|
||||
|
||||
seq_id_sale_refund = seq_id_sale
|
||||
seq_id_purchase_refund = seq_id_purchase
|
||||
|
||||
vals_journal['view_id'] = view_id
|
||||
|
||||
#Sales Refund Journal
|
||||
vals_journal['name'] = _('Sales Refund Journal')
|
||||
vals_journal['type'] = 'sale_refund'
|
||||
vals_journal['code'] = _('SCNJ')
|
||||
vals_journal['sequence_id'] = seq_id_sale_refund
|
||||
|
||||
if obj_multi.property_account_receivable:
|
||||
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.property_account_income_categ.id]
|
||||
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.property_account_income_categ.id]
|
||||
|
||||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
# Purchase Refund Journal
|
||||
vals_journal['name'] = _('Purchase Refund Journal')
|
||||
vals_journal['type'] = 'purchase_refund'
|
||||
vals_journal['code'] = _('ECNJ')
|
||||
vals_journal['sequence_id'] = seq_id_purchase_refund
|
||||
|
||||
if obj_multi.property_account_payable:
|
||||
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.property_account_expense_categ.id]
|
||||
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.property_account_expense_categ.id]
|
||||
|
||||
obj_journal.create(cr,uid,vals_journal)
|
||||
|
||||
# Bank Journals
|
||||
view_id_cash = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal View')])[0] #TOFIX: Why put fixed name ?
|
||||
view_id_cur = self.pool.get('account.journal.view').search(cr, uid, [('name','=','Bank/Cash Journal (Multi-Currency) View')])[0] #TOFIX: why put fixed name?
|
||||
|
|
|
@ -35,12 +35,11 @@ import account_balance_landscape
|
|||
import compare_account_balance
|
||||
import account_invoice_report
|
||||
import account_report
|
||||
import account_analytic_report
|
||||
import account_account_report
|
||||
import account_entries_report
|
||||
import account_analytic_entries_report
|
||||
import voucher_print
|
||||
import account_balance_sheet
|
||||
import account_profit_loss
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import tools
|
||||
from osv import fields,osv
|
||||
|
||||
class account_account_report(osv.osv):
|
||||
_name = "account.account.report"
|
||||
_description = "Account Report"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=128, readonly=True),
|
||||
'code': fields.char('Code', size=64, readonly=True),
|
||||
'type': fields.selection([
|
||||
('receivable', 'Receivable'),
|
||||
('payable', 'Payable'),
|
||||
('view', 'View'),
|
||||
('consolidation', 'Consolidation'),
|
||||
('other', 'Others'),
|
||||
('closed', 'Closed'),
|
||||
], 'Internal Type', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate', readonly=True),
|
||||
'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True),
|
||||
'quantity': fields.float('Quantity', readonly=True),
|
||||
'amount_total': fields.float('Total Amount', readonly=True),
|
||||
'credit': fields.float('Credit', readonly=True),
|
||||
'debit': fields.float('Debit', readonly=True),
|
||||
'balance': fields.float('Balance', readonly=True),
|
||||
'nbr': fields.integer('#Accounts', readonly=True),
|
||||
'parent_account_id': fields.many2one('account.account', 'Parent Account', required=True),
|
||||
}
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'account_account_report')
|
||||
cr.execute("""
|
||||
create or replace view account_account_report as (
|
||||
select
|
||||
min(a.id) as id,
|
||||
count(distinct a.id) as nbr,
|
||||
a.name,
|
||||
a.code,
|
||||
a.type as type,
|
||||
a.company_id as company_id,
|
||||
a.currency_mode as currency_mode,
|
||||
a.user_type as user_type,
|
||||
a.parent_id as parent_account_id,
|
||||
sum(ail.quantity) as quantity,
|
||||
sum(ail.price_subtotal) as amount_total,
|
||||
sum(m.credit) as credit,
|
||||
sum(m.debit) as debit,
|
||||
(sum(m.credit)-sum(m.debit)) as balance
|
||||
from
|
||||
account_account as a
|
||||
left join account_move_line as m on m.account_id=a.id
|
||||
left join account_invoice_line as ail on ail.account_id=a.id
|
||||
left join account_invoice as ai on ai.account_id=a.id
|
||||
group by
|
||||
a.name,
|
||||
a.code,
|
||||
a.type,
|
||||
a.company_id,
|
||||
a.currency_mode,
|
||||
a.user_type,
|
||||
m.account_id,
|
||||
a.parent_id
|
||||
)
|
||||
""")
|
||||
account_account_report()
|
|
@ -1,94 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_account_report_tree" model="ir.ui.view">
|
||||
<field name="name">account.account.report.tree</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Accounts Analysis">
|
||||
<field name="name" invisible="1" string="Account"/>
|
||||
<field name="code" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1" group="base.multi_company"/>
|
||||
<field name="currency_mode" invisible="1"/>
|
||||
<field name="nbr" sum="#Accounts"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="parent_account_id" invisible="1"/>
|
||||
<field name="quantity" sum="Quantity"/>
|
||||
<field name="amount_total" sum="Total Amount"/>
|
||||
<field name="credit" sum="Credit"/>
|
||||
<field name="debit" sum="Debit"/>
|
||||
<field name="balance" sum="Balance"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_account_report_graph" model="ir.ui.view">
|
||||
<field name="name">account.account.report.graph</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Accounts Analysis" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_account_report_search" model="ir.ui.view">
|
||||
<field name="name">account.account.report.search</field>
|
||||
<field name="model">account.account.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Accounts Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-today"
|
||||
string="At Date"
|
||||
domain="[('currency_mode','=', 'current')]"/>
|
||||
<filter icon="terp-stock_format-default"
|
||||
string="Average Rate"
|
||||
domain="[('currency_mode','=','average')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Account"/>
|
||||
<field name="code"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Account" name="Account" icon="terp-folder-orange" context="{'group_by':'name'}"/>
|
||||
<filter string="Code" icon="terp-stock_format-scientific" context="{'group_by':'code'}"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Currencies Rate" icon="terp-dolar" context="{'group_by':'currency_mode'}"/>
|
||||
<filter string="Internal Type" icon="terp-go-home" context="{'group_by':'type'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Parent Account" icon="terp-folder-orange" context="{'group_by':'parent_account_id'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="parent_account_id" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type" />
|
||||
<field name="user_type" widget="selection"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_account_report" model="ir.actions.act_window">
|
||||
<field name="name">Accounts Analysis</field>
|
||||
<field name="res_model">account.account.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_account_account_report_search"/>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem action="action_account_account_report" id="menu_action_account_account_report" parent="account.menu_finance_statistic_report_statement" sequence="6"/>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,94 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import tools
|
||||
from osv import fields,osv
|
||||
|
||||
class analytic_report(osv.osv):
|
||||
_name = "analytic.report"
|
||||
_description = "Analytic Accounts Statistics"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'date_start': fields.date('Date Start', readonly=True),
|
||||
'date_end': fields.date('Date End', readonly=True),
|
||||
'name' : fields.char('Analytic Account', size=128, readonly=True),
|
||||
'partner_id' : fields.many2one('res.partner', 'Associated Partner', readonly=True),
|
||||
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', readonly=True),
|
||||
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
|
||||
'user_id' : fields.many2one('res.users', 'Account Manager', readonly=True),
|
||||
'product_id' : fields.many2one('product.product', 'Product', readonly=True),
|
||||
'total_quantity': fields.float('# Total Quantity', readonly=True),
|
||||
'debit' : fields.float('Debit', readonly=True),
|
||||
'credit' : fields.float('Credit', readonly=True),
|
||||
'balance' : fields.float('Balance', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'nbr':fields.integer('# of Lines', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type'),
|
||||
|
||||
'state': fields.selection([('draft','Draft'),
|
||||
('open','Open'),
|
||||
('pending','Pending'),
|
||||
('cancelled', 'Cancelled'),
|
||||
('close','Close'),
|
||||
('template', 'Template')],
|
||||
'State', readonly=True),
|
||||
|
||||
}
|
||||
_order = 'date_start desc'
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'analytic_report')
|
||||
cr.execute("""
|
||||
create or replace view analytic_report as (
|
||||
select
|
||||
min(s.id) as id,
|
||||
to_char(s.create_date, 'YYYY') as year,
|
||||
to_char(s.create_date, 'MM') as month,
|
||||
to_char(s.create_date, 'YYYY-MM-DD') as day,
|
||||
l.journal_id,
|
||||
l.product_id,
|
||||
s.parent_id,
|
||||
s.date_start,
|
||||
s.date as date_end,
|
||||
s.user_id,
|
||||
s.company_id,
|
||||
s.type,
|
||||
s.name,
|
||||
s.partner_id,
|
||||
sum(s.quantity) as total_quantity,
|
||||
s.debit,
|
||||
s.credit,
|
||||
s.balance,
|
||||
count(*) as nbr,
|
||||
s.state
|
||||
from account_analytic_account s
|
||||
left join account_analytic_line l on (s.id=l.account_id)
|
||||
GROUP BY s.create_date,s.state,l.journal_id,s.name,
|
||||
s.partner_id,s.date_start,s.date,s.user_id,
|
||||
s.company_id,s.type,
|
||||
s.debit,s.credit,s.balance,s.parent_id,l.product_id
|
||||
)
|
||||
""")
|
||||
analytic_report()
|
|
@ -1,128 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_analytic_report_tree" model="ir.ui.view">
|
||||
<field name="name">analytic.report.tree</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Analytic Accounts Analysis">
|
||||
<field name="parent_id" invisible="1" string="Analytic Account"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="journal_id" string="Analytic Journal" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="date_start" invisible="1"/>
|
||||
<field name="date_end" invisible="1"/>
|
||||
<field name="total_quantity" sum=" # Total Quantity"/>
|
||||
<field name="nbr" sum ="# of Lines"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="debit" sum ="Debit"/>
|
||||
<field name="credit" sum ="Credit"/>
|
||||
<field name="balance" sum ="Balance"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_analytic_report_search" model="ir.ui.view">
|
||||
<field name="name">analytic.report.search</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Accounts Analysis">
|
||||
<group>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')),('day','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="This Month"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('day','<=', time.strftime('%%Y-%%m-%%d')), ('day','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Analytic Accounts during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="product_id" />
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-folder-orange"
|
||||
string="My Accounts"
|
||||
help="My Account"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Associated Partner" icon="terp-personal+" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Analytic Journal" icon="terp-folder-green" context="{'group_by':'journal_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Account Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="state"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_analytic_report_search" model="ir.ui.view">
|
||||
<field name="name">account.analytic.report.graph</field>
|
||||
<field name="model">analytic.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Analytic Accounts Analysis" type="bar">
|
||||
<field name="user_id"/>
|
||||
<field name="credit" operator="+"/>
|
||||
<field name="debit" operator="+"/>
|
||||
<field name="balance" operator="+"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_analytic_report_all" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Accounts Analysis</field>
|
||||
<field name="res_model">analytic.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_analytic_report_search"/>
|
||||
</record>
|
||||
<!-- <menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_statistic_report_statement" sequence="8"/>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -88,7 +88,6 @@
|
|||
"access_report_account_type_sales","report.account_type.sales","model_report_account_type_sales","account.group_account_manager",1,0,0,0
|
||||
"access_report_account_sales","report.account.sales","model_report_account_sales","account.group_account_manager",1,0,0,0
|
||||
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_manager",1,1,1,1
|
||||
"access_account_account_report_manager","account.account.report","model_account_account_report","account.group_account_manager",1,0,0,0
|
||||
"access_res_partner_group_account_manager","res_partner group_account_manager","model_res_partner","account.group_account_manager",1,1,1,1
|
||||
"access_account_invoice_accountant","account.invoice accountant","model_account_invoice","account.group_account_user",1,0,0,0
|
||||
"access_account_tax_code_accountant","account.tax.code accountant","model_account_tax_code","account.group_account_user",1,1,1,1
|
||||
|
@ -149,7 +148,6 @@
|
|||
"access_account_invoice_line_accountant","account.invoice.line accountant","model_account_invoice_line","account.group_account_user",1,0,0,0
|
||||
"access_res_partner_address_accountant","res.partner.address accountant","base.model_res_partner_address","account.group_account_user",1,0,0,0
|
||||
"access_account_invoice_line_manager","account.invoice.line manager","model_account_invoice_line","account.group_account_manager",1,0,0,0
|
||||
"access_analytic_report_manager","analytic.report manager","model_analytic_report","account.group_account_manager",1,1,1,1
|
||||
"access_account_account_invoice","account.account invoice","model_account_account","account.group_account_invoice",1,1,1,1
|
||||
"access_res_partner_address_invoice","res.partner.address invoice","base.model_res_partner_address","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_line_system","account.invoice.line system","model_account_invoice_line","base.group_system",1,0,0,0
|
||||
|
|
|
Loading…
Reference in New Issue