-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8e89f8
commit 4b4725d
Showing
5 changed files
with
20 additions
and
17 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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import custom_list | ||
from . import ir_ui_view | ||
from . import ir_module |
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,18 @@ | ||
# Copyright 2024 ooops404 | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import models | ||
|
||
|
||
class Module(models.Model): | ||
_inherit = "ir.module.module" | ||
|
||
def _button_immediate_function(self, function): | ||
res = super(Module, self)._button_immediate_function(function) | ||
views_mods = self.env["custom.list.view"].search([]) | ||
for vm in views_mods: | ||
for vml in vm.line_ids: | ||
if not vml.field_id: | ||
# field was deleted during modules operation | ||
vml.unlink() | ||
vm.button_apply_changes() | ||
return res | ||
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 |
---|---|---|
@@ -1,7 +1,2 @@ | ||
Using this module you can add new fields into list views without having deep odoo | ||
technical knowledge. | ||
|
||
WARNING | ||
|
||
Changes done by module (when you click Apply Changes) can be lost after modules update. | ||
If so - need to apply list view/views changes again. |
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 |
---|---|---|
@@ -1 +0,0 @@ | ||
Reapply list views changes after modules update. | ||