parent
5d4b8c2e58
commit
c39ec15984
|
@ -30,7 +30,7 @@ class project_project(osv.osv):
|
||||||
_inherit = 'project.project'
|
_inherit = 'project.project'
|
||||||
|
|
||||||
_columns = {
|
_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 = {
|
_defaults = {
|
||||||
'timesheets' : True,
|
'timesheets' : True,
|
||||||
|
@ -56,6 +56,10 @@ class project_project(osv.osv):
|
||||||
context = {}
|
context = {}
|
||||||
value = {}
|
value = {}
|
||||||
data_obj = self.pool.get('ir.model.data')
|
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):
|
for project in self.browse(cr, uid, ids, context=context):
|
||||||
# Get Timesheet views
|
# Get Timesheet views
|
||||||
tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id')
|
tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id')
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<div class="manager"><b><field name="amount_invoiced"/> <field name="currency_id"/></b></div>
|
<div class="manager"><b><field name="amount_invoiced"/> <field name="currency_id"/></b></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sequence">
|
<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>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
Loading…
Reference in New Issue