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

Master table autofill adrm #3783

Closed
wants to merge 2 commits into from
Closed

Conversation

hokolomopo
Copy link
Contributor

Description:

[IMP] autofill: AUTOFILL_AUTO for tables

This commit improves the AUTOFILL_AUTO command for tables. Now when
auto filling a cell in a table, we will autofill until the end of the
table.

Task: : 3777825

[FIX] autofill: AUTOFILL_AUTO overwrite cells

The autofill done in the AUTOFILL_AUTO command wasn't checking if
the cells already had a content, and thus could overwrite cells.

This commit add a check to stop the autofill at the first non-empty
cell encountered.

Task: : 3777825

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Mar 1, 2024

if (row !== selection.bottom) {
this.select(activePosition.col, row);
for (let row = selection.bottom + 1; row <= autofillRow; row++) {
if (this.getters.getEvaluatedCell({ ...activePosition, row }).type !== CellValueType.empty) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm afraid you have to check the core cell because a function can return an empty evaluated cell (think about odoo pivot functions) and you don't want the formula to be overwritten in this case.

This commit improves the `AUTOFILL_AUTO` command for tables. Now when
auto filling a cell in a table, we will autofill until the end of the
table.

Task: 3777825
The autofill done in the `AUTOFILL_AUTO` command wasn't checking if
the cells already had a content, and thus could overwrite cells.

This commit add a check to stop the autofill at the first non-empty
cell encountered.

Task: 3777825
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

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

robodoo r+ rebase-ff

@robodoo
Copy link
Collaborator

robodoo commented Mar 7, 2024

Merge method set to rebase and fast-forward.

robodoo pushed a commit that referenced this pull request Mar 7, 2024
This commit improves the `AUTOFILL_AUTO` command for tables. Now when
auto filling a cell in a table, we will autofill until the end of the
table.

Task: 3777825
Part-of: #3783
robodoo pushed a commit that referenced this pull request Mar 7, 2024
The autofill done in the `AUTOFILL_AUTO` command wasn't checking if
the cells already had a content, and thus could overwrite cells.

This commit add a check to stop the autofill at the first non-empty
cell encountered.

closes #3783

Task: 3777825
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@robodoo robodoo added the 17.2 label Mar 7, 2024
@robodoo robodoo closed this Mar 7, 2024
@fw-bot fw-bot deleted the master-table-autofill-adrm branch March 21, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants