Skip to content

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

Merged
pedrobaeza merged 1 commit into
OCA:11.0from
guewen:11.0-related_action-open-record
Jun 6, 2018
Merged

Add default related action to open related records in view#46
pedrobaeza merged 1 commit into
OCA:11.0from
guewen:11.0-related_action-open-record

Conversation

@guewen
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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