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

[10.0][FIX]Fix supplier search for variant #108

Merged
merged 5 commits into from
May 28, 2019

Conversation

luc-demeyer
Copy link
Contributor

No description provided.

@@ -344,7 +344,8 @@ def _ubl_add_item(
if seller:
sellers = self.env['product.supplierinfo'].search([
('name', '=', seller.id),
('product_tmpl_id', '=', product.product_tmpl_id.id)])
('product_tmpl_id', '=', product.product_tmpl_id.id),
Copy link
Member

Choose a reason for hiding this comment

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

is there even a need for the template id if you use the variant id?

@luc-demeyer
Copy link
Contributor Author

@tbaden
Thanks for your feedback.
After a bit of investigation:
product_tmpl_id must always be there, hence I think it's better to keep that part of the domaint (a product.supplierinfo record without product_tmpl_id implies a corrupted data structure).

But while investigating I amended this PR since we need to search on product_id when variants are used and product_id when variants are not used.

@pedrobaeza pedrobaeza added this to the 10.0 milestone May 22, 2019
@pedrobaeza
Copy link
Member

@luc-demeyer
Copy link
Contributor Author

@pedrobaeza
Thanks a lot for this suggestion. I'll have a look and adapt this PR accordingly.

Copy link
Sponsor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review.

@pedrobaeza pedrobaeza merged commit 741ab98 into OCA:10.0 May 28, 2019
astirpe pushed a commit to onesteinbv/edi that referenced this pull request Dec 13, 2019

* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
astirpe pushed a commit to onesteinbv/edi that referenced this pull request Dec 13, 2019

* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
alexis-via pushed a commit that referenced this pull request Dec 31, 2019

* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
astirpe pushed a commit to onesteinbv/edi that referenced this pull request Feb 28, 2020
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
alexis-via pushed a commit that referenced this pull request Mar 3, 2020
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
phuctranfxvn pushed a commit to trobz/edi that referenced this pull request Jan 3, 2021
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
fshah-initos pushed a commit to initOS/edi that referenced this pull request May 5, 2021
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
simahawk pushed a commit to simahawk/edi that referenced this pull request Jul 9, 2021
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
tbanevicius pushed a commit to tbanevicius/edi that referenced this pull request Mar 22, 2022
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
ghost pushed a commit to gbrito/edi that referenced this pull request Feb 14, 2023
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
aisopuro pushed a commit to avoinsystems/edi that referenced this pull request Feb 27, 2023
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
ghost pushed a commit to gbrito/edi that referenced this pull request Mar 28, 2023
* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants