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

[IMP] web: Add support of button type object on One2Many KanbanRecord #31695

Closed

Conversation

Projects
None yet
4 participants
@res-odoo
Copy link
Contributor

res-odoo commented Mar 8, 2019

Apply same logic as in the ListRenderer: buttons with type="object" are
disabled for no saved yet records, as calling the python method with no
id would make no sense.

To avoid to expose this logic inside all Kanban views, we define a
specific KanbanRecord Class for the One2many case.

This could be refactored to prevent from duplicating this logic in list
and kanban views.

Task: 1945006

@res-odoo res-odoo requested a review from adr-odoo Mar 8, 2019

@robodoo robodoo added the seen 🙂 label Mar 8, 2019

@C3POdoo C3POdoo added the RD label Mar 8, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch 2 times, most recently Mar 8, 2019

@robodoo robodoo added the CI 🤖 label Mar 9, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 11, 2019

@robodoo robodoo removed the CI 🤖 label Mar 11, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 11, 2019

@robodoo robodoo added the CI 🤖 label Mar 11, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 12, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 12, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 12, 2019

@robodoo robodoo removed the CI 🤖 label Mar 12, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch 3 times, most recently Mar 12, 2019

@res-odoo res-odoo changed the title [IMP] web: Allow support of button type=object in Kanban_record [IMP] web: Add support of button type object on One2Many KanbanRecord Mar 12, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch 4 times, most recently Mar 12, 2019

@robodoo robodoo added the CI 🤖 label Mar 12, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 14, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 14, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 14, 2019

@robodoo robodoo removed the CI 🤖 label Mar 14, 2019

@res-odoo res-odoo requested a review from aab-odoo Mar 14, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch 2 times, most recently to 3551256 Mar 14, 2019

@robodoo robodoo added the CI 🤖 label Mar 14, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from 3551256 to be2546e Mar 15, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 15, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from be2546e to 0d8f49a Mar 18, 2019

@robodoo robodoo removed the CI 🤖 label Mar 18, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from 0d8f49a to 0bfb232 Mar 18, 2019

@robodoo robodoo added the CI 🤖 label Mar 18, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from 0bfb232 to 04a93d2 Mar 19, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 19, 2019

@res-odoo res-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from 04a93d2 to a6b78d9 Mar 19, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 19, 2019

@adr-odoo adr-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from a6b78d9 to cbdc41f Mar 22, 2019

@robodoo robodoo removed the CI 🤖 label Mar 22, 2019

[FIX] web: Add support of button type object on One2Many KanbanRecord
Before this commit, there were a crash if you tried to add an optionnal
product in a new sale order without saving it.

Apply same logic as in the ListRenderer: buttons with type="object" are
disabled for no saved yet records, as calling the python method with no
id would make no sense.

To avoid to expose this logic inside all Kanban views, we define a
specific KanbanRecord Class for the One2many case.

This could be refactored to prevent from duplicating this logic in list
and kanban views.

Original Task ID: 1945006

@adr-odoo adr-odoo force-pushed the odoo-dev:saas-12.2-mobile-kanban-btn-res branch from cbdc41f to c5cd44a Mar 22, 2019

@adr-odoo
Copy link
Contributor

adr-odoo left a comment

pniederlag pushed a commit to pniederlag/odoo that referenced this pull request Mar 22, 2019

[FIX] web: Add support of button type object on One2Many KanbanRecord
Before this commit, there were a crash if you tried to add an optionnal
product in a new sale order without saving it.

Apply same logic as in the ListRenderer: buttons with type="object" are
disabled for no saved yet records, as calling the python method with no
id would make no sense.

To avoid to expose this logic inside all Kanban views, we define a
specific KanbanRecord Class for the One2many case.

This could be refactored to prevent from duplicating this logic in list
and kanban views.

Original Task ID: 1945006

closes odoo#31695

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>

@robodoo robodoo added merged 🎉 and removed merging 👷 labels Mar 22, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Mar 22, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 22, 2019

@res-odoo res-odoo deleted the odoo-dev:saas-12.2-mobile-kanban-btn-res branch Mar 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.