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

[17.0][FIX] crm_operating_unit: warning in logs #718

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

gurneyalex
Copy link
Member

When crm_operating_unit is installed, warning messages are sent to the Odoo logs:

WARNING odoodb_test odoo.fields: Redundant default on crm.lead.operating_unit_id

This is caused by the setting of a default value on a related field.

We change the field to be computed, read-only with a compute method which implements the logic of the default value in case the team of the lead does not have an operating unit.

When crm_operating_unit is installed, warning messages are sent to the
Odoo logs:

WARNING odoodb_test odoo.fields: Redundant default on crm.lead.operating_unit_id

This is caused by the setting of a default value on a related field.

We change the field to be computed, read-only with a compute method
which implements the logic of the default value in case the team of the
lead does not have an operating unit.
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM

)

@api.depends("team_id.operating_unit_id")
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we add the team_id also in the api.depends?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants