[FIX] 10.0 on_product_price_changed event with new API#48
Open
PierrickBrun wants to merge 2 commits intoOCA:10.0from
Open
[FIX] 10.0 on_product_price_changed event with new API#48PierrickBrun wants to merge 2 commits intoOCA:10.0from
PierrickBrun wants to merge 2 commits intoOCA:10.0from
Conversation
df687d8 to
63193f2
Compare
gurneyalex
approved these changes
Jan 6, 2022
Member
|
/ocabot merge patch |
Contributor
|
On my way to merge this fine PR! |
OCA-git-bot
added a commit
that referenced
this pull request
Jan 6, 2022
Contributor
|
@gurneyalex your merge command was aborted due to failed check(s), which you can inspect on this commit of 10.0-ocabot-merge-pr-48-by-gurneyalex-bump-patch. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While migrating the connector_magento_pricing module I had trouble getting notifications from the "on_product_price_changed" event.
I wrote tests for the event to make sure this wasn't the cause. While doing so I realized the old API fired the event as expected but the new one did not. In fact when the change is done on a product.template, the product.products are notified with the old API but the notification is done on the product.template with the new API.
I made a fix that corrected my problem and everything works now. I am not sure this is the right way to do it (the use of 'product' is redundant).
Also, I have no idea how to test with the new API so my test does not cover this case but only the old way.