Repository navigation
[18.0][IMP] maintenance_equipment_contract: Access requests from contract in order to verify that all has been processed - #594
Open
deeniiz wants to merge 4 commits into
Conversation
…n order to verify that all has been processed (cherry picked from commit 31e7641) [ported to 18.0: attrs replaced by the invisible attribute, contributors entry moved to CONTRIBUTORS.md, README regenerated]
…cts from equipment (cherry picked from commit 7c91a1e)
(cherry picked from commit 597b15d)
…ction of contracts
Author
|
@eantones , can you please review it? |
dalonsod
requested changes
Sep 21, 2026
dalonsod
left a comment
Contributor
There was a problem hiding this comment.
Only code review, see comments
| <field | ||
| name="groups" | ||
| eval="[ | ||
| (4,ref('maintenance.group_equipment_manager'))]" |
| widget="many2many_tags" | ||
| options="{'no_create_edit': True}" | ||
| /> | ||
| <field name="equipment_count" invisible="1" /> |
Contributor
There was a problem hiding this comment.
For 18.0 this field is no longer required, as Odoo will automatically add it to view.
| @api.depends("equipment_ids") | ||
| def _compute_equipment_count(self): | ||
| for record in self: | ||
| record.equipment_count = len(record.equipment_ids) |
Contributor
There was a problem hiding this comment.
This is right and will work in a normal scenario. Anyway, a good and optional improvement here could be moved to a search_count or something like that. Once done, this field could be securely added to e.g. list view, without lack of performance.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forward port of #364, #170 and #222 from 14.0