Skip to content

Commit

Permalink
IMP: add suspension button to the cad view
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Nov 11, 2023
1 parent 9b86cf8 commit 8d4aebb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plm_suspended/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
"name": "PLM Suspended State",
"version": "16.0.1",
"version": "16.0.2",
"author": "OmniaSolutions",
"website": "https://odooplm.omniasolutions.website",
"category": "Manufacturing/Product Lifecycle Management (PLM)",
Expand Down
23 changes: 23 additions & 0 deletions plm_suspended/views/product_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,27 @@
</xpath>
</field>
</record>
<record id="ir_attachment_spare_extension" model="ir.ui.view">
<field name="name">ir.attachment.spare.extension</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="plm.plm_component_base_form"/>
<field name="type">form</field>
<field name="priority" eval="16"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button name="action_suspend"
type="object"
string="Suspend"
class="oe_highlight"
invisible="engineering_state=='suspended'"
/>
<button name="action_unsuspend"
type="object"
string="Un-Suspend"
class="oe_highlight"
invisible="engineering_state not in ['suspended']"
/>
</xpath>
</field>
</record>
</odoo>

0 comments on commit 8d4aebb

Please sign in to comment.