commit
8dca5b7f8e
|
@ -7,12 +7,12 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 4.3.99\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2008-10-28 10:07:49+0000\n"
|
||||
"PO-Revision-Date: 2008-10-28 10:07:49+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"PO-Revision-Date: 2008-11-02 17:56+0100\n"
|
||||
"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: document
|
||||
|
|
|
@ -64,7 +64,7 @@ class report_document_user(osv.osv):
|
|||
f.file_size as file_size,
|
||||
min(f.title) as file_title,
|
||||
min(d.type) as type,
|
||||
min(EXTRACT(MONTH FROM f.create_date)||'-'||substring(to_char(f.create_date,'YY-Month-DD') from 4 for 9)) as month,
|
||||
min(EXTRACT(MONTH FROM f.create_date)||'-'||to_char(f.create_date,'Month')) as month,
|
||||
f.write_date as change_date
|
||||
from ir_attachment f
|
||||
left join document_directory d on (f.parent_id=d.id and d.name<>'')
|
||||
|
@ -74,8 +74,8 @@ class report_document_user(osv.osv):
|
|||
""")
|
||||
report_document_user()
|
||||
|
||||
class report_files_partenr(osv.osv):
|
||||
_name = "report.files.partenr"
|
||||
class report_files_partner(osv.osv):
|
||||
_name = "report.files.partner"
|
||||
_description = "Files details by Partners"
|
||||
_auto = False
|
||||
_columns = {
|
||||
|
@ -91,11 +91,18 @@ class report_files_partenr(osv.osv):
|
|||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_files_partenr as (
|
||||
select min(f.id) as id,count(*) as nbr,min(to_char(f.create_date,'YYYY-MM')||'-'||'01') as name,min(f.title) as file_title,p.name as partner from ir_attachment f inner join res_partner p on (f.partner_id=p.id) group by p.name
|
||||
create or replace view report_files_partner as (
|
||||
select min(f.id) as id,count(*) as nbr,
|
||||
min(to_char(f.create_date,'YYYY-MM-01')) as name,
|
||||
min(f.title) as file_title,
|
||||
p.name as partner
|
||||
from ir_attachment f
|
||||
inner join res_partner p
|
||||
on (f.partner_id=p.id)
|
||||
group by p.name
|
||||
)
|
||||
""")
|
||||
report_files_partenr()
|
||||
report_files_partner()
|
||||
|
||||
class report_document_file(osv.osv):
|
||||
_name = "report.document.file"
|
||||
|
@ -110,9 +117,10 @@ class report_document_file(osv.osv):
|
|||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_document_file as (
|
||||
select min(f.id) as id,count(*) as nbr,
|
||||
min(EXTRACT(MONTH FROM f.create_date)||'-'||substring(to_char(f.create_date,'YY-Month-DD') from 4 for 9)) as month,
|
||||
sum(f.file_size) as file_size
|
||||
select min(f.id) as id,
|
||||
count(*) as nbr,
|
||||
min(EXTRACT(MONTH FROM f.create_date)||'-'||to_char(f.create_date,'Month')) as month,
|
||||
sum(f.file_size) as file_size
|
||||
from ir_attachment f
|
||||
group by EXTRACT(MONTH FROM f.create_date)
|
||||
)
|
||||
|
@ -139,15 +147,15 @@ class report_document_wall(osv.osv):
|
|||
select max(f.id) as id,
|
||||
min(title) as file_name,
|
||||
to_char(min(f.create_date),'YYYY-MM-DD HH24:MI:SS') as last,
|
||||
f.user_id as user_id,f.user_id as user,
|
||||
substring(to_char(f.create_date,'YY-Month-DD') from 4 for 9) as month
|
||||
f.user_id as user_id, f.user_id as user,
|
||||
to_char(f.create_date,'Month') as month
|
||||
from ir_attachment f
|
||||
where create_date in (
|
||||
select max(create_date)
|
||||
from ir_attachment i
|
||||
inner join res_users u on (i.user_id=u.id)
|
||||
group by i.user_id) group by f.user_id,f.create_date
|
||||
having (to_date(substring(CURRENT_DATE for 10),'YYYY-MM-DD') - to_date(substring(f.create_date for 10),'YYYY-MM-DD')) > 30
|
||||
having (CURRENT_DATE - to_date(to_char(f.create_date,'YYYY-MM-DD'),'YYYY-MM-DD')) > 30
|
||||
)
|
||||
""")
|
||||
report_document_wall()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_report_document_user_group_document_manager","report.document.user document manager","model_report_document_user","document.group_document_manager",1,0,0,0
|
||||
"access_report_document_user_group_system","report.document.user group system","model_report_document_user","base.group_system",1,0,0,0
|
||||
"access_report_files_partenr_group_document_manager","report.files.partenr document manager","model_report_files_partenr","document.group_document_manager",1,0,0,0
|
||||
"access_report_files_partenr_group_system","report.files.partenr group system","model_report_files_partenr","base.group_system",1,0,0,0
|
||||
"access_report_files_partner_group_document_manager","report.files.partner document manager","model_report_files_partner","document.group_document_manager",1,0,0,0
|
||||
"access_report_files_partner_group_system","report.files.partner group system","model_report_files_partner","base.group_system",1,0,0,0
|
||||
"access_report_document_file_group_document_manager","report.document.file document manager","model_report_document_file","document.group_document_manager",1,0,0,0
|
||||
"access_report_document_file_group_system","report.document.file group system","model_report_document_file","base.group_system",1,0,0,0
|
||||
"access_report_document_wall_group_document_manager","report.document.wall document manager","model_report_document_wall","document.group_document_manager",1,0,0,0
|
||||
|
|
|
Loading…
Reference in New Issue