mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[imp] create a new context, as suggested by Guewen
This commit is contained in:
@@ -186,14 +186,13 @@ class AccountHoursBlock(orm.Model):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
compose_form_id = False
|
compose_form_id = False
|
||||||
|
|
||||||
ctx = context.copy()
|
ctx = {
|
||||||
ctx.update({
|
|
||||||
'default_model': self._name,
|
'default_model': self._name,
|
||||||
'default_res_id': ids[0],
|
'default_res_id': ids[0],
|
||||||
'default_use_template': bool(template_id),
|
'default_use_template': bool(template_id),
|
||||||
'default_template_id': template_id,
|
'default_template_id': template_id,
|
||||||
'default_composition_mode': 'comment',
|
'default_composition_mode': 'comment',
|
||||||
})
|
}
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
'view_type': 'form',
|
'view_type': 'form',
|
||||||
|
|||||||
Reference in New Issue
Block a user