Skip to content

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

Open
cialuo wants to merge 5 commits intoxie8899:business_requirement_deliverable_8.0from
cialuo:business_requirement_deliverable_8.0_fix_copy_resources_issue
Open

[FIX] get resource sale unit price from pricelist when get from default#43
cialuo wants to merge 5 commits intoxie8899:business_requirement_deliverable_8.0from
cialuo:business_requirement_deliverable_8.0_fix_copy_resources_issue

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