Skip to content

[19.0][MIG] subscription_oca#1393

Open
stferraro wants to merge 35 commits intoOCA:19.0from
Jenrax-git:19.0-mig-subscription_oca
Open

[19.0][MIG] subscription_oca#1393
stferraro wants to merge 35 commits intoOCA:19.0from
Jenrax-git:19.0-mig-subscription_oca

Conversation

@stferraro
Copy link
Copy Markdown

“Applied the requested test corrections as per review.”

@yvaucher
Copy link
Copy Markdown
Member

/ocabot migration subscription_oca

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Feb 24, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 24, 2026
27 tasks
@yvaucher yvaucher changed the title 19.0 mig subscription oca [19.0][MIG] subscription_oca Feb 24, 2026
@yvaucher
Copy link
Copy Markdown
Member

@stferraro The commit history looks really weird, you need to keep the history of the module

I expect to see those commits:

https://github.com/OCA/contract/commits/17.0/subscription_oca

(translation commits can be merged)

Please find here the whole instructions for module migration: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-19.0

Copy link
Copy Markdown
Member

@yvaucher yvaucher left a comment

Choose a reason for hiding this comment

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

Commit history is broken

@stferraro
Copy link
Copy Markdown
Author

@yvaucher ok close this pr and open new with this change for migrate this module

@yvaucher
Copy link
Copy Markdown
Member

yvaucher commented Feb 24, 2026

You can push force on this one to fix it, no need to close it.

carlos-domatix and others added 22 commits March 5, 2026 19:11
Currently translated at 95.7% (159 of 166 strings)

Translation: contract-16.0/contract-16.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-subscription_oca/nl/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/
Currently translated at 100.0% (163 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/it/
Currently translated at 92.6% (151 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/fi/
metingulsoy and others added 11 commits March 5, 2026 19:11
Currently translated at 58.8% (96 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/tr/
Currently translated at 61.3% (100 of 163 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/tr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/
Currently translated at 100.0% (164 of 164 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/it/
Currently translated at 100.0% (164 of 164 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/tr/
Currently translated at 100.0% (164 of 164 strings)

Translation: contract-17.0/contract-17.0-subscription_oca
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca/ca/
@stferraro stferraro force-pushed the 19.0-mig-subscription_oca branch from 1426a10 to 46e3239 Compare March 5, 2026 23:14
@stferraro stferraro requested a review from yvaucher March 5, 2026 23:38
@stferraro
Copy link
Copy Markdown
Author

@yvaucher check pr now !

@rickard-w
Copy link
Copy Markdown

Are you guys also having a look at reported bugs in previous versions when doing this migration?
I reported Bug #1320 - [17.0], [18.0] subscription_oca - Uncontrolled changes of discount on product lines.

Would be really appreciated if this weird behavior was taken care of in [19.0]

@stferraro
Copy link
Copy Markdown
Author

stferraro commented Mar 6, 2026

"Hi @rickard-w, I have addressed the issue described in bug #1320.

I modified the _compute_discount logic to ensure that manual discounts are preserved when changing the product quantity. Additionally, I've added a new regression test test_manual_discount_persistence to verify the fix and prevent this from happening again in the future.

Could you please review and verify? Thanks!"

@rickard-w
Copy link
Copy Markdown

Thank you very much @stferraro.

I would love to help you with the verification, but I don't know how to test this when there's no Runbot, and I don't have the skills to verify the code. Sorry about that

@kwoychesko
Copy link
Copy Markdown

Thank you very much @stferraro.

I would love to help you with the verification, but I don't know how to test this when there's no Runbot, and I don't have the skills to verify the code. Sorry about that

Hey @rickard-w -- I was struggling with this, too. The workaround I'm using:

  1. Find the v18.0 (or other prev version) of the module.
  2. Click the Try Me! button. This opens up the runbot for that version.
  3. Change the version number in the URL from "target_branch=18.0" to "target_branch=19.0" (for example).
  4. The runbot for the 19.0 version opens.
  5. Start the instance related to the PR (see red box in screenshot).
image

@rickard-w
Copy link
Copy Markdown

@stferraro I have done some basic testing of the Subscription now. As far as I can tell it works fine. Thanks for fixing bug #1320.

Thanks @kwoychesko for the Runbot instruction.

@stferraro
Copy link
Copy Markdown
Author

please verify all and approved this pr please and merge to 19.0 branch

@rickard-w
Copy link
Copy Markdown

@stferraro In v17 I have added a Record Rule for multi company. Maybe that should be implemented in this version as this is standard in other odoo modules. Other than that I haven't found any discrepancies

@stferraro
Copy link
Copy Markdown
Author

@rickard-w Thank you for the feedback.

Hello, I will add it to align this module with the standard approach used across Odoo and OCA modules.

This should ensure consistency and completeness regarding multi-company behavior.

Thanks again for pointing this out.

@stferraro
Copy link
Copy Markdown
Author

@rickard-w

Thank you for the clarification.

I have reviewed both version 17 and 18, and I was not able to find any record rule related to multi-company in those implementations of the module.

Could you please point me to the specific PR or commit where this record rule was introduced, and in which part of the module it should be located?

This will help ensure the implementation is aligned correctly with the intended standard approach.

Thanks again for your support.

@stferraro
Copy link
Copy Markdown
Author

@yvaucher please approved this PR and merge to 19.0

@rickard-w
Copy link
Copy Markdown

@ stferraro Sorry for misleading you. What I meant was that I have implemented the record rule in my local v17 installation. I'm a newbie to this so I don't know how to add stuff in here :)

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.