Skip to Content
Menu
This question has been flagged

I have made a field in hr.timesheet.sheet view, with that I can select all projects like this:

class hr_timesheet_sheet(osv.osv): _inherit = "hr_timesheet_sheet.sheet" _columns = { 'project_field': fields.many2one('project.project', 'name'), }

I put that in the timesheet like this:

<record id="hr_timesheet_sheet_tree_test_fields" model="ir.ui.view"> <field name="name">hr.test.fields.tree</field> <field name="model">hr_timesheet_sheet.sheet</field> <field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/> <field name="arch" type="xml"> <xpath expr="//sheet/group/group" position="inside"> <field name="project_field" string="Project"/> </xpath> </field> </record>

How Can I make now 2 buttons that show me exactly the tasks and the documents of the project that I selected in the timesheet view?

I need to take the project.project function and then use them in the hr_timesheet_sheet view with new buttons...

 

This 2 buttons with the same function per project in this view:


Avatar
Discard
Related Posts Replies Views Activity
1
Jul 18
2498
1
Mar 15
4917
0
Nov 24
28
3
Jun 21
8085
0
Apr 21
2859