-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
[16.0][IMP] [account_statement_base account_reconcile_oca] make statements listed and editable #637
Conversation
Hi @alexis-via, @etobella, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment and we can proceed
@@ -325,11 +326,12 @@ | |||
<field | |||
name="context" | |||
>{'default_journal_id': active_id, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'}</field> | |||
<field name="view_mode">tree</field> | |||
<field name="view_mode">tree,kanban</field> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<field name="view_mode">tree,kanban</field> | |
<field name="view_mode">kanban,tree</field> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order is important, as the default loaded view is tree now
<field | ||
name="view_ids" | ||
eval="[(5, 0, 0), | ||
(0, 0, {'view_mode': 'tree', 'view_id': ref('bank_statement_line_reconcile_view')})]" | ||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account_statement_base.account_bank_statement_line_tree')}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the order, first the kanban please 😉
<field | ||
name="view_ids" | ||
eval="[(5, 0, 0), | ||
(0, 0, {'view_mode': 'tree', 'view_id': ref('bank_statement_line_reconcile_view')})]" | ||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account_statement_base.account_bank_statement_line_tree')}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the order, first the kanban please 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just sent a fix.
I haven't checked yet, but statement lines shouldn't be editable once the statement is published (just in case this is favoring other behavior). |
@pedrobaeza I had the same concern, but I tested it on runboat and an error was raised when editing reconciled moves 😃 |
Then isn't better to not allow to edit such reconciled entries? |
Odoo doesn't allow you to change reconciled entries so there is no such concern. The real problem is not having edit/delete capability on the statements. How to change or delete them if you imported wrong? How to set foreign currency and foreign currency amount? Is it possible to do it somewhere else? |
What I mean is UX. According to what I'm understanding, the interface will let you change data in reconciled lines, but at the saving time, it will rise an error. What I'm talking about is to directly avoid to change such data for the reconciled entries. |
How do we allow editing some of the lines conditionally? (on tree editable mode) We can improve UX if this is possible. It works on enterprise similarly by the way. |
In 16 you should do: attrs="{'readonly': [('is_reconciled', '=', True)]}" on the view for each field |
I added this to this PR. |
Can you squash your commits and a use a proper commit message? Thanks 😉 |
There should be "Squash & Merge" option for accepting a PR? |
No, the bot can't squash, so it should be done manually. |
I checked and with this new tree view, we can unlink the items. It is right that we can unlink lines that are not reconciled, but with this we were able to unlink reconciled lines. Can you add a validation on the unlink in order avoid this? |
Hi @lk-eska @pedrobaeza I think that it should be fixed before merging this PR. Deleting reconciled items in the tree view should be forbidden. If you want, we can manage this PR keeping you as author. Let us know, please. |
b346fde
to
7de1c37
Compare
I squashed them into one commit. |
Deleting a statement line (unless it is reconciled with an invoice) is standard behavior in enterprise. This is not a bug but a feature and all enterprise users live with it without complaining. I think we are getting beyond the scope of this pull request. Not that I care about authorship but if you think this is required you can create your own PR fixing it once this gets merged. |
@lk-eska It is already nice to delete not reconciled lines, but right now,we are able to delete reconciled lines. |
But only with reconciled items with invoices You can see here what happens... Obviously, this is not right movie.mp4 |
It is deleting the generated account move so I see no problem here. Why bother unreconciling it when you can skip that step? |
I understand that a reconciled move should never be deleted, as it is posted. So, IMO it is not a desired behavior. |
What about payments related to reconciled account moves like manual ones? For example like the ones that we create in the initial balance, or the ones coming from payrolls? Is that a desired behaviour? |
I haven't tested all possible use cases but I assume it allows deletion if it is not reconciled with another move. It should cover most of your questions. IMO, deleting is not a big deal if it is a standalone entry. |
Hi, I'm starting to think that you're right. I've tested V15 and the functionality is the same as here (I think). In V15 you can delete reconciled bank statement lines as well. |
AFAIK, that's not possible. What are the steps you do for that? |
I think there is a confusion when we say reconciled. Let me clarify:
|
These are my steps in V15:
@pedrobaeza @etobella I think it's not correct, but it seems it has been working like that for several years. WDYT? |
Yep. That's it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual operations can be deleted, but reconciled statement lines (with invoices or other payable/receivable accounts like customers/vendors in the starting balance) can't be deleted once they're reconciled.
IMHO, this pull request is functionally correct. LGTM.
OK, analyzing it, it seems congruent with the new v16 approach:
Anyway, I think we should add a protection over lines belonging to an statement, as if you remove a line, your balances won't fit and you won't be able to add the line in the same statement. What do you think? I'm thinking in statements imported from banks, where the transaction list should be unalterable at that level. |
I agree, but shouldn't we work in this new IMP/FIX in a new PR? |
Can we merge this now? |
Make listed and editable
Make them listed and editable
7de1c37
to
df5a929
Compare
Yes, I added a proper commit message and splitted them between both modules (Sorry for making you merge them, because they were two modules and I didn't notice that) For the next time, remember to use proper commits message https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#L1114-L1167 As you can see, I kept your authorship and no modification on the code If it is ok for you the applied changes, I can proceed with merge |
But I still see 2 different commits. Is that correct, @etobella ? |
Yes, two modules are modified. |
No problem @etobella ! You can merge it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge patch
This PR has the |
@etobella The merge process could not start, because command
|
Trying again /ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 7ad0b37. Thanks a lot for contributing to OCA. ❤️ |
Currently there is no way to list or edit bank statement lines. this PR brings this feature to account_statement_base account_reconcile_oca modules.