diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index d4731fa0215..cea696f590f 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -107,8 +107,11 @@ module named account_voucherss
'company_view.xml',
'account_installer.xml',
'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'
],
'demo_xml': [
#'demo/price_accuracy00.yml',
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 37d539a4b25..a2d18095618 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -22,6 +22,7 @@
groups="group_account_user"/>
+
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 09ff866d1a8..b411e404cac 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -37,6 +37,8 @@ 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
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/account_account_report.py b/addons/account/report/account_account_report.py
new file mode 100644
index 00000000000..55e5d7030c7
--- /dev/null
+++ b/addons/account/report/account_account_report.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+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()
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
new file mode 100644
index 00000000000..32e77be341f
--- /dev/null
+++ b/addons/account/report/account_account_report_view.xml
@@ -0,0 +1,92 @@
+
+
+
+
+ account.account.report.tree
+ account.account.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.account.report.graph
+ account.account.report
+ graph
+
+
+
+
+
+
+
+
+
+
+
+ account.account.report.search
+ account.account.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accounts
+ account.account.report
+ form
+ tree,graph
+ {"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
+
+
diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py
new file mode 100644
index 00000000000..2a1b4ad993b
--- /dev/null
+++ b/addons/account/report/account_analytic_entries_report.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class analytic_entries_report(osv.osv):
+ _name = "analytic.entries.report"
+ _description = "Analytic Entries Statistics"
+ _auto = False
+ _columns = {
+ 'date': fields.date('Date', readonly=True),
+ 'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=128, 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),
+ 'user_id' : fields.many2one('res.users', 'User',readonly=True),
+ 'name': fields.char('Description', size=64, readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
+ 'account_id': fields.many2one('account.analytic.account', 'Account', required=True),
+ 'general_account_id': fields.many2one('account.account', 'General Account', required=True),
+ 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
+ 'move_id': fields.many2one('account.move.line', 'Move', required=True),
+ 'product_id': fields.many2one('product.product', 'Product', required=True),
+ 'product_uom_id': fields.many2one('product.uom', 'Product UOM', required=True),
+ 'amount': fields.float('Amount', readonly=True),
+ 'unit_amount': fields.float('Unit Amount', readonly=True),
+ 'amount_currency': fields.float('Amount Currency', readonly=True),
+ 'nbr': fields.integer('#Entries', readonly=True),
+ }
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'analytic_entries_report')
+ cr.execute("""
+ create or replace view analytic_entries_report as (
+ select
+ min(a.id) as id,
+ count(distinct a.id) as nbr,
+ a.create_date as date,
+ to_char(a.create_date, 'YYYY') as year,
+ to_char(a.create_date, 'MM') as month,
+ to_char(a.create_date, 'YYYY-MM-DD') as day,
+ a.user_id as user_id,
+ a.name as name,
+ a.company_id as company_id,
+ a.currency_id as currency_id,
+ a.account_id as account_id,
+ a.general_account_id as general_account_id,
+ a.journal_id as journal_id,
+ a.move_id as move_id,
+ a.product_id as product_id,
+ a.product_uom_id as product_uom_id,
+ sum(a.amount) as amount,
+ sum(a.unit_amount) as unit_amount,
+ sum(a.amount_currency) as amount_currency
+ from
+ account_analytic_line a
+ group by
+ a.create_date, a.user_id,a.name,company_id,a.currency_id,
+ a.account_id,a.general_account_id,a.journal_id,
+ a.move_id,a.product_id,a.product_uom_id
+ )
+ """)
+analytic_entries_report()
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
new file mode 100644
index 00000000000..41d9c0976f2
--- /dev/null
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -0,0 +1,112 @@
+
+
+
+
+ analytic.entries.report.tree
+ analytic.entries.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ analytic.entries.report.search
+ analytic.entries.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.analytic.entries.graph
+ analytic.entries.report
+ graph
+
+
+
+
+
+
+
+
+
+
+ Analytic Entries
+ analytic.entries.report
+ form
+ tree,graph
+ {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
+
+
diff --git a/addons/account/report/account_analytic_report.py b/addons/account/report/account_analytic_report.py
index 45057d950bd..87912b4a3ef 100644
--- a/addons/account/report/account_analytic_report.py
+++ b/addons/account/report/account_analytic_report.py
@@ -35,7 +35,7 @@ class analytic_report(osv.osv):
'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),
- 'quantity': fields.float('Quantity',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),
@@ -43,6 +43,11 @@ class analytic_report(osv.osv):
'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'),
@@ -50,6 +55,7 @@ class analytic_report(osv.osv):
('close','Close'),
('template', 'Template')],
'State', readonly=True),
+
}
_order = 'date_start desc'
def init(self, cr):
@@ -60,15 +66,18 @@ class analytic_report(osv.osv):
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,
- s.quantity,
+ sum(s.quantity) as total_quantity,
s.debit,
s.credit,
s.balance,
@@ -77,7 +86,8 @@ class analytic_report(osv.osv):
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.quantity,
+ 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
)
""")
diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml
index e9336cd1393..838cefe5898 100644
--- a/addons/account/report/account_analytic_report_view.xml
+++ b/addons/account/report/account_analytic_report_view.xml
@@ -9,23 +9,26 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
analytic.report.search
analytic.report
@@ -38,18 +41,15 @@
domain="[('year','=',time.strftime('%%Y'))]"/>
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -65,40 +77,59 @@
string="Template"
domain="[('state','=','template')]"/>
+
-
-
+
+
+
+
-
-
+
+
+
+
+
+
-
-
+
+
-
+
+ account.analytic.report.graph
+ analytic.report
+ graph
+
+
+
+
+
+
+
+
+
+
Analytic Accounts
analytic.report
form
- tree
- {'search_default_User':1,'search_default_user_id':uid}
+ tree,graph
+ {'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
-
-
+
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
new file mode 100644
index 00000000000..85ba8a058f7
--- /dev/null
+++ b/addons/account/report/account_entries_report.py
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class account_entries_report(osv.osv):
+ _name = "account.entries.report"
+ _description = "Entries"
+ _auto = False
+ _rec_name = 'date'
+ _columns = {
+ 'date': fields.date('Effective Date', readonly=True),
+ 'date_created': fields.date('Date Created', readonly=True),
+ 'date_maturity': fields.date('Date Maturity', readonly=True),
+ 'nbr':fields.integer('# of Entries', readonly=True),
+ 'nbl':fields.integer('# of Lines', readonly=True),
+ 'amount': fields.float('Amount',readonly=True),
+ 'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=128, 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),
+ 'ref': fields.char('Reference', size=64,readonly=True),
+ 'period_id': fields.many2one('account.period', 'Period', readonly=True),
+ 'account_id': fields.many2one('account.account', 'Account', readonly=True),
+ 'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
+ 'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
+ help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
+ 'state_2': fields.selection([('draft','Draft'), ('valid','Valid')], 'State of Move Line', readonly=True,
+ help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
+ 'partner_id': fields.many2one('res.partner','Partner', readonly=True),
+ 'period_id2': fields.many2one('account.period', 'Move Line Period', readonly=True),
+ 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
+ 'journal_id2': fields.many2one('account.journal', 'Move Line Journal', readonly=True),
+ 'type': fields.selection([
+ ('pay_voucher','Cash Payment'),
+ ('bank_pay_voucher','Bank Payment'),
+ ('rec_voucher','Cash Receipt'),
+ ('bank_rec_voucher','Bank Receipt'),
+ ('cont_voucher','Contra'),
+ ('journal_sale_vou','Journal Sale'),
+ ('journal_pur_voucher','Journal Purchase'),
+ ('journal_voucher','Journal Voucher'),
+ ],'Type',readonly=True),
+ 'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ }
+ _order = 'date desc'
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'account_entries_report')
+ cr.execute("""
+ create or replace view account_entries_report as (
+ select
+ min(l.id) as id,
+ am.ref as ref,
+ sum(l.quantity) as quantity,
+ am.state as state,
+ l.state as state_2,
+ am.date as date,
+ count(l.id) as nbr,
+ count(distinct am.id) as nbl,
+ l.debit as amount,
+ to_char(am.date, 'YYYY') as year,
+ to_char(am.date, 'MM') as month,
+ to_char(am.date, 'YYYY-MM-DD') as day,
+ am.company_id as company_id,
+ l.account_id as account_id,
+ l.analytic_account_id as analytic_account_id,
+ l.date_created as date_created,
+ l.date_maturity as date_maturity,
+ am.journal_id as journal_id,
+ l.journal_id as journal_id2,
+ l.period_id as period_id2,
+ am.period_id as period_id,
+ l.partner_id as partner_id,
+ l.product_id as product_id,
+ am.type as type
+ from
+ account_move_line l
+ left join
+ account_move am on (am.id=l.move_id)
+ group by am.ref,
+ am.state,
+ am.date,
+ am.company_id,
+ am.journal_id,
+ l.journal_id,
+ am.period_id,
+ l.period_id,
+ am.type,
+ l.partner_id,
+ l.analytic_account_id,
+ l.product_id,
+ l.date_created,
+ l.date_maturity,
+ l.account_id,
+ l.state,
+ l.debit
+ )
+ """)
+
+account_entries_report()
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
new file mode 100644
index 00000000000..c6308ec9928
--- /dev/null
+++ b/addons/account/report/account_entries_report_view.xml
@@ -0,0 +1,127 @@
+
+
+
+
+ account.entries.report.tree
+ account.entries.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.entries.report.graph
+ account.entries.report
+ graph
+
+
+
+
+
+
+
+
+ account.entries.report.search
+ account.entries.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Entries
+ account.entries.report
+ form
+ tree,graph
+ {'search_default_This Month':1,'search_default_Journal':1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index 36fa5a0d132..cd1477e79cf 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -61,6 +61,13 @@ class account_invoice_report(osv.osv):
('paid','Done'),
('cancel','Cancelled')
], 'Order State', readonly=True),
+ 'date_due': fields.date('Due Date', readonly=True),
+ 'address_contact_id': fields.many2one('res.partner.address', 'Contact Address Name', readonly=True),
+ 'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
+ 'account_id': fields.many2one('account.account', 'Account',readonly=True),
+ 'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
+ 'residual':fields.float('Total Residual', readonly=True),
+ 'delay_to_pay':fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
}
_order = 'date desc'
def init(self, cr):
@@ -87,12 +94,24 @@ class account_invoice_report(osv.osv):
(sum(l.quantity*l.price_unit)/sum(l.quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
s.type as type,
- s.state
- from
+ s.state,
+ s.date_due as date_due,
+ s.address_contact_id as address_contact_id,
+ s.address_invoice_id as address_invoice_id,
+ s.account_id as account_id,
+ s.partner_bank as partner_bank,
+ s.residual as residual,
+ case when s.state != 'paid' then null else
+ extract(epoch from avg(am.date_created-l.create_date))/(24*60*60)::decimal(16,2)
+ end as delay_to_pay
+ from
account_invoice_line l
left join
account_invoice s on (s.id=l.invoice_id)
- left join product_uom u on (u.id=l.uos_id)
+ left join product_uom u on (u.id=l.uos_id),
+ account_move_line am left join account_invoice i on (i.move_id=am.move_id)
+ where
+ am.account_id=i.account_id
group by
s.type,
s.date_invoice,
@@ -101,12 +120,18 @@ class account_invoice_report(osv.osv):
l.uos_id,
s.user_id,
s.state,
+ s.residual,
s.company_id,
s.payment_term,
s.period_id,
s.fiscal_position,
s.currency_id,
- s.journal_id
+ s.journal_id,
+ s.date_due,
+ s.address_contact_id,
+ s.address_invoice_id,
+ s.account_id,
+ s.partner_bank
)
""")
account_invoice_report()
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 33d3442ddbb..160a77f6ffa 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -27,6 +27,13 @@
+
+
+
+
+
+
+
@@ -49,7 +56,7 @@
search
-
+
@@ -76,7 +83,6 @@
domain="[('state', '=' ,'open')]"
help = "In progress tasks"/>
-
+
@@ -98,34 +105,50 @@
domain="[('state', '=' ,'cancel')]"
help = "Cancelled tasks"/>
+
+
-
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
+
@@ -141,7 +164,7 @@
-
+
diff --git a/addons/account/report/account_report_view.xml b/addons/account/report/account_report_view.xml
index f0f67b477e3..9b1688730aa 100644
--- a/addons/account/report/account_report_view.xml
+++ b/addons/account/report/account_report_view.xml
@@ -47,7 +47,7 @@
form
tree,graph
-
+
@@ -116,7 +116,7 @@
-
+
report.account.sales.tree
@@ -169,7 +169,7 @@
graph,tree
-
+
@@ -237,7 +237,7 @@
graph,tree
-
+
diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py
index 44c36997495..7e77f025476 100644
--- a/addons/base_calendar/__openerp__.py
+++ b/addons/base_calendar/__openerp__.py
@@ -40,7 +40,7 @@
'wizard/base_calendar_invite_attendee_view.xml',
'base_calendar_view.xml'
],
- "test" : ['test/base_calendar_test.yml'],
+ # "test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}
diff --git a/addons/board_hr/board_hr_view.xml b/addons/board_hr/board_hr_view.xml
index d26b4b2e6cf..44e2b98c96c 100644
--- a/addons/board_hr/board_hr_view.xml
+++ b/addons/board_hr/board_hr_view.xml
@@ -11,7 +11,7 @@
My Expenses
hr.expense.expense
form
- [('state','=','draft'),('user_id','=',uid)]
+ [('state','in',('draft', 'confirm')),('user_id','=',uid)]
diff --git a/addons/board_project/board_project_issue_view.xml b/addons/board_project/board_project_issue_view.xml
index eaf3a2f8612..60103007985 100644
--- a/addons/board_project/board_project_issue_view.xml
+++ b/addons/board_project/board_project_issue_view.xml
@@ -7,24 +7,72 @@
project.issue
form
tree,form
- [('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))]
+ [('user_id','=',uid),('state','in',['draft','open'])]
+
+ Project issues
+ project.issue
+ form
+ tree,form
+ [('user_id','=',uid),('state','=','pending')]
+
+
+
+
+ Project Issue
+ project.issue.report
+ form
+ graph
+ [('user_id','=',uid)]
+
+
+
+
+ project.issue.report.graph
+ project.issue.report
+ graph
+
+
+
+
+
+
+
+
+
+
+ Project Issue
+ project.issue.report
+ form
+ graph
+ [('user_id','=',uid)]
+
+
+
board.project.issue.form
board.board
form
-
diff --git a/addons/board_purchase/board_purchase_view.xml b/addons/board_purchase/board_purchase_view.xml
index 2370e247eec..5548b3f2838 100644
--- a/addons/board_purchase/board_purchase_view.xml
+++ b/addons/board_purchase/board_purchase_view.xml
@@ -8,6 +8,15 @@
name="Purchase"
parent="base.dashboard"/>
+
+ Draft Purchases
+ ir.actions.act_window
+ purchase.order
+ form
+ tree,form
+ [('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]
+
+
Quotation Request
ir.actions.act_window
@@ -26,7 +35,7 @@
@@ -63,135 +70,61 @@
-
+
crm.lead.report.select
crm.lead.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.tree
- crm.lead.report
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -220,7 +153,7 @@
-
+
Opportunities
crm.lead.report
@@ -244,7 +177,7 @@
-
+
diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py
index c1954f8607f..5f7a3eb489c 100644
--- a/addons/crm/report/crm_phonecall_report.py
+++ b/addons/crm/report/crm_phonecall_report.py
@@ -21,6 +21,7 @@
from osv import fields,osv
import tools
+import crm_report
AVAILABLE_STATES = [
('draft','Draft'),
@@ -98,6 +99,13 @@ class crm_phonecall_report(osv.osv):
('object_id.model', '=', 'crm.phonecall')]"),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
+ 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
+ 'duration': fields.float('Duration',readonly=True),
+ 'date': fields.datetime('Planned Date'),
+ 'partner_address_id': fields.many2one('res.partner.address', 'Contact Name', readonly=True)
}
def init(self, cr):
@@ -124,6 +132,13 @@ class crm_phonecall_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
+ c.priority as priority,
+ c.date_closed as date_closed,
+ c.opportunity_id as opportunity_id,
+ c.canal_id as canal_id,
+ c.date as date,
+ c.partner_address_id as partner_address_id,
+ sum(c.duration) as duration,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -131,6 +146,8 @@ class crm_phonecall_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id, c.categ_id,c.partner_id,c.company_id
,to_char(c.create_date, 'YYYY-MM-DD'),c.create_date
+ ,c.priority,c.date_closed,opportunity_id,canal_id,c.date
+ ,partner_address_id
)""")
crm_phonecall_report()
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 72bc4847608..9f19007ae47 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -16,11 +16,18 @@
+
+
+
+
+
+
+
@@ -63,108 +70,46 @@
-
+
crm.phonecall.report.select
crm.phonecall.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_claim/report/crm_claim_report.py b/addons/crm_claim/report/crm_claim_report.py
index 5be9d3c163b..b21521157c6 100644
--- a/addons/crm_claim/report/crm_claim_report.py
+++ b/addons/crm_claim/report/crm_claim_report.py
@@ -113,6 +113,12 @@ class crm_claim_report(osv.osv):
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]"),
+ 'som': fields.many2one('res.partner.som', 'State of Mind'),
+ 'claim_date': fields.datetime('Date Of Claim',readonly=True),
+ 'deadline_date': fields.datetime('Deadline ',readonly=True),
+ 'partner_address_id': fields.many2one('res.partner.address','Contact Name',readonly=True),
}
def init(self, cr):
@@ -142,6 +148,12 @@ class crm_claim_report(osv.osv):
0.0 as perc_cancel,
c.priority as priority,
c.type_id as type_id,
+ c.date_closed as date_closed,
+ c.canal_id as canal_id,
+ c.som as som,
+ c.create_date as claim_date,
+ c.date_deadline as deadline_date,
+ c.partner_address_id as partner_address_id,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -149,7 +161,8 @@ class crm_claim_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- ,c.priority,c.type_id,c.som
+ ,c.priority,c.type_id,c.date_closed,c.canal_id,c.som
+ ,c.create_date,c.date_deadline,c.partner_address_id
)""")
crm_claim_report()
diff --git a/addons/crm_claim/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml
index 6f906f3d21f..615ab54af83 100644
--- a/addons/crm_claim/report/crm_claim_report_view.xml
+++ b/addons/crm_claim/report/crm_claim_report_view.xml
@@ -24,6 +24,12 @@
+
+
+
+
+
+
@@ -67,121 +73,59 @@
-
+
crm.claim.report.select
crm.claim.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_fundraising/report/crm_fundraising_report.py b/addons/crm_fundraising/report/crm_fundraising_report.py
index 5c19689257c..07cee8de89b 100644
--- a/addons/crm_fundraising/report/crm_fundraising_report.py
+++ b/addons/crm_fundraising/report/crm_fundraising_report.py
@@ -21,14 +21,7 @@
from osv import fields,osv
import tools
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Cancelled'),
- ('done', 'Closed'),
- ('pending','Pending')
-]
+import crm_report
class crm_fundraising_report(osv.osv):
"""CRM Fundraising Report"""
@@ -36,7 +29,7 @@ class crm_fundraising_report(osv.osv):
_name = "crm.fundraising.report"
_auto = False
_description = "CRM Fundraising Report"
-
+
def _get_data(self, cr, uid, ids, field_name, arg, context={}):
""" @param cr: the current row, from the database cursor,
@@ -90,7 +83,7 @@ class crm_fundraising_report(osv.osv):
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True),
- 'day': fields.char('Day', size=128, readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.fundraising')]"),
@@ -100,6 +93,13 @@ class crm_fundraising_report(osv.osv):
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company', 'Company'),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
+ 'som': fields.many2one('res.partner.som', 'State of Mind'),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Fundraising Type', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.fundraising')]"),
}
def init(self, cr):
@@ -126,6 +126,11 @@ class crm_fundraising_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
+ c.priority as priority,
+ c.date_closed as date_closed,
+ c.canal_id as canal_id,
+ c.som as som,
+ c.type_id as type_id,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
@@ -135,7 +140,8 @@ class crm_fundraising_report(osv.osv):
crm_fundraising c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
- c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
+ c.create_date,to_char(c.create_date, 'YYYY-MM-DD'),c.priority,c.date_closed
+ ,c.canal_id,c.som,c.type_id
)""")
crm_fundraising_report()
diff --git a/addons/crm_fundraising/report/crm_fundraising_report_view.xml b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
index 73f35ddba50..e6ae295098e 100644
--- a/addons/crm_fundraising/report/crm_fundraising_report_view.xml
+++ b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
@@ -24,6 +24,11 @@
+
+
+
+
+
@@ -72,103 +77,34 @@
crm.fundraising.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py
index cc3f282e9fa..2b0f6b4addf 100644
--- a/addons/hr_expense/report/hr_expense_report.py
+++ b/addons/hr_expense/report/hr_expense_report.py
@@ -45,9 +45,13 @@ class hr_expense_report(osv.osv):
'department_id':fields.many2one('hr.department','Department',readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
+ 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
'price_average':fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
+ 'no_of_products':fields.integer('# of Products', readonly=True),
+ 'no_of_account':fields.integer('# of Accounts', readonly=True),
'state': fields.selection([
('draft', 'Draft'),
('confirm', 'Waiting confirmation'),
@@ -67,6 +71,7 @@ class hr_expense_report(osv.osv):
date_trunc('day',s.create_date) as date,
s.employee_id,
s.journal_id,
+ s.currency_id,
to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_confirm,
to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_valid,
s.invoice_id,
@@ -75,27 +80,33 @@ class hr_expense_report(osv.osv):
to_char(date_trunc('day',s.create_date), 'MM') as month,
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD') as day,
l.product_id as product_id,
+ l.analytic_account as analytic_account,
sum(l.unit_quantity * u.factor) as product_qty,
s.user_id as user_id,
s.company_id as company_id,
sum(l.unit_quantity*l.unit_amount) as price_total,
(sum(l.unit_quantity*l.unit_amount)/sum(l.unit_quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
+ (select unit_quantity from hr_expense_line where id=l.id and product_id is not null) as no_of_products,
+ (select count(analytic_account) from hr_expense_line where id=l.id and analytic_account is not null) as no_of_account,
s.state
- from
- hr_expense_line l
- left join
- hr_expense_expense s on (s.id=l.expense_id)
- left join product_uom u on (u.id=l.uom_id)
+ from hr_expense_line l
+ left join hr_expense_expense s on (s.id=l.expense_id)
+ left join product_uom u on (u.id=l.uom_id)
group by
date_trunc('day',s.create_date),
+ to_char(date_trunc('day',s.create_date), 'YYYY'),
+ to_char(date_trunc('day',s.create_date), 'MM'),
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD'),
to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY'),
to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY'),
l.product_id,
+ l.analytic_account,
s.invoice_id,
+ s.currency_id,
s.department_id,
l.uom_id,
+ l.id,
s.user_id,
s.state,
s.journal_id,
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index 6e7e6beb218..7a50cb71140 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -14,12 +14,16 @@
+
+
+
+
@@ -47,7 +51,7 @@
-
+
+
@@ -95,13 +101,11 @@
domain="[('state','=','cancelled')]"
help = "Cancelled Expenses"/>
-
-
-
+
-
+
@@ -111,13 +115,16 @@
+
+
+
-
+
diff --git a/addons/hr_holidays/report/available_holidays.py b/addons/hr_holidays/report/available_holidays.py
index 4a1972f1f7d..5499a914f6c 100644
--- a/addons/hr_holidays/report/available_holidays.py
+++ b/addons/hr_holidays/report/available_holidays.py
@@ -25,8 +25,9 @@ class available_holidays_report(osv.osv):
_name = "available.holidays.report"
_auto = False
_columns = {
- 'date': fields.datetime('Date', readonly=True),
+ 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=15, 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),
@@ -35,6 +36,7 @@ class available_holidays_report(osv.osv):
'max_leave': fields.float('Allocated Leaves', readonly=True),
'taken_leaves': fields.float('Taken Leaves', readonly=True),
'remaining_leave': fields.float('Remaining Leaves',readonly=True),
+ 'department_id':fields.many2one('hr.department','Department',readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
}
def init(self, cr):
@@ -46,8 +48,10 @@ class available_holidays_report(osv.osv):
date_trunc('day',h.create_date) as date,
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,
h.employee_id as employee_id,
h.user_id as user_id,
+ h.department_id,
h.state as state,
h.holiday_status_id as holiday_status_id,
sum(number_of_days) as remaining_leave,
@@ -68,7 +72,8 @@ class available_holidays_report(osv.osv):
and s.active <> 'f'
group by h.holiday_status_id, h.employee_id,
date_trunc('day',h.create_date),to_char(s.create_date, 'YYYY'),
- to_char(s.create_date, 'MM'),h.user_id,h.state
+ to_char(s.create_date, 'MM'),to_char(s.create_date, 'YYYY-MM-DD'),h.user_id,
+ h.state,h.department_id
)""")
available_holidays_report()
diff --git a/addons/hr_holidays/report/available_holidays_view.xml b/addons/hr_holidays/report/available_holidays_view.xml
index c05e7817236..a89655b503c 100644
--- a/addons/hr_holidays/report/available_holidays_view.xml
+++ b/addons/hr_holidays/report/available_holidays_view.xml
@@ -10,40 +10,32 @@
tree
-
-
-
-
+
+
+
+
+
-
+
+
-
- available.holidays.report.form
- available.holidays.report
- form
-
-
-
-
-
-
-
-
available.holidays.report.graph
available.holidays.report
graph
-
+
+
+
-
+
@@ -55,27 +47,47 @@
-
-
+
+
+
+<<<<<<< TREE
+
+
+
+
+
+
+
+
+
+=======
+>>>>>>> MERGE-SOURCE
+
-
+
-
-
+
+
+
@@ -88,7 +100,7 @@
available.holidays.report
form
tree,graph
- {"search_default_user_id":uid}
+ {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/hr_holidays/report/hr_holidays_report.py b/addons/hr_holidays/report/hr_holidays_report.py
index 87f01cfb17c..29127922dac 100644
--- a/addons/hr_holidays/report/hr_holidays_report.py
+++ b/addons/hr_holidays/report/hr_holidays_report.py
@@ -28,16 +28,19 @@ class hr_holidays_report(osv.osv):
_auto = False
_rec_name = 'date'
_columns = {
- 'date': fields.datetime('Date', readonly=True),
+ 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=15, 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),
- 'date_from' : fields.datetime('Start Date', readonly=True),
- 'date_to' : fields.datetime('End Date', readonly=True),
- 'number_of_days_temp': fields.float('Number of Days', readonly=True),
+ 'date_from' : fields.date('Start Date', readonly=True),
+ 'date_to' : fields.date('End Date', readonly=True),
+ 'number_of_days_temp': fields.float('#Days', readonly=True),
'employee_id' : fields.many2one('hr.employee', "Employee's Name",readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'holiday_status_id' : fields.many2one("hr.holidays.status", "Leave Type",readonly=True),
+ 'department_id':fields.many2one('hr.department','Department',readonly=True),
'state': fields.selection([('draft', 'Draft'),
('confirm', 'Waiting Validation'),
('refuse', 'Refused'),
@@ -52,14 +55,17 @@ class hr_holidays_report(osv.osv):
create or replace view hr_holidays_report as (
select
min(s.id) as id,
- date_trunc('seconds',s.create_date) as date,
+ date_trunc('day',s.create_date) as date,
date_trunc('day',s.date_from) as date_from,
date_trunc('day',s.date_to) as date_to,
- s.number_of_days_temp,
+ sum(s.number_of_days_temp) as number_of_days_temp,
s.employee_id,
s.user_id as user_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,
+ s.holiday_status_id,
+ s.department_id,
s.state
from
hr_holidays s
@@ -67,7 +73,8 @@ class hr_holidays_report(osv.osv):
s.employee_id is not null
group by
s.create_date,s.state,s.date_from,s.date_to,
- s.number_of_days_temp,s.employee_id,s.user_id
+ s.employee_id,s.user_id,s.holiday_status_id,
+ s.department_id
)
""")
hr_holidays_report()
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index 382a5704585..e508e242827 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -7,14 +7,18 @@
tree
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
@@ -27,6 +31,7 @@
+
@@ -37,40 +42,71 @@
search
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
-
-
+
+
+
@@ -81,7 +117,7 @@
hr.holidays.report
form
tree,graph
- {'search_default_employee': 1, "search_default_user_id":uid}
+ {'search_default_month':1,'search_default_Employee':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py
index 49c33084412..00d15ef3f21 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report.py
+++ b/addons/hr_recruitment/report/hr_recruitment_report.py
@@ -105,6 +105,8 @@ class hr_recruitment_report(osv.osv):
'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
'salary_prop' : fields.float("Salary Proposed"),
'salary_exp' : fields.float("Salary Expected"),
+ 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
+ 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact Name',readonly=True),
'available' : fields.float("Availability")
}
@@ -121,7 +123,9 @@ class hr_recruitment_report(osv.osv):
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
s.state,
+ s.partner_id,
s.company_id,
+ s.partner_address_id,
s.user_id,
s.job_id,
s.type_id,
@@ -140,6 +144,8 @@ class hr_recruitment_report(osv.osv):
date_trunc('day',s.create_date),
date_trunc('day',s.date_closed),
s.state,
+ s.partner_id,
+ s.partner_address_id,
s.company_id,
s.user_id,
s.stage_id,
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 6d3eee8fe68..eba079dcc7e 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -13,6 +13,8 @@
+
+
@@ -96,29 +98,36 @@
string="Hired"
name="done"
domain="[('state','=','done')]"/>
-
+
+
-
-
+
+
+
+
+
+
-
+
+
-
-
-
-
+
+
+
+
+
@@ -132,7 +141,11 @@
hr.recruitment.report
form
tree,graph
+<<<<<<< TREE
+ {'search_default_month':1,'search_default_degree':1,'search_default_job':1,'group_by_no_leaf':1,'group_by':[]}
+=======
{'search_default_month':1,'search_default_User':1,'search_default_user_id':uid,'group_by_no_leaf':1,'group_by':[]}
+>>>>>>> MERGE-SOURCE
diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
index 86995aab44c..07d37b270ef 100644
--- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
+++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
@@ -99,7 +99,7 @@
{'search_default_month':1,'search_default_User':1,'search_default_user_id':uid,'group_by_no_leaf':1,'group_by':[]}
-
+
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py
index ee016df56d7..3dd8d161c5f 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report.py
+++ b/addons/hr_timesheet_sheet/report/timesheet_report.py
@@ -33,7 +33,11 @@ class timesheet_report(osv.osv):
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'name': fields.char('Description', size=64,readonly=True),
+ 'product_id' : fields.many2one('product.product', 'Product'),
+ 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
'user_id': fields.many2one('res.users', 'User',readonly=True),
+ 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing',readonly=True),
+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
'nbr': fields.integer('#Nbr',readonly=True),
'company_id': fields.many2one('res.company', 'Company',readonly=True),
'department_id':fields.many2one('hr.department','Department',readonly=True),
@@ -45,9 +49,8 @@ class timesheet_report(osv.osv):
('draft','Draft'),
('confirm','Confirmed'),
('done','Done')], 'State', readonly=True),
- 'total_att': fields.float('Total Timesheet',readonly=True),
- 'total_ts': fields.float('Total Attendance',readonly=True),
- 'total_diff': fields.float('Difference', readonly=True),
+ 'quantity': fields.float('#Quantity',readonly=True),
+ 'cost': fields.float('#Cost',readonly=True),
}
def init(self, cr):
@@ -64,10 +67,12 @@ class timesheet_report(osv.osv):
to_char(htss.date_current,'MM') as month,
to_char(htss.date_current, 'YYYY-MM-DD') as day,
count(*) as nbr,
- sum(day.total_attendance) as total_att,
- sum(day.total_timesheet) as total_ts,
- sum(day.total_difference) as total_diff,
+ sum(aal.unit_amount) as quantity,
+ sum(aal.amount) as cost,
aal.account_id,
+ aal.product_id,
+ aal.to_invoice,
+ aal.general_account_id,
htss.user_id,
htss.company_id,
htss.department_id,
@@ -75,7 +80,6 @@ class timesheet_report(osv.osv):
from account_analytic_line as aal
left join hr_analytic_timesheet as hat ON (hat.line_id=aal.id)
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
- left join hr_timesheet_sheet_sheet_day AS day ON (htss.id = day.sheet_id)
group by
to_char(htss.date_current,'YYYY'),
to_char(htss.date_current,'MM'),
@@ -84,6 +88,9 @@ class timesheet_report(osv.osv):
htss.date_from,
htss.date_to,
htss.date_current,
+ aal.to_invoice,
+ aal.product_id,
+ aal.general_account_id,
htss.name,
htss.company_id,
htss.state,
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index 8358df4cc9e..517937848ff 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -7,10 +7,9 @@
graph
-
-
-
-
+
+
+
@@ -25,12 +24,15 @@
-
-
-
+
+
+
+
+
+
@@ -43,7 +45,7 @@
search
-
+
@@ -63,10 +65,8 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
+
diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py
index 7f48b111d43..d754d6a50ad 100644
--- a/addons/mrp/report/mrp_production_order.py
+++ b/addons/mrp/report/mrp_production_order.py
@@ -27,12 +27,16 @@ class mrp_production_order(osv.osv):
_description = "Production Order Report"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'year': fields.char('Year',size=64,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=64,readonly=True),
'origin': fields.char('Source Document', size=64),
'nbr': fields.integer('# of Orders', readonly=True),
- 'product_id': fields.many2one('product.product', 'Product', readonly=True, domain=[('type','<>','service')]),
+ 'products_to_consume': fields.integer('Products to Consume', readonly=True),
+ 'consumed_products': fields.integer('Consumed Products', readonly=True),
+ 'date': fields.date('Date', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty': fields.float('Product Qty', readonly=True),
'state': fields.selection([('draft','Draft'),
('picking_except', 'Picking Exception'),
@@ -43,14 +47,15 @@ class mrp_production_order(osv.osv):
('done','Done')],
'State', readonly=True),
'date_planned':fields.date('Scheduled Date'),
- 'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', required=True),
+ 'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', readonly=True),
'date_start': fields.datetime('Start Date',readonly=True),
'date_finnished': fields.datetime('End Date',readonly=True),
- 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True),
+ 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', readonly=True),
'company_id': fields.many2one('res.company','Company',readonly=True),
- 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)],readonly=True),
- 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null',readonly=True),
+ 'bom_id': fields.many2one('mrp.bom', 'Bill of Material',readonly=True),
+ 'routing_id': fields.many2one('mrp.routing', string='Routing',readonly=True),
'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True),
+ 'product_uom': fields.many2one('product.uom', 'Product UOM', readonly=True),
'priority': fields.selection([('0','Not urgent'),
('1','Normal'),
('2','Urgent'),
@@ -65,12 +70,27 @@ class mrp_production_order(osv.osv):
create or replace view mrp_production_order as (
select
min(l.id) as id,
- to_char(s.create_date, 'YYYY') as name,
+ to_date(to_char(s.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
+ 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.product_id as product_id,
+ l.product_uom,
sum(l.product_qty * u.factor) as product_qty,
s.company_id as company_id,
count(*) as nbr,
+ (select sum(sm.product_qty) from stock_move as sm
+ left join mrp_production_move_ids as mv on (sm.id=mv.move_id)
+ left join mrp_production_product_line as ll on (ll.production_id=mv.production_id)
+ where sm.product_id=ll.product_id and ll.id=l.id
+ and sm.state not in ('done','cancel')
+ group by sm.product_id) as products_to_consume,
+ (select sum(sm.product_qty)/2 from stock_move as sm
+ left join mrp_production_move_ids as mv on (sm.id=mv.move_id)
+ left join mrp_production_product_line as ll on (ll.production_id=mv.production_id)
+ where sm.product_id=ll.product_id and ll.id=l.id
+ and sm.state in ('done','cancel')
+ group by sm.product_id) as consumed_products,
s.location_src_id,
s.location_dest_id,
s.bom_id,
@@ -82,16 +102,18 @@ class mrp_production_order(osv.osv):
s.origin,
s.priority,
s.state
- from
- mrp_production_product_line l
- left join
- mrp_production s on (s.id=l.production_id)
- left join product_uom u on (u.id=l.product_uom)
+ from mrp_production_product_line l
+ left join mrp_production s on (s.id=l.production_id)
+ left join product_uom u on (u.id=l.product_uom)
group by
to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'),
+ to_char(s.create_date, 'YYYY-MM-DD'),
+ to_date(to_char(s.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY'),
l.product_id,
l.product_uom,
+ s.id,
+ l.id,
s.bom_id,
s.routing_id,
s.picking_id,
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index 1ae2e6b32bb..a97abe846de 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -48,8 +48,8 @@
-
-
+
+
@@ -101,7 +101,7 @@
tree,graph
- {'search_default_Product': 1,'search_default_this_year':1,'search_default_this_month':1}
+ {'search_default_Product': 1}
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index e099b4544aa..1b74c7e5d7c 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -30,17 +30,16 @@ class report_project_task_user(osv.osv):
'name': fields.char('Task Summary', size=128, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year',size=64,required=False, readonly=True),
- 'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'user_id':fields.many2one('res.users', 'Assigned To', readonly=True),
'date_start': fields.datetime('Starting Date',readonly=True),
'no_of_days': fields.integer('#Days', size=128, readonly=True),
'description': fields.text('Description',readonly=True),
- 'date_end': fields.datetime('Ending Date',readonly=True),
+ 'date_end': fields.date('Ending Date',readonly=True),
'date_deadline': fields.date('Deadline',readonly=True),
'project_id':fields.many2one('project.project', 'Project', readonly=True),
'hours_planned': fields.float('Planned Hours', readonly=True),
'hours_effective': fields.float('Effective Hours', readonly=True),
'hours_delay': fields.float('Avg. Plan.-Eff.', readonly=True),
-# 'closing_days': fields.char('Avg Closing Delay', size=64, readonly=True),
'closing_days': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the task"),
@@ -102,7 +101,6 @@ class report_project_task_user(osv.osv):
t.state,
date_trunc('day',t.date_end),
to_date(to_char(t.date_deadline, 'dd-MM-YYYY'),'dd-MM-YYYY'),
- date_trunc('day',t.date_start),
t.company_id,
t.partner_id,
t.type,
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index 9cca4f556e4..a4a072849b9 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -79,13 +79,17 @@
help = "Pending tasks"/>
+
-
-
+
@@ -139,7 +143,7 @@
form
tree,graph
- {'search_default_month':1,'search_default_User':1,'search_default_user_id':uid,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py
index b990142e1ea..513bae085bd 100644
--- a/addons/project_issue/__openerp__.py
+++ b/addons/project_issue/__openerp__.py
@@ -31,8 +31,8 @@
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': [
- 'crm',
'project',
+ 'hr_timesheet_sheet',
],
'init_xml': [
'project_issue_data.xml'
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index 16dc2eb6ae2..6bc02be3ab2 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -68,19 +68,21 @@ class project_issue_report(osv.osv):
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
'nbr': fields.integer('# of Issues', readonly=True),
'delay_close': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
- help="Number of Days to close the project issue"),
+ help="Number of Days to close the project issue"),
+ 'delay_open': fields.float('Avg Opening Delay', digits=(16,2), readonly=True, group_operator="avg",
+ help="Number of Days to open the project issue"),
'company_id' : fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'project_id':fields.many2one('project.project', 'Project',readonly=True),
- 'type_id': fields.many2one('crm.case.resource.type', 'Type', domain="[('object_id.model', '=', 'project.issue')]"),
'date_closed': fields.datetime('Close Date', readonly=True),
+ 'date_open': fields.datetime('Opened', readonly=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
'partner_id': fields.many2one('res.partner','Partner',domain="[('object_id.model', '=', 'project.issue')]"),
'canal_id': fields.many2one('res.partner.canal', 'Channel',readonly=True),
- 'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" )
+ 'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" ),
+ 'partner_address_id': fields.many2one('res.partner.address','Contact ',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'project_issue_report')
@@ -95,19 +97,20 @@ class project_issue_report(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
- c.stage_id,
to_char(c.date_closed, 'YYYY/mm/dd') as date_closed,
u.company_id as company_id,
c.priority as priority,
c.project_id as project_id,
- c.type_id as type_id,
count(*) as nbr,
c.assigned_to,
c.partner_id,
c.canal_id,
c.task_id,
+ c.partner_address_id as partner_address_id,
+ c.date_open as date_open,
date_trunc('day',c.create_date) as create_date,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
+ avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
+ avg(extract('epoch' from (c.date_open-c.create_date)))/(3600*24) as delay_open
from
project_issue c
left join
@@ -120,17 +123,17 @@ class project_issue_report(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
- c.stage_id,
c.date_closed,
u.company_id,
c.priority,
c.project_id,
- c.type_id,
date_trunc('day',c.create_date),
c.assigned_to,
c.partner_id,
c.canal_id,
- c.task_id
+ c.task_id,
+ c.date_open,
+ c.partner_address_id
)""")
@@ -138,4 +141,4 @@ project_issue_report()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index 5729698392f..f15d734f2ab 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -11,23 +11,22 @@
-
-
-
-
-
+
+
+
+
@@ -36,7 +35,7 @@
project.issue.report
graph
-
+
@@ -51,14 +50,10 @@
-
-
-
-
+<<<<<<< TREE
+=======
-
+>>>>>>> MERGE-SOURCE
+
+
+
+<<<<<<< TREE
+=======
+
+>>>>>>> MERGE-SOURCE
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+<<<<<<< TREE
+=======
+
+>>>>>>> MERGE-SOURCE
+
+
+
+
+<<<<<<< TREE
+=======
+
+>>>>>>> MERGE-SOURCE
+
+
+
+
+
+
+
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index 0ebbcd8e519..7dbf2195c16 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -112,7 +112,11 @@
+<<<<<<< TREE
+
+=======
+>>>>>>> MERGE-SOURCE
diff --git a/addons/project_timesheet/report/task_report_view.xml b/addons/project_timesheet/report/task_report_view.xml
index ce5a86b13a7..7093582d7fc 100644
--- a/addons/project_timesheet/report/task_report_view.xml
+++ b/addons/project_timesheet/report/task_report_view.xml
@@ -74,10 +74,6 @@
-
-
-
-
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py
index 76d018680d2..cf177319ea5 100644
--- a/addons/purchase/report/purchase_report.py
+++ b/addons/purchase/report/purchase_report.py
@@ -54,6 +54,12 @@ class purchase_report(osv.osv):
'location_id': fields.many2one('stock.location', 'Destination', readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position',readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
+ 'partner_address_id':fields.many2one('res.partner.address', 'Address Contact Name', readonly=True),
+ 'dest_address_id':fields.many2one('res.partner.address', 'Dest. Address Contact Name',readonly=True),
+ 'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', readonly=True),
+ 'date_approve':fields.date('Date Approved', readonly=True),
+ 'expected_date':fields.date('Expected Date', readonly=True),
+ 'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
'quantity': fields.float('# of Products', readonly=True),
@@ -76,6 +82,12 @@ class purchase_report(osv.osv):
to_char(s.date_order, 'MM') as month,
to_char(s.date_order, 'YYYY-MM-DD') as day,
s.state,
+ s.date_approve,
+ date_trunc('day',s.minimum_planned_date) as expected_date,
+ s.partner_address_id,
+ s.dest_address_id,
+ s.pricelist_id,
+ s.validator,
s.warehouse_id as warehouse_id,
s.partner_id as partner_id,
s.fiscal_position,
@@ -97,6 +109,12 @@ class purchase_report(osv.osv):
s.create_uid,
s.partner_id,
s.location_id,
+ s.date_approve,
+ date_trunc('day',s.minimum_planned_date),
+ s.partner_address_id,
+ s.pricelist_id,
+ s.validator,
+ s.dest_address_id,
l.product_id,
s.date_order,
to_char(s.date_order, 'YYYY'),
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index 6f923c0440e..49caced7a6b 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -21,6 +21,8 @@
+
+
@@ -32,6 +34,10 @@
+
+
+
+
@@ -46,7 +52,7 @@
search
-
+
@@ -71,44 +77,60 @@
domain="[('state','=','manual')]"/>
+
+
-
-
-
+
+
+
+
-
+
+
+
+
+
-
-
+
+
+
+
+
-
+
+
+
+
+
+
-
+
+
-
+
diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py
index d1081a4b21f..c8b616ced78 100644
--- a/addons/sale/report/sale_report.py
+++ b/addons/sale/report/sale_report.py
@@ -57,6 +57,12 @@ class sale_report(osv.osv):
('done', 'Done'),
('cancel', 'Cancelled')
], 'Order State', readonly=True),
+ 'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
+ 'partner_order_id': fields.many2one('res.partner.address', 'Ordering Contact Name', readonly=True),
+ 'partner_shipping_id': fields.many2one('res.partner.address', 'Shipping Address Name', readonly=True),
+ 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True),
+ 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
+ 'date_confirm': fields.date('Confirmation Date', readonly=True)
}
_order = 'date desc'
def init(self, cr):
@@ -81,7 +87,13 @@ class sale_report(osv.osv):
sum(l.product_uom_qty*l.price_unit) as price_total,
(sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
- s.state
+ s.state,
+ s.partner_invoice_id as partner_invoice_id,
+ s.partner_order_id as partner_order_id,
+ s.partner_shipping_id as partner_shipping_id,
+ s.pricelist_id as pricelist_id,
+ s.project_id as analytic_account_id,
+ s.date_confirm as date_confirm
from
sale_order_line l
left join
@@ -97,7 +109,13 @@ class sale_report(osv.osv):
s.shop_id,
s.company_id,
s.fiscal_position,
- s.payment_term
+ s.payment_term,
+ s.partner_invoice_id,
+ s.partner_order_id,
+ s.partner_shipping_id,
+ s.pricelist_id,
+ s.project_id,
+ s.date_confirm
)
""")
sale_report()
@@ -167,10 +185,14 @@ class product_bought_by_sale_order(osv.osv):
_name = "product.bought.by.sale.order"
_description = "Product bought by sale order"
_auto = False
- _rec_name = 'partner'
+ _rec_name = 'month'
_columns = {
'total_products': fields.integer('Total Products', readonly=True),
- 'name': fields.char('Sale order', size=64, readonly=True)
+ 'product_id':fields.many2one('product.product', 'Product', 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),
+ 'year': fields.char('Year', size=64, readonly=True)
}
_order = 'total_products desc'
def init(self, cr):
@@ -179,8 +201,10 @@ class product_bought_by_sale_order(osv.osv):
create or replace view product_bought_by_sale_order as (
select
min(s.id) as id,
- count(*) as total_products,
- s.name as name
+ l.product_id as product_id,
+ to_char(l.create_date, 'MM') as month,
+ to_char(l.create_date, 'YYYY') as year,
+ count(*) as total_products
from
sale_order_line l
left join
@@ -188,7 +212,7 @@ class product_bought_by_sale_order(osv.osv):
where
s.state='manual' or s.state='progress'
group by
- s.name
+ l.product_id, to_char(l.create_date, 'MM'), to_char(l.create_date, 'YYYY')
)
""")
product_bought_by_sale_order()
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index fdfb1b5d2c9..fe88fa33555 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -24,6 +24,12 @@
+
+
+
+
+
+
@@ -93,8 +99,16 @@
+
+
+
+
+
+
+
+
@@ -108,9 +122,16 @@
+
+
+
+
+
+
+
-
+
@@ -201,7 +222,9 @@
tree
-
+
+
+
@@ -213,8 +236,9 @@
graph
-
-
+
+
+
@@ -223,7 +247,8 @@
Product bought by sale order
product.bought.by.sale.order
form
- tree,graph
+ graph,tree
+ [('year','=', time.strftime('%Y'))]
diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py
index 7f4ac801399..b6e2a3d3373 100644
--- a/addons/stock/report/report_stock_picking.py
+++ b/addons/stock/report/report_stock_picking.py
@@ -30,17 +30,30 @@ class report_stock_picking(osv.osv):
'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),
- 'reference': fields.char('Reference', size=64, select=True),
'nbr': fields.integer('# of Lines', readonly=True),
'nbp': fields.integer('# of Picking', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'product_qty': fields.float('# of Products', readonly=True),
+ 'product_uos_qty': fields.float('# of Products', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
'date': fields.date('Date', readonly=True),
'avg_days_to_deliver': fields.float('Avg Days to Deliver', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Avg Days to deliver"),
- 'origin': fields.char('Origin', size=64),
'state': fields.selection([('draft', 'Draft'),('auto', 'Waiting'),('confirmed', 'Confirmed'),('assigned', 'Available'),('done', 'Done'),('cancel', 'Cancelled')], 'State'),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'invoice_state': fields.selection([
+ ("invoiced", "Invoiced"),
+ ("2binvoiced", "To Be Invoiced"),
+ ("none", "Not from Picking")], "Invoice Status",readonly=True),
+ 'min_date': fields.date('Expected Date',help="Expected date for Picking. Default it takes current date"),
+ 'order_date': fields.date('Order Date', help="Date of Order"),
+ 'date_done': fields.date('Date Done', help="Date of completion"),
+ 'location_id': fields.many2one('stock.location', 'Source Location', help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
+ 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', help="Location where the system will stock the finished products."),
+ 'max_date': fields.date('Max.Expected Date'),
+ 'product_uos': fields.many2one('product.uom', 'Product UOS'),
+ 'product_uom': fields.many2one('product.uom', 'Product UOM'),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_stock_picking')
@@ -48,6 +61,10 @@ class report_stock_picking(osv.osv):
create or replace view report_stock_picking as (
select
min(sm.id) as id,
+ date_trunc('day',sp.min_date) as min_date,
+ date_trunc('day',sp.date) as order_date,
+ date_trunc('day',sp.date_done) as date_done,
+ date_trunc('day',sp.max_date) as max_date,
to_char(sp.create_date, 'YYYY') as year,
to_char(sp.create_date, 'MM') as month,
to_char(sp.create_date, 'YYYY-MM-DD') as day,
@@ -56,19 +73,37 @@ class report_stock_picking(osv.osv):
count(sm.id) as nbr,
count(distinct sp.id) as nbp,
sum(sm.product_qty) as product_qty,
+ sum(sm.product_uos_qty) as product_uos_qty,
+ sm.product_id as product_id,
+ sm.location_dest_id as location_dest_id,
+ sm.location_id as location_id,
sp.type,
- sp.name as reference,
- sp.origin,
+ sm.product_uos,
+ sm.product_uom,
+ sp.invoice_state,
+ sp.company_id as company_id,
avg(extract('epoch' from (sp.date_done-sp.create_date)))/(3600*24) as avg_days_to_deliver,
sp.state
from stock_move as sm
left join stock_picking as sp ON (sm.picking_id=sp.id)
group by sp.type,
- sp.create_date,
- sp.address_id,
- sp.name,
- sp.origin,
- sp.state
+ sp.create_date,
+ sp.address_id,
+ sm.product_id,
+ to_char(sp.create_date, 'YYYY'),
+ sm.location_dest_id,
+ sm.location_id,
+ to_char(sp.create_date, 'MM'),
+ to_char(sp.create_date, 'YYYY-MM-DD'),
+ sm.product_uos,
+ sm.product_uom,
+ date_trunc('day',sp.min_date),
+ date_trunc('day',sp.date),
+ date_trunc('day',sp.date_done),
+ date_trunc('day',sp.max_date),
+ sp.invoice_state,
+ sp.company_id,
+ sp.state
)""")
report_stock_picking()