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

[16.0][FIX] account_reconcile_oca: UnboundLocalError: local variable … #595

Closed
wants to merge 1 commit into from

Conversation

astirpe
Copy link
Member

@astirpe astirpe commented Sep 26, 2023

…'balance' referenced before assignment

Fixes #592, by applying the patch proposed here: odoo/odoo#123626

This is a quick&dirty fix, waiting for better ideas on how to fix it.

@OCA-git-bot
Copy link
Contributor

Hi @etobella,
some modules you are maintaining are being modified, check this out!

@astirpe astirpe force-pushed the 16_fix_account_reconcile_oca branch 2 times, most recently from dc77af2 to 82c07d5 Compare September 26, 2023 14:33
@astirpe astirpe marked this pull request as ready for review September 26, 2023 14:36
@etobella
Copy link
Member

Can you squash your commits?

Copy link

@ThijsvOers ThijsvOers left a comment

Choose a reason for hiding this comment

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

Tested this and it works. Please merge this fix as soon as possible since other modules are depending on this fix (and they are failing now). TIA

@etobella
Copy link
Member

I don't feel comfortable with this change. Which is the definition of the model that is giving you this error?

@astirpe
Copy link
Member Author

astirpe commented Oct 19, 2023

@etobella this is something you fixed when porting the module to V16: #500 (comment)

But then the bug re-appeard after your PR: #580

So the problem is standard odoo method _get_write_off_move_lines_dict() that is bugged. Model is "account.reconcile.model". The fix I applied is this one: https://github.com/odoo/odoo/pull/123626/files . Not sure I answered your question?

@pedrobaeza
Copy link
Member

Don't make a verbatim copy of the method, but overwrite _get_write_off_move_lines_dict and add/patch what you need.

@astirpe
Copy link
Member Author

astirpe commented Oct 20, 2023

This is a quick&dirty fix and i don't think I will have time to change it. If anyone will take over and propose a better solution I will be happy. Shall I close this one?

@sbidoul sbidoul added this to the 16.0 milestone Jan 1, 2024
@ACheung-FactorLibre
Copy link
Contributor

Hi,
If Odoo merges this FIX: odoo/odoo#154551, the error will be fixed and it won't be necessary to ovewrite any funcion.

@astirpe
Copy link
Member Author

astirpe commented Feb 19, 2024

Thank you @ACheung-FactorLibre

@astirpe astirpe closed this Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants