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

9.0 mig purchase fiscal position update #281

Merged
merged 11 commits into from
Nov 16, 2016

Conversation

angelmoya
Copy link
Member

No description provided.


@api.onchange('fiscal_position_id')
def onchange_fiscal_position_id(self):
for line in self.order_line:
Copy link
Member

Choose a reason for hiding this comment

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

Do:

for line in self.order_line:
    temp_line = line.new(line._convert_to_write(line._cache))
    temp_line.onchange_product_id()
    line.taxes_id = temp_line.taxes_id

Copy link
Member Author

Choose a reason for hiding this comment

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

This way is not working, and using cache is not direct, so it's more clear do like @alexis-via on #280

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Change in the approach (only drafted - to be tested)

@pedrobaeza
Copy link
Member

Check also Travis status


@api.onchange('fiscal_position_id')
def fiscal_position_change(self):
'''Function executed by the on_change on the fiscal_position_id field
Copy link
Member

Choose a reason for hiding this comment

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

Double quote instead of simple for docstring according PEP257

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

Include tests

@angelmoya
Copy link
Member Author

Tests added

@pedrobaeza
Copy link
Member

Travis is still red

@pedrobaeza
Copy link
Member

As this one is the same as 10.0 version and it has another author, I merge both.

@pedrobaeza pedrobaeza merged commit dffd9d7 into OCA:9.0 Nov 16, 2016
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.

None yet

3 participants