-
-
Notifications
You must be signed in to change notification settings - Fork 34
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][ADD] repair_part_source_location #67
base: 17.0
Are you sure you want to change the base?
Conversation
90697bf
to
3fe6650
Compare
@api.onchange("picking_type_id") | ||
def _onchange_picking_type_id(self): | ||
if self.picking_type_id: | ||
self.parts_source_location_id = self.picking_type_id.default_location_src_id |
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.
Onchanges are being replaced by computed methods, whenever possible.
Could you change it to a computed field, just like the other fields in this model. E.g.:
|
||
|
||
class StockMove(models.Model): | ||
_inherit = "stock.move" |
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.
If this ends up being empty like this, better to just remove it
class StockMove(models.Model): | |
_inherit = "stock.move" |
MAP_REPAIR_LINE_TYPE_TO_MOVE_LOCATIONS_FROM_REPAIR, | ||
) | ||
|
||
MAP_REPAIR_LINE_TYPE_TO_MOVE_LOCATIONS_FROM_REPAIR["add"] = { |
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.
I have weird feelings about patching this.
It seems this variable is only used in the stock.move._get_repair_locations
method, and that seems easy to override.
I think it'd be much cleaner to do that instead
This PR has the |
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.
It may be conflicting with @imlopes can you check? |
I agreed with you @ivantodorovich |
No description provided.