Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

I don't understand module hr_timesheet_sheet?

By
Nemanja Dragovic
on 9/16/14, 7:12 AM 1,109 views

I saw javascript code, and QWeb template for weekly_timesheet widget. That what I don't understand is how insertion of rows into account_analytic_line, for every date where number of hours are not zero, are solved. In fact, I want to replace fields account_id and user_id. I need for one account to insert employees with numbers of working hours for every day in (date_from .. date_to). 

0
Peter Nietz
On 9/16/14, 7:42 AM

Hi,

if I understood your problem the right way there is no JS or QWEB customization necessary

First you have to edit the python object:  hr_timesheet_sheet.py

Add your custom columns with key and type.

Then edit the view: hr_timesheet_sheet_view.xml

Add whatever you want to see and remove what you don't want to see.

The drawing and checking if something is empty is done by the web-module, which you don't need to edit.

Hope this helps, Greetz

[EDIT]    posted the answer to the comment here, because the comment doesn't format it:

grep gives me in the addons folder:

grep -RFn hr_analytic_timesheet *

[..]
analytic_user_function/analytic_user_function.py:66:class hr_analytic_timesheet(osv.osv):
[..]
hr_timesheet_sheet/hr_timesheet_sheet_view.xml:44:
hr_timesheet_sheet/hr_timesheet_sheet_view.xml:75: name="%(act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet)d"
[..]
hr_timesheet/security/hr_timesheet_security.xml:7: hr_timesheet/security/hr_timesheet_security.xml:14:
[..]

don't know if that's what ur looking for. account_analytic_line should be found the same way I hope.

 

 

Peter

Where is the code for inserting into table hr_analytic_timesheet and account_analytic_line for every day in (date_from .. date_to)?

Nemanja Dragovic
on 9/17/14, 6:18 AM

grep gives me in the addons folder: grep -RFn hr_analytic_timesheet * [..] analytic_user_function/analytic_user_function.py:66:class hr_analytic_timesheet(osv.osv): [..] hr_timesheet_sheet/hr_timesheet_sheet_view.xml:44: hr_timesheet_sheet/hr_timesheet_sheet_view.xml:75: name="%(act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet)d" [..] hr_timesheet/security/hr_timesheet_security.xml:7: hr_timesheet/security/hr_timesheet_security.xml:14: [..] don't know if that's what ur looking for. account_analytic_line should be found the same way I hope.

Peter Nietz
on 9/22/14, 5:44 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/16/14, 7:12 AM
Seen: 1109 times
Last updated: 3/16/15, 8:10 AM