Skip to content

Conversation

@rousseldenis
Copy link
Contributor

@rousseldenis rousseldenis commented Mar 18, 2025

@rousseldenis
Copy link
Contributor Author

/ocabot migration product_attribute_custom_variant

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Mar 18, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 18, 2025
68 tasks
@rousseldenis
Copy link
Contributor Author

@SirAionTech This can be your interest.

I've added two improvements you can maybe backport to your PR.

@rousseldenis
Copy link
Contributor Author

@monen17

@rousseldenis
Copy link
Contributor Author

I think the sale part can be splitted.

Copy link

@monen17 monen17 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
I have tried this module in a local instance and it works great!

I also have reviewed the code and noticed a few thinkgs, see the other comments.

Please edit the title of commit 38ddd11 because it's too long according to the guidelines:

please check if the commit message is cut with ellipsis

(from https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message)

and gets truncated:
image
Since the module name consumes a lot of space already, you can either shorten it or the commit description with something like:

[IMP] product_attribute_custom_value_variant: Readability

Split code in functions

One more thought: it might also be a [REF] because the module's behavior is not changing.

About the backporting, I prefer to do such things when PRs are merged for two reasons:

  • avoid the overhead of keeping multiple PRs synced
  • one more reason to merge PRs 😏

I think the sale part can be splitted.

I agree that ideally this module would only depend on product and we'd have a bridge module to make it work with sale, but as far as I know custom attribute values have very little (maybe none?) use without sales so the bridge module would be installed very often making the decoupling useless.
This said, if someone wants to do it it's ok by me.

@rousseldenis
Copy link
Contributor Author

About the backporting, I prefer to do such things when PRs are merged for two reasons:

  • avoid the overhead of keeping multiple PRs synced
  • one more reason to merge PRs 😏

Yes, I approved your 16.0's PR. If you can attract people there, we can merge :-)

@rousseldenis
Copy link
Contributor Author

rousseldenis commented Mar 19, 2025

I agree that ideally this module would only depend on product and we'd have a bridge module to make it work with sale, but as far as I know custom attribute values have very little (maybe none?) use without sales so the bridge module would be installed very often making the decoupling useless.
This said, if someone wants to do it it's ok by me.

I will publish the split here soon. The idea was also to simplify the code to be called on sale side in order to replace the variant by the new one.

The idea was to be able to get new variant from custom attribute in any other flow.

@rousseldenis
Copy link
Contributor Author

rousseldenis commented Mar 19, 2025

(from https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message)

and gets truncated:

I agree with short commit message BUT I'm not with non meaning ones. And that's not because github interface truncates it that they should go to something like [IMP] p_a_c_v: (...) 😅

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 7, 2025
@github-actions github-actions bot closed this Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration needs review stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants