Odoo Help


How Can I use the buttons from project.project in the hr.timesheet.sheet view?

on 6/23/16, 5:46 AM 754 views

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:

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/23/16, 5:46 AM
Seen: 754 times
Last updated: 6/23/16, 5:46 AM