[FIX]:hr_timesheet:ProgrammingError: column timesheet_report.day does not exist:LINE 1: ...d) AS id, count(timesheet_report.id) AS day_count,"timesheet...

bzr revid: apa@tinyerp.com-20121017101534-pixtr1ayjw3xgk3k
This commit is contained in:
Amit Patel 2012-10-17 15:45:34 +05:30
parent 8a38ee944e
commit 519c621acb
3 changed files with 7 additions and 1 deletions

View File

@ -26,7 +26,6 @@
<field name="product_id" invisible="1"/>
<field name="account_id" invisible="1" groups="analytic.group_analytic_accounting"/>
<field name="general_account_id" invisible="1"/>
<field name="quantity" sum="Hours"/>
<field name="cost" sum="Total Cost"/>
</tree>

View File

@ -32,6 +32,7 @@ class timesheet_report(osv.osv):
('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),
'date': fields.date('Date', 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),
@ -62,6 +63,10 @@ class timesheet_report(osv.osv):
select
min(aal.id) as id,
htss.name,
aal.date as date,
to_char(aal.date, 'YYYY-MM-DD') as day,
to_char(aal.date,'YYYY') as year,
to_char(aal.date,'MM') as month,
htss.date_from,
htss.date_to,
count(*) as nbr,
@ -92,6 +97,7 @@ class timesheet_report(osv.osv):
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
group by
aal.account_id,
aal.date,
htss.date_from,
htss.date_to,
aal.unit_amount,

View File

@ -17,6 +17,7 @@
<field name="model">timesheet.report</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('confirm','new');gray:state == 'cancel'" string="Timesheet">
<field name="date" invisible="1"/>
<field name="name" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_from" invisible="1"/>