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

[FIX][14.0] get_purchase_price pos_margin #1237

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

Conversation

sergiocorato
Copy link

No description provided.

@OCA-git-bot
Copy link
Contributor

Hi @legalsylvain,
some modules you are maintaining are being modified, check this out!

@@ -37,12 +37,12 @@ def _get_purchase_price(self, line):
"""Overwrite the method from the module "sale_margin"
(https://github.com/odoo/odoo/blob/14.0/addons/sale_margin/models/sale_order.py#L20)"""
if not line.product_id:
line.purchase_price = 0.0
return 0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get it. It looks that the comment is obsolete.
https://github.com/odoo/odoo/blob/14.0/addons/sale_margin/models/sale_order.py#L20 doens't mention a _get_purchase_price function, but a _compute_purchase_price function.

It should be bette "copy the method from sale_margin module". Don't you think ?

otherwise, LGTM.

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.

3 participants