Skip to content

Commit

Permalink
Merge PR #1433 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by lmignon
  • Loading branch information
shopinvader-git-bot committed Oct 27, 2023
2 parents bd8ccbf + 0f400fc commit f5d0722
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions shopinvader_restapi/models/shopinvader_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class ShopinvaderBackend(models.Model):
help="Technical field to control form fields appeareance",
default="search_engine",
)
active = fields.Boolean(default=True)
_sql_constraints = [
(
"unique_website_unique_key",
Expand Down
24 changes: 23 additions & 1 deletion shopinvader_restapi/views/shopinvader_backend_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
<form string="Shopinvader Website">
<sheet>
<div class="oe_button_box" name="buttons">

<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<field name="active" invisible="1" />
<button
class="oe_stat_button"
name="%(shopinvader_restapi.action_cart)d"
Expand Down Expand Up @@ -155,6 +161,22 @@
</field>
</record>

<record id="search_shopinvader_backend" model="ir.ui.view">
<field name="name">shopinvader.backend.search</field>
<field name="model">shopinvader.backend</field>
<field name="arch" type="xml">
<search string="Search Backend">
<field name="name" filter_domain="[('name', 'ilike', self)]" />
<separator />
<filter
string="Archived"
name="inactive"
domain="[('active', '=', False)]"
/>
</search>
</field>
</record>

<record id="action_shopinvader_backend" model="ir.actions.act_window">
<field name="name">Shopinvader Website</field>
<field name="res_model">shopinvader.backend</field>
Expand Down

0 comments on commit f5d0722

Please sign in to comment.