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

[16.0][IMP] purchase_vendor_promotion: auto assign supplier with promotion #2

Conversation

trisdoan
Copy link

This change

  • In replenishment, we think that assigning best supplier should also be the intended logical behavior the module.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

lambda x: x._is_promotion_active_or_upcoming()
)
if promotion_suppliers:
rec.supplier_id = promotion_suppliers.sorted(key=lambda x: x.price)[
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to sort again by price ? That was already done in _prepare_sellers no ?

Copy link
Author

Choose a reason for hiding this comment

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

Hello @santostelmo, you're totally right. I wanted to prioritize the price at the beginning. But I think it's not necessary to repeat it.

@trisdoan trisdoan force-pushed the 16.0-imp-purchase_vendor_promotion branch from ee21ca8 to 3a66297 Compare June 11, 2024 08:23
@trisdoan trisdoan requested a review from santostelmo June 11, 2024 08:24
@trisdoan trisdoan closed this Jun 28, 2024
@trisdoan trisdoan reopened this Jun 28, 2024
mymage and others added 20 commits June 28, 2024 15:04
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_packaging_default
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_packaging_default/it/
Currently translated at 100.0% (1 of 1 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_order_supplier_return
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_order_supplier_return/it/
Currently translated at 100.0% (11 of 11 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_allowed_product
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_allowed_product/pt_BR/
Currently translated at 100.0% (30 of 30 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_order_approved
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_order_approved/pt_BR/
Currently translated at 100.0% (26 of 26 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_order_type
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_order_type/pt_BR/
Currently translated at 100.0% (10 of 10 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_default_terms_conditions/pt_BR/
Currently translated at 100.0% (40 of 40 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_advance_payment
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_advance_payment/pt_BR/
Currently translated at 100.0% (23 of 23 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_merge
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_merge/pt_BR/
Currently translated at 100.0% (138 of 138 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_landed_cost
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_landed_cost/pt_BR/
Currently translated at 100.0% (18 of 18 strings)

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

Translation: purchase-workflow-16.0/purchase-workflow-16.0-product_supplier_code_purchase
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-product_supplier_code_purchase/pt_BR/
Currently translated at 100.0% (7 of 7 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_open_qty
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_open_qty/pt_BR/
Currently translated at 100.0% (13 of 13 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_discount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_discount/pt_BR/
Currently translated at 29.4% (68 of 231 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_request/pt_BR/
Currently translated at 100.0% (15 of 15 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_triple_discount
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_triple_discount/pt_BR/
Currently translated at 100.0% (11 of 11 strings)

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

Translation: purchase-workflow-16.0/purchase-workflow-16.0-procurement_purchase_no_grouping
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-procurement_purchase_no_grouping/pt_BR/
sysadminmatmoz and others added 28 commits June 28, 2024 15:04
Currently translated at 100.0% (6 of 6 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_date_planned_manual
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_date_planned_manual/sl/
Currently translated at 100.0% (6 of 6 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_date_planned_manual
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_date_planned_manual/pt_BR/
Currently translated at 16.6% (1 of 6 strings)

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_date_planned_manual
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_date_planned_manual/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: purchase-workflow-12.0/purchase-workflow-12.0-purchase_date_planned_manual
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_date_planned_manual/
pre-commit fixes

Test fixes

Removed unwanted check

Removed unwanted check for access

Reverted changes and updated test scripts

pre-commit fix

test fix

test fix

Test comment changes

Added tests

Removed commit
Currently translated at 100.0% (6 of 6 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_date_planned_manual
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_date_planned_manual/it/
Currently translated at 100.0% (9 of 9 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_vendor_promotion
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_vendor_promotion/it/
Currently translated at 100.0% (11 of 11 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_allowed_product
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_allowed_product/sv/
Currently translated at 100.0% (26 of 26 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_order_type
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_order_type/sv/
Currently translated at 100.0% (231 of 231 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_request
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_request/sv/
@trisdoan trisdoan closed this Jun 28, 2024
@trisdoan
Copy link
Author

Hello @santostelmo , @cyrilmanuel , I prepared OCA#2321 in order to include a multi-company issue fix 🙏

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.