I try to inherit this button in hr.timesheet.sheet.form:
<button class="oe_inline oe_stat_button" name="attachment_tree_view" type="object" icon="fa-files-o">
<field string="Documents" name="doc_count" widget="statinfo"/>
</button>
On my python I have this:
class project(osv.osv):
_inherit = "project.project"
def test(self, cr, uid, vals, context=None):
return super(project.project, self)._get_attached_docs(cr, uid, vals, context=context)
_columns = {
'doc_count': fields.function(
test, string="Number of documents attached", type='integer'
)
}
Now I get all time an error. What am I making wrong with the import of the function get_attached_docs ? How can I import this simple function to my field? and then put it on the button?
I want this 2 buttons from project.project on the hr.timesheet.sheet form with the same links behind that in project:
