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

[FIX] fieldservice_account_analytic: automatically fill Contact in FSM Order #1219

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

tafaRU
Copy link
Member

@tafaRU tafaRU commented Oct 3, 2024

Start by saying that the logical behind it is not clear to me, during a debug session I noticed the following problem.

To Reproduce

Steps to reproduce the behavior:

  1. create a FSM order
  2. set location_id field
  3. edit the FSM order and save it

Expected behavior
Contact is automatically filled with that one of the Location.

Additional context
In debug we have:

> "customer_id" not in vals and order.customer_id is False
> False

> "customer_id" not in vals and not order.customer_id
> True

@OCA-git-bot
Copy link
Contributor

Hi @osimallen, @brian10048, @bodedra,
some modules you are maintaining are being modified, check this out!

@tafaRU
Copy link
Member Author

tafaRU commented Oct 3, 2024

Tests are failing due to https://github.com/OCA/field-service/blob/cf1f50e498036043ac08c41ed3ac803fdef1f446/fieldservice_stock_account/models/fsm_order.py#L52 is no longer raised.
@OCA/field-service-maintainers is it reasonable to fix them by removing assertRaises here?

@max3903 max3903 added this to the 14.0 milestone Oct 8, 2024
@max3903
Copy link
Member

max3903 commented Oct 10, 2024

@OCA/field-service-maintainers is it reasonable to fix them by removing assertRaises here?

👍

@max3903 max3903 self-assigned this Oct 10, 2024
@tafaRU tafaRU force-pushed the 14.0-fix-fieldservice_account_analytic branch from 27b562b to 8ef45b0 Compare October 14, 2024 10:31
…M Order

When customer_id is not set in the order we have:

> "customer_id" not in vals and order.customer_id is False
> False

> "customer_id" not in vals and not order.customer_id
> True
@tafaRU tafaRU force-pushed the 14.0-fix-fieldservice_account_analytic branch from 8ef45b0 to 12218a8 Compare October 14, 2024 10:41
@tafaRU
Copy link
Member Author

tafaRU commented Oct 14, 2024

@OCA/field-service-maintainers the PR now should be ready to be merged. Thank you in advance!

@max3903
Copy link
Member

max3903 commented Oct 14, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-1219-by-max3903-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 23aa6b3 into OCA:14.0 Oct 14, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a33fc4b. Thanks a lot for contributing to OCA. ❤️

@tafaRU tafaRU deleted the 14.0-fix-fieldservice_account_analytic branch October 14, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants