Skip to content

[ADD] product_supplierinfo_update_price: New module #2700

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

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

luisDIXMIT
Copy link

@luisDIXMIT luisDIXMIT force-pushed the 16.0-add-product_supplierinfo_update_price branch from efe82a3 to 7b8fcd8 Compare May 29, 2025 12:07
@luisDIXMIT
Copy link
Author

A clarification: if there are multiple prices from the same supplier for the same product, the first one returned by the filtered function is used.

def action_update_product_supplierinfo(self):
self.ensure_one()

product_supplierinfo = (
Copy link
Member

Choose a reason for hiding this comment

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

you shouldn't use this. use

self.line.product_id._select_seller(
                partner_id=self.partner_id,
                quantity=slef..product_qty,
                date=self.order_id.date_order and self.order_id.date_order.date() or fields.Date.context_today(self),
                uom_id=self.product_uom,
                self._get_select_sellers_params()
)

@api.onchange("product_id", "partner_id", "price_unit")
def _compute_can_update_product_supplierinfo(self):
for line in self:
product_supplierinfo = (
Copy link
Member

Choose a reason for hiding this comment

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

Look previous comment please 😄

@luisDIXMIT luisDIXMIT force-pushed the 16.0-add-product_supplierinfo_update_price branch 2 times, most recently from 699d42a to f22d0c1 Compare May 30, 2025 07:34
@luisDIXMIT luisDIXMIT force-pushed the 16.0-add-product_supplierinfo_update_price branch from f22d0c1 to f22a966 Compare May 30, 2025 07:44
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.

2 participants