diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-06-24 16:46:22 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-09-02 13:33:57 +0000 |
| commit | b4e1e9f3ae86e6b5e7015c0241791f733ee942f4 (patch) | |
| tree | e5af68049246da84012f4d336264df45df9a2001 | |
| parent | 9c1c848ad1e8fef11320e2a162b008de7e304bcb (diff) | |
[FIX] various: use existing state values for state-based conditions in views
Various attributes use state field to control display of nodes: like the
'states' (visibility), statusbar_visible (available status in status bar).
In this commit we fix various incorrect state values as those are either
typos, either references to dead or removed status.
An heuristic to detect invalid state for conditions will land soon in master.
As this commit targets a stable version only view fixes are provided.
Task ID-2329114
PR odoo/odoo#56946
| -rw-r--r-- | addons/fleet/views/fleet_vehicle_cost_views.xml | 2 | ||||
| -rw-r--r-- | addons/mrp/views/mrp_production_views.xml | 2 | ||||
| -rw-r--r-- | addons/snailmail/views/snailmail_views.xml | 2 | ||||
| -rw-r--r-- | addons/stock/views/stock_picking_views.xml | 2 | ||||
| -rw-r--r-- | addons/stock_picking_batch/views/stock_picking_batch_views.xml | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/addons/fleet/views/fleet_vehicle_cost_views.xml b/addons/fleet/views/fleet_vehicle_cost_views.xml index 070ee85eb1b..5754c081495 100644 --- a/addons/fleet/views/fleet_vehicle_cost_views.xml +++ b/addons/fleet/views/fleet_vehicle_cost_views.xml @@ -8,7 +8,7 @@ <header> <button name="contract_open" states="futur" type="object" string="Start Contract" class="oe_highlight" groups="fleet.fleet_group_manager"/> <button name="contract_close" states="futur" type="object" string="Cancel" groups="fleet.fleet_group_manager"/> - <button name="contract_close" states="open,expired,future" type="object" class="oe_highlight" string="Close Contract" groups="fleet.fleet_group_manager"/> + <button name="contract_close" states="open,expired,futur" type="object" class="oe_highlight" string="Close Contract" groups="fleet.fleet_group_manager"/> <button name="contract_draft" states="closed" type="object" string="Reset To Draft" groups="fleet.fleet_group_manager"/> <field name="state" widget="statusbar" /> </header> diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 3b1dd2af601..7c0bc12821a 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -82,7 +82,7 @@ <button name="button_unplan" type="object" string="Unplan" attrs="{'invisible': ['|', '|', ('state', '!=', 'planned'), ('date_planned_start', '=', False), ('date_planned_finished', '=', False)]}"/> <button name="button_unreserve" type="object" string="Unreserve" attrs="{'invisible': [('unreserve_visible', '=', False)]}"/> <button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': [('state', 'in', ('cancel', 'draft'))]}"/> - <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done"/> + <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,progress,done"/> <button name="action_toggle_is_locked" attrs="{'invisible': ['|', ('show_lock', '=', False), ('is_locked', '=', False)]}" string="Unlock" groups="mrp.group_mrp_manager" type="object" help="Unlock the manufacturing order to adjust what has been consumed or produced."/> <button name="action_toggle_is_locked" attrs="{'invisible': ['|', ('show_lock', '=', False), ('is_locked', '=', True)]}" string="Lock" groups="mrp.group_mrp_manager" type="object" help="Lock the manufacturing order to prevent changes to what has been consumed or produced."/>/> <button name="action_cancel" type="object" string="Cancel" diff --git a/addons/snailmail/views/snailmail_views.xml b/addons/snailmail/views/snailmail_views.xml index 1502856abbc..4fbcd1072b4 100644 --- a/addons/snailmail/views/snailmail_views.xml +++ b/addons/snailmail/views/snailmail_views.xml @@ -23,7 +23,7 @@ <header> <button name="snailmail_print" string="Send Now" type="object" states="pending,error" class="oe_highlight"/> <button name="cancel" string="Cancel" type="object" states="pending,error"/> - <field name="state" widget="statusbar" statusbar_visible="pending,sent,cancel"/> + <field name="state" widget="statusbar" statusbar_visible="pending,sent,canceled"/> </header> <sheet> <div class="oe_title"> diff --git a/addons/stock/views/stock_picking_views.xml b/addons/stock/views/stock_picking_views.xml index b04462e3dfd..07b99d820e8 100644 --- a/addons/stock/views/stock_picking_views.xml +++ b/addons/stock/views/stock_picking_views.xml @@ -253,7 +253,7 @@ <button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', '&', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}"/> <button name="action_toggle_is_locked" attrs="{'invisible': ['|', ('state', 'in', ('draft','cancel')), ('is_locked', '=', False)]}" string="Unlock" groups="stock.group_stock_manager" type="object" help="If the picking is unlocked you can edit initial demand (for a draft picking) or done quantities (for a done picking)."/> <button name="action_toggle_is_locked" attrs="{'invisible': [('is_locked', '=', True)]}" string="Lock" groups="stock.group_stock_manager" type="object"/> - <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,done" /> + <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" /> <button name="action_cancel" attrs="{'invisible': [('state', 'not in', ('assigned', 'confirmed', 'partially_available', 'draft', 'waiting'))]}" string="Cancel" groups="base.group_user" type="object"/> </header> <sheet> diff --git a/addons/stock_picking_batch/views/stock_picking_batch_views.xml b/addons/stock_picking_batch/views/stock_picking_batch_views.xml index d1eec150b9f..f70abe362e9 100644 --- a/addons/stock_picking_batch/views/stock_picking_batch_views.xml +++ b/addons/stock_picking_batch/views/stock_picking_batch_views.xml @@ -9,7 +9,7 @@ <field name="arch" type="xml"> <xpath expr="//header" position="replace"> <header> - <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,done"/> + <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done"/> </header> </xpath> </field> |
