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

[18.0][MIG] account_reconcile_model_oca: Migration to 18.0 #738

Open
wants to merge 12 commits into
base: 18.0
Choose a base branch
from

Conversation

xaviedoanhduy
Copy link
Contributor

@xaviedoanhduy xaviedoanhduy commented Nov 7, 2024

change in v18

depend on

Copy link
Member

@mmequignon mmequignon left a comment

Choose a reason for hiding this comment

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

I'm not sure this is the right moment for cosmetic improvements.
LG though

Comment on lines +68 to +77
SQL(
rf"""
{unaccent("%s")} ~* ('^' || (
SELECT STRING_AGG(CONCAT('(?=.*\m', chunk[1], '\M)'), '')
FROM regexp_matches({unaccent('partner.name')}, '\w{{3,}}', 'g')
AS chunk
))
""",
text_value,
)
Copy link
Member

Choose a reason for hiding this comment

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

Why not adding the wrapping parenthesis here, in order to avoid the ugly extra parenthesis in the query parts every where else:

  • query = "[...] ("
  • final = ") [...]"
  • parts = ") OR (".join(subqueries)

which IMO is more complicated to read/understand.

@TDu
Copy link
Member

TDu commented Nov 7, 2024

Are we not missing some commits from 17.0 https://github.com/OCA/account-reconcile/commits/17.0/account_reconcile_oca ?

@xaviedoanhduy
Copy link
Contributor Author

Are we not missing some commits from 17.0 https://github.com/OCA/account-reconcile/commits/17.0/account_reconcile_oca ?

hi @TDu, Maybe you a little confused about between account_reconcile_model_oca and account_reconcile_oca?

@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-mig-account_reconcile_model_oca branch from c4d1fad to ab10b31 Compare November 12, 2024 03:49
@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-mig-account_reconcile_model_oca branch from ab10b31 to 0d217b9 Compare November 12, 2024 04:13
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.

9 participants