Skip to content

[18.0][MIG] product_supplierinfo_for_customer_sale: Migration to version 18.0 and renamed to product_customerinfo_sale#3591

Merged
OCA-git-bot merged 46 commits intoOCA:18.0from
Tecnativa:18.0-mig-product_customerinfo_sale
Apr 14, 2025
Merged

[18.0][MIG] product_supplierinfo_for_customer_sale: Migration to version 18.0 and renamed to product_customerinfo_sale#3591
OCA-git-bot merged 46 commits intoOCA:18.0from
Tecnativa:18.0-mig-product_customerinfo_sale

Conversation

@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa commented Feb 24, 2025

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration product_supplierinfo_for_customer_sale

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 25, 2025
@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor Author

ping @sergio-teruel @rousseldenis @cem-adhoc
@victoralmau @chienandalu could you please review this?

Copy link
Copy Markdown
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

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

Functionally testing in sales, there are some things that do not work correctly:

  • Searching for a product by the product_code or product_name of the defined customer_info of the product does not work.
  • Adding a product line, the price that is defined is not the one indicated in the customerinfo line.

@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor Author

Functionally testing in sales, there are some things that do not work correctly:

  • Searching for a product by the product_code or product_name of the defined customer_info of the product does not work.

Please take into account that in sale.order.line, we have two fields: product_id and product_template_id. This module only affects product_id. If you add this field to the list view, it works fine.

Note: In v17, the sale order only displays product_id, and product_template_id is hidden. It is only shown when the module sale_product_configurator is installed. However, after this PR odoo/odoo#155449, product_template_id is always displayed.
@pedrobaeza @victoralmau, could you confirm if we should now also add support for product_template_id?

  • Adding a product line, the price that is defined is not the one indicated in the customerinfo line.

Please attach an image. I assume you're referring to the product price from customer_info, but this is only used with a pricelist. Did you test with this configuration?

Product configuration
image

Pricelist setting
image

Sale order
image

@pedrobaeza
Copy link
Copy Markdown
Member

pedrobaeza commented Mar 6, 2025

AFAIK, both fields only exist if you install the matrix thing, but not with only regular sale module.

@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor Author

AFAIK, both fields only exist if you install the matrix thing, but not with only regular sale module.

Please review this PR: odoo/odoo#155449. In version 18, the sale module now includes both fields, and they are visible by default

@pedrobaeza
Copy link
Copy Markdown
Member

Oh, they have merged the modules. That's explain it...

Then yes, we have to add support.

@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-mig-product_customerinfo_sale branch from 1d7fcf0 to b53bb08 Compare March 10, 2025 15:16
@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor Author

@victoralmau @pedrobaeza I have updated the code to allow searching on product.template. This feature was added in OCA/product-attribute#1912. Please try again.

odooexperts-visioncode and others added 17 commits March 28, 2025 09:27
[REF] product_supplierinfo_for_customer_sale: Changes in test.

[REF] product_supplierinfo_for_customer_sale: Complete README.rst
…rch, products found by default code and customer code

[REF] product_supplierinfo_for_customer_sale: Add test to find more than one product in name_search

[REF] product_supplierinfo_for_customer_sale: In test find one product from customer code and other one from product default code.

[REF] product_supplierinfo_for_customer_sale: Changes in name_search to work exactly with number of limit defined.

[REF] product_supplierinfo_for_customer_sale: Changes in name_search
 - New field name from type to supplierinfo_type
 - Remove copyright for __init__.py
 - Re-using variables from tests
 - Manifest bump version and using module url
 - Get commit history from
 https://github.com/OCA/product-attribute/tree/8.0/product_supplierinfo_for_customer_sale
    - Run 2to3 script
    - view fixing
… instead of manual assign.

 - Removing duplicated test for name_search
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
There's no price computation on the module, so there shouldn't be any test regarding
this topic, or it can fail in integration tests.
Juany Davila and others added 16 commits March 28, 2025 09:27
…s all product.customerinfo

[UPD] Update product_supplierinfo_for_customer_sale.pot

product_supplierinfo_for_customer_sale 15.0.1.1.0
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-16.0/sale-workflow-16.0-product_supplierinfo_for_customer_sale
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-product_supplierinfo_for_customer_sale/
Currently translated at 100.0% (6 of 6 strings)

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

Translation: sale-workflow-16.0/sale-workflow-16.0-product_supplierinfo_for_customer_sale
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-product_supplierinfo_for_customer_sale/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-product_supplierinfo_for_customer_sale
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-product_supplierinfo_for_customer_sale/de/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-product_supplierinfo_for_customer_sale
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-product_supplierinfo_for_customer_sale/it/
…Form() to change line name properly

TT49073

Co-Authored-By: Pedro M. Baeza <pedro.baeza@tecnativa.com>
… onchange

The previous code was trying to avoid a double search on customerinfo
passing by context the already searched customerinfo, but the ORM makes
some artifacts (like duplicating one2many references with NewId records)
on that cases, provoking the call chain to fail when comparing .id on
NewId.

The solution is to not pass anything by context and do the search 2
times. Anyway, the performance improvement was low, having data in
cache.

TT49073
In OCA#3163 the test where changed and try to set a field restricted to a
group that the user used in the test don't have.
renamed from product_supplierinfo_for_customer
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 18.0-mig-product_customerinfo_sale branch from b53bb08 to 4e14790 Compare March 28, 2025 14:28
@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor Author

@victoralmau @pedrobaeza I have updated the code to allow searching on product.template. This feature was added in OCA/product-attribute#1912. Please try again.

ping @victoralmau @pedrobaeza

Copy link
Copy Markdown
Contributor

@JordiMForgeFlow JordiMForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM

@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor Author

@victoralmau @pedrobaeza I have updated the code to allow searching on product.template. This feature was added in OCA/product-attribute#1912. Please try again.

ping @victoralmau @pedrobaeza

Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-3591-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 48fe1e6 into OCA:18.0 Apr 14, 2025
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 29b907e. Thanks a lot for contributing to OCA. ❤️

@carlos-lopez-tecnativa carlos-lopez-tecnativa deleted the 18.0-mig-product_customerinfo_sale branch April 14, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.