Skip to content

[REF] account: refactor base lines extraction for taxes computation#646

Open
rolandojduartem wants to merge 1 commit intoVauxoo:18.0from
vauxoo-dev:18.0-account-inherit_base_amls-rolando
Open

[REF] account: refactor base lines extraction for taxes computation#646
rolandojduartem wants to merge 1 commit intoVauxoo:18.0from
vauxoo-dev:18.0-account-inherit_base_amls-rolando

Conversation

@rolandojduartem
Copy link
Copy Markdown

@rolandojduartem rolandojduartem commented Dec 10, 2025

Refactored the logic to extract base lines for tax computation in
AccountMove. Introduced the _get_base_amls method to centralize
the retrieval of base lines, improving code clarity and maintainability.

This change enhances heritability, allowing future modules to override
the base lines selection logic in a single place.

No functional change is expected, but the code is now easier to
extend and maintain, especially for localizations or custom modules
that need to alter base line selection for tax calculations.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@rolandojduartem rolandojduartem force-pushed the 18.0-account-inherit_base_amls-rolando branch from 9081cc5 to 9dbe4f7 Compare December 10, 2025 06:01
@rolandojduartem
Copy link
Copy Markdown
Author

What do you think? @luistorresm @hugho-ad @luisg123v

Related to T#96737

Copy link
Copy Markdown
Collaborator

@hugho-ad hugho-ad left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@rolandojduartem
Copy link
Copy Markdown
Author

@luistorresm what do you think?

@luistorresm
Copy link
Copy Markdown
Collaborator

Hello @rolandojduartem

Could you avoid to improve the code?

I think that it is better only move to the new method, what do you think @hugho-ad ?

@hugho-ad
Copy link
Copy Markdown
Collaborator

@rolandojduartem minimal diff please

@hugho-ad
Copy link
Copy Markdown
Collaborator

@rolandojduartem minimal diff please

well, changes seems to be ok for me, but I think @luistorresm stands for not chaging the actual logic implemented by Odoo, but only move it to the new metho

@rolandojduartem rolandojduartem force-pushed the 18.0-account-inherit_base_amls-rolando branch from 9dbe4f7 to 3b5f46e Compare December 19, 2025 22:55
@rolandojduartem
Copy link
Copy Markdown
Author

what about now, @luistorresm?

@luistorresm
Copy link
Copy Markdown
Collaborator

LGTM @rolandojduartem

Refactored the logic to extract base lines for tax computation in
`AccountMove`. Introduced the `_get_base_amls` method to centralize
the retrieval of base lines, improving code clarity and maintainability.

This change enhances heritability, allowing future modules to override
the base lines selection logic in a single place.

No functional change is expected, but the code is now easier to
extend and maintain, especially for localizations or custom modules
that need to alter base line selection for tax calculations.
@rolandojduartem rolandojduartem force-pushed the 18.0-account-inherit_base_amls-rolando branch from 3b5f46e to b33e540 Compare December 19, 2025 23:25
@luistorresm
Copy link
Copy Markdown
Collaborator

@rolandojduartem

Do you create the PR for Odoo?

@rolandojduartem
Copy link
Copy Markdown
Author

rolandojduartem commented Jan 15, 2026

@luistorresm I did, odoo#240809

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.

3 participants