-
Notifications
You must be signed in to change notification settings - Fork 249
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
[16.0][FIX] fieldservice_sale: Fix sale order line create method #1160
Conversation
Hi @brian10048, @max3903, @wolfhall, |
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.
Good change, makes perfect sense :D
I'm using other FSM modules but not this specific one so it didn't break anything in my case
I'm surprised such a glaring bug went through, I guess this line creation code is not covered by unit tests? Would be nice to add one around it
Also I think you're not supposed to change the module version in your PR; this is done automatically by a bot when maintainers merge your PR
@houzefa-abba Awesome, thanks! Just pushed a fix to remove the module version bump. |
/ocabot merge patch |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 50ced3f. Thanks a lot for contributing to OCA. ❤️ |
This PR fixes a bug with the sales order line create method in the fieldservice_sale module to account for cases when the method is triggered without any sales order lines that are created, e.g. on some expense reports. This correction is in line with other
create()
methods and all sales order lines that are created should be returned, not just the last.Currently, the method throws an undefined variable error for
line
if there are no sales order lines created and only returns the last sales order line if there are any created.