Ir al contenido
Menú
Se marcó esta pregunta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 18
3759
1
mar 15
5891
1
mar 25
1352
0
mar 25
1152
3
jun 21
9350