diff --git a/addons/account/account.py b/addons/account/account.py
index f9ec8763fc5..cf79514bcf8 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -758,7 +758,7 @@ class account_move(osv.osv):
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}),
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State', required=True, readonly=True,
- help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Valid\' state.'),
+ help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
'to_check': fields.boolean('To Be Verified'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
diff --git a/addons/report_account/report_receivable.py b/addons/report_account/report_receivable.py
index 45dc1f5a376..8d106193cf7 100644
--- a/addons/report_account/report_receivable.py
+++ b/addons/report_account/report_receivable.py
@@ -24,6 +24,7 @@ import datetime
import mx.DateTime
import pooler
+import tools
from osv import fields,osv
@@ -207,21 +208,25 @@ class report_account_type_sales(osv.osv):
_description = "Report of the Sales by Account Type"
_auto = False
_columns = {
- 'name': fields.char('Month', size=64, readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'period_id': fields.many2one('account.period', 'Force Period',readonly=True),
'product_id': fields.many2one('product.product', 'Product',readonly=True),
'quantity': fields.float('Quantity', readonly=True),
'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True),
'amount_total': fields.float('Total', readonly=True),
- 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', 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),
}
_order = 'name desc,amount_total desc'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_account_type_sales')
cr.execute("""create or replace view report_account_type_sales as (
select
min(inv_line.id) as id,
- to_char(inv.date_invoice, 'YYYY-MM-01') as name,
+ to_char(inv.date_invoice, 'YYYY') as name,
+ to_char(inv.date_invoice,'MM') as month,
sum(inv_line.price_subtotal) as amount_total,
inv.currency_id as currency_id,
inv.period_id,
@@ -235,7 +240,7 @@ class report_account_type_sales(osv.osv):
where
inv.state in ('open','paid')
group by
- to_char(inv.date_invoice, 'YYYY-MM-01'),inv.currency_id, inv.period_id, inv_line.product_id, account.user_type
+ to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.user_type
)""")
report_account_type_sales()
@@ -245,21 +250,25 @@ class report_account_sales(osv.osv):
_description = "Report of the Sales by Account"
_auto = False
_columns = {
- 'name': fields.char('Month', size=64, readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'period_id': fields.many2one('account.period', 'Force Period',readonly=True),
'product_id': fields.many2one('product.product', 'Product',readonly=True),
'quantity': fields.float('Quantity', readonly=True),
'account_id': fields.many2one('account.account', 'Account', readonly=True),
'amount_total': fields.float('Total', readonly=True),
- 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', 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),
}
_order = 'name desc,amount_total desc'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_account_sales')
cr.execute("""create or replace view report_account_sales as (
select
min(inv_line.id) as id,
- to_char(inv.date_invoice, 'YYYY-MM-01') as name,
+ to_char(inv.date_invoice, 'YYYY') as name,
+ to_char(inv.date_invoice,'MM') as month,
sum(inv_line.price_subtotal) as amount_total,
inv.currency_id as currency_id,
inv.period_id,
@@ -273,7 +282,7 @@ class report_account_sales(osv.osv):
where
inv.state in ('open','paid')
group by
- to_char(inv.date_invoice, 'YYYY-MM-01'),inv.currency_id, inv.period_id, inv_line.product_id, account.id
+ to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.id
)""")
report_account_sales()
diff --git a/addons/report_account/report_receivable_view.xml b/addons/report_account/report_receivable_view.xml
index 694bdf690e7..7ef469c96fe 100644
--- a/addons/report_account/report_receivable_view.xml
+++ b/addons/report_account/report_receivable_view.xml
@@ -124,8 +124,8 @@
tree
-
-
+
+
@@ -175,6 +175,7 @@
+
@@ -185,6 +186,18 @@
+
+ report.account_type.sales.form
+ report.account_type.sales
+ form
+
+
+
+
+
+
+
+
report.account_type.sales.graph
diff --git a/addons/report_analytic_line/report_analytic_line.py b/addons/report_analytic_line/report_analytic_line.py
index 006a36cc3a4..42f219df1f3 100644
--- a/addons/report_analytic_line/report_analytic_line.py
+++ b/addons/report_analytic_line/report_analytic_line.py
@@ -20,27 +20,32 @@
##############################################################################
from osv import fields,osv
+import tools
class report_account_analytic_line_to_invoice(osv.osv):
_name = "report.account.analytic.line.to.invoice"
_description = "Analytic lines to invoice report"
_auto = False
_columns = {
- 'name': fields.date('Month', readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
'product_uom_id':fields.many2one('product.uom', 'UoM', readonly=True),
'unit_amount': fields.float('Units', readonly=True),
'sale_price': fields.float('Sale price', readonly=True),
'amount': fields.float('Amount', 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),
}
_order = 'name desc, product_id asc, account_id asc'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'report_account_analytic_line_to_invoice')
cr.execute("""
CREATE OR REPLACE VIEW report_account_analytic_line_to_invoice AS (
SELECT
- DISTINCT(to_char(l.date,'YYYY-MM-DD')) AS name,
+ DISTINCT(to_char(l.date,'MM')) as month,
+ to_char(l.date, 'YYYY') as name,
MIN(l.id) AS id,
l.product_id,
l.account_id,
@@ -57,7 +62,7 @@ class report_account_analytic_line_to_invoice(osv.osv):
WHERE
(invoice_id IS NULL) and (to_invoice IS NOT NULL)
GROUP BY
- to_char(l.date,'YYYY-MM-DD'), product_id, product_uom_id, account_id
+ to_char(l.date, 'YYYY'), to_char(l.date,'MM'), product_id, product_uom_id, account_id
)
""")
report_account_analytic_line_to_invoice()
diff --git a/addons/report_analytic_line/report_analytic_line_view.xml b/addons/report_analytic_line/report_analytic_line_view.xml
index ef61bd70645..e5c9a3d2c06 100644
--- a/addons/report_analytic_line/report_analytic_line_view.xml
+++ b/addons/report_analytic_line/report_analytic_line_view.xml
@@ -9,6 +9,7 @@
-
+
Files by Month
report.document.user
@@ -269,11 +270,27 @@
+
+
+
+ view.files.partner.form
+ report.files.partner
+ form
+
+
+
+
+
+
+
+
+
+
Files Per Partner
report.files.partner