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

[FIX] web: List editable top select last row #38302

Conversation

@jbm-odoo
Copy link
Contributor

commented Oct 9, 2019

Description of the issue/feature this PR addresses:
Current behavior before PR:
Before this commit, when we have a list (editable top) in a form
with some mandatory fields and some existing rows. If we click on
'add a line', a new empty line appear on the top, then we click on
the last row, the empty row will disappear and we will have a
traceback.

Desired behavior after PR is merged:
After this commit, if we repeat this scenario, we click on the last
row, we will be able to edit this last row.

Will fix this issue: #38204

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the seen 🙂 label Oct 9, 2019
@jbm-odoo jbm-odoo force-pushed the odoo-dev:13.0-fix-list-editable-top-select-last-row-jbm branch from b7d0c04 to f634e02 Oct 9, 2019
@jbm-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 9, 2019

@VincentSchippefilt Can you review this PR?
And I wrote a test :)

@C3POdoo C3POdoo added the RD label Oct 9, 2019
@jbm-odoo jbm-odoo force-pushed the odoo-dev:13.0-fix-list-editable-top-select-last-row-jbm branch from f634e02 to bab5bdb Oct 10, 2019
@robodoo robodoo added the CI 🤖 label Oct 10, 2019
await testUtils.dom.click(form.$('.o_field_x2many_list_row_add > a'));
await testUtils.dom.click(form.$('.o_data_row:last() > td.o_list_char'));
// This test ensure that they aren't traceback when clicking on the last row.
assert.strictEqual(form.$('.o_data_row').length, 2, "list should have exactly 2 rows");

This comment has been minimized.

Copy link
@VincentSchippefilt

VincentSchippefilt Oct 10, 2019

Contributor
Suggested change
assert.strictEqual(form.$('.o_data_row').length, 2, "list should have exactly 2 rows");
assert.containsN((form, '.o_data_row', 2, "list should have exactly 2 rows");
Before this commit, when we have a list (editable top) in a form
with some mandatory fields and some existing rows. If we click on
'add a line', a new empty line appear on the top, then we click on
the last row, the empty row will disappear and we will have a
traceback.

After this commit, if we repeat this scenario, we click on the last
row, we will be able to edit this last row.
@jbm-odoo jbm-odoo force-pushed the odoo-dev:13.0-fix-list-editable-top-select-last-row-jbm branch from bab5bdb to 3e34cc5 Oct 10, 2019
@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Oct 10, 2019
@VincentSchippefilt

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

robodoo r+

@VincentSchippefilt

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

@jbm-odoo good job ! :)

@robodoo robodoo added the r+ 👌 label Oct 10, 2019
robodoo pushed a commit that referenced this pull request Oct 10, 2019
Before this commit, when we have a list (editable top) in a form
with some mandatory fields and some existing rows. If we click on
'add a line', a new empty line appear on the top, then we click on
the last row, the empty row will disappear and we will have a
traceback.

After this commit, if we repeat this scenario, we click on the last
row, we will be able to edit this last row.

closes #38302

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
robodoo pushed a commit that referenced this pull request Oct 10, 2019
Before this commit, when we have a list (editable top) in a form
with some mandatory fields and some existing rows. If we click on
'add a line', a new empty line appear on the top, then we click on
the last row, the empty row will disappear and we will have a
traceback.

After this commit, if we repeat this scenario, we click on the last
row, we will be able to edit this last row.

closes #38302

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

Staging failed: ci/runbot on cf8bfc0186e52f13e6c9b6eb5eb6597d3d47fd53 (view more at http://runbot.odoo.com/runbot/build/647687)

@jbm-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 11, 2019

@robodoo retry

@robodoo robodoo added CI 🤖 r+ 👌 and removed error 🙅 labels Oct 11, 2019
@robodoo robodoo closed this in 996f77b Oct 11, 2019
@robodoo robodoo removed the merging 👷 label Oct 11, 2019
@robodoo robodoo added the merged 🎉 label Oct 11, 2019
@robodoo

This comment has been minimized.

Copy link
Contributor

commented Oct 11, 2019

Merged at 996f77b, thanks!

@jbm-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 11, 2019

resolve: #38204

@tde-banana-odoo tde-banana-odoo deleted the odoo-dev:13.0-fix-list-editable-top-select-last-row-jbm branch Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.