Skip to content

[18.0][FIX] account_invoice_import: Use correct fiscal position#1302

Open
mt-software-de wants to merge 1 commit into
OCA:18.0from
mt-software-de:18-fix-account_invoice_import-fiscal_position
Open

[18.0][FIX] account_invoice_import: Use correct fiscal position#1302
mt-software-de wants to merge 1 commit into
OCA:18.0from
mt-software-de:18-fix-account_invoice_import-fiscal_position

Conversation

@mt-software-de
Copy link
Copy Markdown

Right only the fiscal position is used if it is directly set on the partner.
In a normal odoo environment it isn't the case that the fiscal position needs to be set,
because it is selected automatically.

This change uses the method _get_fiscal_position which either returns the manually set fiscal position or the automatically detected on.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @alexis-via,
some modules you are maintaining are being modified, check this out!

@mt-software-de mt-software-de changed the title [FIX] account_invoice_import: Use correct fiscal position [18.0][FIX] account_invoice_import: Use correct fiscal position Feb 27, 2026
@mt-software-de mt-software-de force-pushed the 18-fix-account_invoice_import-fiscal_position branch from 2103d7d to e83c606 Compare February 27, 2026 12:44
Copy link
Copy Markdown
Contributor

@arnaudlayec arnaudlayec left a comment

Choose a reason for hiding this comment

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

Hello,
Thank you for this change. I agree it is really needed because in previous code, if partner.property_account_position_id is empty, the fiscal position of the invoice can be set wrongly.
A call to the native method res_partner._get_fiscal_position should indeed replace the partner.property_account_position_id

I have a few suggestions to let the code simple to read

Comment thread account_invoice_import/wizard/account_invoice_import.py
Comment thread account_invoice_import/readme/CONTRIBUTORS.md
Comment thread account_invoice_import/wizard/account_invoice_import.py Outdated
Comment thread account_invoice_import/wizard/account_invoice_import.py
Comment thread account_invoice_import/wizard/account_invoice_import.py Outdated
@mt-software-de mt-software-de force-pushed the 18-fix-account_invoice_import-fiscal_position branch from e83c606 to 58f7e36 Compare May 12, 2026 09:54
@OCA-git-bot OCA-git-bot added series:18.0 mod:account_invoice_import Module account_invoice_import labels May 12, 2026
@mt-software-de mt-software-de force-pushed the 18-fix-account_invoice_import-fiscal_position branch from 58f7e36 to b2ab15f Compare May 12, 2026 13:29
Copy link
Copy Markdown
Contributor

@arnaudlayec arnaudlayec left a comment

Choose a reason for hiding this comment

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

All good for me, I think it is very helpful

@mt-software-de
Copy link
Copy Markdown
Author

@alexis-via could you maybe give this PR a second review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:account_invoice_import Module account_invoice_import series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants