[FIX] crm: hide mark won/lost buttons when opportunity is won

When an opportunity has a 100% probability, it is regarded
as won. When the opportunity is regarded as done,
there is no more use to show the mark won/lost button.

opw-634420
This commit is contained in:
Denis Ledoux 2015-05-07 18:16:28 +02:00
parent 5efac22043
commit 612b44648e
1 changed files with 2 additions and 2 deletions

View File

@ -372,8 +372,8 @@
<field name="arch" type="xml">
<form string="Opportunities">
<header>
<button name="case_mark_won" string="Mark Won" type="object" class="oe_highlight"/>
<button name="case_mark_lost" string="Mark Lost" type="object" class="oe_highlight"/>
<button name="case_mark_won" string="Mark Won" attrs="{'invisible': [('probability', '=', 100)]}" type="object" class="oe_highlight"/>
<button name="case_mark_lost" string="Mark Lost" attrs="{'invisible': [('probability', '=', 100)]}" type="object" class="oe_highlight"/>
<field name="stage_id" widget="statusbar" clickable="True"
options="{'fold_field': 'fold'}"
domain="['&amp;', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"/>