-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by lmignon
- Loading branch information
Showing
16 changed files
with
157 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
|
||
from . import models # pragma: no cover | ||
from . import tools | ||
from . import wizards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Fix Search Engine Binding form view. The fields data and error are now | ||
properly displayed and fit the width of the form. | ||
|
||
Makes the Odoo's admin user a member of the *Search Engine Connector Manager* group. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A new action **Update state** is now available on *Search Engine Record* objects. | ||
This action allows you to update the state of selected records on the tree view. | ||
|
||
Add a smart button to quickly access to the bound records from the | ||
*Search Engine Backend* and *Search Engine Record* views. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import se_binding_state_updater |
19 changes: 19 additions & 0 deletions
19
connector_search_engine/wizards/se_binding_state_updater.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class SeBindingStateUpdater(models.TransientModel): | ||
|
||
_name = "se.binding.state.updater" | ||
|
||
state = fields.Selection( | ||
string="New state", | ||
selection=lambda self: self.env["se.binding"]._fields["state"].selection, | ||
required=True, | ||
) | ||
|
||
def doit(self): | ||
res_ids = self.env.context.get("active_ids") | ||
self.env["se.binding"].browse(res_ids).write({"state": self.state}) |
33 changes: 33 additions & 0 deletions
33
connector_search_engine/wizards/se_binding_state_updater.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2023 ACSONE SA/NV | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<record model="ir.ui.view" id="se_binding_state_updater_form_view"> | ||
<field | ||
name="name" | ||
>se.binding.state.updater.form (in connector_search_engine)</field> | ||
<field name="model">se.binding.state.updater</field> | ||
<field name="arch" type="xml"> | ||
<form string="Se Binding State Updater"> | ||
<group> | ||
<field name="state" /> | ||
</group> | ||
<footer> | ||
<button name="doit" string="OK" class="btn-primary" type="object" /> | ||
<button string="Cancel" class="btn-default" special="cancel" /> | ||
</footer> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="action_record_bind" model="ir.actions.act_window"> | ||
<field name="name">Update state</field> | ||
<field name="res_model">se.binding.state.updater</field> | ||
<field name="view_mode">form</field> | ||
<field name="view_id" ref="se_binding_state_updater_form_view" /> | ||
<field name="target">new</field> | ||
<field name="binding_model_id" ref="connector_search_engine.model_se_binding" /> | ||
</record> | ||
|
||
</odoo> |