-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
9.0 mig purchase fiscal position update #281
Conversation
|
||
@api.onchange('fiscal_position_id') | ||
def onchange_fiscal_position_id(self): | ||
for line in self.order_line: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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)
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include tests
Tests added |
Travis is still red |
…angelmoya/purchase-workflow into 9.0-mig-purchase_fiscal_position_update
As this one is the same as 10.0 version and it has another author, I merge both. |
No description provided.