[18.0][IMP] account_chart_update: Visible unchecked fields by default#2196
[18.0][IMP] account_chart_update: Visible unchecked fields by default#2196OCA-git-bot merged 1 commit intoOCA:18.0from
Conversation
|
This PR has the |
Gelojr
left a comment
There was a problem hiding this comment.
I do not approve the PR. Review requested.
Module configuration (change in the wizard default behavior)
Changes introduced by the PR (default wizard configuration):
For the following models, the listed fields are included in the wizard but unchecked by default:
account.tax.group:sequenceaccount.tax:sequence,children_tax_idsaccount.account:root_idaccount.group:parent_id,code_prefix_endaccount.fiscal.position:sequence
Tests performed and results
-
TEST1 — OK
-
TEST2 — OK
-
TEST3 — NOT OK (Taxes: Sequence)
Reason for requesting a review
The test performed on Taxes shows that selecting the Sequence field does not result in an actual sequence update. This behavior does not match the expected outcome and requires further review before the PR can be approved.
@Gelojr I have been reviewing this with @EmilioPascual, and it is not an error. In most cases, they do not have any sequence defined by default. If you try to update one that does have a sequence in the XML file that defines it, it will be placed in its correct position. Also, I changed the fields I unchecked by default to:
|
a49e557 to
ec2f7aa
Compare
Gelojr
left a comment
There was a problem hiding this comment.
TEST3 has been performed again. I´m agree with the change has been introduced so that the final log now explicitly lists the accounts that have not been updated because they are not part of the chart of accounts and were created by other methods.
As a possible improvement, it would be useful if the log showed not only the account name but also the account code.
|
This PR has the |
Gelojr
left a comment
There was a problem hiding this comment.
Great job on this contribution @u0f
The following tests have been performed:
- Test 1: Fiscal positions – verified that the field “Sequence” is not included by default when reviewing fiscal positions, and the behavior matches the expected configuration.
- Test 2: Fiscal positions – manually selected the field “Sequence”, executed the update wizard, and confirmed that differences are correctly proposed and applied only when real discrepancies exist.
pedrobaeza
left a comment
There was a problem hiding this comment.
Now it seems o2m fields are shown, although unchecked, while they should be forbidden explicitly, as they can't be handled properly. Example, field tax_ids in tax groups. Can you please check?
ec2f7aa to
bfc3c0d
Compare
Done. Thank you for your review! |
|
Thanks for the changes. Now I'm checking it, and it seems the changes on the tax distribution lines are not detected. Can it be affected by the o2m cleaning you have done? |
The previous implementation moved the one2many filter to _domain_per_name() which blocked one2many fields from being added to the wizard manually. This broke existing tests and prevented detection of changes in tax repartition lines. Solution: Move the one2many filter from _domain_per_name() to each _default_*_field_ids() method. This way: - One2many fields are NOT included by default (desired behavior) - One2many fields CAN be added manually (needed for tests) - Comparison in diff_fields() works correctly for nested models Fixes issue reported by @pedrobaeza in PR OCA#2196
7e32ddf to
8ba16ee
Compare
8ba16ee to
cfd3954
Compare
Updated. Now distribution lines are shown but they are unchecked |
|
Well, they should be checked by default, as that's the most important part in the tax configuration IMO. |
|
If they are automatically checked and updated, no matter if the mark is checked or not, they should be hidden. If the check/update depends on the mark, then it should be checked by default. |
cfd3954 to
beaa1b8
Compare
|
Thanks, tested. Although there are 3 fields ( |
beaa1b8 to
b642ced
Compare
You're right, it's better to leave only |
|
But they are shown, but unchecked, isn't it? I think they should be hidden as they was. |
pedrobaeza
left a comment
There was a problem hiding this comment.
OK, great!
/ocabot merge major
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 89d97ba. Thanks a lot for contributing to OCA. ❤️ |






Given the old logic, ignored fields simply did not appear and were not taken into consideration. #2185
With this improve, some fields have been moved from
ignoredto a new method which causes them to be displayed unchecked by default.https://www.loom.com/share/47a70d6113804757a077f0a1955722c1
@moduon MT-12947