</page>
<page string="MO">
<p>MOE</p>
- <button type="action" target="new" name="cmmi.wizard_add_moe_to_project" string="Add a MOE" class="oe_highlight" context="{'project_id': id}" />
+ <button type="action" target="new" name="%(wizard_add_moe_to_project)d" string="Add a MOE" class="oe_highlight" context="{'project_id': id}" />
<field name="moe_ids">
<tree create="false" delete="true" editable="true">
<field name="project_id" invisible="1" />
</tree>
</field>
<p>MOA</p>
- <button type="action" target="new" name="cmmi.wizard_add_moa_to_project" string="Add a MOA" class="oe_highlight" context="{'project_id': id}" />
+ <button type="action" target="new" name="%(wizard_add_moa_to_project)d" string="Add a MOA" class="oe_highlight" context="{'project_id': id}" />
<field name="moa_ids">
<tree create="false" delete="true" editable="true">
<field name="project_id" invisible="1" />
</field>
</page>
<page string="Domaines">
- <button type="action" target="new" name="cmmi.wizard_add_domain_to_project" string="Add a domain" class="oe_highlight" context="{'project_id': id}" />
+ <button type="action" target="new" name="%(wizard_add_domain_to_project)d" string="Add a domain" class="oe_highlight" context="{'project_id': id}" />
<field name="domains">
<tree create="false" delete="true" editable="true">
<field name="project_id" invisible="1" />
}, context=context)
# Fermer simplement la fenêtre
- #return {'type': 'ir.actions.act_window_close'}
-
- # Renvoi vers la vue du modèle
- return {
- "type": 'ir.actions.act_window',
- "res_model": "cmmi.projet",
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_id': result["project_id"][0],
- #'target': 'new', = pop-up
- 'context': context,
- }
+ return {'type': 'ir.actions.act_window_close'}
+
+ #-----------------------------------------------------------------------
+ # # Renvoi vers la vue du modèle
+ # return {
+ # "type": 'ir.actions.act_window',
+ # "res_model": "cmmi.projet",
+ # 'view_type': 'form',
+ # 'view_mode': 'form',
+ # 'res_id': result["project_id"][0],
+ # #'target': 'new', = pop-up
+ # 'context': context,
+ # }
+ #-----------------------------------------------------------------------
_columns = {
"main": fields.boolean(string="Domaine principal ?"),
context=context
)]))
- # recherche des domaines autres que ceux déjà sélectionnés
+ # recherche des moas autres que ceux déjà sélectionnés
moa_ids = model_base.search(
cr,
uid,
"moa_id": result["moa_id"],
}, context=context)
-
- # Renvoi vers la vue du modèle
- return {
- "type": 'ir.actions.act_window',
- "res_model": "cmmi.projet",
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_id': result["project_id"][0],
- 'context': context,
- }
+ # Fermer simplement la fenêtre
+ return {'type': 'ir.actions.act_window_close'}
+
+
+ #-----------------------------------------------------------------------
+ # # Renvoi vers la vue du modèle
+ # return {
+ # "type": 'ir.actions.act_window',
+ # "res_model": "cmmi.projet",
+ # 'view_type': 'form',
+ # 'view_mode': 'form',
+ # 'res_id': result["project_id"][0],
+ # 'context': context,
+ # }
+ #-----------------------------------------------------------------------
_columns = {
"main": fields.boolean(string="MOA principale ?"),
context=context
)]))
- # recherche des domaines autres que ceux déjà sélectionnés
+ # recherche des moes autres que ceux déjà sélectionnés
moe_ids = model_base.search(
cr,
uid,
"moe_id": result["moe_id"],
}, context=context)
-
- # Renvoi vers la vue du modèle
- return {
- "type": 'ir.actions.act_window',
- "res_model": "cmmi.projet",
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_id': result["project_id"][0],
- 'context': context,
- }
+ # Fermer simplement la fenêtre
+ return {'type': 'ir.actions.act_window_close'}
+
+ #-----------------------------------------------------------------------
+ # # Renvoi vers la vue du modèle
+ # return {
+ # "type": 'ir.actions.act_window',
+ # "res_model": "cmmi.projet",
+ # 'view_type': 'form',
+ # 'view_mode': 'form',
+ # 'res_id': result["project_id"][0],
+ # 'context': context,
+ # }
+ #-----------------------------------------------------------------------
_columns = {
"main": fields.boolean(string="MOE principale ?"),