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

Add default related action to open related records in view #46

Merged
merged 1 commit into from
Jun 6, 2018

Conversation

guewen
Copy link
Member

@guewen guewen commented Jan 24, 2018

Add default related action to open related records.

The related action button now opens by default the record on which the job is working. It uses the default views of the job. The exact behavior depends of the number of records in the job:

  • No record (job called on a model): display a message indicating that there is no available action
  • One record: open the default view in form
  • Several records: open the default view in list

The related action can still be overridden by the 'related_action' decorator.

@guewen guewen changed the title Add related action to open related records in view [WIP] Add related action to open related records in view Jan 24, 2018
@coveralls
Copy link

coveralls commented Jan 24, 2018

Coverage Status

Coverage increased (+0.3%) to 77.595% when pulling 2ec15aa on guewen:11.0-related_action-open-record into b190870 on OCA:11.0.

@guewen
Copy link
Member Author

guewen commented Feb 1, 2018

thoughts:

  • set it as default related action when it's not set?
  • add keyword arguments to configure for instance a default xmlid for the view (e.g. invoices have several views)?

@guewen guewen force-pushed the 11.0-related_action-open-record branch from 83ef3e4 to 1355a70 Compare June 5, 2018 14:02
@guewen guewen changed the title [WIP] Add related action to open related records in view Add related action to open related records in view Jun 5, 2018
@guewen guewen force-pushed the 11.0-related_action-open-record branch from 1355a70 to 9392e9a Compare June 5, 2018 14:22
@guewen
Copy link
Member Author

guewen commented Jun 5, 2018

This one is ready :)

@guewen guewen requested a review from lmignon June 5, 2018 14:23
@guewen guewen changed the title Add related action to open related records in view Add default related action to open related records in view Jun 5, 2018
The related action button now opens by default the record on which the
job is working. It uses the default views of the job. The exact behavior
depends of the number of records in the job:

* No record (job called on a  model): display a message indicating that
there is no available action
* One record: open the default view in form
* Several records: open the default view in list

The related action can still be overridden by the 'related_action'
decorator.
@guewen guewen force-pushed the 11.0-related_action-open-record branch from 9392e9a to 2ec15aa Compare June 5, 2018 15:20
Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

Than you @guewen It's a nice usability improvement!

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

LG

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.

5 participants