Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] mig server_action_navigate (from 14.0) #258

Merged
merged 20 commits into from
May 20, 2024

Conversation

legalsylvain
Copy link
Contributor

@legalsylvain legalsylvain commented Dec 23, 2023

Description

This module provides a generic tool to have the possibility to see a list of records associated to a given selection of records. This is basically the UI version of recordset.mapped('field1.field2').

For example, if you use the sale module, you can configure an action to see all the products that have been sold for a given selection of sale orders.

Configure

  • Go to 'Setting / Technical / Actions / Server Actions'

  • Create a new item

ir_actions_server_form

  • Set a name that will be used for the Contextual Action

  • Choose a model

  • Select 'Navigate' option in the field 'Action To Do'

  • Then, select a field of this model. It can be a one2many, many2many, many2one field.

  • You can then optionally select another fields that belong to the previous selected field relation model

  • Once done, click on the 'Create Contextual Action' to generate a new 'More options' button.

Extra options

  • You can define groups whose members will have access to that option.

  • You can select an action that will be used to display the target field list.

Usage

  • Go to a tree view, for a model for which you have defined a navigation action.

  • click on 'Action' Button

res_users_tree

  • then click on the name of the configured Action and see the results

res_partner_category_tree

@legalsylvain legalsylvain force-pushed the 16.0-mig-server_action_navigate branch 2 times, most recently from cc647f9 to 25f39ad Compare December 23, 2023 19:32
@legalsylvain
Copy link
Contributor Author

/ocabot migration server_action_navigate

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Dec 23, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 23, 2023
11 tasks
@legalsylvain
Copy link
Contributor Author

hi could you take a look on that migration PR ?
CC : contributors : @AshishHirapara (migration to V14)
CC original reviewers : @flotho, @hbrunn, @elvise, @francesco-ooops

Thanks !

@francesco-ooops
Copy link
Contributor

@legalsylvain rebase?

legalsylvain and others added 18 commits March 14, 2024 19:09
running -u all cause an issue :
```
wip-test odoo.addons.base.models.ir_ui_view: delete_last_line n'est pas une action valide sur base.automation

View name: Automations
Error context:
 view: ir.ui.view(1145,)
 xmlid: view_base_automation_form
 view.model: base.automation
 view.parent: ir.ui.view(15,)
 file: /home/florent.thomas/DEV/Odoo_Server_And_Libs/Servers_14.0/OCB/addons/base_automation/views/base_automation_view.xml

2022-08-19 10:29:00,179 2679017 WARNING thesocialitefamily14-wip-test odoo.modules.loading: Transient module states were reset
2022-08-19 10:29:00,184 2679017 ERROR thesocialitefamily14-wip-test odoo.modules.registry: Failed to load registry
```
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-backend-14.0/server-backend-14.0-server_action_navigate
Translate-URL: https://translation.odoo-community.org/projects/server-backend-14-0/server-backend-14-0-server_action_navigate/
Currently translated at 100.0% (26 of 26 strings)

Translation: server-backend-14.0/server-backend-14.0-server_action_navigate
Translate-URL: https://translation.odoo-community.org/projects/server-backend-14-0/server-backend-14-0-server_action_navigate/fr/
@legalsylvain legalsylvain force-pushed the 16.0-mig-server_action_navigate branch from 25f39ad to 9694a6b Compare March 14, 2024 18:09
Copy link
Member

@hbrunn hbrunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to also add a test that edits an action with a tests.common.Form to have the domain computation covered

server_action_navigate/hooks.py Show resolved Hide resolved
@legalsylvain
Copy link
Contributor Author

@hbrunn : done. Thanks for your review.

@legalsylvain
Copy link
Contributor Author

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-258-by-legalsylvain-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0cfd624 into OCA:16.0 May 20, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 8d99db4. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants