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

8.0: cannot create a source manually #33

Closed
lepistone opened this issue Nov 10, 2014 · 0 comments
Closed

8.0: cannot create a source manually #33

lepistone opened this issue Nov 10, 2014 · 0 comments
Assignees
Labels

Comments

@lepistone
Copy link
Member

Install logistic_requisition alone, create a logistic.requisition.line and try to add a source.

You cannot fill in the currency, but when you try to save, you get an error saying that the currency is missing.

@lepistone lepistone self-assigned this Nov 10, 2014
@lepistone lepistone added the bug label Nov 10, 2014
lepistone added a commit to lepistone/vertical-ngo that referenced this issue Nov 10, 2014
Fixes OCA#33.

This is due to the fact that with the v8 API the methods that compute
function fields are called not only on save, but also as automatic
onchanges. In that situation, `self` is not a true record, but a virtual
NewId that contains only the values present in the view.

That is cool in theory, but in cases like that it can crash because the
requisition_id is empty as it is not present in the view.

This fix does the computation that relies on requisition_id only when it
is available. I do not check explicitly whether self if a NewId, so that
if we manage to fix the view so that we know the requisition_id, the
amount_total_company will be updated on the fly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant