Skip to content

[ADD][web_action_conditionable] support forms - #1205

Merged
pedrobaeza merged 5 commits into
OCA:8.0from
hbrunn:8.0-web_action_conditionable-form
Apr 22, 2019
Merged

pedrobaeza merged 5 commits into
OCA:8.0from
hbrunn:8.0-web_action_conditionable-form

Conversation

@hbrunn

@hbrunn hbrunn commented Feb 27, 2019

Copy link
Copy Markdown
Member

I added a few other improvements in separate commits, you'll see that in the messages

@hbrunn hbrunn added this to the 8.0 milestone Feb 27, 2019
@tarteo

tarteo commented Mar 5, 2019

Copy link
Copy Markdown
Member

@pankk

@tarteo tarteo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

<tree create="'some_group' in _group_refs"> in tree views doesn't hide the 'Create' button anymore.

@hbrunn

hbrunn commented Mar 5, 2019

Copy link
Copy Markdown
Member Author

@tarteo thanks, didn't consider this use case. Fixed and updated the readme accordingly

@tarteo

tarteo commented Mar 7, 2019

Copy link
Copy Markdown
Member

The same case is for trees in form views.

@hbrunn

hbrunn commented Mar 7, 2019

Copy link
Copy Markdown
Member Author

I can't reproduce this locally, can you add an example on runbot?

@tarteo

tarteo commented Mar 7, 2019

Copy link
Copy Markdown
Member

http://3360805-1205-62dbc4.runbot3.odoo-community.org/web?debug=1#id=3&view_type=form&model=res.groups&action=75

I've changed

<tree string="Access Rules" editable="top">

to

<tree string="Access Rules" editable="top" create="'some_group' in _group_refs">

but I can still add items.

@hbrunn

hbrunn commented Mar 7, 2019

Copy link
Copy Markdown
Member Author

aha! you try this in a many2many field, I believe this never has worked: https://github.com/OCA/OCB/blob/8.0/addons/web/static/src/js/view_form.js#L5024

But simple to fix, so I just added that even though not in the scope of this PR.

@tarteo tarteo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The previous worked with one2many and many2many fields on my local machine. But this is more clear. Thanks!

Can you increase the version number in the manifest.

@tbaden tbaden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code review

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza

Copy link
Copy Markdown
Member

@hbrunn can you squash commits at your taste?

@hbrunn
hbrunn force-pushed the 8.0-web_action_conditionable-form branch from 74be642 to 517baff Compare April 22, 2019 09:51
@hbrunn

hbrunn commented Apr 22, 2019

Copy link
Copy Markdown
Member Author

@pedrobaeza done

@pedrobaeza
pedrobaeza merged commit a836458 into OCA:8.0 Apr 22, 2019
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