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

[16.0][IMP] repair_order_type: Add api.depends to api.onchange #99

Closed

Conversation

unaiberis
Copy link
Contributor

No description provided.

@unaiberis unaiberis force-pushed the 16.0-imp-repair_order_type branch 2 times, most recently from 4a3b028 to eb0fe8e Compare July 22, 2024 11:00
@oihane oihane force-pushed the 16.0-imp-repair_order_type branch from eb0fe8e to 14e1e93 Compare July 23, 2024 13:16
Comment on lines +20 to +29
@api.depends("repair_id.type_id")
def _compute_location_id(self):
res = super()._compute_location_id()
if self.type == "add":
self.location_id = self.repair_id.type_id.location_id.id
self.location_dest_id = self.repair_id.type_id.location_dest_id.id
else:
self.location_id = self.repair_id.type_id.location_dest_id.id
self.location_dest_id = self.repair_id.type_id.location_id.id
return res
Copy link
Contributor

Choose a reason for hiding this comment

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

No estas teniendo en cuenta que el compute se ejecuta de forma múltiple, y debe de modificarse también en el caso de que se cambie el type

@oihane
Copy link
Contributor

oihane commented Jul 23, 2024

@anajuaristi la combinación de módulos repair_type y repair_type_sequence de OCA es prácticamente igual a este modulo.

@unaiberis unaiberis closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants