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] get resource sale unit price from pricelist when get from default #43

Open
wants to merge 5 commits into
base: business_requirement_deliverable_8.0
Choose a base branch
from

Conversation

cialuo
Copy link

@cialuo cialuo commented Mar 30, 2016

[FIX] get resource sale unit price from pricelist when get from default

`````` self.get_estimation_pricelist()```

  

def get_closest_ancestor_pricelist(self):
for project in self:
pricelist = self.env['product.pricelist'].browse(
project.pricelist_id.id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure this is enough.
Rule should be for the pricelist:
If pricelist in master project then use project.pricelist
else if pricelist is project parent then use parent_project.pricelist
else use partner.pricelist

Copy link
Author

Choose a reason for hiding this comment

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

@elicoidal Seb told me that the rule had not been confirmed, So just let me keep the function and in other model can use this function.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@seb-elico your input ?

@seb-elico
Copy link

Make sure that everywhere in the BR module(s), when you need the pricelist of a BR, you systematically use br.get_estimation_pricelist()

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