bzr revid: sgo@tinyerp.com-20120330084059-d0vfd8s1c4sw0got
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-03-30 14:10:59 +05:30
parent 5d4b8c2e58
commit c39ec15984
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class project_project(osv.osv):
_inherit = 'project.project'
_columns = {
'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view")
'timesheets' : fields.boolean('Timesheets',help = "If you check this field timesheets appears in kanban view"),
}
_defaults = {
'timesheets' : True,
@ -56,6 +56,10 @@ class project_project(osv.osv):
context = {}
value = {}
data_obj = self.pool.get('ir.model.data')
if context.get('btn'):
context.update({
'search_default_to_invoice':1,
})
for project in self.browse(cr, uid, ids, context=context):
# Get Timesheet views
tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id')

View File

@ -58,7 +58,7 @@
<div class="manager"><b><field name="amount_invoiced"/> <field name="currency_id"/></b></div>
</div>
<div class="sequence">
<button name="open_timesheets" class="oe_to_invoice_buttons" type="object">Invoice</button>
<button name="open_timesheets" class="oe_to_invoice_buttons" type="object" context="{'btn':'invoice'}">Invoice</button>
</div>
</xpath>
</field>